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

https://github.com/tireon003/instant-messaging-service

A simple real-time chatting full-stack application.
https://github.com/tireon003/instant-messaging-service

aiogram3 aiohttp alembic celery fastapi-sqlalchemy full-stack messanger postgresql react redis tailwindcss websocket

Last synced: 6 months ago
JSON representation

A simple real-time chatting full-stack application.

Awesome Lists containing this project

README

        

# instant-messaging-service

A simple service for real-time messaging.

### Functionality:
1. Authentication and authorization based on OAuth2 with JWT session tokens
2. Creating chats with users
3. Communication in real time with saving history in the database and subsequent loading
4. Automatic notifications about missed messages from users via a telegram bot when the user is offline

### Stack
- SPA: Vite, JavaScript, React, Nginx, HTML5, Tailwind CSS, React-router, axios
- API: Python, REST API, FastAPI, Pydantic v2, SQLAlchemy v2, Alembic, Redis, Celery, Aiogram3, WebSockets, PostgreSQL
- Telegram bot: Aiogram3, Aiohttp

### How to run

1. Install Docker (if not installed)
2. Install Git (if not installed)
3. Create new telegram bot (via @BotFather)
4. Open terminal and open the folder where you want to place the project
5. Enter command:
```shell
git clone https://github.com/Tireon003/instant-messaging-service
```
6. Enter to project folder and create .env file. It should contain the next variables:
```editorconfig
BOT_TOKEN= // bot api key received from @BotFather

DB_NAME=
DB_HOST=msg_db // don't touch
DB_USER=
DB_PORT=
DB_PASS=

API_HOST=
API_PORT=

JWT_SECRET=

LOG_LEVEL="INFO" //you can change log level if want
```
7. Enter command to build and start app:
```shell
docker-compose up -d --build
```
8. Wait for the project to be built

Well, now application is available on url:
```text
http://locallost:8080/ # react app
http://localhost:8080/docs # fastapi docs
```
The next url's are available:
- /login - page for log in
- /register - page for sign up
- /chat - Main page for chatting