Skip to content
dk
← All projects

ai-chat-platform

Full-stack AI chat application built with React, Flask, and Ollama (learning project)

TypeScript10 forks0 open issues & PRsMITupdated 27d ago
aiauthenticationbackendchatflaskfrontendjwtllmpythonreact
Stars
1
Forks
0
Created
Feb 5, 2026
Last push
Sep 9, 2026
Last commit
Sep 9, 2026
Contributors
0

README

dsk-dev-ai/ai-chat-platform

ai-chat-platform

Full stack AI Chat SaaS with React + Flask + Ollama (Local LLM)

CI License: MIT

AI Chat Platform (Full Stack SaaS)

Full Stack AI Chat SaaS built with:

  • React + TypeScript (Frontend)
  • Flask (Backend API)
  • Ollama Local LLM
  • JWT Authentication
  • Chat History System
  • Admin & User Management

Project Structure

ai-chat-platform/ │ ├── ai-chat-backend/ │ ├── models/ │ ├── routes/ │ ├── services/ │ ├── utils/ │ ├── schemas/ │ ├── db/ │ ├── app.py │ ├── config.py │ └── requirements.txt │ ├── ai-chat-frontend/ │ ├── src/ │ ├── package.json │ └── vite.config.ts │ ├── generate_token.py ├── response.json └── README.md


🔧 Backend Setup cd ai-chat-backend python -m venv venv

▶ Activate Virtual Environment

Windows:

venv\Scripts\activate

Mac/Linux:

source venv/bin/activate

▶ Install Dependencies pip install -r requirements.txt

▶ Run Server python app.py

Backend runs on:

http://127.0.0.1:5000

💻 Frontend Setup cd ai-chat-frontend npm install npm run dev

Frontend runs on:

http://localhost:3000

🔐 Authentication Features

JWT-based authentication

Token expiration handling

Middleware-protected routes

Role-based access control (Admin / User)

🧠 AI Integration

Supports:

Ollama local models

Easily extendable to OpenAI API

📊 Features

✅ Create new chats

✅ Persistent chat history per user

✅ Dark mode UI

✅ Admin routes & management

✅ Message limits

✅ Secure backend architecture

✅ Tests & CI

Backend Tests

cd ai-chat-backend
pip install -r requirements.txt
pip install -r requirements-dev.txt
pytest

Runs the backend test suite (request validation, auth/registration flow, token counting, rate limiting, and config defaults) against an isolated throwaway SQLite database — no network, external services, or a live Ollama server needed.

CI

GitHub Actions (.github/workflows/ci.yml) runs on every push/PR to main:

  • backend-tests — installs the backend dependencies and runs pytest
  • frontend-build — installs frontend deps with npm ci and runs npm run build

📌 Version

Current Version: v3.0

🚀 Future Improvements

Docker deployment

CI/CD pipeline

Streaming AI responses

API rate limiting

Production database (PostgreSQL)

Cloud deployment support

👨‍💻 Author

DSK — AI Developer

Related projects

DistrLab — break a live distributed system in your browser (cache stampedes, queue backpressure, rate limiting, LB strategies, partitions, replica lag). Svelte 5 + Canvas + Web Worker.

canvasdistributed-systemsqueueing-theory
TypeScript2h ago

A collection of high-quality TypeScript packages, developer utilities, and open-source tools.

developer-toolsmonoreponpm
TypeScript2d ago

177 merged pull requests across 19 repositories · data generated Oct 7, 2026