A production-grade, event-driven financial transaction engine built for high concurrency, real-time fraud detection, and predictive load forecasting.
Client → FastAPI Gateway → Redis Stream → PostgreSQL Worker
↓
Analytics Engine (ARIMA Fraud Detection)
| Layer | Technology |
|---|---|
| API Gateway | FastAPI, Python |
| Auth | JWT, OAuth 2.0, RBAC |
| Caching & Queue | Redis, Redis Streams |
| Database | PostgreSQL, SQLAlchemy |
| Analytics | ARIMA, Z-Score Anomaly Detection |
| Frontend | React, Recharts, Vite |
| Infrastructure | Docker, Alembic |
- High-Throughput API Gateway — Async FastAPI ingestion layer capable of processing 1,000+ mock transactions per second using asynchronous request handling and connection pooling
- Identity Fortress — JWT-based authentication with Redis token blacklisting, token caching for microsecond validation, and role-based access control (RBAC) to protect sensitive financial endpoints
- Event-Driven Pipeline — Every transaction is pushed into a Redis Stream immediately after ingestion, decoupling the API from the database and absorbing traffic spikes with zero lag to the user
- ACID-Compliant Worker — A background consumer pulls transactions from the Redis Stream in configurable batches and safely inserts them into PostgreSQL with full rollback support on failure
- Fraud-Sensing Engine — Time-series analysis using ARIMA forecasting and Z-score statistical detection to flag velocity spikes and unusual transaction amounts in real time
- Live React Dashboard — Full-stack frontend with login/register flow, transaction submission form, live transaction history table, fraud alert panel, and a load forecast chart
Dashboard with transaction history, fraud analysis panel, and ARIMA load forecast chart
- Docker Desktop
- Python 3.11 (via Miniconda)
- Node.js 18+
docker-compose up -dcd backend
conda activate aether
alembic upgrade head
uvicorn app.main:app --reloadcd backend
conda activate aether
python -m app.workers.transaction_workercd frontend
npm install
npm run devaether/
├── backend/
│ ├── app/
│ │ ├── api/ # Route handlers (auth, transactions, analytics)
│ │ ├── core/ # Config, Database, Security, Redis client
│ │ ├── models/ # SQLAlchemy ORM models
│ │ ├── schemas/ # Pydantic request/response schemas
│ │ ├── services/ # Business logic (auth, fraud, cache, analytics)
│ │ ├── workers/ # Redis Stream consumer worker
│ │ └── main.py # FastAPI app entry point
│ ├── migrations/ # Alembic database migrations
│ ├── requirements.txt
│ └── Dockerfile
├── frontend/
│ └── src/
│ └── App.jsx # React dashboard
├── docker-compose.yml
└── README.md
| Method | Endpoint | Description | Auth |
|---|---|---|---|
| POST | /auth/register | Register a new user | ❌ |
| POST | /auth/login | Login and receive JWT | ❌ |
| POST | /auth/logout | Blacklist token in Redis | ✅ |
| POST | /transactions/ | Submit a transaction | ✅ |
| GET | /transactions/ | List all transactions | ✅ |
| GET | /transactions/{id} | Get single transaction | ✅ |
| GET | /transactions/stream/length | Redis queue depth | ✅ |
| GET | /analytics/forecast | ARIMA forecast + fraud flags | ✅ |
| GET | /health | Health check | ❌ |
Mohit — github.com/mohitram-ck