Project Structure

How the Next.js app is organized — routes, lib modules, and components.

Creative Hub is a single Next.js 16 app — no separate backend service. Business logic lives in Server Components, Server Actions, and a few API routes.

Top-level layout

text
fsh-creative-hub/
├── src/app/           # Routes & API
├── src/components/    # UI (hub/, landing/, docs/, …)
├── src/lib/           # Server actions, queries, Supabase
├── supabase/migrations/
├── scripts/           # Seed & migrate utilities
├── e2e/               # Playwright tests
└── PRD and MD files/  # Product specs (linked from docs)

App Router

PathPurpose
/Public landing page
/loginAuth entry
/projectsProject grid (hub home)
/tasks/*Task views (Today, Upcoming, Inbox, labels)
/for-youInbox / triage feed
/projects/[id]/*Project workspace, boards, canvas, docs
/share/[token]Public view-only links
/docsThis documentation

lib/ modules

  • lib/supabase/ — browser, server, middleware, admin clients
  • lib/projects/ — project CRUD & members
  • lib/workspace/ — assets, comments, votes
  • lib/tasks/ — task system
  • lib/inbox/ — For You feed
  • lib/search/ — global search
  • lib/routes.ts — canonical path helpers

components/

  • hub/ — authenticated shell (header, nav, search)
  • landing/ — marketing page
  • workspace/ — asset overlay, presentation
  • project-files/ — project home, boards
  • docs/ — documentation UI