A Flask-based backend service for managing and generating academic schedules for Stanford programs. This service provides APIs for program management, profile management, and automated schedule generation based on course requirements and constraints.
- Program Management: Create and manage academic programs with required courses
- Profile Management: Handle student profiles and preferences
- Schedule Generation: Automatically generate optimal course schedules based on:
- Course prerequisites
- Quarter availability
- Program requirements
- Student preferences
- MongoDB Integration: Persistent storage for programs and profiles
- CORS Enabled: Ready for frontend integration
- Python 3.x
- MongoDB
- Required Python packages (see
requirements.txt)
- Clone the repository:
git clone https://github.com/yourusername/StanfordSchedulerBackend.git
cd StanfordSchedulerBackend- Install dependencies:
pip install -r requirements.txt- Configure the application:
- Create an
appsettings.jsonfile in the root directory - Add your MongoDB connection string:
- Create an
{
"DatabaseConnection": {
"ConnectionString": "your_mongodb_connection_string"
}
}POST /solve-user-schedule- Generates a schedule based on program and profile IDs
- Request body:
{"program": "program_id", "profile": "profile_id"}
POST /post-program- Creates a new program
POST /post-program-course- Adds a course to an existing program
POST /post-prereq-course- Adds prerequisites to a program course
POST /post-profile- Creates a new student profile
The backend is structured with the following main components:
src/controller.py: Main Flask application and API endpointssrc/classes/: Core business logic and data modelsconstrain/: Schedule generation logiccomponents/: Data models for courses and other entities
- Start the Flask server:
python src/controller.pyThe server will start in debug mode on the default port (5000).
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Stanford University for academic program information
- Flask framework and its contributors
- MongoDB team for the database solution