This project use multiple internal libs and apps. all are orgnaized in two folders at the PNPM workspace root (apps & packages).
- apps
| - api
| - client
- packages
| - constants
| - contexts
| - functions
| - hooks
| - services
| - types
| - utils
- API env var
API_PORT = ADMINER_PORT = CLIENT_APP_URL = API_URL = JWT_SECRET = POSTGRESQL_DATABASE_TYPE = POSTGRESQL_DATABASE_HOST = POSTGRESQL_DATABASE_PORT = POSTGRESQL_DATABASE_NAME = POSTGRESQL_DATABASE_USERNAME = POSTGRESQL_DATABASE_PASSWORD = MAILDEV_PORT = STRIPE_API_KEY =
- Client env var
NEXT_PUBLIC_API_URL = NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN = NEXT_PUBLIC_STRIPE_API_KEY =
.PHONY: up
up:
docker-compose up -d
.PHONY: down
down:
docker-compose down
.PHONY: install
install:
npm install
.PHONY: reset
reset:
docker volume rm $$(docker volume ls -q) && docker rmi $$(docker images -q)
.PHONY: resetf
resetf:
docker stop $$(docker ps -a -q) \
&& docker rm $$(docker ps -a -q) \
&& docker rmi $$(docker images -q) \
&& docker volume rm $$(docker volume ls -q) \
&& docker system prune -a -f
.PHONY: dev
dev:
npm run start:dev
.PHONY: init
init: up install dev
install dependancies
pnpm i
run project in parallel
pnpm -r --parallel run dev
run project individualy
pnpm
pnpm --filter api run dev
pnpm --filter client run dev
npm
cd apps/api && npm run dev
cd apps/client && npm run dev
-
build client web app
pnpm
pnpm --filter client run build
npm
cd apps/client && npm run build
-
build api
pnpm
pnpm --filter api run build
npm
cd apps/api && npm run build