A minimal demo SaaS application built with Next.js, designed for testing AI issue resolution and showcasing common patterns in early-stage SaaS products.
- Next.js 16 (App Router)
- TypeScript
- Tailwind CSS
- Vitest for testing
Install dependencies and run the development server:
npm install
npm run devOpen http://localhost:3000 to view the app.
Run tests:
npm test/- Landing page with basic marketing content/login- Login/signup page with toggle between modes
/dashboard- Main dashboard (has beta version via feature flag)/settings- User account settings and preferences/onboarding- Post-signup onboarding flow
POST /api/login- User authenticationPOST /api/signup- User registration with onboarding redirect
Users are stored in-memory with the following structure:
id,email,name,plan(free/pro/enterprise)- Optional
preferencesobject (theme, emailNotifications, language)
Demo users available:
demo@example.com- Free plan user (no preferences)pro@example.com- Pro plan user (has preferences)
Feature flags are managed in lib/featureFlags.ts:
ENABLE_BETA_DASHBOARD- Shows enhanced dashboard UI with gradient backgrounds, additional stats, and quick actions panel
Toggle flags by editing the featureFlags object directly.
New users are redirected to /onboarding after signup. The flow shows placeholder content about workspace setup with Continue/Skip options.
/app
/api
/login # Authentication endpoint
/signup # Registration endpoint
/dashboard # Main dashboard with feature flag
/login # Login/signup page
/onboarding # Post-signup flow
/settings # User settings
page.tsx # Landing page
/lib
mockData.ts # In-memory user storage
featureFlags.ts # Feature flag configuration
- Settings page crashes for users without preferences defined
- API error responses are inconsistent between login and signup endpoints
- No test coverage for signup endpoint or onboarding flow
- Onboarding state is not persisted - refreshing the page loses context
- Feature flag cleanup needed - ENABLE_BETA_DASHBOARD should be removed or made permanent
- No authentication state management - users can access protected routes directly
This is a demo application intentionally kept minimal. Many features are under-specified or have gaps to simulate realistic scenarios for issue tracking and resolution.
Mock data is stored in memory and resets on server restart. No database or persistent storage is configured.