Skip to content
This repository was archived by the owner on Oct 9, 2025. It is now read-only.
Draft
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
9 changes: 9 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
POSTGRES_USER=wallet
POSTGRES_PASSWORD=analytic
POSTGRES_DB=wallet_analytic
POSTGRES_PORT=6432

API_HOST=localhost
API_PORT=3001

DB_URL=postgres://wallet:analytic@postgres:5432/wallet_analytic
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,23 @@

## Development

### Dependencies

```bash
bun i
```

### Docker

#### 🔧 Run Containers

Stop and then start all

```bash
docker-compose -f docker-compose.dev.yml -f docker-compose.dev.db.yml down
docker-compose -f docker-compose.dev.yml -f docker-compose.dev.db.yml up --build
```

Start and build containers from scratch (removing volumes and local images):

```bash
Expand Down
7 changes: 5 additions & 2 deletions apps/api/.env.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
APP_PORT=3001
NODE_ENV=development
WEB_APP_URL=http://172.20.10.4:5174

DB_URL=postgres://wallet:analytic@localhost:6432/wallet_analytic
BOT_TOKEN=
DB_URL=postgresql://wallet:analytic@postgres:5432/wallet_analytic

AXIOM_TOKEN=

AXIOM_DATASET_NAME=

AXIOM_DATASET_NAME=wallet
2 changes: 2 additions & 0 deletions apps/bot/.env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
API_ID=
API_HASH=
BOT_TOKEN=

DB_URL=postgres://wallet:analytic@localhost:6432/wallet_analytic
4 changes: 0 additions & 4 deletions docker-compose.dev.db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,3 @@ services:

volumes:
postgres_data:

networks:
otel-net:
external: true
4 changes: 3 additions & 1 deletion packages/db/.env.example
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
DB_URL=postgres://user:password@localhost:6432/botdb
# We use localhost as this package runs on local machine
# and not in docker container.
DB_URL=postgres://wallet:analytic@localhost:6432/wallet_analytic
4 changes: 1 addition & 3 deletions packages/db/src/repositories/user/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ import { getById } from './user.get'
import { getOrCreateByTelegramId } from './user.insert'

export class UserRepository {
constructor(protected db: DbType) {
this.db = db
}
constructor(protected db: DbType) {}

getById = getById
getOrCreateByTelegramId = getOrCreateByTelegramId
Expand Down