Spring Boot REST API backend for managing student preferences, schools, applications, and reminders.
./gradlew bootRunThe application will start on http://localhost:8080
./gradlew testdocker build -t project3-backend .docker run -p 8080:8080 project3-backendThe application will be accessible at http://localhost:8080
docker stop project3-backenddocker rm project3-backendhttps://grad-quest-app-2cac63f2b9b2.herokuapp.com/
The application uses Spring profiles for configuration:
- Default profile:
application.properties- Basic configuration (uses H2 for local dev) - Production profile:
application-prod.properties- Supabase PostgreSQL database configuration
The active profile is set to prod by default in application.properties:
spring.profiles.active=prodPOST /api/users- Create a new userGET /api/users- Get all usersGET /api/users/{userId}- Get user by IDGET /api/users/{userId}/student-id- Get student ID by user IDGET /api/users/email/{email}/student-id- Get student ID by emailGET /api/users/test/student-id- Get/create a test student ID
POST /api/preferences?studentId={id}- Create or update student preferencesGET /api/preferences?studentId={id}- Get student preferencesPUT /api/preferences?studentId={id}- Update student preferences (partial update supported)DELETE /api/preferences?studentId={id}- Delete student preferences
GET /api/schools- Get all schoolsGET /api/schools/{schoolId}- Get school by IDPOST /api/schools- Create a new schoolPUT /api/schools/{schoolId}- Update a school (partial update supported)DELETE /api/schools/{schoolId}- Delete a schoolPOST /api/schools/search- Search schools by criteria
GET /api/applications- Get all applicationsGET /api/applications/{applicationId}- Get application by IDPOST /api/applications- Create a new applicationPUT /api/applications/{applicationId}- Update an applicationDELETE /api/applications/{applicationId}- Delete an application
GET /api/reminders- Get all remindersGET /api/reminders/{reminderId}- Get reminder by IDPOST /api/reminders- Create a new reminderPUT /api/reminders/{reminderId}- Update a reminderDELETE /api/reminders/{reminderId}- Delete a reminder
src/
├── main/
│ ├── java/com/project03/
│ │ ├── controller/ # REST controllers
│ │ ├── model/ # JPA entities
│ │ ├── repository/ # JPA repositories
│ │ └── Project03Application.java
│ └── resources/
│ ├── application.properties
│ └── application-prod.properties
└── test/
└── java/com/project03/
If port 8080 is already in use, you can change it in application.properties:
server.port=8081If you encounter issues building the Docker image:
- Ensure Docker is running
- Check that all required files are present (gradlew, build.gradle, src/)
- Review the Dockerfile for any path issues