A modern reference application that resembles a school administration system to manage courses, enrollments, etc.
This application is used in HackYourFuture to showcase best practices in building a full-stack application and for students to implement parts. For example, in the frontend course students create their own frontend and in the backend course create their own backend in Java.
Make sure to have the following installed, for the frontend application:
Make sure to have the following installed, for backend application:
- Java 21 or later
- Docker
- Any IDE: We recommend VSCode or IntelliJ IDEA
To install the required dependencies (only once), from the ui
directory, run:
npm install
To run the frontend application locally, from the ui
directory, run:
npm run dev
Starting all required dependencies for the CourseHub backend:
docker compose up -d
To run the backend application:
- From Gradle:
./gradlew bootRun
- From IDE: Run the
CourseHubApplication
main class.
Now you can access the CourseHub UI on http://localhost
and the backend API on http://localhost:8080
.
Without authentication, you can only access the public endpoints, for example:
curl http://localhost:8080/courses
To build a Docker image of the course-hub backend, run the following command:
./gradlew bootBuildImage
To build a Docker image for the frontend, from the ui
directory, run:
docker build -t ghcr.io/hackyourfuture/course-hub-frontend ui
After the image is built, you can run it using a special Docker Compose profile (make sure you stop the application if you're running it from Gradle or IDE):
docker compose --profile include-course-hub up
Keep in mind that containers will keep running in the background even after you stop the application. To stop and remove the containers, run:
docker compose --profile include-course-hub down -v