(Feat): Initial Commit
This commit is contained in:
168
QUICK_START.md
Normal file
168
QUICK_START.md
Normal file
@@ -0,0 +1,168 @@
|
||||
# Quick Start Guide
|
||||
|
||||
|
||||
## Start the Application
|
||||
|
||||
### Option 1: Use the Start Script (Recommended)
|
||||
|
||||
```bash
|
||||
# Terminal 1 - Start MySQL
|
||||
docker-compose up
|
||||
|
||||
# Terminal 2 - Start Application
|
||||
./start_application.sh
|
||||
```
|
||||
|
||||
### Option 2: Manual Start
|
||||
|
||||
```bash
|
||||
# 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
|
||||
|
||||
```bash
|
||||
# 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
|
||||
|
||||
```bash
|
||||
# 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
|
||||
|
||||
1. **Login** with admin credentials
|
||||
2. **Create Departments** (already created: Tudki, Dana, Groundnut)
|
||||
3. **Create Supervisors** for each department
|
||||
4. **Create Contractors** and set their rates
|
||||
5. **Create Employees** and assign to contractors
|
||||
6. **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
|
||||
|
||||
```bash
|
||||
# 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:
|
||||
|
||||
```bash
|
||||
# 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
|
||||
|
||||
```bash
|
||||
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`
|
||||
Reference in New Issue
Block a user