β‘ WohaAI is evolving at high speed! Building ChatGPT-like business logic, custom generative APIs, and a dynamic UI layer β progressing rapidly toward production-grade architecture.
WohaAI is a portfolio and educational project designed to:
- Develop and showcase ChatGPT-like generative logic, prompt pipelines, and message orchestration.
- Implement custom Generative APIs for conversational AI, modular and scalable for future extensions.
- Demonstrate a full microservices architecture running on Docker Compose, with production deployment capabilities.
- Provide educational and AI engineering resources for learners and contributors.
This project is in active development, blending LLM-driven backends, real-time API systems, and Next.js UI to form a modern, open AI chatbot stack.
- π§ ChatGPT-like core logic β custom pipeline managing conversation state, role hierarchy, and memory retention.
- π§© Generative APIs β modular endpoints for contextual reasoning, and functional tool use.
- π₯οΈ Frontend (Next.js) β dynamic chat interface, theme engine, and realtime stream rendering.
- π³ Dockerized Environment β each service isolated and configurable through
.env. - π JWT + Redis Integration β secure session management and code verification flows.
- π§ Email Verification β Kafka-based email verification system with mailer service.
- ποΈ Microservices Architecture β Auth, User, Mailer, and AI Agent services.
- Docker & Docker Compose installed
- Node.js 18+ and pnpm package manager
- Git for cloning the repository
git clone https://gitlab.com/TheHasnainIzhar/WohaAI.git
cd WohaAICopy the example environment file and configure it:
cp .env.example .envImportant Environment Variables:
| Variable | Description | Required |
|---|---|---|
JWT_AUTH_SECRET_KEY |
Secret key for JWT authentication | Yes |
MAILER_USER_EMAIL |
Email for sending verification emails | Yes |
MAILER_USER_PASSWORD |
App password for email service | Yes |
ANTHROPIC_API_KEY |
Anthropic API key for AI agent | Yes |
APP_PUBLIC_RECAPTCHA_SITE_KEY |
reCAPTCHA site key for frontend | Yes |
RECAPTCHA_SECRET_KEY |
reCAPTCHA secret key for backend | Yes |
USERS_MONGO_URI |
MongoDB connection string for users | Yes |
AUTH_SESSION_REDIS_URI |
Redis connection for auth sessions | Yes |
β οΈ Never commit.envor secret keys to version control.
pnpm installFor local development, you can run services individually:
# Install dependencies
pnpm install
# Run all services in development mode
pnpm dev
# Build all packages
pnpm build
# Type check all packages
pnpm typecheckDocker is the recommended development environment as it provides:
- Hot reloading for both frontend and backend
- Shared network for seamless service communication
- Mounted volumes for live file editing
- Isolated services with proper networking
# Start all services with hot reload
pnpm docker:allThis command:
- Builds images with the
developmenttarget (DOCKER_TARGET=development) - Mounts local source code for live reload
- Runs all services in a shared Docker network
# Start only apps (Next.js frontend)
pnpm docker:apps
# Start only repository packages
pnpm docker:repo
# Start messaging services (Kafka, Redis)
pnpm docker:messaging
# Start backend services (Auth, User, Mailer)
pnpm docker:services
# Start AI agent
pnpm docker:agentic# Stop all running containers
docker compose --env-file .env down
# Stop and remove volumes
docker compose --env-file .env down -vFor production builds, use the DOCKER_TARGET=build environment variable to build optimized images.
# Build all services with production target
pnpm docker:build:all# Build apps only
pnpm docker:build:apps
# Build repository packages only
pnpm docker:build:repo
# Build messaging services only
pnpm docker:build:messaging
# Build backend services only
pnpm docker:build:services
# Build AI agent only
pnpm docker:build:agenticThe build process uses multi-stage Dockerfiles with two targets:
-
Development Target (
DOCKER_TARGET=development):- Installs all dependencies including dev dependencies
- Enables hot reloading with nodemon/next dev
- Mounts source code volumes for live editing
- Optimized for development experience
-
Build Target (
DOCKER_TARGET=build):- Installs only production dependencies
- Builds optimized production bundles
- Minifies and compresses assets
- Creates smaller, production-ready images
- No source code volumes mounted
Example Build Command:
# Set environment variable and build
DOCKER_TARGET=build docker compose --env-file .env --profile services build
# Or use the npm script
pnpm docker:build:servicesWohaAI/
βββ apps/ # Application services
β βββ web/ # Next.js frontend application
β βββ services/ # Backend microservices
β βββ auth/ # Authentication service
β βββ user/ # User management service
β βββ auth-mailer/ # Email verification service
βββ packages/ # Shared packages
β βββ config/ # Configuration files
β βββ constants/ # Shared constants
β βββ db/ # Database utilities
β βββ env/ # Environment variable handling
β βββ http/ # HTTP client utilities
β βββ kafka/ # Kafka client utilities
β βββ redis/ # Redis client utilities
β βββ telemetry/ # Logging and monitoring
βββ docker-compose.yml # Docker Compose configuration
βββ package.json # Root package.json with scripts
βββ turbo.json # Turborepo configuration
βββ .env.example # Environment variables template
| Layer | Technology | Purpose |
|---|---|---|
| Frontend | Next.js 14 (App Router) | UI, streaming chat, theming |
| Auth Service | Express.js + TypeScript | Authentication, JWT, session management |
| User Service | Express.js + TypeScript | User profile management |
| Mailer Service | Nodemailer + Kafka | Email verification notifications |
| AI Agent | Anthropic API + Custom Logic | Generative intelligence core |
| Database | MongoDB | User and conversation data |
| Cache/Queue | Redis + Kafka | Session, verification, message queue |
| Vector Store | Qdrant | Memory and context storage |
| Infrastructure | Docker + Docker Compose | Container orchestration |
| Service | Port | Description |
|---|---|---|
| Next.js App | 3000 | Frontend web application |
| Auth Service | 8001 | Authentication API |
| User Service | 8002 | User management API |
| Auth Mailer Service | 8003 | Email verification service |
| AI Agent | 9010 | AI agent API |
| Users MongoDB | 27015 | User database |
| Threads MongoDB | 27016 | Conversation database |
| Auth Redis | 6379 | Auth session cache |
| Threads Redis | 8010 | Thread history cache |
| Kafka Broker | 9092 | Message broker for email events |
WohaAI aims to evolve into a modular, production-ready conversational AI ecosystem, combining scalable backend logic, ethical AI engineering practices, and cutting-edge UI.
- π Persistent memory & conversation history
- π§© Function calling & external API tools
- π Observability dashboard (Prometheus + Grafana)
- βοΈ Cloud deployment automation
- π§ Model fine-tuning playground
- π Advanced security features (2FA, rate limiting)
- Development Deployment Guide β Detailed Docker development setup
- Code of Conduct β Community guidelines
- Contributing Guide β How to contribute
- Changelog β Recent changes
- Naming Conventions β Code style guidelines
Contributions are welcome! Please read our Contributing Guide for details on our code of conduct and the process for submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
Built with β€ by Hani. Fast development. Transparent logic. Real AI engineering.