3.1 KiB
3.1 KiB
Quick Start Guide
Start the Application
Option 1: Use the Start Script (Recommended)
# Terminal 1 - Start MySQL
docker-compose up
# Terminal 2 - Start Application
./start_application.sh
Option 2: Manual Start
# Terminal 1 - MySQL
docker-compose up
# Terminal 2 - Backend (Deno)
cd backend-deno
deno task dev
# Terminal 3 - Frontend
npm install # First time only
npm run dev
Prerequisites
- Deno - Install with:
curl -fsSL https://deno.land/install.sh | sh - Docker - For MySQL database
- Node.js - For frontend only
Access the Application
- Frontend: http://localhost:5173
- Backend API: http://localhost:3000
- MySQL: localhost:3306
Default Login
- Username:
admin - Password:
admin123
⚠️ Important: Change the default password after first login!
Database Credentials
- Host: localhost
- Port: 3306
- Database: work_allocation
- User: workalloc_user
- Password: workalloc_pass
- Root Password: rootpassword
Useful Commands
Docker Management
# Stop MySQL
docker-compose down
# Stop and remove all data
docker-compose down -v
# View MySQL logs
docker-compose logs -f mysql
# Access MySQL CLI
docker-compose exec mysql mysql -u root -prootpassword work_allocation
Application Management
# Stop services (Ctrl+C in the terminal running docker-compose up) or docker-compose down
# View backend logs
tail -f backend.log
# View frontend logs
tail -f frontend.log
Next Steps
- Login with admin credentials
- Create Departments (already created: Tudki, Dana, Groundnut)
- Create Supervisors for each department
- Create Contractors and set their rates
- Create Employees and assign to contractors
- Start Managing work allocations and attendance
System Features
For SuperAdmin
- Manage all users across all departments
- Create and manage departments
- View all data system-wide
For Supervisors
- Manage employees and contractors in their department
- Create work allocations
- Check-in/check-out employees
- Set contractor rates
- Mark work as completed
For Contractors
- View work allocations assigned to them
- View employees under them
For Employees
- View their work allocations
- View their attendance records
- See contractor rates
Troubleshooting
Backend won't connect to database
# Check if MySQL is running
docker-compose ps
# Restart MySQL
docker-compose restart mysql
Port conflicts
If port 3306 or 3000 is already in use:
# Stop conflicting services
sudo systemctl stop mysql # If local MySQL is running
# Or change ports in docker-compose.yml and backend/.env
Need to reset database
docker-compose down -v
./setup-docker.sh
Documentation
- Full Setup Guide:
SETUP_GUIDE.md - Docker Details:
DOCKER_SETUP.md - Backend API:
backend/README.md - Architecture:
architecture.md
Support
For issues or questions, refer to the documentation files or check the logs:
- Backend:
backend.log - Frontend:
frontend.log - MySQL:
docker-compose logs mysql