A personal finance dashboard with real-time stock market data and currency conversion. Built with a Django REST API backend and a React (TypeScript) frontend, containerized with Docker and served via Nginx.
- 📈 Stock Viewer — Search any ticker symbol and view interactive OHLCV candlestick charts powered by TradingView Lightweight Charts and the Twelve Data API
- 💱 Currency Converter — Real-time currency conversion and exchange rates for 100+ currencies via the Fixer.io (apilayer) API
- ⚡ API Caching — Database-backed response caching minimizes external API quota usage
- 🛡️ Rate Limiting — DRF throttling (60 req/min per anonymous user) protects against runaway traffic
- 🐳 Fully Dockerized — One command spins up the full stack (backend, frontend, Nginx reverse proxy)
| Layer | Technology |
|---|---|
| Backend | Python 3.12, Django 6, Django REST Framework, Gunicorn |
| Frontend | React 19, TypeScript, Vite, React Router, Axios |
| Charts | TradingView Lightweight Charts |
| Data | Twelve Data API (stocks), Fixer.io / apilayer (currency) |
| Infra | Docker, Docker Compose, Nginx, SQLite |
DjangoFinance/
├── backend/
│ ├── fintracker/ # Django project (settings, URLs, WSGI)
│ ├── stocks/ # Stock market app (search, quotes, candlesticks)
│ ├── currency/ # Currency conversion app (list, convert, rates)
│ ├── requirements.txt
│ └── Dockerfile
├── frontend/
│ ├── src/
│ │ ├── pages/ # Home, StockViewer, CurrencyConverter
│ │ ├── components/ # Navbar and shared UI
│ │ ├── services/ # Axios API clients
│ │ └── hooks/ # Custom React hooks
│ └── Dockerfile
├── nginx/ # Nginx reverse proxy config
├── docker-compose.yml
└── .env # Secret keys (never commit!)
- Docker and Docker Compose
- API keys for Twelve Data and Fixer.io via apilayer
git clone <your-repo-url>
cd DjangoFinance
cp .env.example .env # then fill in your valuesEdit .env:
DJANGO_SECRET_KEY=your-secret-key-here
DEBUG=False
ALLOWED_HOSTS=localhost,127.0.0.1
APPDATA_API_KEY=your_fixer_apilayer_key
TWELVEDATA_API_KEY=your_twelvedata_key
CORS_ALLOWED_ORIGINS=http://localhostdocker compose up --buildThe app will be available at http://localhost.
docker compose exec backend python manage.py createcachetablecd backend
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python manage.py migrate
python manage.py createcachetable
python manage.py runserverBackend runs at http://localhost:8000.
cd frontend
npm install
npm run devFrontend runs at http://localhost:5173. Vite proxies API calls to the Django backend automatically.
All endpoints are prefixed with /api/.
| Endpoint | Method | Params | Description |
|---|---|---|---|
stocks/search/ |
GET | q (string, required) |
Search for ticker symbols |
stocks/quote/ |
GET | symbol (string, required) |
Get current quote for a symbol |
stocks/candles/ |
GET | symbol, interval (default 1day), outputsize (default 90) |
OHLCV candlestick data |
| Endpoint | Method | Params | Description |
|---|---|---|---|
currency/list/ |
GET | — | List all supported currencies |
currency/rates/ |
GET | base (default USD) |
Latest exchange rates for a base |
currency/convert/ |
GET | from, to, amount (all default to USD/BRL/1) |
Convert between currencies |
Rate limiting: 60 requests/minute per anonymous client. Currency symbols and rates are cached (24h and 1h respectively).
| Variable | Description | Required |
|---|---|---|
DJANGO_SECRET_KEY |
Django secret key | ✅ |
DEBUG |
Enable debug mode (True/False) |
✅ |
ALLOWED_HOSTS |
Comma-separated list of allowed hostnames | ✅ |
APPDATA_API_KEY |
Fixer.io API key (via apilayer.com) | ✅ |
TWELVEDATA_API_KEY |
Twelve Data API key | ✅ |
CORS_ALLOWED_ORIGINS |
Comma-separated list of allowed CORS origins | ✅ |
This project is for personal use and portfolio purposes.
Built by Natalia Oliveira.