This is the backend repository for the Medve Matek voluntary organization. It is responsible for managing exercises.
A development version is automatically built and deployed from the main and is available at the following url:
https://be-feladatsor-dev-1029503388169.europe-west3.run.app
When a new version tag is created a corresponding image is built and publised to Dockerhub. From there it's manually deployed to Google Cloud Run. This version is available at the following url:
https://be-feladatsor-prod-1029503388169.europe-west3.run.app
For the majority of the functionality the backend uses Graphql as a commincation layer, and that is awailable at /graphql url for any deployment.
For example: https://be-feladatsor-dev-1029503388169.europe-west3.run.app/graphql for the DEV environment.
However the image upload functionality, and loading the old Excel file the backend provides two regular REST routes.
{/image/{:id}}: Retrieving images
{/image/upload, POST}: Uploading images
{/health}: Health check
{/load-old-excel/load, POST}: Loading the old excel file
The backend uses Nest JS, Prisma, and GraphQL
The backend retains the Talon models and GraphQL support for compatibility and to preserve existing data. The frontend workflow has been removed for now because it made exercise-sheet composition too complicated from both a UX and a technical perspective. New frontend work should not depend on Talon support until a simpler product and technical design is agreed. Talon-specific comment support is intentionally not implemented in either layer.
First of all, duplicate the .env.example file to a .env file.
For running the app you will need to have a Postgre database running.
You can do this with docker
docker compose -f docker-compose.db.yml upThis will start a postgresql db
npm installMigrate the DB schema
npm run db:migrate:dev# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prodApollo Studio is the perfect tool to run queries and migrations against the database.
It starts to run when you start the backend. It runs on http://localhost:3000/graphql, or whatever port you specified in the .env file. When running the backend, the url should also displayed in the console, e.g. Graphql running on http://localhost:3000/graphql
If you want to log in to the backend, you can use the following credentials on the frontend:
username: technical_user
password: technical_user_password