Skip to content

Commit 26eba84

Browse files
udiedrichsenclaude
andcommitted
feat: Complete prototype with auth, dashboard, and donation flow
This commit includes the full CodeHeart prototype implementation: Infrastructure: - Next.js 14 with TypeScript and Tailwind CSS - Vitest + React Testing Library (25 tests passing) - Prettier with Tailwind plugin - Husky pre-commit hooks with lint-staged - ESLint configuration - GitHub Actions CI/CD (lint, build, security scans) - next-intl i18n (German/English) - next-themes (light/dark mode) Pages: - Landing page with hero, features, stats sections - Login/Register pages with mock auth - Donor dashboard with donation history - Codeword search and donation flow - Beneficiaries listing with filtering Components: - UI components: Button, Input, Card, Badge, Progress - FeatureCard, Navbar, ThemeToggle, LanguageToggle Data Layer: - Zustand store with localStorage persistence - Mock data generation with @faker-js/faker - Beneficiary, Donation, User models 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
0 parents  commit 26eba84

Some content is hidden

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

59 files changed

+17160
-0
lines changed

.env.example

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Environment Variables Template
2+
# Copy this file to .env.local and fill in your values
3+
4+
# Supabase (for future use)
5+
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
6+
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
7+
8+
# Stripe (for future use)
9+
STRIPE_SECRET_KEY=your_stripe_secret_key
10+
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
11+
12+
# Email (for future use)
13+
RESEND_API_KEY=your_resend_api_key

.eslintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "next/core-web-vitals"
3+
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Bug Report
2+
description: File a bug report
3+
title: "[Bug]: "
4+
labels: ["bug", "triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to fill out this bug report!
10+
- type: dropdown
11+
id: stakeholder
12+
attributes:
13+
label: Which type of user are you?
14+
description: This helps us understand the impact
15+
options:
16+
- Donor
17+
- Social Worker
18+
- Beneficiary
19+
- Developer
20+
- Other
21+
validations:
22+
required: true
23+
- type: textarea
24+
id: what-happened
25+
attributes:
26+
label: What happened?
27+
description: Also tell us, what did you expect to happen?
28+
placeholder: Tell us what you see!
29+
validations:
30+
required: true
31+
- type: textarea
32+
id: steps-to-reproduce
33+
attributes:
34+
label: Steps to reproduce
35+
description: How can we reproduce this issue?
36+
placeholder: |
37+
1. Go to '...'
38+
2. Click on '....'
39+
3. Scroll down to '....'
40+
4. See error
41+
validations:
42+
required: true
43+
- type: dropdown
44+
id: browsers
45+
attributes:
46+
label: What browsers are you seeing the problem on?
47+
multiple: true
48+
options:
49+
- Firefox
50+
- Chrome
51+
- Safari
52+
- Microsoft Edge
53+
- Other
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: 💝 Community Feedback
2+
description: Share feedback as a community member, social worker, or beneficiary
3+
title: "[FEEDBACK]: "
4+
labels: ["feedback", "community"]
5+
assignees:
6+
- community-team
7+
8+
body:
9+
- type: dropdown
10+
id: role
11+
attributes:
12+
label: Your Role
13+
description: How are you connected to CodeHeart?
14+
options:
15+
- Beneficiary
16+
- Social Worker
17+
- Partner Organization
18+
- Volunteer
19+
- Donor
20+
- General Community Member
21+
validations:
22+
required: true
23+
24+
- type: textarea
25+
id: feedback
26+
attributes:
27+
label: Your Feedback
28+
description: Please share your thoughts, experiences, or suggestions
29+
placeholder: |
30+
Tell us what's on your mind...
31+
- What works well?
32+
- What could be improved?
33+
- Any concerns?
34+
validations:
35+
required: true
36+
37+
- type: dropdown
38+
id: area
39+
attributes:
40+
label: Feedback Area
41+
description: What aspect of CodeHeart is this about?
42+
multiple: true
43+
options:
44+
- User Experience
45+
- Privacy & Security
46+
- Accessibility
47+
- Language Support
48+
- Payment Process
49+
- Communication
50+
- Other
51+
validations:
52+
required: true
53+
54+
- type: checkboxes
55+
id: consent
56+
attributes:
57+
label: Consent
58+
options:
59+
- label: I consent to this feedback being used to improve CodeHeart
60+
required: true
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: User Story
2+
description: Suggest a new feature or improvement
3+
title: "[Story]: "
4+
labels: ["enhancement", "user-story"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for helping us improve CodeHeart!
10+
- type: dropdown
11+
id: stakeholder-type
12+
attributes:
13+
label: As a...
14+
description: Which type of user will benefit from this?
15+
options:
16+
- Donor
17+
- Social Worker
18+
- Beneficiary
19+
- Investor/Sponsor
20+
- Partner Organization
21+
- Developer
22+
validations:
23+
required: true
24+
- type: textarea
25+
id: user-story
26+
attributes:
27+
label: User Story
28+
description: Complete the user story
29+
placeholder: |
30+
As a [stakeholder type]
31+
I want to [action/feature]
32+
So that [benefit/value]
33+
validations:
34+
required: true
35+
- type: textarea
36+
id: acceptance-criteria
37+
attributes:
38+
label: Acceptance Criteria
39+
description: How will we know when this is complete?
40+
placeholder: |
41+
- [ ] Criterion 1
42+
- [ ] Criterion 2
43+
- [ ] Criterion 3
44+
validations:
45+
required: true
46+
- type: textarea
47+
id: social-impact
48+
attributes:
49+
label: Social Impact
50+
description: How will this help our mission?
51+
placeholder: Describe the positive impact on homeless individuals or the donation process

.github/workflows/ci.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: CI/CD Pipeline
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
8+
9+
env:
10+
NODE_VERSION: '20.x'
11+
12+
jobs:
13+
lint-and-type-check:
14+
name: Lint & Type Check
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ env.NODE_VERSION }}
24+
cache: 'npm'
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Run ESLint
30+
run: npm run lint
31+
32+
- name: Type check
33+
run: npx tsc --noEmit
34+
35+
build:
36+
name: Build
37+
runs-on: ubuntu-latest
38+
needs: lint-and-type-check
39+
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- name: Setup Node.js
44+
uses: actions/setup-node@v4
45+
with:
46+
node-version: ${{ env.NODE_VERSION }}
47+
cache: 'npm'
48+
49+
- name: Install dependencies
50+
run: npm ci
51+
52+
- name: Build application
53+
run: npm run build
54+
env:
55+
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}
56+
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
57+
58+
- name: Upload build artifacts
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: build-files
62+
path: .next/
63+
retention-days: 1

.github/workflows/security.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Security Scan
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main]
8+
schedule:
9+
- cron: '0 0 * * 1' # Weekly on Monday
10+
11+
jobs:
12+
dependency-check:
13+
name: Dependency Security Check
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Run npm audit
20+
run: npm audit --audit-level=moderate
21+
continue-on-error: true
22+
23+
- name: Run Snyk Security Scan
24+
uses: snyk/actions/node@master
25+
env:
26+
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
27+
with:
28+
args: --severity-threshold=medium
29+
30+
code-security:
31+
name: Code Security Analysis
32+
runs-on: ubuntu-latest
33+
34+
steps:
35+
- uses: actions/checkout@v4
36+
37+
- name: Run CodeQL Analysis
38+
uses: github/codeql-action/analyze@v3
39+
with:
40+
languages: javascript, typescript
41+
42+
- name: Run Semgrep
43+
uses: returntocorp/semgrep-action@v1
44+
with:
45+
config: auto

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
.yarn/install-state.gz
8+
9+
# testing
10+
/coverage
11+
12+
# next.js
13+
/.next/
14+
/out/
15+
16+
# production
17+
/build
18+
19+
# misc
20+
.DS_Store
21+
*.pem
22+
23+
# debug
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
27+
28+
# local env files
29+
.env*.local
30+
.env
31+
32+
# vercel
33+
.vercel
34+
35+
# typescript
36+
*.tsbuildinfo
37+
next-env.d.ts
38+
39+
# IDE
40+
.idea
41+
.vscode
42+
*.swp
43+
*.swo

.husky/pre-commit

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

.prettierignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Dependencies
2+
node_modules/
3+
4+
# Build outputs
5+
.next/
6+
out/
7+
dist/
8+
9+
# Cache
10+
.cache/
11+
12+
# Lock files
13+
package-lock.json
14+
15+
# Coverage
16+
coverage/

0 commit comments

Comments
 (0)