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, you can either:
- Start application from the terminal:
cd backend ./gradlew bootRun - Run the
CourseHubApplicationmain class from your IDE.
Now you can access the CourseHub frontend UI on http://localhost:3000 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, the frontend will be running on http://localhost:3000 from Docker compose. If you want to run it
locally, follow the steps below.
To install the required dependencies (only once), from the frontend directory, run:
cd frontend
npm installTo run the frontend application locally, from the frontend directory, run:
cd frontend
npm run devNow you can access the CourseHub frontend UI on http://localhost:5173 in development mode.
To build a Docker image of the course-hub backend, from the backend directory, run:
cd backend
./gradlew bootBuildImageTo build a Docker image for the frontend, from the frontend directory, run:
cd frontend
docker build -t ghcr.io/hackyourfuture/course-hub-frontend .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 up -dKeep 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 down -v