MCPcopy Create free account
hub / github.com/Mayurkoli8/ChatDouble

github.com/Mayurkoli8/ChatDouble @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
14 symbols 55 edges 3 files 12 documented · 86% updated 26d ago★ 531 open issues

Browse by type

Functions 14 Types & classes 0
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

ChatDouble V2

This repository contains the next-generation version of ChatDouble with a modern web app architecture.

  • backend/: FastAPI backend for auth, Supabase access, bot embeddings, Gemini chat generation, and credit management.
  • frontend/: Next.js App Router frontend with Supabase auth, bot upload, chat UI, and purchase flows.
  • Legacy Streamlit prototype files remain in the repo root for reference.

What�s Included

  • FastAPI backend with Supabase integration and credit-based billing
  • Next.js frontend using Supabase auth and API integration
  • Google Gemini response generation
  • Supabase PostgreSQL / pgvector embedding search
  • Credit packs and purchase workflow
  • Bot upload, persona generation, and vector similarity retrieval

Quick Start

Backend

Create backend/.env with:

SUPABASE_URL=https://your-project.supabase.co
SUPABASE_SERVICE_KEY=your-service-role-key
GOOGLE_API_KEY=your-gemini-api-key

Then run:

cd backend
python -m pip install -r requirements.txt
python main.py

The backend listens on http://127.0.0.1:8000.

Frontend

Create frontend/.env.local with:

NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key

Then run:

cd frontend
npm install
npm run dev

Open http://localhost:3000.


Environment Variables

Backend (backend/.env):

  • SUPABASE_URL
  • SUPABASE_SERVICE_KEY
  • GOOGLE_API_KEY

Frontend (frontend/.env.local):

  • NEXT_PUBLIC_SUPABASE_URL
  • NEXT_PUBLIC_SUPABASE_ANON_KEY

Project Structure

ChatDouble/
+-- backend/
�   +-- auth.py
�   +-- main.py
�   +-- supabase_client.py
�   +-- utils.py
�   +-- requirements.txt
+-- frontend/
�   +-- src/app/page.tsx
�   +-- src/lib/supabaseClient.ts
�   +-- tsconfig.json
+-- README.md
+-- .gitignore

Notes

  • The backend uses SUPABASE_SERVICE_KEY for server-side Supabase access.
  • The frontend uses public Supabase environment variables only.
  • The legacy Streamlit prototype remains in the repo root for reference.

Next Steps

  1. Create Supabase tables for profiles, bots, embeddings, and transactions.
  2. Add the match_bot_embeddings RPC function in Supabase.
  3. Deploy the backend and frontend to hosting platforms.
  4. Hook in a real payment provider for credit purchases.

License

MIT

Core symbols most depended-on inside this repo

browse all functions →

Shape

Function 14

Languages

Python100%

Modules by API surface

firebase_db.py10 symbols
app.py4 symbols

For agents

$ claude mcp add ChatDouble \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page