Skip to content

Commit b33c8ad

Browse files
committed
Initial open-source release
0 parents  commit b33c8ad

286 files changed

Lines changed: 53895 additions & 0 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.

.env.example

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Database
2+
DATABASE_URL="postgresql://username:password@host:port/database"
3+
TEST_DATABASE_URL="postgresql://username:password@host:port/test_database" # Optional: override database used in tests
4+
5+
# Better Auth
6+
BETTER_AUTH_SECRET="generate-a-long-secret"
7+
BETTER_AUTH_URL="http://localhost:3000"
8+
NEXT_PUBLIC_BETTER_AUTH_URL="http://localhost:3000/api/auth"
9+
10+
# Google OAuth (optional)
11+
GOOGLE_CLIENT_ID="your-google-client-id"
12+
GOOGLE_CLIENT_SECRET="your-google-client-secret"
13+
14+
# Convex (hosted)
15+
NEXT_PUBLIC_CONVEX_URL="https://your-project.convex.cloud"
16+
CONVEX_DEPLOY_KEY="prod:your-project|your-deploy-key" # For CI/CD deployments
17+
18+
# Convex (local Docker - optional, for dev:local)
19+
# CONVEX_SELF_HOSTED_URL="http://127.0.0.1:3210"
20+
# CONVEX_SELF_HOSTED_ADMIN_KEY="local-dev|01e5f753250a1fe22c9ff160b4a610060943bc2cf0e75c6c4d559484660548843bded7168d8eee5b454c255adda9e1d942"
21+
22+
# App URLs
23+
NEXT_PUBLIC_APP_URL="http://localhost:3000"
24+
25+
# Strava Integration
26+
NEXT_PUBLIC_STRAVA_CLIENT_ID="your-strava-client-id"
27+
STRAVA_CLIENT_SECRET="your-strava-client-secret"
28+
STRAVA_VERIFY_TOKEN="random-string-for-webhook-verification"
29+
STRAVA_WEBHOOK_URL="https://yourdomain.com/api/webhooks/strava"
30+
31+
# Stripe (per-challenge keys are stored in the database, this encrypts them)
32+
STRIPE_ENCRYPTION_KEY="generate-a-32-character-secret-key"
33+
34+
# Optional: Development
35+
NODE_ENV="development"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Bug report
3+
about: Report a problem
4+
labels: bug
5+
---
6+
7+
## Summary
8+
9+
## Steps to reproduce
10+
11+
## Expected behavior
12+
13+
## Actual behavior
14+
15+
## Environment
16+
- OS:
17+
- Node version:
18+
- pnpm version:
19+
20+
## Additional context

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Security issues
4+
url: https://march.fit
5+
about: Please report security issues via email to security@march.fit.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
name: Feature request
3+
about: Propose an idea
4+
labels: enhancement
5+
---
6+
7+
## Problem
8+
9+
## Proposed solution
10+
11+
## Alternatives considered
12+
13+
## Additional context

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
## Summary
2+
3+
## Testing
4+
- [ ] pnpm lint
5+
- [ ] pnpm typecheck
6+
- [ ] Other (describe)
7+
8+
## Screenshots (if UI)
9+
10+
## Notes

.github/workflows/test.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
8+
9+
env:
10+
PNPM_VERSION: 10.14.0
11+
12+
jobs:
13+
checks:
14+
name: Lint, Typecheck, and Build
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Fetch base branch for turbo --affected
24+
if: github.event_name == 'pull_request'
25+
run: git fetch origin ${{ github.event.pull_request.base.ref }}
26+
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: '18'
31+
32+
- name: Setup pnpm
33+
uses: pnpm/action-setup@v4
34+
with:
35+
version: ${{ env.PNPM_VERSION }}
36+
37+
- name: Install dependencies
38+
run: pnpm install --frozen-lockfile
39+
40+
- name: Lint
41+
run: pnpm lint
42+
43+
- name: Typecheck
44+
run: pnpm typecheck
45+
46+
- name: Build
47+
env:
48+
NEXT_PUBLIC_CONVEX_URL: "https://example.convex.cloud"
49+
NEXT_PUBLIC_BETTER_AUTH_URL: "http://localhost:3000/api/auth"
50+
NEXT_PUBLIC_APP_URL: "http://localhost:3000"
51+
NEXT_PUBLIC_STRAVA_CLIENT_ID: "12345"
52+
run: pnpm build
53+
54+
tests:
55+
name: Tests
56+
runs-on: ubuntu-latest
57+
58+
steps:
59+
- name: Checkout code
60+
uses: actions/checkout@v4
61+
62+
- name: Setup Node.js
63+
uses: actions/setup-node@v4
64+
with:
65+
node-version: '18'
66+
67+
- name: Setup pnpm
68+
uses: pnpm/action-setup@v4
69+
with:
70+
version: ${{ env.PNPM_VERSION }}
71+
72+
- name: Install dependencies
73+
run: pnpm install --frozen-lockfile
74+
75+
- name: Run tests
76+
run: pnpm test

.gitignore

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Dependencies
2+
node_modules/
3+
.pnpm-store/
4+
5+
# Environment variables
6+
.env
7+
.env.local
8+
.env.development.local
9+
.env.test.local
10+
.env.production.local
11+
12+
# Build outputs
13+
dist/
14+
build/
15+
.next/
16+
.turbo/
17+
storybook-static/
18+
19+
# Cache directories
20+
.cache/
21+
*.tsbuildinfo
22+
23+
# OS generated files
24+
.DS_Store
25+
.DS_Store?
26+
._*
27+
.Spotlight-V100
28+
.Trashes
29+
ehthumbs.db
30+
Thumbs.db
31+
32+
# IDE files
33+
.vscode/
34+
.idea/
35+
*.swp
36+
*.swo
37+
38+
# Logs
39+
logs
40+
*.log
41+
npm-debug.log*
42+
yarn-debug.log*
43+
yarn-error.log*
44+
pnpm-debug.log*
45+
46+
# Database
47+
*.sqlite
48+
*.sqlite3
49+
*.db
50+
51+
# Convex
52+
packages/backend/.env.local
53+
packages/backend/.env
54+
packages/backend/.env.local.self-hosted
55+
56+
# Misc
57+
coverage/
58+
.nyc_output/
59+
.vercel
60+
scripts/seed-data/*.zip

.npmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
shamefully-hoist=true
2+
public-hoist-pattern[]=*convex*
3+

0 commit comments

Comments
 (0)