A high-fidelity, minimalist AI chat interface exploring the boundaries of digital identity.
✦ Live Demo ✦
|
✦ API Docs ✦
Persona-based interaction is the core of the experience. Each character features a unique "mask" and a distinct psychological framework:
- Framework: Next.js 15+ (React 19, App Router)
- Styling: Tailwind CSS 4+ (Precision UI Design)
- Animations: Framer Motion 12+ (60fps Fluid Interactions)
- Icons: Lucide React (Minimalist Iconography)
- Typing: TypeScript (Strict Structural Integrity)
- Rendering: React Markdown & Remark GFM (Rich AI Responses)
- Framework: FastAPI (Asynchronous Python 3.12)
- Server: Uvicorn (High-performance ASGI)
- AI Engine: Groq Cloud SDK (LPU™ Acceleration)
- Validation: Pydantic V2 (Data Modeling)
- Settings: Pydantic Settings & Dotenv (Env Configuration)
- Test Suite: Pytest & Pytest-Asyncio
- API Client: HTTPX (Async Testing)
- Containerization: Docker (Project Root & Layered Contexts)
- Orchestration: Docker Compose (Production-ready Services)
Persona is designed around Clean Architecture, ensuring that the core business logic remains independent of external frameworks, libraries, and infrastructure.
┌──────────────────────────────────┐
│ ✦ NEXT.JS FRONTEND ✦ │
│ (Next.js 15, Tailwind CSS) │
└────────────────┬─────────────────┘
│
▼ [Streaming API]
│
┌────────────────┴─────────────────┐
│ ✦ FASTAPI BACKEND ✦ │
│ (Modular Clean Architecture) │
├──────────────────────────────────┤
│ 1. API LAYER (Routes, Deps) │
├──────────────────────────────────┤
│ 2. APPLICATION (Use Cases) │
├──────────────────────────────────┤
│ 3. DOMAIN (Entities, Enums) │
├──────────────────────────────────┤
│ 4. INFRASTRUCTURE (Groq SDK) │
└────────────────┬─────────────────┘
│
▼ [LPU Acceleration]
│
┌────────────────┴─────────────────┐
│ ✦ GROQ AI ENGINE ✦ │
│ (Llama 3.3 70B Model) │
└──────────────────────────────────┘
- Inward Dependencies: Every layer only points inward. The Domain is the core.
- Contract-Based: UseCases talk to Abstract Interfaces implemented via Groq.
- Type Safety: End-to-end typing from TypeScript to Pydantic models.
.
├── backend/ # FastAPI Asynchronous Backend
│ ├── app/
│ │ ├── api/ # API Layer (Routes, Dependencies)
│ │ ├── application/ # Application Layer (Use Cases)
│ │ ├── core/ # Core Layer (Config, Enums, Exceptions)
│ │ ├── domain/ # Domain Layer (Entities, Interfaces)
│ │ ├── infrastructure/ # Infrastructure Layer (LLM, Registry)
│ │ └── main.py # Application Factory
│ ├── tests/ # Pytest Suite (Unit & Integration)
│ ├── Dockerfile # Multi-stage Backend Build
│ └── requirements.txt # Python Dependencies
├── frontend/ # Next.js 15 Standalone Frontend
│ ├── src/ # Project Source
│ ├── public/ # Static Assets (SVGs, Icons)
│ ├── Dockerfile # Multi-stage Standalone Build
│ └── next.config.ts # Standalone & API Rewrites
├── docker-compose.yml # Orchestration & Health Checks
└── .env.example # Environment Template
GET /health
- Response:
{"status": "ok", "version": "1.0.0"}
POST /api/v1/chat
- Request Body:
{ "character": "sherlock", "message": "The case is simple.", "history": [] } - Response:
text/event-stream(Token-by-token streaming).
The most efficient way to run Persona is using Docker Compose.
# 1. Clone & Configure
git clone https://github.com/mariiammaysara/persona.git
cd persona
cp .env.example .env
# 2. Add your Groq API Key to .env
# 3. Launch
docker-compose up --buildAccess frontend at localhost:3000 and backend at localhost:8000.
cd backend
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reload"Identity is not a fixed state, but a collection of masks we wear for the world."
Persona follows a Luxury Minimalist design aesthetic:
- Palette:
#0A0908(Obsidian) backgrounds with#E3D5CA(Parchment) accents. - Typography: A sophisticated blend of Inter (precision) and Cormorant Garamond (elegance).
- Architecture: Clean, immutable code that prioritizes readability over complexity.
© Mariam Maysara