FastAPIPythonPostgreSQLDDDSQLAlchemy

Energy Production Backend (REST API)

A domain-driven backend system for oil & gas production logging, featuring strict audit trails, role-based access, and automated compliance reporting.

Energy Production Backend (REST API) screenshot
## Context In the oil and gas industry, accurate production logging is critical for regulatory compliance and revenue allocation. Manual errors in volume reporting can lead to significant financial audits. This project implements a **robust REST API** for field operators to log daily production figures (oil, gas, water) with strict validation and immutable audit trails. --- ## Tech Stack - **Language:** Python 3.11+ - **Framework:** FastAPI (High performance, auto-documentation) - **Database:** PostgreSQL - **ORM:** SQLAlchemy (Async) - **Migration:** Alembic - **Testing:** Pytest --- ## Key Features **Domain-Driven Design (DDD)** The codebase is structured around bounded contexts (Production, Inventory, Personnel) ensures that business logic is decoupled from framework specifics. **Immutable Audit Logs** Every write operation generates an audit record. Historical data cannot be altered, only corrected via new adjusting entries. **Role-Based Access Control (RBAC)** - **Field Operator:** Can submit daily logs. - **Supervisor:** Can approve/reject logs. - **Auditor:** Read-only access to all history.

Screenshots

Energy Production Backend (REST API) screenshot 1
Energy Production Backend (REST API) screenshot 2
Energy Production Backend (REST API) screenshot 3