# Architecture Overview

## Foundation
- Next.js 15 App Router application
- Shared-schema multi-tenant PostgreSQL model
- Prisma ORM for data access
- NextAuth for authentication
- next-intl for Arabic and English localization
- Uploadthing for media and documents

## Main bounded contexts
- Auth
- Tenants
- Vehicles
- Bookings
- Customers
- Payments
- Invoices
- Notifications
- Reports

## Multi-tenant strategy
- Platform-wide users
- Company membership via `Membership`
- Shared tables with `tenantId`
- Global admin authority via `UserPlatformRole`