Void Engine AI is a full-stack AI chat application with a Next.js frontend and an Express + TypeScript backend. The project is designed around a streaming chat experience, conversation history, user authentication, and multi-provider LLM integration.
The app combines:
- A modern chat UI in Next.js
- Server-side LLM orchestration in Express
- Streaming responses from AI providers
- MongoDB-backed persistence for users and conversations
- Model and provider switching for multiple AI backends
- Authentication with JWT-based protected routes
- Next.js 16
- React 19
- TypeScript
- Sass styling
- Markdown rendering with syntax highlighting
- Local conversation management and state-driven chat experience
- Express.js
- TypeScript
- MongoDB + Mongoose
- JWT auth
- Google Gemini and OpenRouter integrations
- Zod-based validation patterns and structured API responses
- AI chat interface with streaming text responses
- Conversation creation, listing, retrieval, update, and deletion
- User registration and login
- Protected API routes for authenticated users
- Provider and model selection in the chat flow
- Message history used for conversation continuity
- Browser notification support for completed responses
- Markdown rendering and code block styling for AI output
voidcore/
├── BE/ # Express API and AI integration layer
│ ├── src/
│ │ ├── config/ # env, CORS, DB, LLM config
│ │ ├── controllers/ # auth, chat, llm, conversation handlers
│ │ ├── middleware/ # auth middleware
│ │ ├── models/ # MongoDB schemas
│ │ ├── routes/ # REST routes
│ │ ├── services/ # business logic and LLM providers
│ │ └── utils/ # JWT/password helpers
│ └── package.json
├── FE/ # Next.js frontend app
│ ├── app/ # App Router pages and API handlers
│ ├── components/ # Chat, sidebar, markdown, UI blocks
│ ├── context/ # Chat and toast state
│ ├── hooks/ # custom hooks
│ ├── services/ # API and state services
│ └── package.json
├── README.md
├── LICENSE
└── package.json (if present in repo root)
Create a .env file inside the BE folder:
PORT=5000
CLIENT_URL=http://localhost:3000
JWT_SECRET=your_super_secret_jwt_key
MONGODB_URI=mongodb://localhost:27017/voidcore
GEMINI_API_KEY=your_gemini_api_key
OPENROUTER_API_KEY=your_openrouter_api_key
MONGODB_DNS_SERVER=optional_dns_server_for_mongoNotes:
CLIENT_URLis required for the backend CORS configuration.GEMINI_API_KEYis used for Gemini-powered chat responses.OPENROUTER_API_KEYenables the OpenRouter provider integration.JWT_SECRETis required for authenticated endpoints.
BACKEND_API_URL=http://localhost:5000cd FE && npm install
cd ../BE && npm installcd BE
npm run devThe backend listens on the configured PORT and exposes a health check at:
http://localhost:5000/health
In a separate terminal:
cd FE
npm run devThen open:
http://localhost:3000
cd FE
npm run dev
npm run build
npm run lint
npm run plopcd BE
npm run dev
npm run build
npm run startThe backend exposes routes under the main API surface:
POST /api/auth/registerPOST /api/auth/loginGET /api/auth/me
POST /api/chator chat streaming routes defined in the app layer
GET /api/llm/providersGET /api/llm/models
GET /api/conversationsGET /api/conversations/:idPOST /api/conversationsPATCH /api/conversations/:idDELETE /api/conversations/:id
This project is actively evolving. Some parts of the frontend and backend are structured for future expansion, while the current app already supports a working chat flow, persistent conversation management, and multiple model/provider integrations.
This project is licensed under the MIT License. See the LICENSE file for details.