Skip to content

Latest commit

 

History

87 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Historia Chat

Historia-chat is a text messaging application backend built with FastAPI. It handles real-time delivery over WebSockets, persists messages in a SQL database, and includes a dedicated security module for authentication, with interactive API docs via Swagger UI and ReDoc. Currently in active beta development.

❕- Portfolio Project.

Setup

Clone the repository

git clone https://github.com/RovaldaVC/Historia-chat.git

cd Historia-chat

Set up a virtual environment

python3 -m venv venv

Activate virtual environment

source .venv/bin/activate - Linux

source .venv/Scripts/activate - Windows

Install dependencies

pip install -e .

Run the server

cd app

uvicorn app.main:app --reload

The API will be available at http://127.0.0.1:8000.

Project Structure

. ├── app

│   ├── database # SQLAlchemy models, schemas, and session management

│   │   ├── crud.py # Endpoint's core logic

│   │   ├── database.py # Database Setup

│   │   ├── init.py

│   │   ├── models.py # Tables of database

│   │   └── schemas.py # schemas and response models

│   ├── init.py

│   ├── main.py # Endpoints

│   ├── security # Authentication, hashing, and token generation

│   │   ├── authentication.py # Authorization Setup

│   │   ├── hash_password.py

│   │   ├── hash_session.py

│   │   └── init.py

│   └── websocket # WebSocket connection managers and event handlers

│       └── manager.py

├── excalidraw # Architecture diagrams and system design

│   ├── 1_setup.excalidraw

│   ├── 2_security_setup.excalidraw

│   ├── 3_feedback.excalidraw

│   ├── 4_fixed_bugs.excalidraw

│   ├── 5_websocket_setup.excalidraw

│   ├── 6_user_interface.excalidraw

│   ├── 7_chat_logic.excalidraw

│   ├── 8_fix_bugs.excalidraw

│   └── 9.excalidraw

├── pyproject.toml

├── README.md

├── SECURITY.md

└── tests # Unit and integration tests - ⚠️ Beta Mode

│   ├── test_app_imports.py

│   ├── test_chat_creation.py

│   └── test_websocket_message_storage.py

API Documentation

Once the server is running, interactive docs are available at:

License

MIT

About

A real-time chat app backend built with FastAPI, WebSockets, and SQL

Topics

Resources

Security policy

Stars

3 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages