A real-time collaborative chat application where multiple users can interact with each other and an AI assistant powered by Google's Gemini API. Built with modern web technologies for seamless real-time communication.
- WebSocket-based instant messaging
- Live updates across all participants
- Message read receipts with user avatars (Messenger-style)
- Typing indicators showing who's typing
- Unread message badges and filtering
- Gemini AI assistant in group chats
- Streaming responses for natural conversation flow
- Shared AI context - everyone sees the same responses
- Bot commands via
/bot <message>syntax
- Group chats with multiple participants
- Private AI chats for one-on-one AI conversations
- Invite users by username
- Member management (add/remove participants)
- Chat info panel (Messenger-style) with member list
- Leave or delete chats with confirmation
- Node.js 22+ and pnpm
- Python 3.13+
- Docker (recommended for database)
- Gemini API Key - Get one here
git clone https://github.com/ndminhvn/gemini-coop.git
cd gemini-coopcd packages/ingress
# Copy environment template
cp .env.example .env
# Edit .env and add your GEMINI_API_KEY
# Start with Docker (recommended)
docker compose up --build -dBackend runs on http://localhost:8000
cd packages/web
# Install dependencies
pnpm install
# Start development server
pnpm devFrontend runs on http://localhost:3000
- Visit http://localhost:3000
- Register a new account
- Create a group chat or start an AI chat
- Invite friends or chat with the AI bot using
/bot <message>
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β Next.js 15 ββββββββββΊβ FastAPI ββββββββββΊβ Gemini API β
β Frontend β HTTP/ β Backend β HTTPS β (Google) β
β + React 19 β WS β + PostgreSQL β β β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
Frontend:
- Next.js 15 (App Router)
- React 19
- TypeScript
- Tailwind CSS
- shadcn/ui components
- WebSocket client
Backend:
- FastAPI (Python)
- PostgreSQL 17
- SQLAlchemy 2.0 ORM
- WebSocket (real-time)
- JWT authentication
- Google Gemini API
gemini-coop/
βββ packages/
β βββ ingress/ # Backend (FastAPI + PostgreSQL)
β β βββ server/ # API routes
β β βββ services/ # Business logic (auth, chat, gemini, websocket)
β β βββ shared/ # Config & utilities
β β βββ docker-compose.yml
β β βββ README.md # Backend documentation
β β
β βββ web/ # Frontend (Next.js + React)
β βββ app/ # Pages (App Router)
β βββ components/ # UI components
β βββ contexts/ # React contexts (auth, chat, websocket)
β βββ hooks/ # Custom hooks
β βββ lib/ # Utilities & API client
β
βββ ARCHITECTURE.md # System architecture details
βββ README.md # This file
- Architecture Guide - System design and data flow
- Backend README - API setup and endpoints
β
User authentication (JWT)
β
Real-time WebSocket messaging
β
Gemini AI integration with streaming
β
Group chats with multiple users
β
Message read receipts (Messenger-style)
β
Typing indicators
β
Unread message badges and filtering
β
Chat info panel with member management
β
Invite/remove participants
β
Leave/delete chats
β
Auto-expanding message input
β
Responsive sidebar with chat list
See ROADMAP.md for detailed development plans.
Upcoming:
- Search in chat messages
- Media/files/links sections
- Dark mode
- File upload support
- Voice messages
- Push notifications
- Multiple AI models
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.