FinDash is a financial dashboard application that provides portfolio management and analytics capabilities. The project uses PostgreSQL for data storage, Metabase for data visualization, and pgAdmin for database management.
- Portfolio data management
- Interactive data visualization with Metabase
- Database management with pgAdmin
- Containerized deployment
- Mutual Fund NAV (Net Asset Value) tracking with historical and latest data
- Docker
- Docker Compose
- Make (optional, for using Makefile commands)
- Python 3.x (for nav_loader)
- PostgreSQL client libraries (for nav_loader)
-
Clone the repository:
git clone <repository-url> cd FinDash
-
Create and configure the
.envfile with the following variables:# PostgreSQL Configuration POSTGRES_USER=your_postgres_user POSTGRES_PASSWORD=your_postgres_password POSTGRES_DB=portfolio # Metabase Configuration MB_DB_TYPE=postgres MB_DB_DBNAME=metabase MB_DB_PORT=5432 MB_DB_USER=your_postgres_user MB_DB_PASSWORD=your_postgres_password MB_DB_HOST=postgres JAVA_TIMEZONE=UTC # NAV Loader Configuration MFAPI_BASE_URL=https://www.mfapi.in
-
Start the services:
make up
or
docker compose -f docker-compose.yaml -f docker-compose.local.yaml up
-
Access the services:
- Metabase: http://localhost:3000
- PostgreSQL: localhost:5432 (from the host; Metabase uses the
postgresservice on the Docker network)
FinDash/
├── docker-entrypoint-initdb.d/ # Database initialization scripts
├── nav_loader/ # Navigation loader component
│ ├── src/ # Source code
│ │ ├── main.py # Main entry point
│ │ ├── api_client.py # Mutual fund API client
│ │ ├── database.py # Database operations
│ │ ├── nav_updater.py # NAV update logic
│ │ ├── config.py # Configuration
│ │ ├── logger.py # Logging setup
│ │ ├── excluded_dates.py # Dates to exclude from NAV data
│ │ └── specific_nav_entries.py # Manual NAV entries
│ └── requirements.txt # Python dependencies
├── docker-compose.yaml # Docker Compose configuration
├── docker-compose.local.yaml # Publishes Metabase on localhost:3000 (used by `make up`)
├── docker-compose.prod.yaml # Production overrides + Caddy HTTP on :80 (see deploy/digitalocean/)
├── Makefile # Make commands
├── portfolio.sql # Portfolio database schema
└── README.md # This file
make up: Start all services (Metabase on http://localhost:3000)make down: Stop all services and remove volumesmake prod: Production stack (Metabase on HTTP port 80 via Caddy; seedeploy/digitalocean/README.md)make backup: Create database backups
See deploy/digitalocean/README.md for a Droplet-based deployment using Docker Compose (HTTP on your Droplet’s IP, no domain required).
The nav_loader is a Python-based component that synchronizes Mutual Fund NAV data with your portfolio database. It fetches data from the https://www.mfapi.in/ service and stores it in your PostgreSQL database.
-
Create and activate a virtual environment:
# Create virtual environment python -m venv .venv # Activate virtual environment # On macOS/Linux: source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies:
cd nav_loader pip install -r requirements.txt
- Fetches historical NAV data for all schemes in your portfolio
- Updates latest NAV values for all schemes
- Handles excluded dates (holidays, etc.)
- Supports manual NAV entries for specific dates
- Comprehensive logging
-
Run the NAV loader:
python src/main.py --mode [historical|latest]historical: Fetches complete NAV history for all schemeslatest: Updates only the most recent NAV values
The component can be further configured through:
- Environment variables (see above)
excluded_dates.py: List of dates to exclude from NAV dataspecific_nav_entries.py: Manual NAV entries for specific dates
- Reads scheme codes from the database
- Fetches NAV data from https://www.mfapi.in/
- Filters out excluded dates
- Updates the database with new NAV values
- Logs all operations for monitoring
The project includes database backup functionality. To create a backup:
make backupThis will create backup files in the docker-entrypoint-initdb.d/ directory:
02-schema.sql: Database schema03-data.sql: Database data04-metabase_dump.sql: Metabase configuration
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.