feat: add real Stripe integration, e2e tests, and Pi deployment

Replace documentation-only repo with working code:

- Stripe integration: webhook handler (8 event types), billing API
  (customers, checkout, payments, subscriptions, invoices)
- Express API server with health endpoint, structured logging
- E2E tests (Playwright): health, webhook signature verification,
  billing API validation
- Unit tests: webhook event handler coverage for all event types
- Pi deployment: deploy.sh (rsync + systemd), NGINX load balancer
  across Pi cluster, Docker support
- CI/CD: test workflow, Pi deploy workflow, updated auto-deploy
  and self-healing to run real tests before deploying
- Move resume docs to docs/ to separate code from documentation

https://claude.ai/code/session_01Mf5Pg82fV6BTRS9GnpV7nr
This commit is contained in:
Claude
2026-03-04 09:00:51 +00:00
parent dfa351891e
commit 20232bfd69
31 changed files with 1409 additions and 299 deletions

22
Dockerfile Normal file
View File

@@ -0,0 +1,22 @@
FROM node:20-slim AS base
WORKDIR /app
# Install production dependencies only
COPY package.json package-lock.json* ./
RUN npm ci --production 2>/dev/null || npm install --production
# Copy application code
COPY src/ ./src/
ENV NODE_ENV=production
ENV PORT=3000
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD node -e "const http = require('http'); http.get('http://localhost:3000/api/health', (r) => process.exit(r.statusCode === 200 ? 0 : 1)).on('error', () => process.exit(1));"
USER node
CMD ["node", "src/server.js"]