Skip to content

Commit 149db26

Browse files
add local demo data mode
1 parent abcefab commit 149db26

8 files changed

Lines changed: 561 additions & 7 deletions

File tree

.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ NEXTAUTH_SECRET=your-secret-here # Generate with: openssl rand -base64 32
1111
GITHUB_ID=your-github-oauth-app-id
1212
GITHUB_SECRET=your-github-oauth-app-secret
1313

14+
# Local visual QA (optional)
15+
# Set to 1 to use built-in demo leaderboard/profile data instead of Supabase.
16+
# NEXT_PUBLIC_VIBERANK_DEMO_DATA=1
17+
1418
# To get GitHub OAuth credentials:
1519
# 1. Go to https://github.com/settings/developers
1620
# 2. Click "New OAuth App"

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,14 @@ pnpm dev
138138

139139
Open <http://localhost:3000>.
140140

141+
For local visual QA without a Supabase project, enable the built-in demo data:
142+
143+
```bash
144+
NEXT_PUBLIC_VIBERANK_DEMO_DATA=1 pnpm dev
145+
```
146+
147+
Demo data is read-only and only intended to render realistic leaderboard, profile, model-list, and hire-page states during UI review.
148+
141149
### Useful scripts
142150

143151
| Command | What it does |
@@ -146,7 +154,7 @@ Open <http://localhost:3000>.
146154
| `pnpm build` | Production build |
147155
| `pnpm start` | Serve the production build |
148156
| `pnpm lint` | Run `next lint` |
149-
| `pnpm test` | Run the ccusage normalization/validation tests (`node test/ccusage.test.mts`; pass a `cc.json` path to also test real data) |
157+
| `pnpm test` | Run the ccusage and data-layer tests (`node test/ccusage.test.mts`; pass a `cc.json` path to also test real data) |
150158
| `pnpm exec tsc --noEmit` | Type-check without emitting |
151159

152160
## Tech stack

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"build": "next build",
99
"start": "next start",
1010
"lint": "next lint",
11-
"test": "node test/ccusage.test.mts"
11+
"test": "node test/ccusage.test.mts && for f in test/*.test.mts; do [ \"$f\" = \"test/ccusage.test.mts\" ] || node \"$f\" || exit 1; done"
1212
},
1313
"dependencies": {
1414
"@auth/core": "^0.40.0",

0 commit comments

Comments
 (0)