This project is a Proof of Concept (PoC) designed to validate the end-to-end orchestration of automated automotive payment scenarios. It demonstrates deterministic orchestration, rule-based evaluation, and secure integration with third-party payment APIs within a highly scalable backend environment.
- Deterministic Rule-Based Evaluation: Implements a scalable rules engine (using Strategy/Chain of Responsibility patterns) to calculate dynamic pricing based on vehicle type, time of day, and road conditions.
- Third-Party API Integration: Robust external API consumption with built-in resilience (retries, timeouts) to simulate payment processing through external gateways.
- Polyglot Persistence (SQL + NoSQL): * PostgreSQL: Handles relational data (Users, Vehicles, Core Transactions) ensuring ACID compliance.
- MongoDB: Stores unstructured audit logs, raw third-party API payloads, and non-binding AI-generated scenario history.
- High Performance & Asynchronous Flows: Utilizes C# asynchronous programming (
async/await) and optimized memory allocation to ensure non-blocking, high-throughput transaction processing.
- Ingestion: API receives an automotive event payload (e.g., license plate, timestamp, sensor ID).
- Evaluation: The Rules Engine deterministically calculates the fee.
- Integration: An asynchronous call is dispatched to a Mock Payment API to authorize the transaction.
- Persistence: The transaction state is saved in PostgreSQL, while the raw request/response communication is logged in MongoDB.
Built with a Test-Driven Development (TDD) mindset.
- Unit Tests (xUnit): Extensive coverage of the Rule-Based Evaluation engine to guarantee 100% deterministic outputs.
- Integration Tests: Validating the interaction between the orchestration layer, PostgreSQL, and MongoDB.
Provide a seamless execution experience. Use Docker Compose so the recruiter only needs one command.
docker-compose up -d