Tech Stack
Highlights
- Organizations + memberships with strict tenant isolation in queries.
- Stripe subscription lifecycle (create, upgrade/downgrade, cancel) with webhook verification.
- Plan gating that cleanly separates billing state from app permissions.
- Usage tracking tables for metered features and future analytics.
Description
Most SaaS ideas stall because the same foundation gets rebuilt from scratch: authentication, roles, billing, and deployment. This project is a practical starter kit designed to remove that friction and provide a secure, production-minded baseline for new products.
Project Info
What I Built
- Organizations (tenants), memberships, and roles (Owner/Admin/Member).
- Billing tables tied to Stripe customer + subscription IDs.
- Webhook handler with signature verification and idempotent processing patterns.
- Plan-based feature gating + usage limits (starter/pro/enterprise style).
Data Model
- organizations, memberships, roles
- plans, subscriptions, billing_events
- usage_events, usage_rollups
- audit_events: durable record of security-relevant actions
Deployment Notes
- Reverse proxied with Nginx; API process managed by PM2.
- Environment configuration for secrets (Stripe keys, webhook secret, DB creds).