Compass is a web application for the Stadtmuur organization, which allows the participants to record their working hours, track their mood, track exceptional incidents, create daily reports and visualize this information.
For more information navigate to our wiki.
- Prerequisites
- Project Structure
- Building the Project
- Running the Project
- Running Tests
- Additional Information
- Docker and Kubernetes
- Makefile
This project uses Node.js and Java. We recommend using NVM (Node Version Manager) to manage your Node.js versions. You can switch to the correct Node.js version for this project by running nvm use
in the project directory.
For Java, we recommend using a Java Development Kit (JDK) version 21 or above.
.
.
βββ README.md # Project README with general information
βββ backend # Backend specific code
β βββ src # Source code for the backend application
β βββ build.gradle # Gradle build script for the backend
β βββ settings.gradle # Gradle settings for the project
βββ frontend # Frontend specific code
β βββ .github # GitHub workflows and actions configurations
β βββ .vscode # VSCode specific settings
β βββ migrations # Database migrations
β βββ public # Public assets such as images and static files
β βββ scripts # Scripts for building, deploying, etc.
β βββ src # Source code for the frontend
β β βββ app # Next.js application setup and routing
β β βββ components # Reusable React components
β β βββ libs # Third-party libraries configuration
β β βββ locales # Localization and internationalization files
β β βββ models # Models for structuring database data
β β βββ styles # CSS and styling files
β β βββ templates # HTML or other templates
β β βββ types # TypeScript type definitions
β β βββ utils # Utility functions
β β βββ validations # Validation schemas for data input
β βββ tests # Testing suite
β β βββ e2e # End-to-end testing, possibly including Monitoring as Code
β β βββ integration # Integration tests for interconnected components
β βββ tailwind.config.js # Tailwind CSS configuration
β βββ tsconfig.json # TypeScript configuration
- Navigate to the backend directory.
- Run
./gradlew build
to build the project.
- Navigate to the frontend directory.
- Install the necessary dependencies by running
npm install
. - Build the project by running
npm run build
.
- Navigate to the backend directory.
- Start the server by running
./gradlew bootRun
.
- Navigate to the frontend directory.
- Start the server by running
npm run start
.
This project uses Jest for unit testing and Playwright for integration and E2E testing. To run the tests, use the following commands:
- Unit tests:
npm run test
- Integration & E2E tests:
npx playwright install npm run test:e2e
Refer to the code block from frontend/README.md
lines 294-304 for more details.
- Tailwind CSS for styling.
- Sentry for error monitoring.
- Auth0 for authentication.
This project can be containerized using Docker and orchestrated with Kubernetes. However, specific instructions for Docker and Kubernetes will depend on your project setup and requirements. Please refer to Docker's official documentation and Kubernetes' official documentation for more information.
This project includes a Makefile with commands for building and running different components of the project using Docker. Here are some of the commands you might find useful:
-
make build-backend
: Builds the Docker image for the backend part of the project. -
make build-frontend
: Builds the Docker image for the frontend part of the project. -
make build
: Builds the Docker images for both the frontend and backend parts of the project.
-
make run
: Runs the Docker containers for the project using Docker Compose. This command starts up all the services defined in thedocker-compose.yml
file, including the frontend, backend, and any databases or other dependencies. -
make stop
: Stops all running Docker containers associated with the project's Docker Compose configuration. This command brings down all the services that were started withmake run
.