{"id":40973276,"url":"https://github.com/bernoussama/server-manager","last_synced_at":"2026-01-22T06:46:49.348Z","repository":{"id":290446207,"uuid":"973804021","full_name":"bernoussama/server-manager","owner":"bernoussama","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-17T19:41:52.000Z","size":1445,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-18T05:48:55.545Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bernoussama.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-04-27T19:12:35.000Z","updated_at":"2026-01-17T19:41:55.000Z","dependencies_parsed_at":"2025-05-17T14:23:15.234Z","dependency_job_id":"a825a14d-af29-48ed-bb9a-14604ece70e2","html_url":"https://github.com/bernoussama/server-manager","commit_stats":null,"previous_names":["bernoussama/server-manager"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bernoussama/server-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernoussama%2Fserver-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernoussama%2Fserver-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernoussama%2Fserver-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernoussama%2Fserver-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bernoussama","download_url":"https://codeload.github.com/bernoussama/server-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bernoussama%2Fserver-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28657222,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-22T06:46:48.619Z","updated_at":"2026-01-22T06:46:49.338Z","avatar_url":"https://github.com/bernoussama.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Server Manager\n\nA full-stack monorepo application for managing and monitoring network services built with TypeScript, Express, and React.\n\n![License](https://img.shields.io/badge/license-GPLv3-blue.svg)\n![TypeScript](https://img.shields.io/badge/TypeScript-5.1.6-blue)\n![Node.js](https://img.shields.io/badge/Node.js-18+-green)\n![Express](https://img.shields.io/badge/Express-4.18.2-lightblue)\n![React](https://img.shields.io/badge/React-18.3.1-61DAFB)\n[![CI](https://github.com/bernoussama/server-manager/actions/workflows/ci.yml/badge.svg)](https://github.com/bernoussama/server-manager/actions/workflows/ci.yml)\n\n## 📋 Overview\n\nServer 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.\n\nThe application allows you to:\n\n- Monitor system metrics (CPU, memory, disk usage, uptime)\n\u003cimg width=\"1600\" height=\"860\" alt=\"image\" src=\"https://github.com/user-attachments/assets/e2ec6b5e-48bc-4573-a938-4c6a0825e947\" /\u003e\n\n  \n- Start, stop, and restart network services (named, dhcpd, httpd)\n\u003cimg width=\"1600\" height=\"860\" alt=\"image\" src=\"https://github.com/user-attachments/assets/00d614dd-2b1c-44a4-a58e-46ef6cc04c66\" /\u003e\n\n  \n- Configure DNS zones and records with bind integration\n\u003cimg width=\"1600\" height=\"860\" alt=\"image\" src=\"https://github.com/user-attachments/assets/d897c207-cfc0-42d1-82e0-aa3c8ecedb6a\" /\u003e\n\u003cimg width=\"1600\" height=\"860\" alt=\"image\" src=\"https://github.com/user-attachments/assets/46ed9115-5e2e-4f70-ad08-4c01d18ce7d9\" /\u003e\n\n- Configure HTTP virtual hosts and Apache settings\n  \u003cimg width=\"1600\" height=\"860\" alt=\"image\" src=\"https://github.com/user-attachments/assets/473fc569-71a5-49fc-9599-56a1431e3abb\" /\u003e\n\n- Configure DHCP server settings\n  \u003cimg width=\"1600\" height=\"860\" alt=\"image\" src=\"https://github.com/user-attachments/assets/55dc9ddd-b6d6-44ae-b26c-aa290c7cd4d6\" /\u003e\n\n- View service status and logs\n- Manage user accounts with authentication\n\n## 🔧 Tech Stack\n\n### Backend (`apps/backend`)\n- **Language**: TypeScript\n- **Runtime**: Node.js\n- **Framework**: Express\n- **Database**: SQLite with Drizzle ORM\n- **Validation**: Zod (via shared package)\n- **Authentication**: JWT tokens with bcrypt password hashing\n- **Development Tools**: ESLint, Prettier, Nodemon, Jest\n\n### Frontend (`apps/ui`)\n- **Language**: TypeScript\n- **Framework**: React 18\n- **UI Components**: Custom component library with shadcn/ui\n- **Styling**: Tailwind CSS\n- **Icons**: Lucide React\n- **Build Tool**: Vite\n- **Testing**: Vitest\n- **State Management**: React Hook Form\n- **HTTP Client**: Fetch API with custom wrapper\n\n### Shared (`packages/shared`)\n- **Types**: Shared TypeScript interfaces and types\n- **Validators**: Zod schemas for data validation\n- **Transformers**: Data transformation utilities\n\n### Infrastructure\n- **Monorepo**: Turborepo with pnpm workspaces\n- **Package Manager**: pnpm\n- **Containerization**: Docker support\n\n## 📁 Project Structure\n\n```\nts-node-express/\n├── apps/\n│   ├── backend/              # Express API server\n│   │   ├── src/\n│   │   │   ├── controllers/  # API route controllers\n│   │   │   │   ├── authController.ts\n│   │   │   │   ├── dnsController.ts\n│   │   │   │   ├── httpController.ts\n│   │   │   │   ├── servicesController.ts\n│   │   │   │   ├── systemMetricsController.ts\n│   │   │   │   └── usersController.ts\n│   │   │   ├── db/           # Database configuration\n│   │   │   ├── lib/          # Utility libraries\n│   │   │   ├── middlewares/  # Express middlewares\n│   │   │   ├── models/       # Data models\n│   │   │   ├── routes/       # API route definitions\n│   │   │   └── types/        # Type definitions\n│   │   ├── drizzle/          # Database migrations\n│   │   └── test/             # API tests and config files\n│   └── ui/                   # React frontend application\n│       └── src/\n│           ├── components/   # Reusable UI components\n│           ├── features/     # Feature-specific components\n│           │   ├── configuration/\n│           │   │   ├── dns/\n│           │   │   ├── dhcp/\n│           │   │   └── http/\n│           │   ├── dashboard/\n│           │   └── services/\n│           ├── hooks/        # Custom React hooks\n│           ├── lib/          # Frontend utilities and API clients\n│           └── pages/        # Page components\n├── packages/\n│   └── shared/               # Shared code between apps\n│       └── src/\n│           ├── types/        # TypeScript type definitions\n│           └── validators/   # Zod validation schemas\n├── docs/                     # Documentation\n└── Configuration files (package.json, turbo.json, etc.)\n```\n\n## 🚀 Getting Started\n\n### Prerequisites\n\n- Node.js 18+\n- pnpm package manager\n\n### Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/bernoussama/server-manager.git\ncd server-manager\n```\n\n2. Install dependencies using pnpm workspaces:\n```bash\npnpm install\n```\n\n3. Set up environment variables:\n```bash\n# Copy example environment file\ncp apps/backend/.env.example apps/backend/.env\n\n# Edit the .env file with your configuration\n```\n\n4. Set up the database:\n```bash\n# Generate and run database migrations\ncd apps/backend\npnpm dlx drizzle-kit generate\npnpm dlx drizzle-kit push\n```\n\n### Running the Application\n\n#### Development Mode\n\nStart all applications in development mode:\n```bash\n# From root directory\npnpm dev\n```\n\nOr start individual applications:\n\n```bash\n# Start backend only\ncd apps/backend \u0026\u0026 pnpm dev\n\n# Start frontend only (in a new terminal)\ncd apps/ui \u0026\u0026 pnpm dev\n```\n\nYour backend API will run at http://localhost:3000 and the UI will be available at http://localhost:5173.\n\n#### Production Build\n\nBuild all applications:\n```bash\npnpm build\n```\n\nRun in production mode:\n```bash\n# Start backend\ncd apps/backend \u0026\u0026 pnpm start\n\n# Serve frontend (after building)\ncd apps/ui \u0026\u0026 pnpm preview\n```\n\n## 🔌 API Endpoints\n\n### Authentication API\n- `POST /api/auth/signup` - Register a new user\n- `POST /api/auth/login` - Login user\n\n### Services API\n- `GET /api/services` - Get all services status\n- `GET /api/services/:service` - Get specific service status\n- `POST /api/services/:service/start` - Start a service\n- `POST /api/services/:service/stop` - Stop a service\n- `POST /api/services/:service/restart` - Restart a service\n\n### DNS API\n- `GET /api/dns/config` - Get DNS configuration\n- `PUT /api/dns/config` - Update DNS configuration\n\n### HTTP API\n- `GET /api/http/config` - Get HTTP configuration\n- `PUT /api/http/config` - Update HTTP configuration\n- `POST /api/http/validate` - Validate HTTP configuration\n- `GET /api/http/status` - Get HTTP service status\n- `POST /api/http/service/:action` - Control HTTP service\n\n### System Metrics API\n- `GET /api/system-metrics` - Get system performance metrics\n\n### Users API\n- `GET /api/users` - Get all users\n- `GET /api/users/:id` - Get specific user\n- `POST /api/users` - Create a user\n- `PUT /api/users/:id` - Update a user\n- `DELETE /api/users/:id` - Delete a user\n\n## 🧪 Testing\n\nRun tests for the entire monorepo:\n```bash\npnpm test\n```\n\nRun tests for individual applications:\n```bash\n# Backend tests\ncd apps/backend \u0026\u0026 pnpm test\n\n# Frontend tests\ncd apps/ui \u0026\u0026 pnpm test\n\n# Shared package tests\ncd packages/shared \u0026\u0026 pnpm test\n```\n\n## 📋 Development Commands\n\n### Root level (affects all workspaces):\n- `pnpm dev` - Start all applications in development mode\n- `pnpm build` - Build all applications\n- `pnpm test` - Run tests for all packages\n- `pnpm lint` - Lint all packages\n- `pnpm format` - Format code in all packages\n\n### Backend (`apps/backend`):\n- `pnpm start` - Run production build\n- `pnpm dev` - Run development server with hot reload\n- `pnpm build` - Build for production\n- `pnpm lint` - Run ESLint\n- `pnpm format` - Format code with Prettier\n- `pnpm test` - Run Jest tests\n\n### Frontend (`apps/ui`):\n- `pnpm dev` - Run development server\n- `pnpm build` - Build for production\n- `pnpm preview` - Preview production build\n- `pnpm lint` - Run ESLint\n- `pnpm test` - Run Vitest tests\n\n### Shared (`packages/shared`):\n- `pnpm build` - Build shared package\n- `pnpm test` - Run tests\n- `pnpm lint` - Run ESLint\n\n## 🏗️ Architecture\n\nThe application follows a modern monorepo architecture:\n\n- **Turborepo**: Manages the monorepo with optimized build caching and task orchestration\n- **Shared Package**: Contains common types, validators, and utilities used by both frontend and backend\n- **Type Safety**: End-to-end type safety with shared TypeScript interfaces\n- **API-First Design**: RESTful API with comprehensive validation using Zod schemas\n- **Component-Based UI**: Modular React components with feature-based organization\n\n## 🐳 Docker Support\n\nThe backend includes Docker support:\n\n```bash\n# Build Docker image\ncd apps/backend\ndocker build -t server-manager-backend .\n\n# Run with Docker\ndocker run -p 3000:3000 server-manager-backend\n```\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the project\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## 📄 License\n\nThis project is licensed under the GPLv3 License.\n\n## 📞 Contact\n\nProject Link: [https://github.com/bernoussama/server-manager](https://github.com/bernoussama/server-manager)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbernoussama%2Fserver-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbernoussama%2Fserver-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbernoussama%2Fserver-manager/lists"}