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.
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/
- Counter Model:
- Task: Create a Counter model with an integer field named count.
- The count should start at 0.
- Create a
GETendpoint that returns the current counter value.- If the counter does not exist, create it with a value of
0. - Create a
POSTendpoint that increments the counter by one and returns the updated value.
- If the counter does not exist, create it with a value of
- Connect both counter endpoints in scheduler/urls.py
The React frontend is already implemented. No frontend work is required.
- 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!