Intelligent scheduling application powered by constraint optimization with comprehensive employee management
# Clone the repository
git clone https://github.com/yourusername/AI-Schedule-Manager.git
cd AI-Schedule-Manager
# Start with Docker Compose
docker-compose up -d
# Access the application
# Frontend: http://localhost:3000
# API: http://localhost:8000
# API Documentation: http://localhost:8000/docs
# Task Monitor: http://localhost:5555- Download the installer:
AI-Schedule-Manager-Setup.exe - Run the installer and follow the wizard
- Launch from Start Menu or Desktop shortcut
- The application runs locally on your machine
- Complete CRUD Operations: Create, read, update, delete employees
- Role-Based Access Control (RBAC): Admin, Manager, User, Guest roles
- Advanced Search & Filtering: Search by name/email, filter by department/role/status
- Extended Employee Fields: Qualifications, availability schedules, hourly rates
- Password Management: Secure reset and change with history tracking
- Account Status Management: Active, inactive, locked, verified states
- Comprehensive Audit Trails: Track all department, role, and status changes
- Pagination & Sorting: Handle large employee datasets efficiently
- Structured Input: Define scheduling rules and constraints
- Rule Engine: Automatically applies rules to schedule generation
- Constraint-Based: Rules are enforced through optimization algorithms
- Constraint Optimization: Advanced constraint-based scheduling algorithms
- Multi-objective: Balances coverage, cost, preferences, and fairness
- Conflict Detection: Identifies and prevents scheduling conflicts
- Scalable: Handles up to 100 employees across 24/7 operations
- Cost Optimization: Minimizes labor costs while meeting requirements
- Compliance: Ensures labor law compliance (breaks, maximum hours)
- Security: JWT authentication, CSRF protection, input sanitization
- Audit Logging: Complete audit trails for compliance
The system supports:
β’ Employee availability management
β’ Shift coverage requirements
β’ Workload balancing and fairness
β’ Maximum hours and labor law compliance
β’ Department-based scheduling
β’ Conflict detection and resolution
β’ Schedule optimization for cost efficiency
All components use commercial-friendly open source licenses:
- Backend: FastAPI (Python) - High-performance async API
- Database: PostgreSQL - Reliable data storage with SQLAlchemy ORM
- Frontend: React + Material-UI (MUI) - Modern, responsive interface
- Scheduling: Constraint-based optimization algorithms
- Deployment: Docker - Simple, consistent deployment
- Authentication: JWT-based secure authentication
- Python 3.9+
- Node.js 18+
- PostgreSQL 15+
- Redis 7+
cd backend
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -e .
# Set environment variables
cp .env.example .env
# Edit .env with your database credentials
# Initialize database
alembic upgrade head
# Start backend
uvicorn src.main:app --reloadcd frontend
# Install dependencies
npm install
# Set API endpoint
echo "REACT_APP_API_URL=http://localhost:8000" > .env
# Start development server
npm start# Backend (.env)
DATABASE_URL=postgresql://user:pass@localhost/scheduledb
REDIS_URL=redis://localhost:6379
SECRET_KEY=your-secret-key-change-in-production
CORS_ORIGINS=http://localhost:3000
# Frontend (.env)
REACT_APP_API_URL=http://localhost:8000Once running, access interactive API docs at:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
- Comprehensive API Reference:
/docs/API_REFERENCE.md
# Authentication
POST /api/auth/login # User login with JWT
POST /api/auth/register # Register new user
POST /api/auth/refresh # Refresh access token
POST /api/auth/logout # Logout and revoke token
# Employee CRUD
GET /api/employees # List employees (search, filter, sort, paginate)
GET /api/employees/{id} # Get specific employee
POST /api/employees # Create employee (admin/manager)
PATCH /api/employees/{id} # Update employee (admin/manager)
DELETE /api/employees/{id} # Delete employee (admin only)
# Password Management
POST /api/employees/{id}/reset-password # Reset password (admin only)
PATCH /api/employees/{id}/change-password # Change password (self/admin)
# Account Status
PATCH /api/employees/{id}/status # Update account status (admin only)
GET /api/employees/{id}/status-history # View status change history
# Role Management
PATCH /api/employees/{id}/role # Update role (admin only)
GET /api/employees/{id}/role-history # View role change history
# Audit Trails
GET /api/employees/{id}/department-history # View department assignment history
# Scheduling
POST /api/rules/parse # Parse natural language rule
GET /api/schedule/generate # Generate optimized schedule
GET /api/analytics/costs # Labor cost analysisβββββββββββββββββββββββ
β React Frontend β
β (User Interface) β
ββββββββββββ¬βββββββββββ
β
βΌ
βββββββββββββββββββββββ
β FastAPI Backend β
β (API Gateway) β
ββββββββββββ¬βββββββββββ
β
ββββββββΌβββββββ
βΌ βΌ βΌ
ββββββββββ ββββββββββ ββββββββββ
β NLP β βScheduleβ βBusinessβ
β Engine β β Solver β β Logic β
ββββββββββ ββββββββββ ββββββββββ
β β β
ββββββββββββΌβββββββββββ
βΌ
ββββββββββββββββββββ
β PostgreSQL β
β Database β
ββββββββββββββββββββ
# Backend tests
cd backend
pytest tests/ -v --cov=src
# Frontend tests
cd frontend
npm test
# End-to-end tests
npm run test:e2e# Initialize swarm
docker swarm init
# Deploy stack
docker stack deploy -c docker-compose.prod.yml schedule_app
# Scale workers
docker service scale schedule_app_celery=3# Apply configurations
kubectl apply -f k8s/
# Check deployment
kubectl get pods -n schedule-app- Schedule Generation: < 3 seconds for 100 employees
- Rule Parsing: < 500ms per rule
- API Response: < 200ms (p95)
- Concurrent Users: 50+ simultaneous
- Memory Usage: < 512MB typical
- JWT Authentication: Access tokens (15 min) and refresh tokens (30 days)
- Role-Based Access Control (RBAC): Admin, Manager, User, Guest roles
- Resource-Based Authorization: Users can only access their own data
- Token Revocation: Redis-based token blacklisting on logout
- Password Security: bcrypt hashing with salt rounds
- Password History: Prevent reuse of last 5 passwords
- Input Sanitization: HTML escaping to prevent XSS attacks
- SQL Injection Prevention: Parameterized queries via SQLAlchemy ORM
- CSRF Protection: CSRF tokens for state-changing requests
- HTTPS Required: Forced HTTPS in production with HSTS headers
- CORS Protection: Whitelist-based origin validation
- Rate Limiting: Global and endpoint-specific rate limits
- Request Size Limits: 1MB maximum request body
- Security Headers: CSP, X-Frame-Options, X-Content-Type-Options
- Comprehensive Audit Trails: Track all employee, role, department, and status changes
- Security Event Logging: Log authentication attempts and permission denials
- Account Lockout: Automatic lockout after failed login attempts
Comprehensive documentation is available in the /docs directory:
- API Reference: Complete endpoint documentation with examples
- Developer Guide: Local development setup and contribution guide
- User Guide: End-user documentation for all features
- Migration Guide: Database migration and deployment procedures
- β Complete employee CRUD operations
- β JWT authentication and authorization
- β Role-based access control (Admin, Manager, User, Guest)
- β Department assignment with validation
- β Qualifications tracking (max 20 per employee)
- β Weekly availability schedules
- β Hourly rate management (0.00-1000.00)
- β Maximum hours per week limits
- β Password reset (admin-initiated)
- β Password change (self-service)
- β Password history tracking (last 5 passwords)
- β Account status management (active, locked, verified)
- β Comprehensive input validation
- β XSS and SQL injection prevention
- β Department assignment history
- β Role change history
- β Account status change history
- β Advanced search and filtering
- β Pagination and sorting
- β Performance optimization (N+1 query prevention)
We welcome contributions! Please see our documentation:
- Developer Guide: Setup and contribution guidelines
- API Reference: API endpoint specifications
- Issues: GitHub Issues
MIT License - Free for commercial use. See LICENSE for details.
- Documentation: See
/docsdirectory for comprehensive guides - API Docs: http://localhost:8000/docs (interactive Swagger UI)
- Issues: GitHub Issues
- Email: support@aischedulemanager.com
β Free and open source β Flexible rule-based scheduling β Self-hosted (keep your data)
β No monthly fees β Advanced constraint optimization β Unlimited rules and constraints
β Intelligent optimization β Department-based management β Customizable and extensible
- Google OR-Tools constraint solver integration
- Natural language processing for rule parsing
- Mobile app (React Native)
- Advanced analytics dashboard
- Multi-location support
- Payroll system integration
- Time clock integration
- Automated shift trading
- Predictive scheduling with ML
Built with β€οΈ for small business owners by the open source community