Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Inserv

Modern Server & Service Management Dashboard

A beautiful, intuitive dashboard for managing your servers, services, and credentials in one place.

Go React Tailwind License

FeaturesQuick StartAPI DocumentationContributing


📋 Table of Contents

✨ Features

Core Functionality

  • 🔐 Secure Authentication - JWT-based login and registration system
  • 🖥️ Server Management - Complete CRUD operations for servers with environment categorization (dev/staging/production)
  • 🔑 Multiple Credentials - Store and manage multiple username/password combinations per server
  • ⚙️ Service Management - Track services running on each server with port mapping and credentials
  • 📊 Dashboard Analytics - Real-time statistics and recent server activity overview
  • 🌙 Modern UI/UX - Dark mode with glassmorphism design for a premium experience

🛠 Tech Stack

Frontend

  • Framework: React 19 with TypeScript
  • Build Tool: Vite
  • Styling: Tailwind CSS v4
  • Runtime: Bun

Backend

  • Language: Go 1.25
  • Framework: Gin
  • Authentication: JWT

Database

  • SQLite - Lightweight and embedded

🚀 Quick Start

Prerequisites

Before you begin, ensure you have the following installed:

  • Go (1.25 or higher)
  • Bun (for frontend)
  • Docker & Docker Compose (optional, for containerized deployment)

Development Mode

1. Clone the repository

git clone https://github.com/yourusername/inserv.git
cd inserv

2. Start the Backend

cd backend
cp .env.example .env
# Edit .env with your configuration

# Generate a secure JWT secret
openssl rand -base64 32

# Update JWT_SECRET in .env with the generated value
go run ./cmd/server

The backend API will be available at http://localhost:8080

3. Start the Frontend

cd frontend
bun install
bun run dev

The frontend will be available at http://localhost:5173

Docker Deployment

For production or quick testing with Docker:

docker compose up -d

The application will be available at http://localhost:3000

📚 API Documentation

Authentication

Method Endpoint Description
POST /api/auth/register Register a new user
POST /api/auth/login Login user
GET /api/auth/me Get current user info

Servers

Method Endpoint Description
GET /api/servers List all servers
POST /api/servers Create a new server
GET /api/servers/:id Get server details
PUT /api/servers/:id Update server
DELETE /api/servers/:id Delete server
GET /api/servers/:id/credentials List server credentials
POST /api/servers/:id/credentials Add credential to server
GET /api/servers/:id/services List server services
POST /api/servers/:id/services Add service to server

Dashboard

Method Endpoint Description
GET /api/dashboard/stats Get dashboard statistics

⚙️ Configuration

Create a .env file in the backend directory with the following variables:

# Server Configuration
ENVIRONMENT=development
PORT=8080

# Database
DATABASE_PATH=./data/inserv.db

# Security
JWT_SECRET=your-super-secret-jwt-key-change-this-in-production

# CORS
ALLOW_ORIGINS=http://localhost:5173

Generating JWT Secret

For production use, generate a secure random JWT secret:

Using OpenSSL (Recommended):

openssl rand -base64 32

Using Node.js:

node -e "console.log(require('crypto').randomBytes(32).toString('base64'))"

Using Python:

python3 -c "import secrets; print(secrets.token_urlsafe(32))"

Copy the generated value and update JWT_SECRET in your .env file.

Environment Variables

Variable Description Default
ENVIRONMENT Application environment (development/production) development
PORT Backend server port 8080
DATABASE_PATH SQLite database file path ./data/inserv.db
JWT_SECRET Secret key for JWT token generation -
ALLOW_ORIGINS CORS allowed origins (comma-separated) http://localhost:5173

📁 Project Structure

inserv/
├── backend/              # Go backend application
│   ├── cmd/             # Application entrypoints
│   │   └── server/      # Main server application
│   ├── internal/        # Private application code
│   │   ├── config/      # Configuration management
│   │   ├── database/    # Database layer
│   │   ├── handlers/    # HTTP request handlers
│   │   ├── middleware/  # HTTP middleware
│   │   ├── models/      # Data models
│   │   └── routes/      # Route definitions
│   └── data/            # SQLite database storage
├── frontend/            # React frontend application
│   ├── src/
│   │   ├── components/  # React components
│   │   ├── pages/       # Page components
│   │   ├── services/    # API services
│   │   ├── hooks/       # Custom React hooks
│   │   ├── types/       # TypeScript types
│   │   └── utils/       # Utility functions
│   └── public/          # Static assets
└── docker-compose.yml   # Docker composition

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with ❤️ by the Inserv Team

⬆ back to top

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages