A modern full-stack application for managing class schedules, teachers, subjects, and departments at educational institutions.
- FastAPI: Modern, fast Python web framework
- SQLAlchemy: SQL toolkit and ORM
- Pydantic: Data validation using Python type annotations
- SQLite: Database (easily switchable to PostgreSQL)
- Uvicorn: ASGI server
- React: UI library
- Material-UI (MUI): React component library
- React Router: Navigation
- Axios: HTTP client
- Vite: Build tool
kec-routine-scheduler/
├── backend/
│ ├── app/
│ │ ├── api/
│ │ │ └── routes/ # API endpoints
│ │ ├── core/ # Config & database
│ │ ├── models/ # Database models
│ │ ├── schemas/ # Pydantic schemas
│ │ ├── services/ # Business logic
│ │ └── main.py # FastAPI app
│ ├── requirements.txt
│ └── run.py
├── frontend/
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── pages/ # Page components
│ │ ├── services/ # API services
│ │ ├── App.jsx
│ │ └── main.jsx
│ ├── package.json
│ └── vite.config.js
└── README.md
- Python 3.8+
- Node.js 16+
- npm or yarn
- Navigate to the backend directory:
cd backend- Create a virtual environment:
python -m venv venv
.\venv\Scripts\Activate.ps1- Install dependencies:
pip install -r requirements.txt- Create a
.envfile (copy from.env.example):
copy .env.example .env- Run the backend server:
python run.pyThe API will be available at http://localhost:8000
- API Documentation:
http://localhost:8000/docs - Alternative docs:
http://localhost:8000/redoc
- Navigate to the frontend directory:
cd frontend- Install dependencies:
npm install- Start the development server:
npm run devThe frontend will be available at http://localhost:3000
- ✅ Department management (CRUD)
- ✅ Teacher management (CRUD)
- ✅ Subject management (CRUD)
- ✅ Class management (CRUD)
- ✅ Schedule management
- ✅ Responsive UI with Material-UI
- ✅ RESTful API with FastAPI
- ✅ Database models with SQLAlchemy
- 🔄 Advanced schedule generation
- 🔄 Conflict detection
- 🔄 PDF export for schedules
- 🔄 User authentication
- 🔄 Role-based access control
GET /api/departments- Get all departmentsPOST /api/departments- Create a departmentGET /api/departments/{id}- Get department by IDPUT /api/departments/{id}- Update departmentDELETE /api/departments/{id}- Delete department
GET /api/teachers- Get all teachersPOST /api/teachers- Create a teacherGET /api/teachers/{id}- Get teacher by IDPUT /api/teachers/{id}- Update teacherDELETE /api/teachers/{id}- Delete teacher
GET /api/subjects- Get all subjectsPOST /api/subjects- Create a subjectGET /api/subjects/{id}- Get subject by IDPUT /api/subjects/{id}- Update subjectDELETE /api/subjects/{id}- Delete subject
GET /api/schedules- Get all schedulesPOST /api/schedules- Create a scheduleGET /api/schedules/class/{id}- Get schedule by classGET /api/schedules/teacher/{id}- Get schedule by teacherDELETE /api/schedules/{id}- Delete schedule
# Backend tests
cd backend
pytest
# Frontend tests
cd frontend
npm testcd backend
# Set production environment variables
# Deploy using gunicorn or similar ASGI servercd frontend
npm run build
# Deploy the dist/ folder to a web serverThe application uses Alembic for database migrations (optional):
cd backend
alembic revision --autogenerate -m "Description"
alembic upgrade head- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License.
For issues and questions, please open an issue on GitHub.