Skip to content

Commit bcf5b8c

Browse files
authored
Merge branch 'main' into feat/subs
2 parents 1402152 + c06f99f commit bcf5b8c

202 files changed

Lines changed: 25572 additions & 6719 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
**/.git
2+
**/node_modules
3+
**/dist
4+
**/build
5+
**/.next
6+
**/coverage
7+
**/*.log
8+
**/*.db
9+
**/*.db-journal
10+
**/data
11+
**/.env
12+
**/.env.*
13+
!**/.env.example
14+
contract/target

.editorconfig

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
9+
[*.{ts,tsx,js,jsx,cjs,mjs,json,yaml,yml,md}]
10+
indent_style = space
11+
indent_size = 2
12+
13+
[*.rs]
14+
indent_style = space
15+
indent_size = 4
16+
17+
[Makefile]
18+
indent_style = tab
19+
20+
[*.md]
21+
trim_trailing_whitespace = false

.env.example

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Root .env — values here are picked up by docker compose via ${VAR} substitution.
2+
# Copy to .env and fill in your values:
3+
# cp .env.example .env
4+
5+
# ── Stellar connectivity ──────────────────────────────────────────────────────
6+
STELLAR_RPC_URL=https://soroban-testnet.stellar.org:443
7+
STELLAR_NETWORK=testnet
8+
STELLAR_NETWORK_PASSPHRASE=Test SDF Network ; September 2015
9+
10+
# Replace with your deployed contract ID
11+
CONTRACT_ADDRESSES=[{"address":"CXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","events":["*"]}]
12+
13+
# ── Dashboard ─────────────────────────────────────────────────────────────────
14+
# Vite embeds this at BUILD time — change requires `docker compose up --build`
15+
VITE_EVENTS_API_URL=http://localhost:8787/api/events
16+
VITE_STELLAR_NETWORK=TESTNET
17+
18+
# ── Optional: Discord notifications ──────────────────────────────────────────
19+
# DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/YOUR_ID/YOUR_TOKEN
20+
# DISCORD_WEBHOOK_ID=YOUR_ID
21+
22+
# ── Logging ───────────────────────────────────────────────────────────────────
23+
LOG_LEVEL=info

.github/dependabot.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
version: 2
2+
3+
updates:
4+
# Dashboard (frontend) npm dependencies
5+
- package-ecosystem: "npm"
6+
directory: "/dashboard"
7+
schedule:
8+
interval: "weekly"
9+
day: "monday"
10+
time: "09:00"
11+
timezone: "UTC"
12+
open-pull-requests-limit: 10
13+
labels:
14+
- "dependencies"
15+
- "frontend"
16+
commit-message:
17+
prefix: "chore(dashboard)"
18+
groups:
19+
react:
20+
patterns:
21+
- "react"
22+
- "react-dom"
23+
- "@types/react"
24+
- "@types/react-dom"
25+
testing:
26+
patterns:
27+
- "@testing-library/*"
28+
- "jest"
29+
- "jest-*"
30+
- "ts-jest"
31+
- "@types/jest*"
32+
typescript-eslint:
33+
patterns:
34+
- "@typescript-eslint/*"
35+
- "eslint*"
36+
- "typescript"
37+
vite:
38+
patterns:
39+
- "vite"
40+
- "@vitejs/*"
41+
42+
# Listener npm dependencies
43+
- package-ecosystem: "npm"
44+
directory: "/listener"
45+
schedule:
46+
interval: "weekly"
47+
day: "monday"
48+
time: "09:00"
49+
timezone: "UTC"
50+
open-pull-requests-limit: 10
51+
labels:
52+
- "dependencies"
53+
- "listener"
54+
commit-message:
55+
prefix: "chore(listener)"
56+
57+
# Rust/Cargo contract dependencies
58+
- package-ecosystem: "cargo"
59+
directory: "/contract"
60+
schedule:
61+
interval: "weekly"
62+
day: "monday"
63+
time: "09:00"
64+
timezone: "UTC"
65+
open-pull-requests-limit: 5
66+
labels:
67+
- "dependencies"
68+
- "contract"
69+
commit-message:
70+
prefix: "chore(contract)"
71+
72+
# GitHub Actions
73+
- package-ecosystem: "github-actions"
74+
directory: "/"
75+
schedule:
76+
interval: "weekly"
77+
day: "monday"
78+
time: "09:00"
79+
timezone: "UTC"
80+
open-pull-requests-limit: 5
81+
labels:
82+
- "dependencies"
83+
- "github-actions"
84+
commit-message:
85+
prefix: "chore(ci)"

.github/pull_request_template.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
## Overview
2+
3+
<!-- What does this PR change and why? -->
4+
5+
## Related Issue
6+
7+
Closes #<!-- issue number -->
8+
9+
## Changes
10+
11+
<!-- List the key files/areas modified -->
12+
13+
## Verification
14+
15+
<!-- What commands did you run to verify this works? -->
16+
17+
```bash
18+
# e.g.
19+
cd dashboard && npm test
20+
cd listener && npm run typecheck && npm test
21+
cd contract/contracts/hello-world && cargo test
22+
```
23+
24+
## How to Test
25+
26+
<!-- Any manual steps a reviewer needs beyond running the test suite -->
27+
28+
## Checklist
29+
30+
- [ ] Branch is up to date with `main`
31+
- [ ] Tests added/updated and all pass locally
32+
- [ ] `cargo fmt --all` run (if Rust changes)
33+
- [ ] `npm run lint` passes (if TypeScript changes)
34+
- [ ] Documentation updated if behavior changed

.github/workflows/ci.yml

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,39 @@ name: CI
22

33
on:
44
pull_request:
5-
paths:
6-
- 'listener/src/migrations/**'
7-
- 'listener/src/database/**'
8-
- 'listener/src/scripts/**'
9-
- 'listener/package.json'
105
push:
116
branches:
127
- main
138
- staging
149

1510
jobs:
11+
format:
12+
name: Formatting checks
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Setup Node
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 22
21+
22+
- name: Install dashboard dependencies
23+
working-directory: dashboard
24+
run: npm ci
25+
26+
- name: Check dashboard formatting (Prettier)
27+
working-directory: dashboard
28+
run: npm run format:check
29+
30+
- name: Install listener dependencies
31+
working-directory: listener
32+
run: npm ci
33+
34+
- name: Check listener formatting (Prettier)
35+
working-directory: listener
36+
run: npm run format:check
37+
1638
frontend:
1739
name: Frontend (lint, typecheck, test)
1840
runs-on: ubuntu-latest
@@ -21,7 +43,7 @@ jobs:
2143
- name: Setup Node
2244
uses: actions/setup-node@v4
2345
with:
24-
node-version: 22
46+
node-version: 20
2547
cache: "npm"
2648
cache-dependency-path: dashboard/package-lock.json
2749
- name: Install dependencies
@@ -54,7 +76,7 @@ jobs:
5476
- name: Setup Node
5577
uses: actions/setup-node@v4
5678
with:
57-
node-version: 22
79+
node-version: 20
5880
cache: "npm"
5981
cache-dependency-path: listener/package-lock.json
6082
- name: Install dependencies

.github/workflows/preview-cleanup.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
- uses: actions/checkout@v4
1818

1919
- name: Delete Cloudflare Pages deployment
20+
if: github.event.pull_request.head.repo.full_name == github.repository
2021
uses: cloudflare/wrangler-action@v3
2122
with:
2223
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}

.github/workflows/preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Setup Node
2424
uses: actions/setup-node@v4
2525
with:
26-
node-version: 18
26+
node-version: 20
2727
cache: npm
2828
cache-dependency-path: dashboard/package-lock.json
2929

.github/workflows/staging.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,20 @@ jobs:
3131
cd listener
3232
npm ci
3333
npm run build
34+
- name: Start listener (background)
35+
run: |
36+
cd listener
37+
nohup npm run start >/tmp/listener.log 2>&1 &
38+
echo $! >/tmp/listener.pid
3439
- run: |
3540
cd dashboard
3641
npm ci
3742
npm run build
3843
- run: |
39-
bash scripts/health-check.sh http://localhost:3000/health
44+
bash scripts/health-check.sh
45+
- name: Stop listener
46+
if: always()
47+
run: |
48+
if [ -f /tmp/listener.pid ]; then
49+
kill "$(cat /tmp/listener.pid)" || true
50+
fi

.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Dependencies
2+
node_modules/
3+
4+
# Build outputs
5+
dist/
6+
build/
7+
.next/
8+
out/
9+
coverage/
10+
11+
# Env / local
12+
.env
13+
.env.*
14+
!.env.example
15+
*.log
16+
.DS_Store
17+
18+
# Tooling / data
19+
data/
20+
test-data/
21+
*.db
22+
*.db-journal

0 commit comments

Comments
 (0)