- NestJS
- Prisma
- Docker
- Mysql
- Vite
- Pnpm
- Typescript
- React
- Typescript
- Material-UI,
- Tanstack React Query
- Tanstack React Router
- Tailwind
- Vite
- Pnpm
- Docker
- Nginx
$ chmod +x start.sh
$ chmod +x stop.sh
$ ./start.sh
$ ./stop.sh
Incase if you encounter any issue in the servers you can run the clean script to clean all docker containers and db.
$ ./clean.sh
NOTE: In some cases that some containers are not cleaned/removed you need to restart, stopped or kill your docker process in your system or manually remove those images/containers.
Incase if you add and seed the database you run this script only if mysql db server (or after the exeucution of ./start.sh) is up and running.
$ ./seed.sh
NOTE: Its important to remember that if you already have an existing data that have the same ID's from the seed data, the seeding will fail. Unless the existing data is delete or removed.
1) Backend (default url http://localhost:8888)
$ cd backend
# install deps
$ pnpm install
# run mysql db server
$ docker-compose up --build
# run prisma migration
$ npx prisma migrate dev
# (optional) add predefined data to db
$ npx prisma db seed
# run backend app
$ pnpm run start
or
$ pnpm run start:dev
2) Frontend (default url http://localhost:8080)
$ cd frontend
$ pnpm install
$ pnpm run dev
# development
$ pnpm run start
# watch mode
$ pnpm run start:dev
# production mode
$ pnpm run start:prod
# unit tests
$ pnpm run test
# e2e tests
$ pnpm run test:e2e
# test coverage
$ pnpm run test:cov
NOTE: Remember any db schema change you need to run migrate
$ npx prisma migrate dev
$ npx prisma generate
# Docker commands
$ docker ps -a
$ docker container prune
$ docker ps -a
$ docker rm <id>
# db only
docker-compose up db
# frontend only
docker-compose up frontend
# backend only
docker-compose up backend
To know check out the guideline Read more