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.
You can access a live demo of CourseHub at: https://coursehub.hyf.dev and explore the OpenAPI specification at: https://coursehub.hyf.dev/api/swagger-ui/index.html.
- Any IDE: We recommend VSCode or IntelliJ IDEA
Make sure to have the following installed, for the backend application:
Make sure to have the following installed, for the frontend application:
Starting all required dependencies for the CourseHub backend:
docker compose up -dTo run the backend application:
- From Gradle:
./gradlew bootRun - From IDE: Run the
CourseHubApplicationmain class.
Now you can access the CourseHub UI on http://localhost:80 and the backend API on http://localhost:8080.
Without authentication, you can only access the public endpoints, for example:
curl http://localhost:8080/coursesYou can also see all available endpoints in the OpenAPI documentation.
By default you get the the frontend running on http://localhost:80 from a docker compose, if you want to run it
locally, follow the steps below.
To install the required dependencies (only once), from the ui directory, run:
npm installTo run the frontend application locally, from the ui directory, run:
npm run devWith this you can now access the CourseHub UI on http://localhost:5173 in development mode.
To build a Docker image of the course-hub backend, run the following command:
./gradlew bootBuildImageTo build a Docker image for the frontend, from the ui directory, run:
docker build -t ghcr.io/hackyourfuture/course-hub-frontend uiAfter 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 upKeep 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