Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Database url
# https://www.prisma.io/docs/orm/overview/databases/postgresql#connection-url
DATABASE_URL=

# Database config
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# NestJS booking system

A simple booking system built with NestJS & Prisma ORM. This project was created to test the NestJS framework, and additional changes or new features may appear over time.
A simple booking system built with NestJS 11 & Prisma. This project was created to test the NestJS framework, and additional changes or new features may appear over time.

The project uses a PostgreSQL database running in Docker. Athentication has been implemented using the Google Auth0 with the JWT tokens. Each module features multiple unit and e2e tests.

Expand All @@ -20,6 +20,7 @@ This project requires [Node.js 20+](https://nodejs.org/en), [pnpm 9+](https://pn
4. Push the prisma schema to the database `npx prisma db push`
5. Start the development server `pnpm run start:dev`
6. If necessary, run prisma studio to check the db data `pnpm run prisma:studio`
7. You can also populate the database with test data using `pnpm run prisma:seed`

## License

Expand Down
2 changes: 1 addition & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: booking-system
services:
db:
container_name: booking-system-db
image: postgres:17.2
image: postgres:17.5
restart: always
ports:
- 5432:5432
Expand Down
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import simpleImportSortPlugin from "eslint-plugin-simple-import-sort";
import unusedImportsPlugin from "eslint-plugin-unused-imports";
import eslintTs from "typescript-eslint";

/** @type {import("eslint").Linter.Config} */
/** @type {import("eslint").Linter.Config[]} */
export default [
...eslintTs.configs.recommended,
{
Expand Down
66 changes: 33 additions & 33 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"start:prod": "node dist/src/main",
"build": "nest build",
"ts:check": "tsc --noEmit",
"lint:check": "eslint \"{src,prisma,test}/**/*.ts\"",
"lint:fix": "eslint \"{src,prisma,test}/**/*.ts\" --fix",
"format:check": "prettier --check \"{src,prisma,test}/**/*.ts\"",
"format:fix": "prettier --write \"{src,prisma,test}/**/*.ts\"",
"lint:check": "eslint \"**/*.{ts,mjs}\"",
"lint:fix": "eslint \"**/*.{ts,mjs}\" --fix",
"format:check": "prettier \"**/*.{ts,mjs}\" --check --cache",
"format:fix": "prettier \"**/*.{ts,mjs}\" --write --cache",
"prisma:gen": "prisma generate",
"prisma:studio": "npx prisma studio",
"prisma:seed": "npx prisma db seed",
Expand All @@ -26,56 +26,56 @@
"test:e2e:watch": "jest --config ./test/jest-e2e.json --watch"
},
"dependencies": {
"@nestjs/common": "^10.4.15",
"@nestjs/config": "^3.3.0",
"@nestjs/core": "^10.4.15",
"@nestjs/jwt": "^10.2.0",
"@nestjs/mapped-types": "^2.0.6",
"@nestjs/passport": "^10.0.3",
"@nestjs/platform-express": "^10.4.15",
"@nestjs/swagger": "^8.1.0",
"@prisma/client": "6.1.0",
"bcrypt": "^5.1.1",
"@nestjs/common": "^11.1.2",
"@nestjs/config": "^4.0.2",
"@nestjs/core": "^11.1.2",
"@nestjs/jwt": "^11.0.0",
"@nestjs/mapped-types": "^2.1.0",
"@nestjs/passport": "^11.0.5",
"@nestjs/platform-express": "^11.1.2",
"@nestjs/swagger": "^11.2.0",
"@prisma/client": "6.8.2",
"bcrypt": "^6.0.0",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
"compression": "^1.7.5",
"class-validator": "^0.14.2",
"compression": "^1.8.0",
"cookie-parser": "^1.4.7",
"passport": "^0.7.0",
"passport-google-oauth20": "^2.0.0",
"passport-jwt": "^4.0.1",
"reflect-metadata": "^0.2.2",
"rxjs": "^7.8.1"
"rxjs": "^7.8.2"
},
"devDependencies": {
"@faker-js/faker": "^9.3.0",
"@nestjs/cli": "^10.4.9",
"@nestjs/schematics": "^10.2.3",
"@nestjs/testing": "^10.4.15",
"@faker-js/faker": "^9.8.0",
"@nestjs/cli": "^11.0.7",
"@nestjs/schematics": "^11.0.5",
"@nestjs/testing": "^11.1.2",
"@types/bcrypt": "^5.0.2",
"@types/compression": "^1.7.5",
"@types/compression": "^1.8.0",
"@types/cookie-parser": "^1.4.8",
"@types/express": "^5.0.0",
"@types/express": "^5.0.2",
"@types/jest": "^29.5.14",
"@types/node": "^22.10.2",
"@types/node": "^22.15.21",
"@types/passport": "^1.0.17",
"@types/passport-google-oauth20": "^2.0.16",
"@types/passport-jwt": "^4.0.1",
"@types/supertest": "^6.0.2",
"eslint": "^9.17.0",
"@types/supertest": "^6.0.3",
"eslint": "^9.27.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-unused-imports": "4.1.4",
"jest": "^29.7.0",
"prettier": "^3.4.2",
"prisma": "^6.1.0",
"prettier": "^3.5.3",
"prisma": "^6.8.2",
"source-map-support": "^0.5.21",
"supertest": "^7.0.0",
"ts-jest": "^29.2.5",
"ts-loader": "^9.5.1",
"supertest": "^7.1.1",
"ts-jest": "^29.3.4",
"ts-loader": "^9.5.2",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.7.2",
"typescript-eslint": "^8.18.1"
"typescript": "^5.8.3",
"typescript-eslint": "^8.32.1"
},
"prisma": {
"seed": "ts-node prisma/seed.ts"
Expand Down
Loading