Skip to main content

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:

  1. Getting Started: Standard installation and basic usage.
  2. Database & Migrations: Connecting to Postgres and managing migrations with Alembic.
  3. Customizing Models: How to add your own fields and models, and how to use the AuditableMixin.
  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ecom_foundation_core-0.1.0.tar.gz (65.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ecom_foundation_core-0.1.0-py3-none-any.whl (71.3 kB view details)

Uploaded Python 3

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

Hashes for ecom_foundation_core-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fea4ef068ad6dbb221c5a53519939aa25fd6d33227a86ffd49f733aad9d55af5
MD5 22d326229cfb7b955aeeff4584af43f0
BLAKE2b-256 6ee11c27fd42cbe590e26521fd3717c8bfcfebcde0264bc39fe51e2bec1fe117

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ecom_foundation_core-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ecom_foundation_core-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ef5cf4dbfa8cd682520ff37b06d638e5292a9cb89134ea6608aea90fb572f1d
MD5 ba70436118d307113cbf69db67ca969b
BLAKE2b-256 fa3c2a09e43e16e948e49aaf7df359210422ee2f370af49493dd127d2b4105f6

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page