ERP Framework is a modular and extensible solution built with a Clean Architecture approach. It leverages FastAPI for building a RESTful API and uses Poetry for dependency management and virtual environment management.
- Modular Design: Integration and customization are simplified by decoupling ERP modules such as sales, inventory, HR, finance, and manufacturing.
- FastAPI API Layer: Provides a modern, high-performance API built using FastAPI.
- Debug Ready: The API startup prints debugging details (e.g.,
sys.executableandsys.path) to ensure the correct virtual environment is used. - Robust Testing: Comprehensive unit tests in the
tests/directory and integration tests inintegration_tests/ensure reliability. - Easy Setup & Extensibility: Designed to allow quick adaptation to different ERP requirements with minimal configuration changes.
- Clone the Repository
git clone <repository-url> cd erp-framework
- Install Dependencies
Make sure you have Python 3.7+ installed, then run:
poetry install
- Run Tests
Run the test suite to verify everything is set up correctly:
poetry run pytest
To start the API server, use the following command that explicitly uses the Poetry-managed virtual environment:
poetry run python -m uvicorn erp.app:app --reloadThis will start the FastAPI server with auto-reload enabled. The API is accessible at http://127.0.0.1:8000.
- erp/
- app.py: Entry point for the FastAPI application, including debug prints to display
sys.executableandsys.path. - core/erp_system.py: Initializes the ERP system, registers modules, and provides processing logic.
- domain/erp_modules.py: Contains definitions for ERP modules (e.g., sales, inventory).
- use_cases/process_operation.py: Implements core business logic for processing ERP operations.
- app.py: Entry point for the FastAPI application, including debug prints to display
- tests/: Unit tests for core functionality and domain logic.
- integration_tests/: Integration tests for API endpoints.
- pyproject.toml: Poetry configuration including dependencies like FastAPI, Uvicorn, and HTTPX.
At startup, the application prints out the Python executable and system path. This helps ensure that the correct virtual environment is used. If you experience issues with package imports (e.g., FastAPI not being found), confirm that you are running the application using:
poetry run python -m uvicorn erp.app:app --reloadThis project is licensed under the MIT License.