https://github.com/kir-dev/konzisite-api
Nest & Prisma backend for the new Konzisite, an app for students to organize and sign up for consultations.
https://github.com/kir-dev/konzisite-api
nestjs prismajs typescript
Last synced: 5 months ago
JSON representation
Nest & Prisma backend for the new Konzisite, an app for students to organize and sign up for consultations.
- Host: GitHub
- URL: https://github.com/kir-dev/konzisite-api
- Owner: kir-dev
- Created: 2022-04-20T15:11:14.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2025-12-13T03:07:51.000Z (6 months ago)
- Last Synced: 2025-12-14T17:31:48.332Z (6 months ago)
- Topics: nestjs, prismajs, typescript
- Language: TypeScript
- Homepage: https://api.konzisite.kir-dev.hu
- Size: 2.19 MB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
## Description
Konzisite is a web application for the students of Budapest University of Technology and Economic Faculty of Electrical Engineering and Informatics to organise consultations, study sessions where students help each other. This repository contains the backend REST API for that application, built with
TypeScript,
NestJS and
Prisma. See the frontend repository here. The application was developed by
Kir-Dev. For more information about the project, see our project page or our blogpost, both in Hungarian.
## Preperation
First, start a PostgreSQL server locally on your machine.
Then create an OAuth client at [AuthSCH](https://auth.sch.bme.hu/console/index) with the following redirect address: `http://localhost:3300/auth/callback`
Finally, copy the contents of `.env.example` to a new file named `.env`. Replace the database credentials with the credentials required to connect to your local database and the AuthSCH credentials with ID and secret that AuthSCH generated for your client.
## Installation
```bash
# Install the dependencies
npm install
# Then apply the migrations
npx prisma migrate dev
# Optionally seed the databse with mock data
npm run seed
```
## Running the app
```bash
# development
npm run start
# watch mode
npm run dev
# production mode
npm run start:prod
# running prisma studio, easy way to explore and manipulate the db
npx prisma studio
```
## Setting up a Postman collection
If you want to use Postman for testing the endpoints, you can import `postman_collection.json` from the root of the project into Postman. This will create a collection with some of the endpoints of the app already defined. To use it, create two new variables in the Environments -> Globals tab:
- `baseUrl`: the value should be the URL where the backend is running, so most likely `http://localhost:3300`
- `token`: the value should be your JWT token. You can get this by running both the backend and frontend apps. After logging in, you can copy the token from the `JWT_TOKEN` cookie.
If you add new endpoints to the collection that you think the others could use, please overwrite the `postman_collection.json` file with the export of the modified collection, and commit it.
## Docker deployment
Edit the .env file accordingly, set the exposed port to your liking.
```bash
docker-compose up --build [-d]
```