Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
12c73d3
feat: implement issues #822, #829, #834, #836
openhands-agent Jun 26, 2026
af8f252
Merge pull request #1069 from trinnode/trinnode/implement-issues-822-…
Akanimoh12 Jun 26, 2026
e115286
feat(backend): structured request logging with request ids
dumbdevss Jun 26, 2026
75f1f6b
feat: add auth challenge endpoint, rate limiting, DB indexes, and dat…
Smartdevs17 Jun 26, 2026
59c774d
Merge pull request #1065 from Smartdevs17/fix/all-issues
Akanimoh12 Jun 26, 2026
e73c10e
feat: add AnalyticsDaily model (#823)
jayteemoney Jun 26, 2026
e6cf356
feat: add AuditLog model for admin actions (#824)
jayteemoney Jun 26, 2026
7547592
feat: add soft-delete (deletedAt) convention (#825)
jayteemoney Jun 26, 2026
5e8d1a8
feat: add createdAt/updatedAt timestamps to all models (#826)
jayteemoney Jun 26, 2026
3f700e0
feat: add backend ESLint and Prettier configuration
Muyideen-js Jun 26, 2026
a6cb81e
feat(auth): atomic nonce consumption and upsert user on first login (…
Samuel1505 Jun 26, 2026
b4bdf65
test(auth): update mocks and add coverage for upsert and consumed-non…
Samuel1505 Jun 26, 2026
bf2148e
feat(auth): extend Express Request with typed user field (#838)
Samuel1505 Jun 26, 2026
f1dbc91
feat(auth): add requireAuth Express middleware (#838)
Samuel1505 Jun 26, 2026
4d0bffa
test(auth): add tests for requireAuth middleware (#838)
Samuel1505 Jun 26, 2026
a1d496b
docs(auth): add ADR 001 for Stellar wallet challenge-response auth fl…
Samuel1505 Jun 26, 2026
f2cd82b
Merge branch 'test-implement-drips' into feat/786-backend-eslint-pret…
Muyideen-js Jun 26, 2026
339bbf7
Merge pull request #1070 from jayteemoney/feat/db-models-analytics-au…
Akanimoh12 Jun 27, 2026
e01c713
feat: add EditorConfig for backend workspace (#787)
CollinsKRO Jun 27, 2026
94d6674
feat: profiles module (by-address, reactivate, image) + tips prepare …
dimka90 Jun 27, 2026
e0bd00d
Merge pull request #1075 from dimka90/feat/profiles-tips-issues
Akanimoh12 Jun 27, 2026
c39aa36
Merge branch 'test-implement-drips' into test-implement-drips
Maxwell316 Jun 27, 2026
33b24f2
Merge pull request #1072 from Maxwell316/test-implement-drips
Akanimoh12 Jun 27, 2026
e60db76
test(backend): add Supertest helper and wire app service to docker-co…
Chucks1093 Jun 27, 2026
df0d5e8
Merge pull request #1076 from Chucks1093/feat/issue-795-791-887-888
Akanimoh12 Jun 27, 2026
85af106
added username validation rules
Majormaxx Jun 27, 2026
97c5e21
added username availability check endpoint
Majormaxx Jun 27, 2026
78de929
added GET /tips paginated feed endpoint
Majormaxx Jun 27, 2026
df98a34
feat(backend): tip read endpoints and indexer poll loop
manoahLinks Jun 27, 2026
b7d11e7
added Soroban RPC client wrapper module
Majormaxx Jun 27, 2026
14a114e
Merge pull request #1082 from Majormaxx/fix/890-soroban-rpc-client-wr…
Akanimoh12 Jun 27, 2026
b5e1451
Merge branch 'test-implement-drips' into test-implement-drips
Akanimoh12 Jun 27, 2026
ec2acef
Merge pull request #1081 from manoahLinks/test-implement-drips
Akanimoh12 Jun 27, 2026
32a5094
Merge pull request #1078 from Majormaxx/fix/856-username-availability
Akanimoh12 Jun 27, 2026
7e94739
Merge pull request #1074 from CollinsKRO/Basic
Akanimoh12 Jun 27, 2026
afbdae5
Merge branch 'test-implement-drips' into fix/857-username-validation
Majormaxx Jun 27, 2026
6e95c25
Merge pull request #1071 from dumbdevss/feat/request-id-logging-797
Akanimoh12 Jun 27, 2026
3174afd
Merge branch 'test-implement-drips' into fix/871-tips-paginated-feed
Majormaxx Jun 27, 2026
18fd5b9
Merge pull request #1079 from Majormaxx/fix/871-tips-paginated-feed
Akanimoh12 Jun 27, 2026
3d75719
Merge pull request #1077 from Majormaxx/fix/857-username-validation
Akanimoh12 Jun 27, 2026
577c2f4
Merge branch 'test-implement-drips' into feat/786-backend-eslint-pret…
Muyideen-js Jun 27, 2026
4bbb430
feat(backend): tip dedupe by txHash and profile update rate limiting
tosin-zoffun Jun 27, 2026
7e1ee00
Merge pull request #1073 from Muyideen-js/feat/786-backend-eslint-pre…
Akanimoh12 Jun 29, 2026
52874e2
feat: implement profiles credit score, redis caching, tips submit, an…
DeborahOlaboye Jun 29, 2026
010d5da
feat: implement profiles credit score, redis caching, tips submit, an…
goldandrew Jun 29, 2026
5d4bed2
feat: implement profile creation, OpenAPI docs, tip filtering, and mi…
goldandrew Jun 29, 2026
6370c2e
Merge branch 'test-implement-drips' into feat/issues-884-865
tosin-zoffun Jun 29, 2026
e4f1329
Merge pull request #1083 from tosin-zoffun/feat/issues-884-865
Akanimoh12 Jun 29, 2026
5d90a5f
feat(backend): implement profiles soft-delete, PUT update, stats and …
LawalRahman Jun 29, 2026
353bd5d
feat(indexer): implement refund projection, idempotency, retry/backof…
vic-Gray Jun 29, 2026
399cad9
feat: add husky + lint-staged pre-commit for backend
Oluwatomilola Jun 29, 2026
0622a3e
Merge pull request #1089 from vic-Gray/test-implement-drips
Akanimoh12 Jun 29, 2026
436be7a
Merge branch 'test-implement-drips' into add-husky-lint-staged
Oluwatomilola Jun 29, 2026
8918e98
feat(indexer): decode full event topic tuple into a canonical name
Joycejay17 Jun 29, 2026
d528f54
feat(indexer): project profile, goal, and subscription events
Joycejay17 Jun 29, 2026
098f1db
Merge remote-tracking branch 'origin/test-implement-drips' into feat/…
Joycejay17 Jun 29, 2026
f3daac9
Merge branch 'test-implement-drips' into create-dockerfile-for-the-ba…
Oluwatomilola Jun 29, 2026
98a6b0f
fix(indexer): keep EventLog data cast type-safe after merge
Joycejay17 Jun 29, 2026
ae452c7
Merge pull request #1091 from Joycejay17/feat/indexer-projections-895…
Akanimoh12 Jun 29, 2026
6107596
test(indexer): merge tip idempotency tests with profile/goal/sub proj…
bade2brazy Jun 29, 2026
4682b42
test(indexer): add cursor persistence unit tests
bade2brazy Jun 29, 2026
d08e315
feat(tips): add TipResponseDto
bade2brazy Jun 29, 2026
7fe0b00
feat(tips): add serializeTip — BigInt/Date to JSON-safe DTO
bade2brazy Jun 29, 2026
24ff69e
test(tips): unit tests for serializeTip serializer
bade2brazy Jun 29, 2026
aad2639
feat(tips): add confirmTipParamSchema for PATCH confirm endpoint
bade2brazy Jun 29, 2026
d28182f
feat(tips): add confirm handler for PATCH /:txHash/confirm
bade2brazy Jun 29, 2026
6e811f1
feat(tips): add PATCH /:txHash/confirm route and OpenAPI spec entry
bade2brazy Jun 29, 2026
6ccece5
feat(tips): use serializeTip DTO pattern and add confirmTip service f…
bade2brazy Jun 29, 2026
9db832c
test(tips): add cursor pagination chain and confirm status lifecycle …
bade2brazy Jun 29, 2026
0e86221
Merge pull request #1087 from bade2brazy/feat/880-881-886-892-batch
Akanimoh12 Jun 29, 2026
877a878
Merge remote-tracking branch 'upstream/test-implement-drips' into sof…
LawalRahman Jun 29, 2026
2b6b756
feat(indexer): add standalone process entrypoint
Caneryy Jun 29, 2026
62cce1c
chore: resolve merge conflicts and fix typescript errors
LawalRahman Jun 29, 2026
bdb908c
Merge pull request #1088 from LawalRahman/soft-delete-deactivate-own-…
Akanimoh12 Jun 29, 2026
6664c82
feat(profiles): add ProfileResponseDto and serializer (#866)
Levi-Ojukwu Jun 30, 2026
34731aa
feat(indexer): handle CreditScoreUpdated event (#898)
dannyy2000 Jun 30, 2026
ada45f3
Merge pull request #1095 from dannyy2000/feat/indexer-898-904-906-907
Akanimoh12 Jun 30, 2026
6b87cfa
Merge pull request #1092 from Oluwatomilola/create-dockerfile-for-the…
Akanimoh12 Jun 30, 2026
0f9d6da
Merge pull request #1090 from Oluwatomilola/add-husky-lint-staged
Akanimoh12 Jun 30, 2026
25c301a
Merge pull request #1094 from Guzbyte-tech/feat/profile-dto-serialize…
Akanimoh12 Jun 30, 2026
b908514
Merge pull request #1093 from Caneryy/feat/issue-908
Akanimoh12 Jun 30, 2026
5ccbecd
Merge branch 'test-implement-drips' into any/stellar-wave-four-features
goldandrew Jun 30, 2026
f569cda
Merge branch 'test-implement-drips' into any/stellar-wave-backend-fea…
DeborahOlaboye Jun 30, 2026
72d6de6
Merge pull request #1085 from DeborahOlaboye/any/stellar-wave-backend…
Akanimoh12 Jun 30, 2026
c12cde8
Merge branch 'test-implement-drips' into any/stellar-wave-four-features
goldandrew Jun 30, 2026
d146b82
feat(indexer): publish projected events to the realtime layer
Olajcodes Jun 30, 2026
2832966
Merge pull request #1086 from goldandrew/any/stellar-wave-four-features
Akanimoh12 Jun 30, 2026
9673fbc
feat(tips): add creator tip aggregation and OpenAPI documentation
dubemoyibe-star Jun 30, 2026
0f67ae0
Merge branch 'test-implement-drips' into feat/tips-aggregation-openap…
dubemoyibe-star Jun 30, 2026
a34b960
test(indexer): add mocked-RPC integration tests for projections (#910)
Olajcodes Jun 30, 2026
eb218de
Merge pull request #1098 from Olajcodes/feat/indexer-integration-test…
Akanimoh12 Jun 30, 2026
7f4475c
Merge pull request #1097 from dubemoyibe-star/feat/tips-aggregation-o…
Akanimoh12 Jun 30, 2026
c1838e2
feat: implement leaderboard module (#926, #934) and credit score modu…
openhands-agent Jul 23, 2026
093774f
docs: add TypeScript backend implementation reference to credit score…
openhands-agent Jul 23, 2026
74ed53e
Merge pull request #1101 from trinnode/trinnode/credit-score-docs-925
Akanimoh12 Jul 23, 2026
0761b5b
Merge pull request #1100 from trinnode/trinnode/implement-issues-926-…
Akanimoh12 Jul 23, 2026
56a50ad
feat: withdrawals module (GET /withdrawals/me), credit score history …
abayomicornelius Jul 23, 2026
9e8a6ce
feat(credit): implement GET /credit/:username current score endpoint …
Jul 23, 2026
ccc6cee
feat(credit): implement credit score backfill job for existing users …
Jul 23, 2026
d23f444
feat(leaderboard): add 24h, 7d, and all-time window filtering (#929)
Jul 23, 2026
4081a08
docs(leaderboard): add API documentation for leaderboard endpoints (#…
Jul 23, 2026
b832ad3
Merge pull request #1102 from abayomicornelius/fix/issues-936-937-927…
Akanimoh12 Jul 23, 2026
e9cd2e6
Merge branch 'test-implement-drips' into test-implement-drips
ProBuidler Jul 23, 2026
c9e2b01
Merge pull request #1103 from ProBuidler/test-implement-drips
Akanimoh12 Jul 23, 2026
0e5212a
feat(realtime): Socket.IO gateway with JWT auth handshake
Ibk-Bless Jul 23, 2026
49efbce
feat(withdrawals): minimum validation + indexer status tracking
Ibk-Bless Jul 23, 2026
827e027
feat(credit): background job for scheduled credit score recomputation
onajidavid87-web Jul 23, 2026
62216f6
feat: implement withdrawals balances, withdrawals prepare, realtime t…
Junman140 Jul 23, 2026
9b4c9d4
Merge pull request #1107 from Junman140/feat/withdrawals-realtime-938…
Akanimoh12 Jul 23, 2026
a5fa8b9
Merge branch 'test-implement-drips' into test-implement-drips
onajidavid87-web Jul 23, 2026
c6b4500
fixed all issues
emdevelopa Jul 24, 2026
e7fd541
Merge branch 'Akanimoh12:main' into main
emdevelopa Jul 24, 2026
9e73fc8
Merge branch 'test-implement-drips' into feat/realtime-socket-gateway…
Ibk-Bless Jul 24, 2026
6af15ae
Merge branch 'test-implement-drips' into feat/withdrawals-minimum-sta…
Ibk-Bless Jul 24, 2026
80d59c4
Merge pull request #1105 from Ibk-Bless/feat/withdrawals-minimum-stat…
Akanimoh12 Jul 24, 2026
7f7d65d
Merge branch 'test-implement-drips' into feat/realtime-socket-gateway…
Akanimoh12 Jul 24, 2026
80048af
Merge pull request #1104 from Ibk-Bless/feat/realtime-socket-gateway-…
Akanimoh12 Jul 24, 2026
c384cef
Merge branch 'test-implement-drips' into test-implement-drips
Akanimoh12 Jul 24, 2026
cdf61cc
Merge pull request #1106 from onajidavid87-web/test-implement-drips
Akanimoh12 Jul 24, 2026
c999c83
Merge branch 'test-implement-drips' into main
Akanimoh12 Jul 24, 2026
d7b3302
Merge pull request #1109 from EmdevelopaOpenSource/main
Akanimoh12 Jul 24, 2026
83a0318
feat(backend): add leaderboard pagination and credit caching
Godsmiracle001 Jul 24, 2026
317f195
Merge pull request #1110 from Godsmiracle001/feat/leaderboard-credit-…
Akanimoh12 Jul 24, 2026
67bed16
feat(ipfs): add IPFS image upload, pinning, gateway URL builder, erro…
Jul 24, 2026
9fa3ee6
Merge pull request #1111 from Mosas2000/feat/ipfs-module-981-985
Akanimoh12 Jul 24, 2026
022e0ab
feat: implement X (Twitter) integration module
Georgechisom Jul 24, 2026
29d6b50
Merge branch 'test-implement-drips' into fix/x-integration-module
Georgechisom Jul 24, 2026
9df0432
feat(x): add x module and ipfs issues
stephanieoghenemega-eng Jul 25, 2026
cfbfab2
Merge pull request #1113 from stephanieoghenemega-eng/feat/x-module-9…
Akanimoh12 Jul 25, 2026
7c7c252
feat(x): add typed X API v2 client, cached metrics with freshness TTL…
Mikey-222 Jul 25, 2026
53deced
Merge pull request #1114 from Mikey-222/feat/x-cached-metrics-handle
Akanimoh12 Jul 25, 2026
dc1b688
Merge branch 'test-implement-drips' into fix/x-integration-module
Georgechisom Jul 25, 2026
95179f7
Merge pull request #1112 from Georgechisom/fix/x-integration-module
Akanimoh12 Jul 25, 2026
b728192
fix: resolve unresolved merge conflicts blocking backend build
Samuel1505 Jul 25, 2026
d35a5cd
feat: add notification preferences and unread count endpoints
Samuel1505 Jul 25, 2026
235c39b
feat: notify creator on new tip
Samuel1505 Jul 25, 2026
6847bf0
feat: notify creator when a funding goal is reached
Samuel1505 Jul 25, 2026
6c62dc8
feat(credit): implement pure formula functions, configurable weights,…
girly-coder01 Jul 25, 2026
e1a6c7b
Merge pull request #1118 from girly-coder01/feat/912-916-918-921-cred…
Akanimoh12 Jul 25, 2026
f438456
Merge pull request #1115 from Samuel1505/test-implement-drips
Akanimoh12 Jul 25, 2026
b810893
feat(backend): withdrawal fee calculation (2%) and balance.updated re…
Godbrand0 Jul 25, 2026
c905c46
fix(realtime): typed event contract, connection/event rate limiting, …
codeX-james Jul 25, 2026
4662b76
Merge pull request #1117 from codeX-james/feat/realtime-notifications…
Akanimoh12 Jul 25, 2026
2fff7e1
Merge branch 'test-implement-drips' into fix/withdrawal-fee-and-realt…
Godbrand0 Jul 25, 2026
27b152c
Merge pull request #1119 from Godbrand0/fix/withdrawal-fee-and-realti…
Akanimoh12 Jul 25, 2026
994d9d7
feat(backend): notify on subscription charge, fix realtime room-broad…
DeborahOlaboye Jul 25, 2026
529274e
feat(backend): leaderboard.updated events, Redis realtime adapter, wi…
JONAH-6 Jul 25, 2026
bdd58f2
Merge pull request #1120 from DeborahOlaboye/feat/notifications-and-r…
Akanimoh12 Jul 25, 2026
91923cf
feat(x): handle X API rate limits with retry/backoff and circuit breaker
jojoafrica1 Jul 26, 2026
21c641e
Merge pull request #1121 from JONAH-6/feat/realtime-leaderboard-redis…
Akanimoh12 Jul 26, 2026
3c08971
Merge pull request #1122 from Chummy-debug/feat/975-x-api-rate-limit-…
Akanimoh12 Jul 26, 2026
b4b3576
feat: withdrawals API docs, enhanced tests, notifications POST /:id/read
Lekan101 Jul 26, 2026
56ab756
Merge pull request #1124 from Lekan101/feat/withdrawals-notifications…
Akanimoh12 Jul 26, 2026
45210f4
feat: add search and analytics modules
Smartdevs17 Jul 26, 2026
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ Thumbs.db

issue.md
pr.md

...
.npm_cache/

1 change: 0 additions & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh" 2>/dev/null || true

npx --no -- commitlint --edit "$1"
6 changes: 4 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh" 2>/dev/null || true

# Block staged .env files (not .env.example)
if git diff --cached --name-only | grep -E "(^|/)\.env$" > /dev/null 2>&1; then
Expand All @@ -22,4 +21,7 @@ if [ -n "$STAGED_RS" ]; then
fi

# Run lint-staged in frontend-scaffold
cd frontend-scaffold && npx lint-staged
(cd frontend-scaffold && npx lint-staged)

# Run lint + format on staged backend files
(cd backend && npx lint-staged)
9 changes: 9 additions & 0 deletions backend/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
34 changes: 34 additions & 0 deletions backend/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ DATABASE_URL=postgresql://tipz:tipz@localhost:5432/tipz?schema=public

# Redis (used by BullMQ queues + caching + rate limiting + socket adapter)
REDIS_URL=redis://localhost:6379
# Attaches the Socket.IO Redis adapter so realtime rooms are shared across horizontally scaled instances.
# Set to false for a single-instance/local dev setup that doesn't need cross-instance fan-out.
REALTIME_REDIS_ADAPTER_ENABLED=true

# Auth (Stellar wallet challenge/JWT)
JWT_SECRET=change-me-in-production
Expand All @@ -32,6 +35,37 @@ CONTRACT_ID=
INDEXER_POLL_INTERVAL_MS=5000
INDEXER_START_LEDGER=

# Credit score recompute schedule (cron expression for BullMQ repeatable job)
CREDIT_RECOMPUTE_CRON=0 */6 * * *

# Credit score weights and configuration (optional — defaults provided)
# Weights as percentages (must sum to <= 100)
CREDIT_SCORE_WEIGHT_BASE=40
CREDIT_SCORE_WEIGHT_TIP=20
CREDIT_SCORE_WEIGHT_X=30
CREDIT_SCORE_WEIGHT_AGE=10

# Divisors for converting raw signals to scores
CREDIT_SCORE_DIVISOR_TIP=10000000
CREDIT_SCORE_DIVISOR_FOLLOWER=50
CREDIT_SCORE_DIVISOR_ENGAGEMENT=10
CREDIT_SCORE_DIVISOR_AGE=10

# Caps for sub-scores
CREDIT_SCORE_CAP_BASE=40
CREDIT_SCORE_CAP_MAX=100
CREDIT_SCORE_CAP_X_SUB=50
CREDIT_SCORE_CAP_AGE_SUB=100
CREDIT_SCORE_CAP_TIP_SUB=100

# Cache TTL for credit scores in seconds
CREDIT_SCORE_CACHE_TTL_SECONDS=300

# Withdrawals
WITHDRAWAL_MIN_AMOUNT_STROOPS=10000000
# Withdrawal fee, in basis points (1/100th of a percent). 200 = 2%.
WITHDRAWAL_FEE_BPS=200

# X (Twitter) API — credit score signals
X_API_BEARER_TOKEN=
X_API_BASE_URL=https://api.twitter.com/2
Expand Down
6 changes: 6 additions & 0 deletions backend/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules/
dist/
coverage/
build/
*.js
*.d.ts
8 changes: 8 additions & 0 deletions backend/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"printWidth": 100,
"arrowParens": "always"
}
46 changes: 30 additions & 16 deletions backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ It covers the definition of done, module conventions, and local verification ste

## Tech stack

| Concern | Choice |
| -------------- | ---------------------------------------- |
| Language | TypeScript (Node.js ≥ 20, ESM) |
| HTTP framework | Express |
| ORM / DB | Prisma + PostgreSQL |
| Cache / queues | Redis + BullMQ |
| Realtime | Socket.IO |
| Chain access | `@stellar/stellar-sdk` (Soroban RPC) |
| Validation | Zod |
| Logging | Pino |
| Tests | Vitest + Supertest |
| Concern | Choice |
| -------------- | ------------------------------------ |
| Language | TypeScript (Node.js ≥ 20, ESM) |
| HTTP framework | Express |
| ORM / DB | Prisma + PostgreSQL |
| Cache / queues | Redis + BullMQ |
| Realtime | Socket.IO |
| Chain access | `@stellar/stellar-sdk` (Soroban RPC) |
| Validation | Zod |
| Logging | Pino |
| Tests | Vitest + Supertest |

---

Expand Down Expand Up @@ -104,13 +104,27 @@ The dev server uses [`tsx watch`](https://github.com/privatenumber/tsx) — no n
npm run dev # starts tsx watch src/server.ts → http://localhost:4000/health
```

**Git hooks**

After `npm install`, Husky installs a `pre-commit` hook that runs `lint-staged` on
staged `backend/**/*.ts` files. It will auto-fix lint issues (ESLint) and apply
Prettier formatting where possible; if a file cannot be fixed automatically the
commit is blocked so you can fix it manually.

```bash
cd backend
npm install # runs `husky` via the prepare script and installs the hook
```

To skip the hook in an emergency: `git commit --no-verify`.

**Hot reload behaviour**

| Change type | Behaviour |
|---|---|
| TypeScript source files | Automatic restart (tsx watch detects the change) |
| `.env` file | **Not** auto-reloaded — restart the process manually after editing `.env` |
| `prisma/schema.prisma` | Run `npm run prisma:generate` then restart |
| Change type | Behaviour |
| ----------------------- | ------------------------------------------------------------------------- |
| TypeScript source files | Automatic restart (tsx watch detects the change) |
| `.env` file | **Not** auto-reloaded — restart the process manually after editing `.env` |
| `prisma/schema.prisma` | Run `npm run prisma:generate` then restart |

**Port config** — set `PORT` in your `.env` (default `4000`). The value is
validated at startup via `src/config/env.ts`; the server refuses to start if
Expand Down
33 changes: 31 additions & 2 deletions backend/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Local infrastructure for backend development: PostgreSQL + Redis.
# Usage: docker compose -f backend/docker-compose.yml up -d
# Local infrastructure for backend development: PostgreSQL, Redis, and the backend app.
# Usage: docker compose -f backend/docker-compose.yml up
#
# One-command startup — brings up Postgres, Redis, and the backend together.
# The app container waits for both services to be healthy before starting.
services:
postgres:
image: postgres:16-alpine
Expand All @@ -25,6 +28,32 @@ services:
- '6379:6379'
volumes:
- tipz_redisdata:/data
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 5s
timeout: 5s
retries: 5

app:
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
ports:
- '${PORT:-3000}:3000'
environment:
NODE_ENV: development
PORT: 3000
DATABASE_URL: postgresql://tipz:tipz@postgres:5432/tipz
REDIS_URL: redis://redis:6379
env_file:
- path: .env
required: false
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy

volumes:
tipz_pgdata:
Expand Down
Loading
Loading