E-Com Foundation Platform: A modular foundation for building high-performance enterprise microservices, powering systems like the International Regulatory Management System (IRMS).
Project description
E-Com Foundation Core
A production-ready foundation for high-performance enterprise microservices. Built with FastAPI, Pydantic V2, and SQLAlchemy 2.0 (Async).
🚀 Overview
ecom_foundation_core provides a modular backbone for complex enterprise systems. It is an enterprise foundation platform with auth, billing, notifications, and workflows, modularizing Authentication, RBAC, Billing, and Auditing—allowing you to build new microservices in minutes instead of months. While originally designed for the Ordvel marketplace, it is currently the foundation for the International Regulatory Management System (IRMS).
Core Modules
- 🔑 Auth: JWT-based authentication, password hashing, and 2FA.
- 🛡️ RBAC: Multi-role support with fine-grained permission enforcement.
- 💳 Billing: Unified interface for Stripe and Paystack.
- 📜 Audit: Automatic logging of database changes (INSERT/UPDATE/DELETE).
- ⚙️ Workflows: Built-in Celery integration for asynchronous processing.
🛠️ Getting Started
Installation
pip install ecom-foundation-core
Quick Start Example
This is all you need to create a fully secure microservice using the foundation:
from ecom_foundation_core.bootstrap import create_app, AppConfig
from ecom_foundation_core.modules.common.database import create_async_engine
# 1. Configuration
config = AppConfig(
title="Order Service",
enable_auth=True,
enable_rbac=True
)
# 2. Initialize PostgreSQL
db_engine = create_async_engine("postgresql+asyncpg://user:pass@localhost/db")
# 3. Bootstrap
app = create_app(config=config, db_engine=db_engine)
📖 In-Depth Guides
We have provided step-by-step guides for every part of the system:
- Getting Started: Standard installation and basic usage.
- Database & Migrations: Connecting to Postgres and managing migrations with Alembic.
- Customizing Models: How to add your own fields and models, and how to use the
AuditableMixin. - Example Application: A standalone, runnable FastAPI application demonstrating all features.
🧬 Extending the System
The foundation is designed to be personalized. You can easily extend internal models by inheriting from Base:
from ecom_foundation_core.modules.common.database import Base
from ecom_foundation_core.modules.audit.mixins import AuditableMixin
class Product(Base, AuditableMixin):
__tablename__ = "products"
name: Mapped[str] = mapped_column(String(255))
price: Mapped[int] = mapped_column(Integer)
Adding this model to your application's metadata will automatically allow you to manage it via migrations and track it with the Audit system.
🧪 Testing
The foundation comes with a robust test suite in Docker for maximum reliability:
docker compose -f docker-compose.test.yml up --build
📄 License
e-com services limited. All rights reserved.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ecom_foundation_core-0.1.0.tar.gz.
File metadata
- Download URL: ecom_foundation_core-0.1.0.tar.gz
- Upload date:
- Size: 65.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fea4ef068ad6dbb221c5a53519939aa25fd6d33227a86ffd49f733aad9d55af5
|
|
| MD5 |
22d326229cfb7b955aeeff4584af43f0
|
|
| BLAKE2b-256 |
6ee11c27fd42cbe590e26521fd3717c8bfcfebcde0264bc39fe51e2bec1fe117
|
Provenance
The following attestation bundles were made for ecom_foundation_core-0.1.0.tar.gz:
Publisher:
release.yml on E-com-services-Ltd/platform-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ecom_foundation_core-0.1.0.tar.gz -
Subject digest:
fea4ef068ad6dbb221c5a53519939aa25fd6d33227a86ffd49f733aad9d55af5 - Sigstore transparency entry: 1356890517
- Sigstore integration time:
-
Permalink:
E-com-services-Ltd/platform-core@5b1a45ceb40c9220f4d5571c9f534b81bffac840 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/E-com-services-Ltd
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5b1a45ceb40c9220f4d5571c9f534b81bffac840 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ecom_foundation_core-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ecom_foundation_core-0.1.0-py3-none-any.whl
- Upload date:
- Size: 71.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ef5cf4dbfa8cd682520ff37b06d638e5292a9cb89134ea6608aea90fb572f1d
|
|
| MD5 |
ba70436118d307113cbf69db67ca969b
|
|
| BLAKE2b-256 |
fa3c2a09e43e16e948e49aaf7df359210422ee2f370af49493dd127d2b4105f6
|
Provenance
The following attestation bundles were made for ecom_foundation_core-0.1.0-py3-none-any.whl:
Publisher:
release.yml on E-com-services-Ltd/platform-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ecom_foundation_core-0.1.0-py3-none-any.whl -
Subject digest:
3ef5cf4dbfa8cd682520ff37b06d638e5292a9cb89134ea6608aea90fb572f1d - Sigstore transparency entry: 1356890532
- Sigstore integration time:
-
Permalink:
E-com-services-Ltd/platform-core@5b1a45ceb40c9220f4d5571c9f534b81bffac840 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/E-com-services-Ltd
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5b1a45ceb40c9220f4d5571c9f534b81bffac840 -
Trigger Event:
push
-
Statement type: