65 lines
1.2 KiB
Markdown
65 lines
1.2 KiB
Markdown
# 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](.specify/memory/constitution.md):
|
|
|
|
- **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:
|
|
|
|
```bash
|
|
npm install
|
|
```
|
|
|
|
Copy environment variables:
|
|
|
|
```bash
|
|
cp .env.example .env
|
|
```
|
|
|
|
Fill in your Azure AD credentials and database URL.
|
|
|
|
Run database migrations:
|
|
|
|
```bash
|
|
npm run db:push
|
|
```
|
|
|
|
Start the development server:
|
|
|
|
```bash
|
|
npm run dev
|
|
```
|
|
|
|
Open [http://localhost:3000](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:
|
|
|
|
```bash
|
|
docker build -t tenantpilot .
|
|
```
|
|
|
|
Run with environment variables:
|
|
|
|
```bash
|
|
docker run -p 3000:3000 --env-file .env tenantpilot
|
|
```
|