Skip to content

Commit db97ed8

Browse files
committed
Merge branch 'feat/dashboard-analytics'
2 parents 47ed950 + e418b00 commit db97ed8

11 files changed

Lines changed: 1183 additions & 47 deletions

File tree

.github/workflows/pr-checks.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,10 @@ jobs:
2323
# 2. PR title prefix → type labels (enhancement, bug, docs, etc.)
2424
auto-label:
2525
if: >-
26+
github.event.action == 'opened' &&
2627
github.event.pull_request.user.login != 'github-actions[bot]' &&
2728
github.event.pull_request.user.login != 'release-please[bot]' &&
28-
github.event.pull_request.user.login != 'dependabot[bot]' &&
29-
github.event.action != 'labeled' &&
30-
github.event.action != 'unlabeled'
29+
github.event.pull_request.user.login != 'dependabot[bot]'
3130
runs-on: ubuntu-latest
3231
steps:
3332
- uses: actions/checkout@v6

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx lint-staged

.lintstagedrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"*.{ts,tsx}": ["cd frontend && pnpm exec eslint --fix"],
3+
"*.rs": ["cargo fmt --check"]
4+
}

CONTRIBUTING.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,25 @@ cargo build --target wasm32-unknown-unknown --release
3535

3636
```bash
3737
cd frontend
38+
cp .env.example .env # Copy environment variables
3839
pnpm install
3940
pnpm dev # Start dev server
4041
pnpm build # Production build
4142
pnpm lint # Run linter
4243
```
4344

45+
### Pre-commit Hooks
46+
47+
This project uses [husky](https://typicode.github.io/husky/) and [lint-staged](https://github.com/lint-staged/lint-staged) to run automated checks before commits. The pre-commit hook runs:
48+
49+
- **ESLint** on staged `.ts`/`.tsx` files in the frontend
50+
- **cargo fmt --check** on staged `.rs` files in the contracts
51+
52+
These checks help prevent formatting issues from reaching CI. The hooks are automatically installed after running `pnpm install` in the frontend directory.
53+
54+
To troubleshoot hook issues, check `.husky/pre-commit` and `.lintstagedrc`.
55+
The `.env.example` file contains optional configuration for connecting to Stellar testnet. These variables will be required once contract integration is complete.
56+
4457
## Branch Naming
4558

4659
Use conventional prefixes:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ See [SECURITY.md](SECURITY.md) for vulnerability disclosure.
245245

246246
<p align="center">
247247
<a href="https://github.com/lernza/lernza/graphs/contributors">
248-
<img src="https://contrib.rocks/image?repo=lernza/lernza" alt="Contributors" />
248+
<img src="https://stg.contrib.rocks/image?repo=lernza/lernza" alt="Contributors" />
249249
</a>
250250
</p>
251251

frontend/.env.example

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Soroban RPC endpoint for chain interactions
2+
VITE_SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
3+
4+
# Network identifier (testnet/mainnet)
5+
VITE_NETWORK_PASSPHRASE=Test SDF Network ; September 2015
6+
7+
# Contract addresses (deploy your own contracts or use deployed addresses)
8+
VITE_QUEST_CONTRACT_ID=
9+
VITE_MILESTONE_CONTRACT_ID=
10+
VITE_REWARDS_CONTRACT_ID=

frontend/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ node_modules
1111
dist
1212
dist-ssr
1313
*.local
14+
.env
15+
.env.local
1416

1517
# Editor directories and files
1618
.vscode/*

0 commit comments

Comments
 (0)