AnotherWrapper Premium is a single Next.js app, not a monorepo. This page helps you build a mental model of the codebase so you can find the right file quickly and avoid editing the wrong layer.
The Four Main Surfaces
Your app is organized around four key areas:Marketing Page
app/landing/ — The public-facing landing page that sells your product.Product Apps
app/(apps)/ — The AI-powered apps your users interact with after signing in.Dashboard
app/page.tsx — The canonical home/dashboard route with account info, credits, and navigation.API Routes
app/api/ — Shared backend routes for auth, avatars, OG images, and payment webhooks.Shared Layers
Everything that’s reused across your app lives in these shared directories:components/ -- Reusable UI
components/ -- Reusable UI
All your React components. Base primitives live in
components/ui/, marketing components in components/landing/, and app-specific UI in components/(apps)/.lib/ai/ -- AI & model logic
lib/ai/ -- AI & model logic
Model configuration, provider setup, and shared AI helpers. This is where you configure which models are available and how they behave.
lib/auth/ -- Authentication
lib/auth/ -- Authentication
Server-side auth helpers. The canonical entry point is
lib/auth/server.ts.lib/db/ -- Database access
lib/db/ -- Database access
Domain-first database modules. The Drizzle client, schema definitions, shared types, and feature-scoped queries all live here.
lib/actions/ -- Server actions
lib/actions/ -- Server actions
Server actions that sit above the database layer for form handling and orchestration.
lib/payments/ -- Billing
lib/payments/ -- Billing
Provider-agnostic billing logic for Polar, Stripe, and LemonSqueezy.
lib/analytics/, lib/email/, lib/storage/, lib/rag/
lib/analytics/, lib/email/, lib/storage/, lib/rag/
Product analytics, contact sync, object storage, and document chunking/embeddings/retrieval.
lib/shared/, lib/integrations/, lib/config/, lib/observability/
lib/shared/, lib/integrations/, lib/config/, lib/observability/
Where to Edit Common Things
- Marketing Site
- Product Apps
- Database
- Docs
app/landing/page.tsx— The main landing pagecomponents/landing/*— Landing page componentsconfig.ts— Site-wide metadata and config

