# RentFlow Benin
A property management web application for landlords in Benin. Manage properties, tenants, rent payments, and expenses from a single dashboard — with bilingual support (French / English).
## Features
- **Authentication** — Secure landlord accounts with email/password (JWT sessions)
- **Properties** — Add, edit, and delete rental properties
- **Tenants** — Register tenants with lease details, rent amount, and due date
- **Payments** — Record and track rent payments (PAID / PENDING / OVERDUE) with WhatsApp receipt generation
- **Expenses** — Log property expenses by category (Maintenance, Taxes, Utilities, Insurance, Other)
- **Reports** — Financial overview with total revenue, expenses, and net profit
- **Bilingual** — Full French and English interface (FR/EN switcher)
## Tech Stack
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| Language | TypeScript |
| Styling | Tailwind CSS v4 |
| Database | PostgreSQL (Neon / Supabase) |
| ORM | Prisma v7 + `@prisma/adapter-pg` |
| Auth | NextAuth v4 (credentials + JWT) |
| Passwords | bcrypt (12 rounds) |
## Getting Started
### 1. Clone the repository
```bash
git clone
github.com
cd Rentflow-Benin
```
### 2. Install dependencies
```bash
npm install
```
### 3. Configure environment variables
Copy `.env.example` to `.env` and fill in your values:
```bash
cp .env.example .env
```
```env
# PostgreSQL connection string (e.g. Neon, Supabase, Railway)
DATABASE_URL="postgresql://user:password@host:5432/rentflow?sslmode=require"
# Generate with: openssl rand -base64 32
NEXTAUTH_SECRET="your-secret-here"
# Your deployment URL (use
localhost for local dev)
NEXTAUTH_URL="
localhost"
```
### 4. Run database migrations
```bash
npx prisma migrate dev
```
### 5. Start the development server
```bash
npm run dev
```
Open
localhost in your browser.
## Database Schema
```
Landlord
└── Property (many)
├── Tenant ( …