-
npm i
-
docker-compose up -d
-
Database
cd databases/main-pg
cp .env.example .env
npm run migration:up
npm run fixture:up
-
Common lib
cd libs/common
npm run introspect:main-pg
npm run build
– (vscode) reload window
- Monorepo
- FALS
- Modular monolith
- Distributed Functions (RPC + EDA)
- Branded types
- Typed Errors
- FOP architecture
- FDD patterns
- Migration-first aproach
- Logs, Metrics and Tracing
- Project – ...
- Service – ...
- Application – ...
- Do something with Docker
- Add stub fixture
- Add all needed libs
- ...
Add migrationsIntrospectAdd kyselyExtend schema with branded typesExtend schema with kyselyCreate RPCs on zod in libs/commonCreate service from templateCreate features: SignIn, SignUp, SendEmailCreate application in serviceAdd to http gateway
Add protobuf tolibs/proto
Generate gRPCGenerate swaggerAdd toDoDo
Graceful shutdown for gRPCAdd error middlewareRun- Add auth middleware and check
- Add client
- Dockerfile
- Create new app for partner api
- Add cron app
- Create script
- Move features to
/apps
- Move SendEmail to different service
- Add gRPC communication
- Add Events
- Add InmemoryTransport
- Add Events
- Add Kafka
- Add HTTP API ontop of gRPC openapi export
- Node.js 16
- TypeScript 4.9
- PG 14
- Redis
- Kafka
- Docker
/.git
/.gitlab
– CI/CD config/.husky
– git hooks/databases/main-pg
– main PG database/libs/common
– common libs between local applications/.cspell.json
– spell checker config/.dockerignore
– docker ignore/.eslintignore
– eslint ignore/.eslintrc.js
– eslint config/.gitignore
– git ignore/.gitlab-ci.yml
– CI/CD config/.npmrc
– npm config/.nvmrc
– node version/.pretterignore
– prettier ignore/.prettierrc.js
– prettier config/.releaserrc.json
– semantic release config/.commitlintrc.js
– commitlint config/.cspell-ext.json
– spell checker config/.docker-compose.app.yml
– docker compose for applications/.docker-compose.extra.yml
– docker compose for extra services/.docker-compose.yml
– docker compose config/Dockerfile
– main docker file/Dockerfile.base
– main docker file base/Dockerfile.template
– main docker file template/jest.config.int.json
– jest integration tests config/jest.config.unit.json
– jest unit tests config/lerna.json
– lerna config/nx.json
– nx config/package.json
– main package.json/tsconfig.json
– main tsconfig
More info in /${app}/README.md
/dist
– compiled code/node_modules
– node modules/src
– source code/apps
– combination of features, libs and other code to start application as service or cron/features
– business logic/libs
– libs for this application/scripts
– folder for scripts/tests
– tests config folder
/libs/common
– if it will be used in any application<app>/src/libs
– if it will be used only in this application*/libs/@dntb/*
– if it is project specific code
Types that will be checked in runtime and compile time like UInt32
, Email
, ControllerSerialNumber
.
- pino + Loki + Grafana – for logs
- opentelemetry + Prometheus + Grafana – for metrics
- opentelemetry + Tempo + Grafana – for tracing
- Create new application in
${application}/src/apps
(use other application as example) - Add
index.ts
andconfig.ts
- Go to
${application}/package.json
and add new application toscripts
- Create MR
- Merge to
development
- Test in development (with QA engineer)
- Create MR to
main
- Merge to
main