Skip to content

Commit cd7e8c2

Browse files
committed
Merge origin/main into feat/103-achievement-service-setup
2 parents 6cc2383 + 7a0fb37 commit cd7e8c2

969 files changed

Lines changed: 125119 additions & 11291 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.

.editorconfig

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

.env.blockchain-events.example

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Blockchain Events Configuration
2+
# Stellar Horizon API endpoint for event polling
3+
STELLAR_HORIZON_URL=https://horizon-testnet.stellar.org
4+
5+
# Stellar network (testnet or mainnet)
6+
STELLAR_NETWORK=testnet
7+
8+
# Comma-separated list of quest contract addresses to monitor
9+
QUEST_CONTRACT_ADDRESSES=contract1-address,contract2-address,contract3-address
10+
11+
# Polling interval in seconds (default: 30)
12+
BLOCKCHAIN_EVENTS_POLL_INTERVAL=30
13+
14+
# Maximum retry attempts for failed events (default: 3)
15+
BLOCKCHAIN_EVENTS_MAX_RETRIES=3
16+
17+
# Dead letter queue cleanup interval in hours (default: 24)
18+
BLOCKCHAIN_EVENTS_DLQ_CLEANUP_INTERVAL_HOURS=24
19+
20+
# Event processing timeout in milliseconds (default: 30000)
21+
BLOCKCHAIN_EVENTS_PROCESSING_TIMEOUT_MS=30000

.gitattributes

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Auto-detect text files
2+
* text=auto eol=lf
3+
4+
# Source code
5+
*.ts text eol=lf
6+
*.js text eol=lf
7+
*.json text eol=lf
8+
*.yml text eol=lf
9+
*.yaml text eol=lf
10+
*.md text eol=lf
11+
12+
# Shell scripts
13+
*.sh text eol=lf
14+
15+
# Windows-friendly batch files
16+
*.bat text eol=crlf
17+
18+
# Binary files
19+
*.png binary
20+
*.jpg binary
21+
*.jpeg binary
22+
*.gif binary
23+
*.ico binary
24+
*.pdf binary
25+
*.woff binary
26+
*.woff2 binary
27+
28+
# Prevent merge conflicts on lock files (generated)
29+
package-lock.json -diff
30+
yarn.lock -diff
31+
pnpm-lock.yaml -diff

.github/ISSUE-344-345-340-PR.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
Summary
2+
-------
3+
4+
This PR adds three new minimal NestJS microservices under `microservices/`:
5+
6+
- `badge-verification-service` — generates badge proofs, builds Merkle-style proofs, simulates on-chain commit, supports revocation, expiration, and shareable proof links.
7+
- `clans-service` — supports clan creation, hierarchical parent linking, territory claims, conflict tracking, and treasury transfers.
8+
- `sponsorship-service` — manages sponsors, campaigns, collaborations, performance metrics, and payouts.
9+
10+
What changed
11+
------------
12+
13+
- Added service skeletons with TypeScript/NestJS entrypoints, in-memory data stores, controllers and services, minimal tests, and Dockerfiles.
14+
15+
Why
16+
---
17+
18+
These services implement the features requested in issues #344, #345 and #340 respectively and provide a minimal, reviewable starting point that satisfies the acceptance criteria.
19+
20+
Testing performed
21+
-----------------
22+
23+
- Added basic unit sanity tests under each service (not wired into root CI). They assert core flows (create + basic actions).
24+
25+
Risks considered
26+
----------------
27+
28+
- Services use in-memory stores for simplicity — intended as a minimal implementation. Persistence, auth, and full production hardening should be added in follow-ups.
29+
30+
Edge cases handled
31+
------------------
32+
33+
- Proofs can be revoked and expire; verification checks for those states. Clans and Sponsorship APIs validate basic relationships.
34+
35+
Closes
36+
------
37+
38+
Closes: #344
39+
Closes: #345
40+
Closes: #340
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Bug report
2+
description: Report broken or unexpected behavior
3+
labels: ["bug", "triage"]
4+
5+
---
6+
7+
## Describe the bug
8+
9+
<!-- A clear, one-paragraph description of what went wrong. -->
10+
11+
## Steps to reproduce
12+
13+
1.
14+
2.
15+
3.
16+
17+
## Expected behavior
18+
19+
<!-- What you thought would happen. -->
20+
21+
## Actual behavior
22+
23+
<!-- What actually happened. Paste error output, stack traces, or screenshots. -->
24+
25+
```text
26+
<paste logs here>
27+
```
28+
29+
## Environment
30+
31+
- OS: <!-- e.g. macOS 14.4, Ubuntu 22.04, Windows 11 -->
32+
- Node version: <!-- output of `node -v` -->
33+
- Branch / commit: <!-- output of `git rev-parse --abbrev-ref HEAD` and `git rev-parse --short HEAD` -->
34+
- Install method: <!-- npm ci / npm install / Docker -->
35+
- Are you running: <!-- local / docker-compose / production / staging -->
36+
37+
## Minimal reproduction
38+
39+
<!--
40+
If possible, a repo, code snippet, or curl command that reproduces the issue.
41+
Example:
42+
curl -X POST http://localhost:3000/api/v1/auth/wallet/challenge \
43+
-H 'Content-Type: application/json' \
44+
-d '{"walletAddress":"GABC..."}'
45+
-->
46+
47+
## Possible cause
48+
49+
<!-- Optional: your hypothesis about the root cause. -->
50+
51+
## Additional context
52+
53+
<!-- Anything else that might help — related issues, PRs, screenshots. -->
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Feature request
2+
description: Suggest a new feature or improvement
3+
labels: ["enhancement"]
4+
5+
---
6+
7+
## Problem
8+
9+
<!-- What user-facing problem does this solve? Who is affected? -->
10+
11+
## Proposed solution
12+
13+
<!-- A clear description of what you want to happen. -->
14+
15+
## Alternatives considered
16+
17+
<!-- Other approaches you considered and why this one is better. -->
18+
19+
## Acceptance criteria
20+
21+
<!-- Bullet list of what "done" looks like. -->
22+
23+
- [ ]
24+
- [ ]
25+
- [ ]
26+
27+
## Out of scope
28+
29+
<!-- What this PR/feature will NOT do, to keep scope tight. -->
30+
31+
## Additional context
32+
33+
<!-- Mockups, related issues, prior art from other projects. -->

.github/ISSUE_TEMPLATE/question.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Question / Support
2+
description: Ask a question or request help (not a bug)
3+
labels: ["question"]
4+
5+
---
6+
7+
## What are you trying to do?
8+
9+
<!-- One paragraph describing your goal. -->
10+
11+
## What have you tried?
12+
13+
<!-- Links to docs you read, commands you ran, etc. -->
14+
15+
## Environment (if relevant)
16+
17+
- OS:
18+
- Node version:
19+
- Branch / commit:
20+
21+
## Additional context
22+
23+
<!-- Anything else that might help us answer. -->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
## What does this PR do?
2+
3+
<!-- One sentence summary. Example: "Adds JWT-based session refresh for the wallet-auth flow." -->
4+
5+
## Why?
6+
7+
<!-- Link the issue: Fixes #123, Closes #456, or "Part of #789" -->
8+
9+
## Type of change
10+
11+
- [ ] Bug fix (non-breaking change that fixes an issue)
12+
- [ ] New feature (non-breaking change that adds functionality)
13+
- [ ] Breaking change (fix or feature that would cause existing behavior to change)
14+
- [ ] Refactor (no behavior change)
15+
- [ ] Docs / CI / tooling
16+
17+
## How was it tested?
18+
19+
- [ ] Unit tests added/updated
20+
- [ ] E2E test added/updated
21+
- [ ] Manual verification steps below
22+
23+
<!-- Describe the manual verification you ran, including curl commands or screenshots. -->
24+
25+
## Checklist
26+
27+
- [ ] `npm run lint` passes
28+
- [ ] `npm run format:check` passes (run `npm run format` if not)
29+
- [ ] `npm run typecheck` passes
30+
- [ ] `npm test` passes
31+
- [ ] I added/updated tests for the change
32+
- [ ] I updated relevant docs (README, JSDoc, comments)
33+
- [ ] I added a changeset / migration if schema changed
34+
- [ ] I read `CONTRIBUTING.md`
35+
36+
## Screenshots / Logs
37+
38+
<!-- Paste logs, screenshots, or curl output that proves the change works. -->
39+
40+
## Risk & rollout
41+
42+
<!-- Who is affected? Does it need a feature flag? A migration? Backwards-incompatible? -->

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI Pipeline
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout Code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '20'
21+
cache: 'npm'
22+
23+
- name: Install Dependencies
24+
run: npm ci
25+
26+
- name: Lint Check
27+
run: npm run lint:check
28+
29+
- name: Format Check
30+
run: npm run format:check
31+
32+
- name: TypeScript Type Check
33+
run: npm run typecheck
34+
35+
- name: Run Unit Tests
36+
run: npm test
37+
38+
- name: Build
39+
run: npm run build

.gitignore

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,51 @@
1-
node_modules
1+
# Dependencies
2+
node_modules/
3+
jspm_packages/
4+
5+
# Build output
6+
dist/
7+
build/
8+
*.tsbuildinfo
9+
coverage/
10+
.nyc_output/
11+
12+
# Logs
213
*.log
14+
npm-debug.log*
15+
yarn-debug.log*
16+
yarn-error.log*
17+
pnpm-debug.log*
18+
lerna-debug.log*
319

420
# Environment files
521
.env
22+
.env.local
23+
.env.*.local
24+
.env.development
25+
.env.production
26+
27+
# Editor / OS
28+
.DS_Store
29+
Thumbs.db
30+
.idea/
31+
.vscode/*
32+
!.vscode/extensions.json
33+
!.vscode/settings.json
34+
*.swp
35+
*.swo
36+
37+
# Testing
38+
junit.xml
39+
test-results/
40+
playwright-report/
41+
playwright/.cache/
42+
43+
# Prisma / TypeORM generated
44+
prisma/migrations/dev/
645

7-
dist
46+
# Misc
47+
*.tgz
48+
.pnp.*
49+
.cache/
50+
.tmp/
51+
.temp/

0 commit comments

Comments
 (0)