src/
├── app/ # Next.js App Router
│ ├── (auth)/ # Auth pages (sign-in, sign-up, forgot-password)
│ ├── (dashboard)/ # Protected dashboard pages
│ │ ├── dashboard/ # Project list
│ │ ├── project/[projectId]/ # Project workspace (canvas, PRD, details)
│ │ ├── memory/ # Global memory management
│ │ ├── integrations/ # Integration connectors
│ │ ├── settings/ # Account, billing, security
│ │ ├── templates/ # Template library
│ │ └── admin/ # Admin dashboard
│ └── api/ # REST API routes (100+ endpoints)
├── components/ # React components (200+ files)
│ ├── canvas/ # XYFlow project editor
│ ├── dashboard/ # Dashboard UI
│ ├── memory/ # Memory table, graph, conflicts
│ ├── prd/ # PRD generation and refinement
│ ├── feedback/ # Feedback portal
│ ├── integrations/ # Integration UIs
│ ├── admin/ # Admin tools
│ ├── settings/ # Settings forms
│ └── ui/ # shadcn/ui base components (30+)
├── stores/ # Zustand state stores
│ ├── canvas-store.ts # Nodes, edges, selection, viewport
│ ├── view-store.ts # Tabs, filters, sorting
│ └── codebase-map-store.ts # Repository visualization
├── lib/ # Shared utilities and business logic
│ ├── db/ # Drizzle ORM schemas and queries
│ ├── api/ # API client utilities
│ ├── agent/ # AI agent tool definitions
│ ├── github/ # GitHub App integration
│ ├── pm/ # Linear, Jira, Notion integrations
│ ├── memory/ # Memory system logic
│ ├── auth.ts # Better Auth configuration
│ └── stripe.ts # Stripe client setup
├── hooks/ # Custom React hooks
├── types/ # TypeScript type definitions
├── middleware.ts # Auth and routing middleware
└── globals.css # Global styles and CSS variables