Welcome to the CSM Scheduler Intro Project! This repository contains a scaffolded full-stack web application designed to help you learn and practice web development with Django, React, and SCSS.
You act as the engineering team for Computer Science Mentors (CSM). Your goal is to build a simplified version of the Scheduler, the tool used by thousands of Berkeley students to enroll in sections.
The project is split into two parts:
- Backend (Django + PostgreSQL): Handles data storage and API logic.
- Frontend (React + TypeScript + SCSS): Provides the user interface for students.
We have removed complex authentication and attendance.
- Students and Mentors are simplified: they just have a
nameandemail. - Enrolling simply means creating a "Student" record linked to a "Section" and "Course".
- Backend: Django Rest Framework (DRF) serving a JSON API.
- Frontend: Vite-powered React app consuming the API.
- Database: PostgreSQL.
- Infrastructure: Docker Compose orchestrates the services.
- Prerequisites: Ensure you have Docker Desktop installed.
- Run the App:
docker-compose up --build
- Access:
- Backend API: http://localhost:8000/api/
- Admin Panel: http://localhost:8000/admin/
- Frontend: http://localhost:5173/
Form a team of 4 (2 Backend, 2 Frontend). You should be able to finish this in ~5 hours.
- Section Enrollment Logic:
- The
SectionViewSetcurrently exposes generic CRUD. - Task: Implement a custom action
enrollonSectionViewSet.- It should accept
nameandemailin the body. - Validate if the student can enroll (check capacity, check if email is already enrolled in this course).
- Create the
Studentobject linking to theSection. - Return a success message or error.
- It should accept
- The
- Course Stats API:
- Task: Write a new API endpoint using the
@api_view(["GET"])decorator. - Path:
api/course-capacities/(or similar). - It should return a list of courses with their current enrollment counts vs capacity (e.g.,
[{"course": "CS61A", "enrolled": 50, "capacity": 100}, ...]).- Hint: You'll need to aggregate data from Sections.
- Task: Write a new API endpoint using the
- Course Catalog:
- Create a page that lists all available
Courses. - Clicking a course should show its details.
- Create a page that lists all available
- Section Browser & Enrollment:
- When viewing a Course, show a list of associated
Sections. - Display time, location ("Spacetimes"), and capacity (e.g., "3/5 enrolled").
- Task: Add an "Enroll" button.
- When clicked, prompt the user for their Name and Email (simple modal or javascript prompt).
- Call your Backend's
enrollendpoint. - Refresh the list to show the new enrollment count.
- When viewing a Course, show a list of associated
- (Optional) Stats Integration:
- Display the data from the new
Course Stats APIsomewhere on the home page.
- Display the data from the new
- Git Branching: Use feature branches.
- API Design: Agree on the
enrollpayload format before starting!
- Django REST Framework @action
- Django REST Framework @api_view
- React Documentation
- Sass Documentation
Good luck!