main
Mobile Contract Manager
A full-stack web application for managing mobile contracts with role-based access control, MFA support, and a modern UI.
Features
- Authentication: JWT-based with MFA (Google Authenticator / TOTP)
- Roles: Admin (full access) and User (read-only)
- MFA: QR code setup via Google Authenticator
- First Login: Forces password change on first login
- Database: PostgreSQL (self-hosted)
- Frontend: React + Tailwind CSS (dark modern UI)
Default Credentials
| Username | Password | Role |
|---|---|---|
| admin | admin | Admin |
You will be prompted to change the password on first login.
Quick Start
-
Clone / extract this project
-
Configure
.env(change passwords and secrets for production!):POSTGRES_PASSWORD=your_secure_password JWT_SECRET=your_super_secret_key_min_32_characters JWT_REFRESH_SECRET=another_super_secret_key_min_32_chars ENCRYPTION_KEY=exactly32characterslongkeyhere123 -
Deploy with Docker Compose:
docker compose up -d -
Access the app at
http://localhost(or port defined in APP_PORT)
Stopping the App
docker compose down
To also remove the database volume (all data):
docker compose down -v
Project Structure
├── backend/ # Node.js/Express API
├── frontend/ # React SPA
├── nginx/ # Reverse proxy config
├── db-init/ # Database initialization SQL
├── docker-compose.yml
└── .env
Security Notes
- Change all
.envsecrets before production deployment - The
ENCRYPTION_KEYmust be exactly 32 characters - Consider using HTTPS (put a TLS-terminating reverse proxy in front)
- Passwords are hashed with bcrypt (cost factor 12)
Languages
JavaScript
99.1%
Dockerfile
0.4%
HTML
0.3%
CSS
0.2%