An open API service indexing awesome lists of open source software.

https://github.com/thedhruvish/chat-app

FastChat is a real-time messaging web app inspired by WhatsApp.
https://github.com/thedhruvish/chat-app

fastapi google-authentication jinja2 oath2 python sqlite3 sqlite3-database uv websocket

Last synced: 2 months ago
JSON representation

FastChat is a real-time messaging web app inspired by WhatsApp.

Awesome Lists containing this project

README

          

# ๐Ÿ“ฑ FastChat - A WhatsApp-like Messaging App (Python + FastAPI)

FastChat is a real-time messaging web app inspired by WhatsApp. It leverages modern Python web technologies including **FastAPI**, **Starlette**, **Google OAuth2**, **SQLite3**, and **Uvicorn** for fast and scalable performance.

---

## ๐Ÿš€ Features

- โœ… Google OAuth2 login
- ๐Ÿ’ฌ Real-time chat features
- ๐Ÿ—ƒ๏ธ SQLite3-based local database
- ๐Ÿง  Modular architecture with routers and utils
- ๐Ÿ” Custom middleware for logging and auth
- โšก FastAPI + Uvicorn (via `uv`) backend
- ๐Ÿ–ฅ๏ธ Jinja2 templating for UI

---

## ๐Ÿงฐ Tech Stack

| Tech | Use Case |
|------------------|------------------------------|
| FastAPI | Web framework (REST APIs) |
| Starlette | Middleware & ASGI support |
| SQLite3 | Lightweight database |
| Google OAuth2 | User authentication |
| Jinja2 | HTML templating |
| uv + uvicorn | Package manager & ASGI server|

---

## ๐Ÿ› ๏ธ Installation

```bash
# Clone the repository
git clone https://github.com/thedhruvish/chat-app.git
cd chat-app

# Install dependencies with uv
uv venv
source venv/bin/activate # active the virtual environment
uv install

# Run the app
fastapi run app/app.py
```

---

## ๐Ÿ“‚ Project Structure

```
chat-app/
โ”‚
โ”œโ”€โ”€ app/
โ”‚ โ”œโ”€โ”€ db/
โ”‚ โ”‚ โ””โ”€โ”€ sqllit_db.py # SQLite3 DB connection
โ”‚ โ”œโ”€โ”€ router/
โ”‚ โ”‚ โ”œโ”€โ”€ auth.py # Google OAuth2 auth routes
โ”‚ โ”‚ โ””โ”€โ”€ chat.py # Chat-related endpoints
โ”‚ โ”œโ”€โ”€ schemas/
โ”‚ โ”‚ โ””โ”€โ”€ user.py # User models (Pydantic)
โ”‚ โ”œโ”€โ”€ templates/ # HTML templates
โ”‚ โ””โ”€โ”€ utile/
โ”‚ โ””โ”€โ”€ chat_manage.py # Chat management logic
โ”‚
โ”œโ”€โ”€ .env # Environment variables
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ .python-version
โ”œโ”€โ”€ chat.db # SQLite3 database
โ”œโ”€โ”€ LICENSE
โ”œโ”€โ”€ pyproject.toml # Project dependencies
โ”œโ”€โ”€ uv.lock # Locked dependencies
โ””โ”€โ”€ README.md # Project documentation

```

---

## ๐Ÿงช Usage

- Visit `http://localhost:8000`
- Click "Login with Google"
- Start chatting!

---

## ๐Ÿ“ƒ License

MIT License - see the [LICENSE](LICENSE) file for details.

---

## ๐Ÿ™‹โ€โ™‚๏ธ Contributing

Contributions are welcome! Please fork the repo and submit a pull request.

---

## ๐Ÿ“ฌ Contact

Created by [@thedhruvish](https://github.com/thedhruvish) โ€“ feel free to reach out!
email - [thedhruvish@gmail.com](mailto:thedhruvish@gmail.com)