Skip to content

itsmefdil/inserv

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

Features β€’ Quick Start β€’ API Documentation β€’ Contributing


πŸ“‹ 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

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors