Skip to content

Latest commit

 

History

History
62 lines (51 loc) · 1.16 KB

File metadata and controls

62 lines (51 loc) · 1.16 KB

Examples

Example: Service inventory summary

Compute:
- Lambda: user-create, billing-sync, webhook-dispatch

Serverless:
- serverless.yml (runtime: nodejs18.x, memory: 512, timeout: 10)
- serverless.prod.yml (runtime: nodejs20.x, memory: 1024, timeout: 20)

API Routes:
- POST /v1/users (auth: jwt)
- GET /v1/billing (auth: jwt)
- POST /v1/webhook (auth: signature)

Data:
- RDS: users, billing_accounts, invoices

Queues:
- SQS: billing-events, webhook-queue

Storage:
- S3: public-assets, user-uploads

AI:
- OpenAI: /v1/ai/summary (model: gpt-4o)

Example: Top endpoints by usage (confirm with user)

1) POST /v1/webhook - 4.2M req/day, p95 900ms
2) GET /v1/billing - 1.1M req/day, p95 420ms
3) POST /v1/users - 220k req/day, p95 180ms

Example: Monorepo structure

src/
  app/
  server/
    api/
    jobs/
    db/
  types/
  lib/

Example: API migration mapping

POST /v1/users
  -> app/api/v1/users/route.ts (POST)
  -> auth: jwt (middleware)
  -> response: { id, email, createdAt }

Example: PG dump staging notes

Dump location: secure storage (not in repo)
Retention: 30 days
Planetscale env vars: DATABASE_URL, DIRECT_URL