190 lines
3.2 KiB
Markdown
190 lines
3.2 KiB
Markdown
# Dashboard Manajemen Layanan Server Private Berbasis Web
|
|
|
|
Minmon is a student-friendly web application for managing private servers, hosted services, attached domains, and internal server notes. The system focuses on CRUD operations plus lightweight DNS monitoring, not deployment automation.
|
|
|
|
## Final Project Scope
|
|
|
|
This app allows an admin to:
|
|
|
|
- Manage servers
|
|
- Manage services running on each server
|
|
- Manage domains attached to services
|
|
- Manage notes/documentation for each server
|
|
- Run DNS A-record checks and compare resolved IPs with the expected server IP
|
|
- View a dashboard summary
|
|
|
|
## Main Features
|
|
|
|
- Better-auth admin login
|
|
- Dashboard summary for:
|
|
- total servers
|
|
- total services
|
|
- total domains
|
|
- matched domains
|
|
- mismatched domains
|
|
- unresolved domains
|
|
- inactive/down services
|
|
- recent notes
|
|
- Server CRUD
|
|
- Service CRUD
|
|
- Domain CRUD
|
|
- DNS check action
|
|
- Server notes CRUD
|
|
- Sample seeded admin and demo dataset
|
|
|
|
## Database / Entity Overview
|
|
|
|
### Server
|
|
|
|
- id
|
|
- name
|
|
- primaryIpAddress
|
|
- secondaryIpAddress
|
|
- operatingSystem
|
|
- location
|
|
- provider
|
|
- description
|
|
- status
|
|
- createdAt
|
|
- updatedAt
|
|
|
|
### Service
|
|
|
|
- id
|
|
- serverId
|
|
- name
|
|
- type
|
|
- internalPort
|
|
- externalPort
|
|
- protocol
|
|
- status
|
|
- description
|
|
- createdAt
|
|
- updatedAt
|
|
|
|
### Domain
|
|
|
|
- id
|
|
- serviceId
|
|
- name
|
|
- expectedServerIp
|
|
- lastResolvedIp
|
|
- lastResolvedIps
|
|
- resolutionStatus
|
|
- lastCheckedAt
|
|
- remarks
|
|
- lastCheckMessage
|
|
- createdAt
|
|
- updatedAt
|
|
|
|
### Note
|
|
|
|
- id
|
|
- serverId
|
|
- title
|
|
- content
|
|
- category
|
|
- createdAt
|
|
- updatedAt
|
|
|
|
### Relationships
|
|
|
|
- One server has many services
|
|
- One server has many notes
|
|
- One service belongs to one server
|
|
- One service has many domains
|
|
- One domain belongs to one service
|
|
|
|
## Tech Stack
|
|
|
|
- React
|
|
- TanStack Router
|
|
- tRPC
|
|
- PostgreSQL
|
|
- Drizzle ORM
|
|
- better-auth
|
|
- Effect (used narrowly for DNS checking)
|
|
- Bun
|
|
- Turborepo
|
|
|
|
## Local Run Instructions
|
|
|
|
1. Install dependencies
|
|
|
|
```bash
|
|
bun install
|
|
```
|
|
|
|
2. Create `apps/server/.env`
|
|
|
|
```env
|
|
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/minmon
|
|
BETTER_AUTH_SECRET=your-32-char-or-longer-secret-value-here
|
|
BETTER_AUTH_URL=http://localhost:3000
|
|
CORS_ORIGIN=http://localhost:5173
|
|
NODE_ENV=development
|
|
```
|
|
|
|
3. Start PostgreSQL if needed
|
|
|
|
```bash
|
|
bun run db:start
|
|
```
|
|
|
|
4. Apply database schema
|
|
|
|
```bash
|
|
bun run db:push
|
|
```
|
|
|
|
5. Seed sample data
|
|
|
|
```bash
|
|
bun run --filter @minmon/db db:seed
|
|
```
|
|
|
|
Seeded admin:
|
|
|
|
- Email: `admin@minmon.local`
|
|
- Password: `admin12345`
|
|
|
|
6. Run the application
|
|
|
|
```bash
|
|
bun run dev
|
|
```
|
|
|
|
7. Open the app
|
|
|
|
- Web: `http://localhost:5173`
|
|
- API: `http://localhost:3000`
|
|
|
|
## Project Structure
|
|
|
|
```text
|
|
minmon/
|
|
├── apps/
|
|
│ ├── web/
|
|
│ └── server/
|
|
├── packages/
|
|
│ ├── api/
|
|
│ ├── auth/
|
|
│ ├── db/
|
|
│ ├── env/
|
|
│ └── ui/
|
|
└── docs/
|
|
```
|
|
|
|
## Extra Assignment Deliverables
|
|
|
|
See:
|
|
|
|
- `docs/run-instructions.md`
|
|
- `docs/uml-guidance.md`
|
|
- `docs/report-outline.md`
|
|
|
|
## Notes
|
|
|
|
- DNS checking is limited to A record / IPv4 as required.
|
|
- This is not a deployment platform and does not include SSH, Docker orchestration, or reverse proxy automation.
|
|
- Full workspace typecheck is still blocked by a pre-existing desktop typing issue for `three`, but the web app and server app are verified.
|