Logo Lanfrica

EmmanuelAdah/PanAfrik_Store

Domaine:

digital infrastructure

Type de record:

software
Créateur:
Emm
Hôte:
Pan Afric Store -- An express based application, focused on currency conversion and locking in four major African currencies (NGN, GHS, ZAR, KES) and USD. # 🌍 Pan-Afrik Store API **Pan-Afrik Store** is a high-performance cross-border e-commerce backend engine. It solves the critical challenge of currency volatility in African trade by implementing automated exchange rate synchronization, rate-locking at checkout, and decoupled merchant payout logic. --- ## 🚀 Key Technical Features - **Automated Currency Sync**: Integrated `RateService` that fetches, caches, and manages exchange rates via a PostgreSQL-backed `RateCache`. - **Atomic Checkout**: A robust transaction-based checkout system that locks exchange rates to prevent price fluctuations during payment. - **Merchant Payout Management**: Automatically calculates merchant earnings in their local `baseCurrency`, ensuring sellers receive exact amounts regardless of the buyer's currency. - **Security & Resilience**: - **JWT & Role-Based Access**: Strict boundaries for `merchant` and `customer` roles. - **Rate Limiting**: Protects sensitive checkout and auth endpoints from brute-force attacks. - **Cloudinary Integration**: Secure handling and storage of product imagery. --- ## 🏗️ Project Architecture ``` ├── config/ # Cloudinary, CORS, Prisma, and Redis setups ├── controllers/ # Express handlers (Auth, Cart, Order, Product, Rate, User) ├── coverage/ # LCOV and Jest test coverage reports ├── middleware/ # Hash, JWT Auth, Rate Limiter, and Role Check logic ├── prisma/ │ ├── migrations/ # SQL migration history │ └── schema.prisma # PostgreSQL relational schema ├── routes/ # Unified API route definitions ├── services/ # Business Logic: Currency, Rates, Webhooks, Image Uploads ├── test/ # Comprehensive Jest integration and unit test suites ├── utils/ # AppError, catchAsyncErrors, Logger, and Validators ├── app.js # Express application configuration └── server.js # Server entry point ``` # API Documentation **Base URL:** panafrik-store.on