◆ Case Study · Niche SaaS

A Trilingual AI Niche SaaS Shipped End-to-End

80 pages across 3 languages, Next.js 14 App Router with ISR, Supabase for auth + data, Stripe for subscriptions, and an LLM-powered AI interpretation backend. Designed, built, deployed, and marketed end-to-end.

80
Pages (ES/EN/PT)
3
Languages
12
Zodiac Signs × 3
69
Dream Symbols
Freemium
to Premium
Production deployment
Live and SEO-ranking in 3 languages · details under NDA
Feature Surface
FeatureRoute PatternRenderingNotes
Dream Analysis/[lang]/dream-analysisClient + APIDeepSeek backend, 3 free/month, unlimited premium
Zodiac Signs/[lang]/zodiac-signs/[sign]Static (12 signs × 3 langs)generateStaticParams — 36 pre-rendered pages
Compatibility/[lang]/compatibility/[pair]ISR 300sDynamic matching across all 12 signs
Dream Dictionary/[lang]/dream-dictionary/[symbol]ISR 3600s69 symbols pre-rendered + dynamic Supabase entries
Birth Chart/[lang]/birth-chartClient-renderedNatal chart calculation, premium feature
Blog/[lang]/blog/[slug]ISR 300sTrilingual articles from Supabase
Pricing / Checkout/[lang]/pricingStatic + StripeFreemium → paid tier
Dashboard/[lang]/dashboardServer (auth)Protected by Supabase middleware
Every feature ships in 3 languages simultaneously. Content is not translated at request time — the database stores each language natively, and generateStaticParams walks the language list to produce real static HTML per locale.
Tech Stack

Framework

Next.js14.2.21 App Router
TypeScriptstrict
Tailwind CSS3.4
shadcn/ui15 components
Framer Motionanimations

Backend + Data

SupabasePostgres + Auth
Supabase SSRserver components
Stripecheckout + portal
DeepSeekAI dream interp
React Hook Form + Zodvalidation

Ops + SEO

ISR300s / 3600s windows
Middlewarei18n + auth
Sitemap200+ URLs + hreflang
Schema.orgOrganization + WebSite + SoftwareApp
Verceldeploy
App Router Architecture

The platform is a single Next.js 14 App Router codebase. Every feature lives under src/app/[lang]/ where [lang] is one of en, es, pt. Static content pages are pre-rendered at build + revalidated with ISR. Authenticated pages are server components gated by Supabase middleware. There is no headless CMS, no separate API server, no client-state mess — just the framework.

Edge · Middleware
Language detection · redirects · Supabase session refresh · protected-route auth gate
Rendering · Next.js App Router
Static (zodiac, dream symbols) · ISR (blog, compatibility) · Server components (dashboard) · Client islands (forms, charts)
Data · Supabase
Auth (email + OAuth) · users + subscriptions · blog_posts · symbol_content · dream_history · Row Level Security
Payments · Stripe
Checkout session → webhook → Supabase subscription update · customer portal for self-serve billing
AI · External DeepSeek Backend
Dream interpretation API · prompt engineering per language · usage metered against Supabase subscription tier
SEO · Distribution
Dynamic sitemap (200+ URLs + hreflang) · Schema.org triple · GAEL marketing OS for social distribution
Rendering Strategy per Route
Route GroupStrategyRevalidationWhy
Zodiac signs (12 × 3)Static (SSG)build timeEvergreen content, pure SEO plays
Dream dictionary (69+)ISR3600sRarely changes, but Supabase-editable
Compatibility pairsISR300sPersonalized tone tuning per language
BlogISR300sNew content adds daily via GAEL
Dashboard / historyServer componentper-requestPersonalized, auth-gated, no cache
Dream analysis resultClient + APIn/aStreaming-like UX while DeepSeek runs
Data Model Highlights
TableRole
profilesSupabase user metadata — stripe_customer_id, tier, locale, birth data for chart
dream_historyUser dream submissions + AI interpretations, RLS-scoped per user
symbol_contentDream dictionary entries in 3 languages, editorial-controlled
blog_postsMultilingual blog with language alternates, drives GAEL distribution
subscriptionsStripe-synced state (status, tier, renewal date), updated by webhook
The entire database schema uses Supabase Row Level Security so the same client SDK can be used server-side and client-side without leaking data — users only ever see their own rows.
Engineering Challenges Solved

🌐 True i18n without a Library

Most Next.js i18n libraries are heavy or tied to legacy pages router. App Router has no built-in i18n.

Solution: [lang] dynamic segment + middleware for detection/redirects + language-keyed Supabase content. generateStaticParams walks the language list to pre-render every page per locale. Zero client-side i18n runtime.

🔒 Freemium Quota Enforcement

Free users get 3 AI interpretations/month. Enforcing that without trusting the client is tricky.

Solution: Quota checked server-side against dream_history row count per calendar month, with Supabase RLS. Premium bypass keyed to the Stripe-synced subscription status — never touches client state.

📊 ISR Window Tuning

Too short and the CDN thrashes. Too long and editorial changes take a day to appear.

Solution: Split ISR into 2 windows — 300s for anything editorially active (blog, compatibility), 3600s for near-evergreen (dream dictionary, zodiac). On-demand revalidation via Supabase trigger for urgent updates.

🔑 Stripe Webhook Race Conditions

User completes checkout, returns to the app, sees their still-free dashboard because the webhook hasn't fired yet.

Solution: Success page hits a server action that eagerly reconciles the Stripe subscription against Supabase before rendering. The webhook is still source of truth, but the user never sees stale state.

🔍 SEO Across 3 Languages

Google can easily treat 3 language versions as duplicate content without proper signals.

Solution: Dynamic sitemap emits every URL with hreflang alternates. Schema.org WebSite + Organization + SoftwareApplication on the root layout. <link rel="alternate"> tags rendered via metadata API per page.

🔥 Shipping Solo Without Burnout

Building a real SaaS alone means a thousand decisions: framework, database, payments, design system, SEO, content.

Solution: Ruthlessly boring choices where possible. shadcn/ui over a custom design system. Supabase over homegrown auth. Stripe over anything else. The interesting work is the product, not the plumbing — keep the plumbing boring.
💡 The The platform codebase is the reference implementation I bring to every Next.js SaaS project — auth, payments, i18n, ISR, SEO and AI backends already wired and production-tested.
Results & Metrics
80
Pages shipped
(3 languages)
200+
Sitemap URLs
with hreflang
15
shadcn/ui
components
1
Repo, 1 deploy,
1 founder
Feature Coverage

Content Surface

Zodiac sign pages12 × 3 langs
Compatibility pairs12 × 3 langs
Dream dictionary69 symbols
Blog postsSupabase-driven

Product Surface

AI dream analysisDeepSeek backend
Birth chartnatal calculation
Daily horoscopepersonalized
Lucky numbersper sign
Communityuser-generated

Business Surface

Freemium tier3 interps / month
Premiumpaid tier
Stripe checkout+ customer portal
Email captureonboarding flow
Deliverables
  • 🌐
    Next.js 14 App Router CodebaseTypeScript strict, Tailwind, shadcn/ui, Supabase SSR, Stripe, middleware i18n — single repo, single deploy
  • 📲
    Trilingual Product80 pages across ES/EN/PT, all SEO-optimized, all pre-rendered or ISR-cached
  • 🛠️
    Supabase Schema + RLSprofiles, dream_history, symbol_content, blog_posts, subscriptions — all row-level-secured
  • 💰
    Stripe IntegrationCheckout, webhooks, customer portal, eager subscription reconciliation on success page
  • 🤖
    AI Dream Interpretation BackendDeepSeek-powered Node backend with language-specific prompt engineering and quota tracking
  • 📈
    SEO FoundationDynamic sitemap (200+ URLs), hreflang alternates, Schema.org triple, metadata API per route
Technology Tags
Next.js 14 App Router TypeScript Tailwind CSS shadcn/ui Framer Motion Supabase Supabase Auth PostgreSQL Row Level Security Stripe Stripe Webhooks DeepSeek React Hook Form Zod ISR Middleware i18n Schema.org Vercel Multilingual SEO

Need a Niche SaaS Shipped End-to-End?

I build production Next.js SaaS applications solo — framework, database, auth, payments, SEO, AI backends. The platform is the reference. Your niche is the next one.

💬 Hire Me on Contra ← Back to portfolio
What I Build

Voice AI Agents

Inbound receptionistsAny language
Outbound sales agentsCold + warm
Appointment bookingReal-time CRM
Emergency routingLive transfer

Content Automation

AI content generationMultilingual
Blog & social publishingMulti-platform
Email drip campaignsFull funnel
Trend intelligenceAutomated

Video Production

AI script writingNative multilingual
AI image generationGPT Image
TTS voiceoverWaveNet voices
Remotion renderCustom templates

Infrastructure

N8N workflowsSelf-hosted
PostgreSQL + RedisProduction-grade
Monitoring & alerts24/7
DocumentationRunbooks + guides
Based in Honduras (UTC-6). Available for async collaboration across all timezones. Fluent in English, Spanish, and French.