Skip to content

HackYourFuture/CourseHub

Repository files navigation

CourseHub

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.

Getting started

Prerequisites

Make sure to have the following installed, for the frontend application:

Make sure to have the following installed, for backend application:

Running the frontend

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

Running the backend

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.

Making requests

Without authentication, you can only access the public endpoints, for example:

curl http://localhost:8080/courses

Building docker images

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

Running docker image

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

Cleanup

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 3

  •  
  •  
  •