MCPSERV.CLUB
Ghostfolio

Ghostfolio

Self-Hosted

Track and analyze your investments with privacy-first precision

Active(100)
6.8kstars
0views
Updated 21 hours ago

Overview

Discover what makes Ghostfolio powerful

Ghostfolio is a full‑stack, self‑hostable wealth‑management platform that aggregates holdings from multiple brokerage and crypto exchanges into a unified, privacy‑first dashboard. At its core, the system exposes RESTful endpoints for transaction CRUD, portfolio analytics, and real‑time price feeds, while a client SPA renders interactive charts and PWA features. The project is structured as an Nx monorepo, allowing developers to iterate on the backend and frontend in parallel while sharing common libraries (e.g., DTOs, validation schemas, and utility functions).

Backend

Frontend

Infrastructure

Transaction Management

Overview

Ghostfolio is a full‑stack, self‑hostable wealth‑management platform that aggregates holdings from multiple brokerage and crypto exchanges into a unified, privacy‑first dashboard. At its core, the system exposes RESTful endpoints for transaction CRUD, portfolio analytics, and real‑time price feeds, while a client SPA renders interactive charts and PWA features. The project is structured as an Nx monorepo, allowing developers to iterate on the backend and frontend in parallel while sharing common libraries (e.g., DTOs, validation schemas, and utility functions).

Technical Stack

  • Backend: NestJS (TypeScript) on Node.js, leveraging its modular architecture for clear separation of concerns. Core modules include Accounts, Transactions, Analytics, and Auth. The persistence layer uses PostgreSQL accessed via TypeORM, with schema migrations managed by the Nest CLI. An optional Redis layer can be plugged in for caching price lookups or session storage.
  • Frontend: Angular (TypeScript) powered by PrimeNG and Chart.js for data visualization. The UI is responsive, supports dark/zen modes, and ships as a PWA for offline access. State management is handled by NgRx, ensuring deterministic updates across components.
  • Infrastructure: Docker images are published to Docker Hub (ghostfolio/ghostfolio), facilitating containerized deployments on Kubernetes, Docker‑Compose, or any OCI‑compatible runtime. The repo ships with Helm charts and a docker-compose.yml that expose environment variables for database credentials, API keys, and feature flags.

Core Capabilities & APIs

  • Transaction Management: Full CRUD via /api/transactions, with validation against a shared DTO schema. Bulk import/export in CSV or JSON formats.
  • Portfolio Analytics: Endpoints expose computed metrics such as ROAI, CAGR, Sharpe ratio, and risk‑adjusted returns. The analytics service aggregates price history from external APIs (Alpha Vantage, CoinGecko) and caches results to reduce latency.
  • Multi‑Account & Asset Support: Accounts can be linked to different brokerages; the system normalizes holdings across asset classes (stocks, ETFs, crypto). A plugin interface (IAccountProvider) allows developers to add new data sources without touching core code.
  • Webhooks & Event Bus: External systems can subscribe to transaction events via a simple webhook mechanism. Internally, NestJS’ EventEmitter is used for decoupled communication between modules.

Deployment & Infrastructure

Ghostfolio’s self‑hosting footprint is modest: a single PostgreSQL instance, an optional Redis cache, and the Node/Angular container. The Docker image is ~400 MB, making it suitable for edge devices or cloud VMs with 1–2 GB RAM. Horizontal scaling is straightforward—stateless API pods can be replicated behind a load balancer, while the PostgreSQL cluster can be configured for read replicas. The PWA frontend is served as static assets, enabling CDN caching and zero‑downtime updates.

Integration & Extensibility

The plugin system is a key differentiator: developers can write a tiny module that implements the IAccountProvider interface, register it in the NestJS module registry, and immediately expose new brokerage data. Additionally, Ghostfolio offers a GraphQL fallback (via @nestjs/graphql) for clients preferring schema‑first queries. Custom dashboards can be built by extending the Angular component library or by consuming the public REST API from external scripts.

Developer Experience

Documentation is hosted on GitHub and follows a “read‑the‑docs” pattern: installation, architecture, contribution guidelines, and API reference are all in Markdown. The community is active on Slack and GitHub Discussions, with a clear triage process for issues. TypeScript’s strict mode enforces type safety across the monorepo, and Nx’s affected commands help developers run tests or lint only what changed. The codebase follows SOLID principles, making it approachable for newcomers while still being performant.

Use Cases

  • Personal Portfolio Manager: An individual who trades across several exchanges can self‑host Ghostfolio to keep a single, GDPR‑compliant view of all holdings.
  • Financial Advisory Firms: Small firms can deploy the platform on-premises to offer clients a privacy‑first analytics dashboard without exposing data to third‑party SaaS.
  • FinTech MVPs: Startups building investment tools can fork Ghostfolio, customize the UI, and expose a branded API to their users.

Advantages

Ghostfolio’s open‑source AGPL v3 license guarantees that any derivative must remain free, protecting users from vendor lock‑in. Its full TypeScript stack ensures type safety across client and server, reducing runtime bugs. The modular architecture and plugin hooks give developers the flexibility to integrate new data sources or analytics algorithms with minimal friction. Compared to spreadsheet‑based tracking, Ghostfolio offers real‑time price updates, automated transaction reconciliation, and advanced risk metrics—all while keeping data under the owner’s control.

Open SourceReady to get started?

Join the community and start self-hosting Ghostfolio today

Weekly Views

Loading...
Support Us
Most Popular

Infrastructure Supporter

$5/month

Keep our servers running and help us maintain the best directory for developers

Repository Health

Loading health data...

Information

Category
other
License
AGPL-3.0
Stars
6.8k
Technical Specs
Pricing
Open Source
Database
PostgreSQL
Docker
Official
Supported OS
LinuxDocker
Author
ghostfolio
ghostfolio
Last Updated
21 hours ago