Welcome to AIToolsBox! This project is a comprehensive example of building and deploying AI-powered microservices using FastAPI. It demonstrates clean architecture, dependency injection, and advanced microservices practices. The project currently includes an OCR service leveraging Tesseract OCR, and will be expanded to include additional AI services in the future. Additionally, AIToolsBox comes with a React-based web application and a Flutter-based Android client.
- Overview
- Features
- Clean Architecture
- Prerequisites
- Setup and Deployment
- Usage
- Contributing
- License
- Contact
AIToolsBox is designed to be a learning resource and a practical example of implementing AI-powered microservices with a focus on clean architecture. It features:
- A microservice architecture using FastAPI.
- A Tesseract OCR service for extracting text from images.
- Centralized logging and monitoring using the EFK stack (Elasticsearch, Fluent Bit, Kibana).
- API management and routing through Traefik.
- HTTP & gRPC communication between services.
- Microservices with FastAPI: Each service is implemented using FastAPI with clean architecture principles and dependency injection for maintainability and scalability.
- Tesseract OCR Service: Utilizes Tesseract OCR to extract text from images.
- Traefik API Gateway: Manages routing and load balancing, accessible via
http://localhost:8080
. - EFK Stack for Logging: Centralized logging using Elasticsearch, Fluent Bit, and Kibana, accessible via
http://localhost:5601
. - Simplified Deployment: Easy setup and deployment scripts for both Windows and Linux users.
AIToolsBox follows the principles of Clean Architecture in each service to ensure that services are:
- Independent of frameworks: The core application logic is not dependent on any specific framework or external technology.
- Testable: Each component is isolated and can be tested independently.
- Independent of UI: The user interface can change without altering the business logic.
- Independent of Database: The database can be swapped without changing the business logic.
To run this project, ensure you have the following installed:
Clone the repository and navigate to the project directory:
git clone https://github.com/aminupy/AIToolsBox.git
cd AIToolsBox
To run the services on Windows, execute the following command:
cd deployment
deply.bat
To run the services on Linux, execute the following command:
cd deployment
./deploy.sh
These scripts will build and start all microservices, the Traefik API gateway, and the EFK stack.
- IAM Service: 'http://iam.localhost'
- Media Service: 'http://media.localhost'
- OCR Service: 'http://ocr.localhost'
- Traefik Dashboard: 'http://localhost:8080'
- Kibana Dashboard: 'http://localhost:5601'
- IAM Service: Handles user registration, authentication and authorization.
- Media Service: Manages operations related to media files.
- OCR Service: Extracts text from images using Tesseract OCR.
- Traefik Dashboard: Provides an overview of the services and routing configuration.
- Kibana Dashboard: Displays logs and metrics for monitoring.
Contributions are welcome! To contribute, follow these steps:
- Fork this repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.
- Sit back and relax while your PR is reviewed.
This project is licensed under the MIT License. See the LICENSE file for more information.
If you have any questions or suggestions, feel free to reach out to me at:
- Email: esaminu.py@gmail.com
- LinkedIn: linkedin.com/aminupy
- GitHub: github.com/aminupy