Skip to content

sreekarnv/mint

Repository files navigation

Mint

A production-style fintech platform built as a polyglot microservices monorepo. Covers authentication, wallet management, payments, KYC, fraud detection, analytics, social features, webhooks, an admin console, and a tamper-proof audit log.

Looking for the original version built with Express, MongoDB, RabbitMQ, and React? See the v1 branch.

Frontend

A Next.js 15 app serves both the user-facing product and the admin console through the same nginx gateway.

User dashboard showing wallet balance, recent transactions, and quick actions
Dashboard — wallet balance, recent activity, quick deposit & send
Analytics page showing spending by category, breakdown chart, and monthly budgets
Analytics — category spend, breakdown, top merchants, budget tracking
Notifications feed showing transaction alerts and verification events
Notifications — real-time activity feed via SSE
Identity verification page showing tier progression and active limits
Identity Verification — tier progression, document upload, active limits
Admin KYC management page showing pending review queue and profile review panel
Admin — KYC Management — pending review queue, document inspection, approve / reject

Services

Service Stack Port Description
web Next.js 15 3000 User app and admin console
auth Python / FastAPI 4001 JWT issuance, refresh, RBAC
wallet Python / FastAPI 4002 Balances, gRPC settlement interface
transactions NestJS 4003 Transfers, top-ups, idempotency
fraud NestJS (gRPC only) Real-time fraud scoring on every transaction
kyc NestJS 4004 Document upload, tier management
analytics NestJS 4005 Spend insights, category budgets
notifications NestJS 4006 Persistent notifications + SSE stream
social NestJS 4007 Contacts, money requests, bill splits
webhook NestJS 4008 User-registered webhooks + delivery log
admin NestJS 4009 Admin console API
audit NestJS 4010 Immutable append-only audit log

Running

# Generate RSA keys (first time only)
sh scripts/generate-keys.sh

# Start everything
docker compose -f docker-compose.dev.yml up -d --build

The app is at http://localhost. The admin console is at http://localhost/app-admin.

Create an admin user:

docker exec -it mint-auth uv run python /app/apps/auth/src/create_admin.py \
  --email admin@mint.dev \
  --password adminpass \
  --name "Admin User"

Migrations run automatically on startup. Swagger UI is at /api-docs on every service.

Observability

Every service exports OpenTelemetry traces to a local collector. Trace context is propagated across HTTP, gRPC, and Kafka — a single transfer produces one trace spanning fraud scoring, wallet settlement, analytics ingestion, notification delivery, and webhook dispatch.

Grafana is at http://localhost:4000.

Grafana Tempo showing a distributed trace for a top-up request

Docs

Full documentation at sreekarnv.github.io/mint.

  • Architecture — service map, communication patterns, auth flow, transfer flow
  • Design Decisions — polyglot rationale, gRPC vs Kafka, idempotency, fraud scoring, audit immutability
  • Services — endpoints, databases, Kafka topics per service
  • Infrastructure — nginx, Kafka, Postgres, Redis, MinIO, observability
  • Running — dev and production setup

About

Event-driven wallet platform built with NextJS, FastAPI, NestJS, Kafka, and gRPC. 11 microservices covering auth, fraud detection, KYC, analytics, social payments, webhooks, and audit. PostgreSQL per service, OpenTelemetry tracing, production Docker Compose.

Topics

Resources

Stars

Watchers

Forks

Contributors