tractatus/package.json
TheFlow a36effdce9 feat: implement Koha donation system frontend (Phase 3)
Complete donation form, transparency dashboard, and success pages.

**Frontend Pages:**

Donation Form (public/koha.html):
- Three monthly tiers: $5, $15, $50 NZD
- One-time custom donations
- Anonymous by default with opt-in public acknowledgement
- Donor information form (name optional, email required)
- Stripe Checkout integration
- Allocation transparency (40/30/20/10 breakdown)
- Māori cultural acknowledgement (Koha meaning)
- Comprehensive FAQ section
- Accessible design (WCAG 2.1 AA compliant)

Transparency Dashboard (public/koha/transparency.html):
- Live metrics: total received, monthly supporters, recurring revenue
- Allocation breakdown with animated progress bars
- Recent public donor acknowledgements
- One-time donation statistics
- Auto-refresh every 5 minutes
- Call-to-action to donate

Success Page (public/koha/success.html):
- Animated success confirmation with checkmark
- Donation details verification via session ID
- Next steps explanation (receipt, allocation, dashboard)
- Monthly donor management information
- Links to transparency dashboard and docs
- Error state handling

**Database & Scripts:**

Initialization Script (scripts/init-koha.js):
- Creates MongoDB indexes for koha_donations collection
- Verifies Stripe configuration (keys, price IDs)
- Tests transparency metrics calculation
- Validates database setup
- Provides next steps guide
- npm script: `npm run init:koha`

Package Updates:
- Added Stripe SDK dependency (v14.25.0)
- Added init:koha script to package.json

**Features:**

Privacy-First Design:
 Anonymous donations by default
 Opt-in public acknowledgement
 Email only for receipts
 No payment details stored

User Experience:
 Responsive mobile design
 Keyboard navigation support
 Focus indicators for accessibility
 Loading/error states
 Form validation

Transparency:
 Public metrics API integration
 Real-time donor acknowledgements
 Clear allocation breakdown
 Automatic dashboard updates

Cultural Sensitivity:
 Māori term "Koha" explained
 Te Tiriti acknowledgement
 Indigenous partnership values

**API Integration:**

- POST /api/koha/checkout - Create donation session
- GET /api/koha/transparency - Fetch public metrics
- GET /api/koha/verify/:sessionId - Verify payment status

**Testing Checklist:**

□ Form validation (email required, minimum amount)
□ Tier selection (monthly $5/$15/$50)
□ One-time custom amount input
□ Anonymous vs public acknowledgement toggle
□ Stripe Checkout redirect
□ Success page verification
□ Transparency dashboard data display
□ Mobile responsiveness
□ Keyboard navigation

**Next Steps:**

1. Create Stripe products with currency_options (all 10 currencies)
2. Test with Stripe test cards
3. Implement multi-currency support
4. Add Privacy Policy page
5. Deploy to production

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-08 13:56:56 +13:00

74 lines
2.4 KiB
JSON

{
"name": "tractatus-website",
"version": "0.1.0",
"description": "Tractatus-Based LLM Safety Framework website platform",
"main": "src/server.js",
"scripts": {
"start": "node src/server.js",
"dev": "concurrently -n \"SERVER,WATCHDOG\" -c \"cyan,magenta\" \"nodemon src/server.js\" \"node scripts/framework-watchdog.js\"",
"dev:simple": "nodemon src/server.js",
"build:css": "npx tailwindcss -i ./public/css/src/tailwind.css -o ./public/css/tailwind.css --minify",
"watch:css": "npx tailwindcss -i ./public/css/src/tailwind.css -o ./public/css/tailwind.css --watch",
"test": "jest --coverage",
"test:watch": "jest --watch",
"test:unit": "jest tests/unit",
"test:integration": "jest tests/integration",
"test:security": "jest tests/security",
"lint": "eslint src/ tests/",
"lint:fix": "eslint src/ tests/ --fix",
"migrate:docs": "node scripts/migrate-documents.js",
"init:db": "node scripts/init-db.js",
"init:koha": "node scripts/init-koha.js",
"seed:admin": "node scripts/seed-admin.js",
"generate:pdfs": "node scripts/generate-pdfs.js",
"deploy": "bash scripts/deploy-frontend.sh",
"framework:init": "node scripts/session-init.js",
"framework:watchdog": "node scripts/framework-watchdog.js",
"framework:check": "node scripts/pre-action-check.js",
"framework:recover": "node scripts/recover-framework.js"
},
"keywords": [
"ai-safety",
"llm",
"tractatus",
"digital-sovereignty",
"ai-governance"
],
"author": "John Stroh <john.stroh.nz@pm.me>",
"license": "Apache-2.0",
"dependencies": {
"bcrypt": "^5.1.1",
"cors": "^2.8.5",
"dotenv": "^16.3.1",
"express": "^4.18.2",
"express-rate-limit": "^7.1.5",
"helmet": "^7.1.0",
"highlight.js": "^11.9.0",
"jsonwebtoken": "^9.0.2",
"marked": "^11.0.0",
"mongodb": "^6.3.0",
"puppeteer": "^24.23.0",
"sanitize-html": "^2.11.0",
"stripe": "^14.25.0",
"validator": "^13.11.0",
"winston": "^3.11.0"
},
"devDependencies": {
"@anthropic-ai/sdk": "^0.9.1",
"autoprefixer": "^10.4.21",
"axe-core": "^4.10.3",
"concurrently": "^9.2.1",
"eslint": "^8.56.0",
"jest": "^29.7.0",
"nodemon": "^3.0.2",
"pa11y": "^9.0.1",
"pa11y-reporter-html": "^2.0.0",
"postcss": "^8.5.6",
"supertest": "^6.3.3",
"tailwindcss": "^3.4.18"
},
"engines": {
"node": ">=18.0.0",
"npm": ">=9.0.0"
}
}