A full-stack monorepo application for managing and monitoring network services built with TypeScript, Express, and React.
Server Manager is a powerful web application for monitoring and controlling essential network services like DNS (bind), DHCP, and HTTP servers. It features a robust TypeScript/Express backend API and a modern React UI with a clean, responsive dashboard.
The application allows you to:
- Monitor system metrics (CPU, memory, disk usage, uptime)
- Start, stop, and restart network services (named, dhcpd, httpd)
- Configure DNS zones and records with bind integration
-
View service status and logs
-
Manage user accounts with authentication
- Language: TypeScript
- Runtime: Node.js
- Framework: Express
- Database: SQLite with Drizzle ORM
- Validation: Zod (via shared package)
- Authentication: JWT tokens with bcrypt password hashing
- Development Tools: ESLint, Prettier, Nodemon, Jest
- Language: TypeScript
- Framework: React 18
- UI Components: Custom component library with shadcn/ui
- Styling: Tailwind CSS
- Icons: Lucide React
- Build Tool: Vite
- Testing: Vitest
- State Management: React Hook Form
- HTTP Client: Fetch API with custom wrapper
- Types: Shared TypeScript interfaces and types
- Validators: Zod schemas for data validation
- Transformers: Data transformation utilities
- Monorepo: Turborepo with pnpm workspaces
- Package Manager: pnpm
- Containerization: Docker support
ts-node-express/
├── apps/
│ ├── backend/ # Express API server
│ │ ├── src/
│ │ │ ├── controllers/ # API route controllers
│ │ │ │ ├── authController.ts
│ │ │ │ ├── dnsController.ts
│ │ │ │ ├── httpController.ts
│ │ │ │ ├── servicesController.ts
│ │ │ │ ├── systemMetricsController.ts
│ │ │ │ └── usersController.ts
│ │ │ ├── db/ # Database configuration
│ │ │ ├── lib/ # Utility libraries
│ │ │ ├── middlewares/ # Express middlewares
│ │ │ ├── models/ # Data models
│ │ │ ├── routes/ # API route definitions
│ │ │ └── types/ # Type definitions
│ │ ├── drizzle/ # Database migrations
│ │ └── test/ # API tests and config files
│ └── ui/ # React frontend application
│ └── src/
│ ├── components/ # Reusable UI components
│ ├── features/ # Feature-specific components
│ │ ├── configuration/
│ │ │ ├── dns/
│ │ │ ├── dhcp/
│ │ │ └── http/
│ │ ├── dashboard/
│ │ └── services/
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Frontend utilities and API clients
│ └── pages/ # Page components
├── packages/
│ └── shared/ # Shared code between apps
│ └── src/
│ ├── types/ # TypeScript type definitions
│ └── validators/ # Zod validation schemas
├── docs/ # Documentation
└── Configuration files (package.json, turbo.json, etc.)
- Node.js 18+
- pnpm package manager
- Clone the repository:
git clone https://github.com/bernoussama/server-manager.git
cd server-manager- Install dependencies using pnpm workspaces:
pnpm install- Set up environment variables:
# Copy example environment file
cp apps/backend/.env.example apps/backend/.env
# Edit the .env file with your configuration- Set up the database:
# Generate and run database migrations
cd apps/backend
pnpm dlx drizzle-kit generate
pnpm dlx drizzle-kit pushStart all applications in development mode:
# From root directory
pnpm devOr start individual applications:
# Start backend only
cd apps/backend && pnpm dev
# Start frontend only (in a new terminal)
cd apps/ui && pnpm devYour backend API will run at http://localhost:3000 and the UI will be available at http://localhost:5173.
Build all applications:
pnpm buildRun in production mode:
# Start backend
cd apps/backend && pnpm start
# Serve frontend (after building)
cd apps/ui && pnpm previewPOST /api/auth/signup- Register a new userPOST /api/auth/login- Login user
GET /api/services- Get all services statusGET /api/services/:service- Get specific service statusPOST /api/services/:service/start- Start a servicePOST /api/services/:service/stop- Stop a servicePOST /api/services/:service/restart- Restart a service
GET /api/dns/config- Get DNS configurationPUT /api/dns/config- Update DNS configuration
GET /api/http/config- Get HTTP configurationPUT /api/http/config- Update HTTP configurationPOST /api/http/validate- Validate HTTP configurationGET /api/http/status- Get HTTP service statusPOST /api/http/service/:action- Control HTTP service
GET /api/system-metrics- Get system performance metrics
GET /api/users- Get all usersGET /api/users/:id- Get specific userPOST /api/users- Create a userPUT /api/users/:id- Update a userDELETE /api/users/:id- Delete a user
Run tests for the entire monorepo:
pnpm testRun tests for individual applications:
# Backend tests
cd apps/backend && pnpm test
# Frontend tests
cd apps/ui && pnpm test
# Shared package tests
cd packages/shared && pnpm testpnpm dev- Start all applications in development modepnpm build- Build all applicationspnpm test- Run tests for all packagespnpm lint- Lint all packagespnpm format- Format code in all packages
pnpm start- Run production buildpnpm dev- Run development server with hot reloadpnpm build- Build for productionpnpm lint- Run ESLintpnpm format- Format code with Prettierpnpm test- Run Jest tests
pnpm dev- Run development serverpnpm build- Build for productionpnpm preview- Preview production buildpnpm lint- Run ESLintpnpm test- Run Vitest tests
pnpm build- Build shared packagepnpm test- Run testspnpm lint- Run ESLint
The application follows a modern monorepo architecture:
- Turborepo: Manages the monorepo with optimized build caching and task orchestration
- Shared Package: Contains common types, validators, and utilities used by both frontend and backend
- Type Safety: End-to-end type safety with shared TypeScript interfaces
- API-First Design: RESTful API with comprehensive validation using Zod schemas
- Component-Based UI: Modular React components with feature-based organization
The backend includes Docker support:
# Build Docker image
cd apps/backend
docker build -t server-manager-backend .
# Run with Docker
docker run -p 3000:3000 server-manager-backendContributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the GPLv3 License.
Project Link: https://github.com/bernoussama/server-manager

