Ghostfolio is an open source wealth management application designed for individuals who want to track their investments in stocks, ETFs, and cryptocurrencies without relying on spreadsheets or proprietary services. It empowers users to make informed, data-driven decisions by providing real-time portfolio analytics, performance metrics, and risk assessments—all while maintaining full control over their financial data.
Built with a modern tech stack including Angular, NestJS, Prisma, and PostgreSQL, Ghostfolio offers both a cloud-based Premium service and full self-hosting capabilities via Docker. The application supports multi-account management, external data integrations via CoinGecko, and secure authentication via JWT or experimental OpenID Connect, making it ideal for privacy-conscious investors and tech-savvy users seeking financial independence.
What You Get
- Portfolio Performance Analytics - Track Return on Average Investment (ROAI) across timeframes: Today, WTD, MTD, YTD, 1Y, 5Y, and Max with visual charts and historical comparisons.
- Multi-Account Management - Consolidate investments from multiple brokers or platforms into a single unified portfolio dashboard.
- Transaction Management - Create, update, and delete buy/sell transactions with support for manual entry and bulk import/export via CSV or JSON.
- Static Portfolio Risk Analysis - Identify concentration risks, asset class imbalances, and diversification gaps through automated portfolio composition analysis.
- Dark Mode & Zen Mode - Reduce visual clutter with a dark theme and a minimalist Zen Mode for focused portfolio review without distractions.
- Progressive Web App (PWA) - Install Ghostfolio as a native-like app on mobile and desktop with offline access, push notifications, and home screen icon support.
- Self-Hosting with Docker - Deploy Ghostfolio on your own infrastructure using official Docker images for amd64, arm/v7, and arm64 architectures.
- OpenID Connect (OIDC) Authentication - Securely authenticate users via external identity providers like Keycloak or Auth0 using experimental OIDC support.
Common Use Cases
- Tracking a diversified investment portfolio - An investor uses Ghostfolio to monitor holdings across multiple brokers, including stocks, ETFs, and crypto, with real-time performance metrics and risk alerts.
- Running a personal finance blog - A financial educator self-hosts Ghostfolio to demonstrate portfolio tracking techniques and share anonymized data visualizations with their audience.
- Replacing spreadsheets for investment tracking - A retiree migrates from Excel to Ghostfolio to automate portfolio updates, eliminate manual errors, and visualize long-term growth trends.
- Privacy-focused wealth management - A tech professional avoids cloud-based financial apps and runs Ghostfolio on a home server to retain full ownership of sensitive financial data.
Under The Hood
Architecture
- Monorepo structure managed by Nx with clearly separated Angular frontend and NestJS API applications, organized into shared libraries for API, client, common utilities, and UI components
- Dependency injection and modularity enforced through NestJS modules, ensuring clean separation between controllers, services, and data access layers
- Prisma ORM serves as the unified data access layer, abstracted behind service classes to encapsulate business logic and prevent direct repository exposure
- Shared domain models and utilities are centralized across frontend and backend via TypeScript path aliases, promoting consistency and type safety
- Build and test pipelines are standardized with Nx target defaults, enabling parallelized execution and consistent CI/CD workflows
- Docker multi-stage builds isolate runtime dependencies and enforce environment-specific configurations through structured config files
Tech Stack
- Node.js 22 backend powered by NestJS with Express, using Prisma for type-safe database interactions and PostgreSQL as the primary data store
- Angular 21.1.1 frontend with Material Design components and PWA capabilities, managed within the Nx monorepo for scalable architecture
- Comprehensive testing stack using Jest for unit and integration tests, and Cypress for end-to-end scenarios, fully integrated with Nx’s execution framework
- Redis-backed job queues via Bull and BullBoard for background processing, with seamless NestJS integration for task scheduling and monitoring
- Unified TypeScript configuration with strict linting, Prettier formatting, and import sorting applied consistently across all modules
- Production-optimized Docker builds with Prisma schema generation embedded in the pipeline for reliable deployment
Code Quality
- Extensive test coverage with well-structured unit and integration tests, using mocks for external dependencies to ensure isolated and repeatable test scenarios
- Clear separation of concerns through modular service design, with dedicated test utilities and mock implementations that reduce coupling and improve maintainability
- Robust error handling with custom exception patterns and strict validation in data import pipelines, rejecting malformed inputs proactively
- Consistent naming conventions and strong type safety enforced across APIs, interfaces, and test fixtures, enhancing readability and reducing runtime errors
- Uniform linting and configuration standards maintained across frontend and backend via shared tsconfig files, ensuring codebase cohesion
- Innovative use of domain-specific test data factories and polymorphic calculation logic to enable reusable, readable test scenarios for complex financial operations
What Makes It Unique
- Native Prisma integration across frontend and backend creates a unified, type-safe data layer that eliminates common ORM mismatches in full-stack applications
- Built-in performance logging interceptor provides granular, method-level timing insights without requiring external APM tools
- Modular UI component library with shared interfaces enables consistent, maintainable financial dashboards across the entire application
- Decoupled data provider abstraction supports pluggable market data sources with built-in credit tracking, empowering community contributions
- Fine-grained, role-based permission system embedded in shared interfaces ensures consistent access control from API to UI
- Custom lexical-style financial data editor with direct Prisma persistence offers a rare, intuitive way to edit historical market data in personal finance tools