https://github.com/morikeli/bundi-chat
A FastAPI-based backend โก powered by Tortoise ORM, providing a secure chat application with features like encrypted messaging, user authentication, and real-time communication.
https://github.com/morikeli/bundi-chat
chat chat-app chat-application fastapi fastapi-crud pydantic pydantic-v2 python python-3 python3 tortoise-orm websocket websocket-application websocket-chat websocket-server websockets
Last synced: 2 days ago
JSON representation
A FastAPI-based backend โก powered by Tortoise ORM, providing a secure chat application with features like encrypted messaging, user authentication, and real-time communication.
- Host: GitHub
- URL: https://github.com/morikeli/bundi-chat
- Owner: morikeli
- Created: 2025-11-17T10:02:05.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2025-11-17T11:21:57.000Z (about 1 month ago)
- Last Synced: 2025-11-17T12:11:00.929Z (about 1 month ago)
- Topics: chat, chat-app, chat-application, fastapi, fastapi-crud, pydantic, pydantic-v2, python, python-3, python3, tortoise-orm, websocket, websocket-application, websocket-chat, websocket-server, websockets
- Language: Python
- Homepage:
- Size: 65.4 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# **๐ BundiChat Backend**
## **๐ Overview**
BundiChat backend is a fast, scalable, and privacy-focused chat server built with **FastAPI**, **Tortoise ORM**, **Docker**, and **uv** for dependency management.
It powers a real-time messaging platform with secure authentication, encrypted communication workflows, user avatars, and async performance optimized for production.
---
### **๐ Project Structure**
```
.
โโโ app/
โ โโโ core/
| โโโ middleware/
โ โโโ models/
| โโโ routers/
| โโโ schemas/
โ โโโ services/
โ โโโ utils/
โ โโโ __init__.py
โ
โโโ migrations/
โโโ .dockerignore
โโโ .env.example
โโโ .gitignore
โโโ .python-version
โโโ Dockerfile
โโโ README.md
โโโ docker-compose.yml
โโโ pyproject.toml
โโโ uv.lock
```
## **๐ ๏ธ Developer Instructions**
### **Prerequisites**
* ๐ Python - v3.9+
* ๐๏ธ uv
* ๐ Docker
### **๐ง Tech Stack**
* **FastAPI** โ async high-performance API framework
* **Tortoise ORM** โ expressive async ORM
* **Docker & Docker Compose** โ containerization and running multi-container Docker app, and deployment
* **uv** โ dependency & environment manager
* **WebSockets** โ real-time communication
* **PostgreSQL** โ storage backend
---
**NOTE**
- Make sure you have installed Docker on your machine. Refer to [Docker's installation guide]() and follow a step-by-step guide on how you can install Docker on your OS. If you don't wish to use Docker, check `**NOTE**` section below.
- Make sure you have installed `uv` package manager. Refer to [uv's documentation]() for more info.
### Docker installation guide
- [Install Docker on Windows](https://docs.docker.com/desktop/setup/install/windows-install)
- Linux:
- [Install Docker on Ubuntu](https://docs.docker.com/engine/install/ubuntu/)
- [Install Docker on Debian](https://docs.docker.com/engine/install/debian/)
- [Install Docker on Fedora](https://docs.docker.com/engine/install/fedora/)
- [Install Docker on macOS](https://docs.docker.com/desktop/setup/install/mac-install)
Once installed, check version using the following commands:
```bash
docker --version
docker compose version
```
---
Follow these steps to run the app successfully:
1. Clone the Project
```bash
git clone https://github.com/morikeli/bundi-chat.git
cd bundi-chat
```
2. Using uv
Install dependencies from pyproject.toml:
```bash
uv sync
```
If you wish to install new dependencies run this command:
```bash
uv add
```
---
**NOTE**: You can also install multiple packages separated by spaces. For example:
```bash
uv add
```
If you don't wish to use Docker to run the app, you can use the following commands:
Run server:
```bash
uv run fastapi dev
```
You can also use this command to run the development server
```bash
uvicorn app:app --reload
```
API documentation is available at:
* Swagger UI โ `http://localhost:8000/api/v1/docs`
* ReDoc โ `http://localhost:8000/api/v1/redoc`
---
3. Run Using Docker Compose (Recommended)
Make sure Docker is installed in your local machine.
Build and start the container. In Linux, it requires sudo privileges to use docker commands. Therefore use `sudo` before each command:
```bash
docker compose up --build
# If you want to run the container in the background, use:
# docker compose up -d
```
To stop containers run this command:
```bash
docker compose down
```
To view logs, run this command:
```bash
docker compose logs -f
```
---
**Miscellaneous**
If you wish to apply linting or script formatting using uv, run the following commands:
#### **๐งน Linting & Formatting**
```bash
uv run ruff check .
uv run ruff format .
```
---
## **๐ค Contributions**
Contributions are welcome! ๐
### How to contribute:
1. **Fork** the repo
2. **Create a feature branch**
3. Commit changes with clear messages
4. Submit a **pull request**
5. Follow existing code style & project structure
Open issues anytime for bugs, feature suggestions, or discussions.