back-chat


Nameback-chat JSON
Version 1.1.1 PyPI version JSON
download
home_pagehttps://github.com/AbelGRubio/backend-chat.git
SummaryNone
upload_time2025-08-05 07:53:55
maintainerNone
docs_urlNone
authoragrubio
requires_python>=3.12
licenseNone
keywords development setup setuptools
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Distributed Chat Backend with Redundancy

![Python Version](https://img.shields.io/badge/python-3.12-blue.svg)
[![PyPI version](https://badge.fury.io/py/back_chat.svg)](https://badge.fury.io/py/back_chat)
![License](https://img.shields.io/badge/license-MIT-blue.svg)

This project is a **Python-based backend** designed to handle message storage in a database and ensure **high availability and redundancy** through communication between multiple backend instances using message queues (RabbitMQ).

## βš™οΈ Key Features

- πŸ’¬ Stores incoming chat messages in a relational database.
- πŸ” Redundancy and synchronization across multiple backend instances.
- πŸ•ΈοΈ Inter-process communication using RabbitMQ.
- πŸ” Horizontally scalable architecture.
- πŸš€ Ready for deployment in Docker/Kubernetes environments.

---

## 🧱 High-Level Architecture

```
+-----------+       +-------------+       +-----------+
| Frontend  | <---> |  Backend A  | <---> |  Backend B |
+-----------+       +-------------+       +-----------+
                        ↑   ↓                  ↑   ↓
                      [RabbitMQ] <----------> [RabbitMQ]
                        ↑   ↓                  ↑   ↓
                      [Database]            [Database]
```

> All backend instances are synchronized via message queues, allowing for load distribution and consistency.

---

## πŸš€ Installation

1. Clone the repository:
   ```bash
   git clone https://github.com/AbelGRubio/backend-chat.git
   cd backend-chat
   ```

2. Install dependencies:
   ```bash
   pip install -r requirements.txt
   ```

3. Create a `.env` file with the required variables (RabbitMQ, DB, etc.)

---

## ▢️ Running the App

```bash
python src
```

Or with FastAPI and Uvicorn:

```bash
uvicorn src.back_chat:app --host 0.0.0.0 --port 8000
```

---

## πŸ›  Required Environment Variables

```env
RABBITMQ_URL=amqp://user:password@rabbitmq:5672/
DATABASE_URL=postgresql://user:password@localhost:5432/chat
INSTANCE_ID=backend-a
```

---

## βœ… Requirements

- Python 3.12+
- RabbitMQ
- PostgreSQL (or equivalent)
- Docker (optional but recommended)

---


## πŸ§ͺ Tests

_Pending integration of automatic tests using `pytest`._

---

## 🀝 Contributing

Contributions, suggestions, and issues are welcome! Feel free to open a PR or issue.

---

## πŸͺͺ License

This project is licensed under the [MIT License](LICENSE).

---

## ✨ Author

**Abel G. Rubio**  
GitHub: [@AbelGRubio](https://github.com/AbelGRubio)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/AbelGRubio/backend-chat.git",
    "name": "back-chat",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.12",
    "maintainer_email": null,
    "keywords": "development, setup, setuptools",
    "author": "agrubio",
    "author_email": "contact@agrubio.dev",
    "download_url": "https://files.pythonhosted.org/packages/ef/2f/64a43bc7cb175ee8c04305b7df978f1920a5877c499693d1c9bfc9416e0c/back_chat-1.1.1.tar.gz",
    "platform": null,
    "description": "# Distributed Chat Backend with Redundancy\n\n![Python Version](https://img.shields.io/badge/python-3.12-blue.svg)\n[![PyPI version](https://badge.fury.io/py/back_chat.svg)](https://badge.fury.io/py/back_chat)\n![License](https://img.shields.io/badge/license-MIT-blue.svg)\n\nThis project is a **Python-based backend** designed to handle message storage in a database and ensure **high availability and redundancy** through communication between multiple backend instances using message queues (RabbitMQ).\n\n## \u2699\ufe0f Key Features\n\n- \ud83d\udcac Stores incoming chat messages in a relational database.\n- \ud83d\udd01 Redundancy and synchronization across multiple backend instances.\n- \ud83d\udd78\ufe0f Inter-process communication using RabbitMQ.\n- \ud83d\udd10 Horizontally scalable architecture.\n- \ud83d\ude80 Ready for deployment in Docker/Kubernetes environments.\n\n---\n\n## \ud83e\uddf1 High-Level Architecture\n\n```\n+-----------+       +-------------+       +-----------+\n| Frontend  | <---> |  Backend A  | <---> |  Backend B |\n+-----------+       +-------------+       +-----------+\n                        \u2191   \u2193                  \u2191   \u2193\n                      [RabbitMQ] <----------> [RabbitMQ]\n                        \u2191   \u2193                  \u2191   \u2193\n                      [Database]            [Database]\n```\n\n> All backend instances are synchronized via message queues, allowing for load distribution and consistency.\n\n---\n\n## \ud83d\ude80 Installation\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/AbelGRubio/backend-chat.git\n   cd backend-chat\n   ```\n\n2. Install dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n3. Create a `.env` file with the required variables (RabbitMQ, DB, etc.)\n\n---\n\n## \u25b6\ufe0f Running the App\n\n```bash\npython src\n```\n\nOr with FastAPI and Uvicorn:\n\n```bash\nuvicorn src.back_chat:app --host 0.0.0.0 --port 8000\n```\n\n---\n\n## \ud83d\udee0 Required Environment Variables\n\n```env\nRABBITMQ_URL=amqp://user:password@rabbitmq:5672/\nDATABASE_URL=postgresql://user:password@localhost:5432/chat\nINSTANCE_ID=backend-a\n```\n\n---\n\n## \u2705 Requirements\n\n- Python 3.12+\n- RabbitMQ\n- PostgreSQL (or equivalent)\n- Docker (optional but recommended)\n\n---\n\n\n## \ud83e\uddea Tests\n\n_Pending integration of automatic tests using `pytest`._\n\n---\n\n## \ud83e\udd1d Contributing\n\nContributions, suggestions, and issues are welcome! Feel free to open a PR or issue.\n\n---\n\n## \ud83e\udeaa License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n---\n\n## \u2728 Author\n\n**Abel G. Rubio**  \nGitHub: [@AbelGRubio](https://github.com/AbelGRubio)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": null,
    "version": "1.1.1",
    "project_urls": {
        "Homepage": "https://github.com/AbelGRubio/backend-chat.git"
    },
    "split_keywords": [
        "development",
        " setup",
        " setuptools"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "aab597efcc1f90f5b605624616d011c70c5ead3fa947dc519acc8a3d7021edfd",
                "md5": "d7df7eb0429a0d62a4405ae9ed86180e",
                "sha256": "ccc23823173d64ac61004f5ef71a08db4155459bcbca4a55cbc8e18068f7f53d"
            },
            "downloads": -1,
            "filename": "back_chat-1.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d7df7eb0429a0d62a4405ae9ed86180e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12",
            "size": 23313,
            "upload_time": "2025-08-05T07:53:54",
            "upload_time_iso_8601": "2025-08-05T07:53:54.393886Z",
            "url": "https://files.pythonhosted.org/packages/aa/b5/97efcc1f90f5b605624616d011c70c5ead3fa947dc519acc8a3d7021edfd/back_chat-1.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ef2f64a43bc7cb175ee8c04305b7df978f1920a5877c499693d1c9bfc9416e0c",
                "md5": "9556bdc0e52e6ab0cf0c06ff1841ea93",
                "sha256": "d7938a61742d3eb5e36f39e0f27fcfa29d37f83bc696ac7bbbf9b07c2373d16d"
            },
            "downloads": -1,
            "filename": "back_chat-1.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "9556bdc0e52e6ab0cf0c06ff1841ea93",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 20176,
            "upload_time": "2025-08-05T07:53:55",
            "upload_time_iso_8601": "2025-08-05T07:53:55.530719Z",
            "url": "https://files.pythonhosted.org/packages/ef/2f/64a43bc7cb175ee8c04305b7df978f1920a5877c499693d1c9bfc9416e0c/back_chat-1.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-05 07:53:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "AbelGRubio",
    "github_project": "backend-chat",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "back-chat"
}
        
Elapsed time: 1.07486s