# Kuwana.ai (Aiia) — Comparison & Decision-Support Platform
An AI-assisted comparison and decision-support platform for Zimbabwean consumers, businesses, and regulators. Users express a need — a bank account, a school, an insurance policy, a data bundle — and the platform surfaces eligible options, total-cost comparisons, and an explainable recommendation, across four role-based portals: **Consumer**, **Corporate/SME**, **Regulator**, and **Provider/Admin**.
Built with Next.js (App Router) and PostgreSQL via Prisma.
## Tech stack
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router), React, TypeScript |
| Styling | Tailwind CSS, Radix UI primitives, shadcn-style components (`components/ui`) |
| Data | PostgreSQL, Prisma ORM |
| Auth | JWT (`jsonwebtoken`, `bcryptjs`) + `AuthGuard` route protection |
| Motion | Framer Motion |
| Deployment | Docker (multi-stage build), `docker-compose` |
## Getting started
### Prerequisites
- Node.js 22+
- A PostgreSQL database
### 1. Install dependencies
```bash
npm install
```
The repo also ships a `pnpm-lock.yaml`; either package manager works, but `npm` is what the Dockerfile and CI-equivalent scripts assume.
### 2. Configure environment variables
Create a `.env` file in the project root:
```bash
DATABASE_URL=postgresql://user:password@host:5432/dbname
JWT_SECRET=your-jwt-signing-secret
```
### 3. Set up the database
```bash
npx prisma generate
npx prisma migrate deploy # or `npx prisma db push` for local iteration
npx prisma db seed # optional, runs prisma/seed.ts
```
### 4. Run the dev server
```bash
npm run dev
```
The app runs on **
http://localhost:3001** (not the Next.js default 3000 — see the `-p 3001` flag in `package.json`).
## Available scripts
| Script | Description |
|---|---|
| `npm run dev` | Start the dev server (webpack, port 3001, bound to `0.0.0.0`) |
| `npm run build` | Production build |
| `npm run start` | Start the production server |
| `npm run lint` | Run ESLi …