How nextify-limited/saasfly works
Saasfly is a Next.js SaaS starter with a public marketing and documentation site, user authentication, a customer dashboard, billing, and Kubernetes-cluster screens. The user-facing flow runs from public pricing or sign-in into authenticated dashboard features; billing operations are exposed through the API and Stripe webhooks update subscription records. The graph also preserves the documented i18n and SEO capabilities and the cluster and admin areas visible in the route tree. Several routes and API routers were not sampled, so their internal connections are omitted rather than inferred.
Main entry points: stripe.ts Billing procedures · webhooks.ts Webhook processing · clerk.ts Clerk authentication · index.ts Application database
Components 22
Next.js experience
- Marketing site
apps/nextjs/src/app/[lang]/(marketing)/page.tsx - Blog and docs
apps/nextjs/src/app/[lang]/(marketing)/blog/page.tsx - Pricing pages
apps/nextjs/src/app/[lang]/(marketing)/pricing/page.tsx - Sign-in pages
apps/nextjs/src/app/[lang]/(auth)/login/page.tsx - Customer dashboard
apps/nextjs/src/app/[lang]/(dashboard)/dashboard/page.tsx - Account settings
apps/nextjs/src/app/[lang]/(dashboard)/dashboard/settings/page.tsx - Cluster editor
apps/nextjs/src/app/[lang]/(editor)/editor/cluster/[clusterId]/page.tsx - Admin dashboard
apps/nextjs/src/app/admin/(dashboard)/dashboard/page.tsx
Identity and access
- Clerk authentication
packages/auth/clerk.ts - Auth proxy
apps/auth-proxy/routes/[...auth].ts
API and data
- tRPC context
packages/api/src/trpc.ts - API routers
packages/api/src/root.ts - Cluster procedures
packages/api/src/router/k8s.ts - Customer procedures
packages/api/src/router/customer.ts - Subscription query
packages/api/src/router/auth.ts - Application database
packages/db/index.ts
Billing
- Billing procedures
packages/api/src/router/stripe.ts - Subscription plans
packages/common/src/subscriptions.ts - Stripe integration
packages/stripe/src/index.ts - Stripe webhook route
apps/nextjs/src/app/api/webhooks/stripe/route.ts - Webhook processing
packages/stripe/src/webhooks.ts
Other components
- Visitor
Connections 20
- Visitor → Marketing site: visits
README.md - Visitor → Sign-in pages: signs in
README.md - Visitor → Pricing pages: views plans
README.md - Visitor → Customer dashboard: uses app
- Customer dashboard → Clerk authentication: uses identity
apps/nextjs/src/app/[lang]/(dashboard)/dashboard/page.tsx - Marketing site → Blog and docs: offers content
- Pricing pages → Subscription plans: displays plans
- Auth proxy → Clerk authentication: forwards auth
- Sign-in pages → Clerk authentication: authenticates
- tRPC context → API routers: invokes procedures
packages/api/src/root.ts - API routers → tRPC context: uses primitives
packages/api/src/root.ts - Subscription query → Application database: reads subscription
packages/api/src/router/auth.ts - Billing procedures → Application database: accesses records
packages/api/src/router/stripe.ts - Billing procedures → Stripe integration: uses billing
packages/api/src/router/stripe.ts - Billing procedures → Subscription plans: uses plan data
packages/api/src/router/stripe.ts - Stripe webhook route → Stripe integration: verifies event
apps/nextjs/src/app/api/webhooks/stripe/route.ts - Stripe webhook route → Webhook processing: dispatches event
apps/nextjs/src/app/api/webhooks/stripe/route.ts - Webhook processing → Stripe integration: retrieves subscription
packages/stripe/src/webhooks.ts - Webhook processing → Application database: updates customer
packages/stripe/src/webhooks.ts - Cluster editor → Cluster procedures: uses procedures