How kimflip-dev/vibebase-essential works
VibeBase Essential is a Next.js SaaS starter kit. Its main user journey is account creation/login, browsing a product, checkout and payment verification, then accessing purchases and receipts in the account area. Separate branches provide blog publishing, gated downloads, inquiries, and administrative management. Supabase backs authentication and application records; PortOne handles payments, with optional Resend email. The graph reflects README-documented capabilities where implementation was not sampled; those links are documented rather than claims of source inspection.
Main entry points: route.ts Payment webhook · actions.ts Payment actions · client.ts PortOne API client · auth.ts Admin authorization
Components 26
Public experience
- Landing page
app/page.tsx
Identity and account
- Authentication
app/auth/actions.ts - OAuth callback
app/auth/callback/route.ts - Member account
app/mypage/actions.ts - Profile settings
app/mypage/profile/page.tsx - Member inquiries
app/mypage/inquiries/actions.ts
Commerce and payments
- Product catalog
app/products/actions.ts - Checkout
app/products/[slug]/checkout/page.tsx - Payment widget
components/products/portone-payment-widget.tsx - Payment actions
app/products/actions.ts - PortOne API client
lib/portone/client.ts - Payment webhook
app/api/webhooks/portone/route.ts - Webhook verification
lib/portone/webhook.ts - Purchase history
app/mypage/purchases/page.tsx
Content and downloads
- Public blog
app/blog/actions.ts - Download catalog
app/download/actions.ts - Gated file delivery
app/api/downloads/[id]/file/route.ts
Administration
- Admin workspace
app/admin/dashboard/page.tsx - Download management
app/admin/downloads/actions.ts - Admin authorization
lib/admin/auth.ts - First-admin bootstrap
lib/admin/bootstrap.ts
Shared services
- Supabase
- Email delivery
lib/email/send.ts
Other components
- Visitor or member
- Resend
- PortOne
Connections 33
- Visitor or member → Landing page: visits
app/page.tsx - Visitor or member → Authentication: registers or logs in
- OAuth callback → First-admin bootstrap: checks first admin
app/auth/callback/route.ts - OAuth callback → Supabase: exchanges session
app/auth/callback/route.ts - Member account → Supabase: reads and updates account
- Profile settings → Member account: invokes profile actions
app/mypage/profile/page.tsx - Profile settings → Supabase: loads current user
app/mypage/profile/page.tsx - Visitor or member → Product catalog: browses products
- Product catalog → Supabase: queries published products
app/products/actions.ts - Checkout → Payment widget: renders
- Checkout → Payment actions: starts checkout
- Payment actions → Supabase: creates pending order
app/products/actions.ts - Payment widget → PortOne: initiates payment
- Payment actions → PortOne API client: verifies payment
app/products/actions.ts - PortOne API client → PortOne: calls payment API
lib/portone/client.ts - PortOne → Payment webhook: sends events
- Payment webhook → Webhook verification: validates signature
app/api/webhooks/portone/route.ts - Payment webhook → PortOne API client: retrieves payment
app/api/webhooks/portone/route.ts - Payment webhook → Supabase: records purchase or refund
app/api/webhooks/portone/route.ts - Purchase history → Payment actions: loads purchases
app/mypage/purchases/page.tsx - Payment actions → Email delivery: sends purchase receipt
app/products/actions.ts - Payment webhook → Email delivery: sends receipt or refund notice
app/api/webhooks/portone/route.ts - Email delivery → Resend: delivers email
- Visitor or member → Public blog: reads posts
- Public blog → Supabase: loads posts
app/blog/actions.ts - Visitor or member → Download catalog: browses downloads
- Download catalog → Supabase: loads download records
app/download/actions.ts - Gated file delivery → Supabase: authorizes file access
app/api/downloads/[id]/file/route.ts - Admin workspace → Admin authorization: checks admin access
- Admin authorization → Supabase: reads role claims
lib/admin/auth.ts - Download management → Admin authorization: requires admin
app/admin/downloads/actions.ts - Download management → Supabase: manages downloads
app/admin/downloads/actions.ts - First-admin bootstrap → Supabase: assigns initial role
lib/admin/bootstrap.ts