A comprehensive field service management system for roofing companies with region-based queue management.
- React 18 with TypeScript
- Vite for build tooling
- Material-UI (MUI) for components
- Tailwind CSS for styling
- Flask with Python 3.11
- Flask-SQLAlchemy for ORM
- Flask-JWT-Extended for authentication
- MySQL database
- Docker & Docker Compose
- Nginx for production
- Environment-based configuration
- Docker and Docker Compose
- jq (for JSON parsing in scripts)
- curl (for API calls)
-
Start the application:
make dev-bg
-
Add test data:
./scripts/add_test_data.sh
-
Access the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- Admin Login: admin@triguardroofing.com / admin123
-
Update production environment files:
- Update
backend/.env.prod
with production values - Update
frontend/.env.prod
with production API URL - Update
secrets/
files with secure passwords
- Update
-
Deploy:
make prod # or npm run prod
make setup # Install dependencies
make dev # Start development environment
make dev-bg # Start development in background
make prod # Start production environment
make logs # View development logs
make down # Stop all containers
make clean # Clean Docker system
npm run dev # Start development
npm run prod # Start production
npm run dev:down # Stop development
npm run clean # Clean Docker system
Dispatch_Tool/
βββ docs/ # Documentation
β βββ SETUP.md # Complete setup guide
β βββ CALL_CENTER_API.md # Call center API documentation
β βββ DEPLOYMENT.md # Production deployment guide
β βββ REGION_SYSTEM_IMPLEMENTATION.md # Technical details
βββ scripts/ # Setup and utility scripts
β βββ add_test_data.sh # Populate system with test data
β βββ deploy.sh # Production deployment script
βββ frontend/ # React TypeScript frontend
β βββ src/ # Source code
β βββ package.json # Frontend dependencies
βββ backend/ # Flask Python backend
β βββ app.py # Main application file
β βββ routes/ # API endpoints
β βββ requirements.txt # Python dependencies
βββ mysql/ # Database configuration
β βββ init/ # Database initialization scripts
βββ docker-compose.yml # Development configuration
βββ Makefile # Development commands
βββ README.md # This file
- Setup Guide - Complete installation and setup instructions
- Call Center API - External API documentation for appointment creation
- Deployment Guide - Production deployment instructions
- Region System - Technical implementation details
- Notifications - Environment-aware SMS and email system
- Region-based Queue Management - Organize teams and appointments by geographic regions
- Role-based Access Control - Admin, Dispatcher, Field Agent, and Call Center roles
- Real-time Updates - Live status updates and notifications
- Call Center API - External API for appointment creation
- Comprehensive Dashboard - Multiple queue views and management interfaces
- Frontend runs on port 3000 with hot reload
- Backend runs on port 8000 with debug mode
- MySQL runs on port 3306
The system includes comprehensive test data setup via scripts/add_test_data.sh
:
- 6 Regions (Global + 5 Texas regions)
- 5 Teams (one per region)
- 14 Users (1 admin + 5 dispatchers + 8 field agents)
- 6 Sample appointments
- Update all passwords in production
- Set proper
SECRET_KEY
andJWT_SECRET_KEY
- Use Docker secrets for sensitive data
- Configure firewall rules for EC2 deployment
- Make changes to frontend/backend code
- Changes auto-reload in development mode
- Test using the available endpoints
- Use
make logs
to view application logs - Use
make down
to stop when done
- Development: Access phpMyAdmin at http://localhost:8080
- Production: Use secure database management practices
- Backup:
make backup
(customize as needed)
- Launch EC2 instance with Docker installed
- Clone repository to EC2
- Update production environment files
- Run
make prod-bg
to start in background - Configure security groups for ports 80 and 443
- Set up SSL certificates for production
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.