- TypeScript - base programming language
- Telegraf - package for interact with Telegram Bot Api
- nodemon - hot reload
- prettier - code formatting
- Postgres - Database
- DrizzleORM - ORM for interact with database
- Docker - Containerization platform
- docker-compose - orchestration
.
├── app
│ ├── .prettierignore
│ ├── .prettierrc.js
│ ├── Dockerfile
│ ├── Makefile
│ ├── nodemon.json
│ ├── package.json
│ ├── package-lock.json
│ ├── tsconfig.json
│ ├── src
│ │ ├── bot // <-- Bot application files
│ │ │ ├── middleware
│ │ │ │ ├── dbServicesMiddleware.ts // <-- add db services to telegram context
│ │ │ │ └── index.ts
│ │ │ └── types.ts
│ │ ├── db // <-- database files - DrizzleORM + services
│ │ │ ├── index.ts
│ │ │ ├── migrate.ts
│ │ │ ├── migrations
│ │ │ │ ├── 0000_cuddly_moira_mactaggert.sql
│ │ │ │ └── meta
│ │ │ │ ├── 0000_snapshot.json
│ │ │ │ └── _journal.json
│ │ │ ├── schema
│ │ │ │ ├── index.ts
│ │ │ │ └── user.ts
│ │ │ ├── services // <-- buisness logic layer for interact with database
│ │ │ │ ├── abstract.ts
│ │ │ │ └── user.ts
│ │ │ └── types.ts
│ │ └── index.ts
│ └── tsconfig.json
├── docker-compose.dev.yml
├── dump // <-- directory mapped to [app, db] containers for share files in dev mode
├── Makefile
└── README.MD
up - start application (docker-compose up)
up-silent - start in detached mode (docker-compose up -d)
rebuild - rebuild all containers (docker-compose up --build)
down - stop and remove container (docker-compose down)
shell (container_name) - open container shell (docker-compose exec <container_name> /bin/bash)
build (container_name) - rebuild specified container (docker-compose build <container-name>)
logs (container_name) - logs for specified container (docker-compose logs <container-name>)
migrations - create new migrations
migrate - apply migrations
prettier - write prettier
chmod - reset a+w chmod for all files
n (...args) - npm run (...args) shortcut
- Add Production setup
- Add CI/CD