/tach-challenge

microservices to manage accounts and transactions between multiple accounts.

Primary LanguagePythonMIT LicenseMIT

tach microservices ⚙️

Microservices to manage Accounts and Transactions between multiple accounts.

Warning

This project is for demo purposes only. Don't use it in production environments.

How it works? 🧠

tach-ecosystem

  1. Users can create accounts via the API.
  2. Users can create transactions via the API.
  3. The Accounts service detects newly created transactions and transfers funds accordingly.
  4. The Transactions service detects fund transfers and updates transaction statuses.
  5. Users can view their account balances and transaction results via the API.

Stack 🧰

This project stands on shoulders of:

  • Sanic: For RESTFull API.
  • petisco: For clean applications and dependency injection.
  • meiga: For monad-based result type.
  • Beanie: For map MongoDB documents to Python objects (ODM).
  • pika: For RabbitMQ connections on petisco.

Quickstart 🚀

Docker

Clone repository and use Docker with docker-compose to build and run images.

  1. Clone repository
git clone git@github.com:lucaslucyk/tach-challenge.git
  1. Check .env files.

  2. Start containers with docker-compose.

docker-compose up -d

Locally 💻️

  1. Start dependencies services:

    1. RabbitMQ
    2. MongoDB
  2. Check .env files.

  3. Start apps with poetry:

poetry run python accounts/main.py
poetry run python transactions/main.py

Test 🧪

Coming soon.

Contact 📬️

License 📝

This project is licensed under the terms of the MIT license.

Made with ❤️ and 🧉