Phase 0 (Research): 6 key decisions to make
- Server/Client composition pattern for initial data + search
- Null filtering strategy (backend vs frontend)
- JSON formatting approach (native vs syntax highlighter)
- Badge color mapping for policy types
- Route strategy (/search redirect vs replacement)
- Sheet component state management
Phase 1 (Design): API contracts and component design
- getRecentPolicySettings() Server Action (new)
- searchPolicySettings() extension with limit param
- PolicyDetailSheet component (Shadcn Sheet)
- PolicyTable component with click handlers
- PolicySearchContainer client wrapper
Phase 2 (Implementation): 44 tasks across 7 epics
- Epic 1: Backend Server Actions (P1, T001-T005)
- Epic 2: Detail Sheet component (P1, T006-T011)
- Epic 3: Table & Search components (P1, T012-T018)
- Epic 4: Page refactor (P1, T019-T024)
- Epic 5: Navigation update (P2, T025-T029)
- Epic 6: Visual improvements (P3, T030-T034)
- Epic 7: Testing & validation (T035-T044)
Constitution compliance: ✅ All checks pass
Performance targets: <2s initial load, <300ms detail sheet, <2s search
No database changes required - extends existing schema
|
||
|---|---|---|
| .github | ||
| .specify | ||
| .vscode | ||
| app | ||
| components | ||
| config | ||
| lib | ||
| public | ||
| specs | ||
| .gitignore | ||
| components.json | ||
| debug-db.ts | ||
| Dockerfile | ||
| drizzle.config.ts | ||
| eslint.config.mjs | ||
| fix-constraint.ts | ||
| kirimase.config.json | ||
| next-auth.d.ts | ||
| next.config.ts | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.mjs | ||
| README.md | ||
| tailwind.config.ts | ||
| tsconfig.json | ||
TenantPilot
A multi-tenant SaaS application built with Next.js, Azure AD authentication, and Drizzle ORM.
Architecture Principles
This project follows strict architectural principles defined in our Constitution:
- Server-First: Next.js App Router with Server Actions, no client-side fetches
- Type Safety: TypeScript strict mode mandatory
- Database: Drizzle ORM exclusively
- UI: Shadcn UI components with Tailwind CSS
- Auth: Azure AD multi-tenant authentication
Getting Started
First, install dependencies:
npm install
Copy environment variables:
cp .env.example .env
Fill in your Azure AD credentials and database URL.
Run database migrations:
npm run db:push
Start the development server:
npm run dev
Open http://localhost:3000 to see the application.
Development
- Use Server Actions for all data operations
- Follow TypeScript strict mode requirements
- Use Shadcn UI for new components
- Test with Azure AD authentication
Deployment
Build the Docker image:
docker build -t tenantpilot .
Run with environment variables:
docker run -p 3000:3000 --env-file .env tenantpilot