A modular, containerized full-stack FinTech application for managing investment portfolios, built with a modern web stack and an authentication-first architecture.
The system provides secure user authentication, portfolio tracking, transaction handling, and real-time market data integration, all orchestrated through Docker for consistent local development.
- Secure authentication via OAuth2 / OpenID Connect
- Portfolio & transaction management
- Real-time asset valuation
- RESTful backend API
- Modern frontend with state management
- Fully containerized development environment
- Persistent relational database
The application is structured as a monorepo with clearly separated responsibilities:
| Layer | Technology |
|---|---|
| Frontend | React + Vite (served via Nginx) |
| Backend | Python + Flask |
| Authentication | Keycloak (OIDC) |
| Database | PostgreSQL |
| Infrastructure | Docker & Docker Compose |
All services communicate over an isolated Docker network, allowing the entire stack to be started with a single command.
.
├── backend/ # Flask API (business logic, auth, models)
│ ├── controllers/
│ ├── models/
│ ├── services/
│ ├── extensions.py
│ └── app.py
│
├── frontend/ # React frontend
│ ├── src/
│ ├── public/
│ └── vite.config.js
│
├── docker/ # Dockerfiles & Nginx config
│ ├── backend/
│ └── frontend/
│
├── docker-compose.yml # Full stack orchestration
├── .env.example # Environment variable template
└── docs/ # Architecture & design notes
- Docker Desktop
- Docker Compose v2
No local installation of Node.js, Python, or PostgreSQL is required.
Create a local .env file using the provided template:
cp .env.example .envExample values:
DATABASE_URL=postgresql+psycopg2://postgres:postgres@db:5432/fintech
KC_CLIENT_SECRET=replace-me
VITE_API_URL=http://localhost:8000
.envfiles are intentionally excluded from version control.
docker compose up --buildThis command:
- Builds frontend and backend images
- Starts PostgreSQL with persistent storage
- Starts Keycloak for authentication
- Serves the frontend via Nginx
- Exposes the backend API
| Service | URL |
|---|---|
| Frontend | http://localhost:5173 |
| Backend API | http://localhost:8000 |
| Auth Server | http://localhost:8080 |
Authentication is handled via Keycloak using OpenID Connect:
- Users authenticate against the identity provider
- Access tokens are issued and attached to API requests
- Backend routes enforce authorization via token validation
This setup mirrors real-world enterprise identity architectures.
PostgreSQL runs in a dedicated container with a named volume:
- Data persists across container restarts
- Schema is managed via SQLAlchemy models
- Tables are initialized automatically on first run
To inspect the database:
docker compose exec db psql -U postgres -d fintechThe backend can be tested independently of the frontend using:
curl- Postman / Insomnia
- Direct container access
Example:
curl http://localhost:8000/products/# Stop all services
docker compose down
# Rebuild everything
docker compose up --build
# View running containers
docker compose ps
# Follow logs
docker compose logs backend- Clear separation of concerns
- Auth-first API design
- Container-native development
- Explicit configuration via environment variables
- Minimal assumptions about runtime environment
This project is intentionally focused on clarity, correctness, and architecture rather than production hardening (e.g. rate limiting, secrets management, CI/CD).
MIT License