Skip to content

ndminhvn/gemini-coop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

31 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Gemini Coop

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.

✨ Features

πŸ’¬ Real-Time Messaging

  • 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

πŸ€– AI Integration

  • 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

πŸ‘₯ Chat Management

  • 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

πŸš€ Quick Start

Prerequisites

  • Node.js 22+ and pnpm
  • Python 3.13+
  • Docker (recommended for database)
  • Gemini API Key - Get one here

1. Clone Repository

git clone https://github.com/ndminhvn/gemini-coop.git
cd gemini-coop

2. Start Backend

cd 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 -d

Backend runs on http://localhost:8000

3. Start Frontend

cd packages/web

# Install dependencies
pnpm install

# Start development server
pnpm dev

Frontend runs on http://localhost:3000

4. Create Account & Start Chatting!

  1. Visit http://localhost:3000
  2. Register a new account
  3. Create a group chat or start an AI chat
  4. Invite friends or chat with the AI bot using /bot <message>

πŸ“Έ Screenshots

Main Chat Interface

Main chat page with sidebar and messages

Create Group Chats

Create group dialog with AI option

Real-Time Features

Read receipts and unread indicators

Member Management

Chat info panel with member management

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Next.js 15    │◄───────►│   FastAPI        │◄───────►│  Gemini API     β”‚
β”‚   Frontend      β”‚  HTTP/  β”‚   Backend        β”‚  HTTPS  β”‚  (Google)       β”‚
β”‚   + React 19    β”‚  WS     β”‚   + PostgreSQL   β”‚         β”‚                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Tech Stack

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

πŸ“ Project Structure

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

πŸ“š Documentation

πŸ”‘ Key Features Implemented

βœ… 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

🚧 Roadmap

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

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ“„ License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

About

Gemini Coop - A cooperative chat application - UH Hackathon 2025

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors