A full-stack web application for managing students, courses, and grades built with React, Node.js, Express, and MySQL.
Course: SOEN 387 - Fall 2025
Institution: Concordia University
- Features
- Tech Stack
- Prerequisites
- Installation & Setup
- Running the Application
- Project Structure
- API Endpoints
- Troubleshooting
- Student Management: View all students and their enrolled courses
- Course Management: Browse courses with enrollment statistics
- Enrollment System: Enroll students in courses
- Grade Management: Assign and update letter grades (A+, A, A-, B+, B, B-, C+, C, C-, D+, D, F)
- Dashboard Analytics:
- Real-time statistics
- Grade distribution charts
- Enrollment trends
- Course analytics
- Responsive Design: Works seamlessly on desktop and mobile devices
- Node.js
- Express.js
- MySQL 8.1
- TypeScript
- React 19
- TypeScript
- Redux Toolkit (RTK Query)
- React Router
- TailwindCSS
- shadcn/ui components
- Recharts (data visualization)
- Docker & Docker Compose
- phpMyAdmin (database management)
Make sure you have the following installed on your system:
- Docker Compose (version 2.0 or higher)
- Git
Note: No need to install Node.js, MySQL, or npm separately - Docker will handle everything!
git clone <repository-url>
cd student-course-trackerCreate a .env file in the root directory:
cp .env.example .envThe .env file should contain:
DB_HOST=db
DB_USER=root
DB_PASSWORD=root
DB_NAME=student_course_tracker
DB_PORT=3306Create a .env file in the frontend directory:
cp frontend/.env.example frontend/.envThe frontend/.env file should contain:
VITE_API_URL=http://localhost:4000From the root directory, run:
docker-compose up --buildThis command will:
- Build and start the MySQL database
- Build and start the backend API server
- Build and start the frontend development server
- Start phpMyAdmin for database management
- Initialize the database with sample data
The first time you run the application, Docker will:
- Download necessary images (MySQL, Node.js)
- Install all dependencies
- Build the containers
- Initialize the database with sample data (30 students, 5 courses, and enrollments)
This process may take 5-10 minutes depending on your internet connection.
Once all services are running, you can access:
- Frontend Application: http://localhost:3000
- Backend API: http://localhost:4000
- phpMyAdmin: http://localhost:8080
- Username:
root - Password:
root
- Username:
To stop all services:
docker-compose downTo stop and remove all data (including the database):
docker-compose down -vstudent-course-tracker/
βββ backend/
β βββ src/
β β βββ routes/ # API route handlers
β β βββ db.ts # Database connection
β β βββ server.ts # Express server setup
β β βββ logger.ts # Request logging
β βββ Dockerfile
β βββ package.json
β βββ tsconfig.json
βββ frontend/
β βββ src/
β β βββ api/ # RTK Query API slices
β β βββ app/ # Redux store & routing
β β βββ components/ # Reusable UI components
β β βββ hook/ # Custom React hooks
β β βββ view/ # Page components
β β βββ main.tsx # Application entry point
β βββ Dockerfile
β βββ package.json
β βββ vite.config.ts
βββ db_init/
β βββ student_course_tracker.sql # Database schema & seed data
βββ docker-compose.yml
βββ .env.example
βββ README.md
GET /students- Get all studentsGET /students/:id- Get student by IDPOST /students- Create new student
GET /courses- Get all coursesGET /courses/:id- Get course by IDPOST /courses- Create new course
GET /enrollments- Get all enrollmentsPOST /enrollments- Enroll a student in a coursePUT /enrollments- Update student's gradeGET /enrollments/course/:id/grades- Get all grades for a courseGET /enrollments/student/:id/courses- Get all courses for a studentGET /enrollments/courses/:id/students- Get all students in a course
If you get port conflict errors:
# Change ports in docker-compose.yml
ports:
- "3001:3000" # Frontend (change 3000 to 3001)
- "4001:4000" # Backend (change 4000 to 4001)
- "3307:3306" # MySQL (change 3306 to 3307)
- "8081:80" # phpMyAdmin (change 8080 to 8081)If the backend can't connect to the database:
- Wait a few seconds for MySQL to fully start
- Check MySQL container logs:
docker-compose logs dbIf the frontend shows a blank page:
- Check if the API is running: http://localhost:4000
- Check browser console for errors
- Verify the
VITE_API_URLinfrontend/.env
To start fresh:
docker-compose down -v
docker-compose up --buildThe application comes pre-loaded with:
- 30 students (Alice Smith, Bob Johnson, etc.)
- 5 courses (CS101-CS105)
- Multiple enrollments with random grades
The application is already configured for development with:
- Hot Module Replacement (HMR) for frontend
- Automatic server restart on backend changes
- Volume mounting for live code updates
docker-compose logs -f
docker-compose logs -f backend
docker-compose logs -f frontend
docker-compose logs -f dbThis project is for educational purposes as part of SOEN 387 coursework at Concordia University.
For issues or questions:
- Check the Troubleshooting section
- Review Docker logs
- Verify environment variables are correctly set
Built with β€οΈ for SOEN 387 - Fall 2025