Investbrain: a self-hosted Laravel portfolio tracker with pluggable market data and an LLM chat layer
Smart LLM-enabled investment tracker that consolidates and monitors market performance across your different brokerages
At a glance
- What is it?
- Investbrain is a PHP/Laravel web application that consolidates holdings across brokerages, pulls quotes through a swappable provider interface, and exposes your positions to an LLM chat assistant. It is aimed at people willing to run Docker Compose and manage their own database, not at anyone who wants a hosted product.
- Who is it for?
- Adopt Investbrain if you already run Docker and want your transaction history in a database you control, and if you are comfortable reading .env.example to wire up an LLM provider or an OpenAI-compatible local endpoint. Do not adopt it if you need a vendor to handle uptime, or if you cannot accept a licence that GitHub reports as NOASSERTION.
- Can I use it commercially?
- Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
- Is it still maintained?
- Yes. The repository last received commits 22 days ago.
- What is it written in?
- Mainly PHP, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
The problem: holdings scattered across brokerages with no shared view
Anyone with accounts at more than one brokerage ends up with the same problem. Each broker reports positions in its own format, on its own schedule, with its own cost basis conventions. A spreadsheet works until you add a second currency, a dividend, or a position you closed last year. Investbrain targets that gap. It is a self-hosted web application that stores portfolios and transactions in a database you run, then layers market data and an optional chat assistant on top. The README describes it as a tracker that helps you "manage, track, and make informed decisions about your investments." The audience is implied by the deployment instructions: people who have Docker Engine installed and are willing to edit a compose file. The topics on the repository (portfolio, self-host, stocks) confirm that framing. There is no hosted tier described in the material, so the project assumes you are the operator.
Laravel application, provider interface, and a fallback chain
The README states that Investbrain is a Laravel PHP web application with an extensible market data provider interface. That interface is the architectural centre of the project. Quote retrieval does not go directly to a vendor SDK; it goes through a contract, MarketDataInterface, and the concrete implementation is chosen at runtime from configuration. The fallback mechanism is the part worth understanding. MARKET_DATA_PROVIDER accepts a comma-separated list, and the application walks it in order. The README's example is MARKET_DATA_PROVIDER=yahoo,alphavantage, and it states that Yahoo Finance is attempted first, with Alpha Vantage tried automatically if Yahoo fails. That ordering is a design decision with consequences: your first provider determines latency and rate-limit exposure for every quote request, and the fallback only triggers on failure, not on a stale or wrong value. If a provider returns a successful response with bad data, the chain stops there. The chat layer is a separate concern. Investbrain integrates with OpenAI and Ollama, and the README notes support for Anthropic, Gemini and xAI, all configured through the .env file. The assistant is described as grounded on your investments, which means the application supplies your holdings as context rather than letting the model answer from general knowledge. The README also carries an explicit caution about LLM limitations and points users to a licensed investment advisor when in doubt.
Installing with Docker Compose, and the environment keys you actually edit
The documented path is Docker Compose with the official image. The README recommends it and supplies a compose file at the repository root. The steps are short. Fetch the file with curl -O https://raw.githubusercontent.com/investbrainapp/investbrain/main/docker-compose.yml, then adjust the environment properties in the compose file, then run docker compose up. The README notes the image pull can take a few minutes and that the registration page is reachable at http://localhost:8000/register once the containers are healthy. Configuration beyond the compose file lives in .env, with .env.example as the reference. The keys the README names explicitly are MARKET_DATA_PROVIDER for the provider list and the API keys for whichever LLM provider you select. For a local model, you configure an OpenAI-compatible endpoint, which the README illustrates with Ollama's OpenAI compatibility mode. Custom market data providers require two edits: a class implementing MarketDataInterface, and an entry in the configuration file under the interfaces section, for example 'custom_provider' => \App\Services\CustomProviderMarketData::class, followed by adding custom_provider to the MARKET_DATA_PROVIDER list. Note that the README does not document database credentials or backup procedure in the excerpt available here, so treat the compose file itself as the source of truth for persistence.
Import upserts, and the data-loss question the README leaves open
The import behaviour is described precisely enough to plan around. Imports are upserted: a record whose ID does not exist is created, and a record whose ID matches an existing one is updated. That means a single import file can both add new transactions and bulk-correct existing ones. It also means an import file with the wrong IDs will overwrite the rows those IDs point to rather than creating duplicates, which is convenient when you are correcting a mapping and dangerous when you are not. The README's export section is truncated in the material available here, so the round-trip guarantee is not something I can confirm. Before you rely on export as a backup, verify what the export actually contains: whether it includes portfolio metadata as well as transactions, and whether re-importing an export is idempotent given the upsert rule. That is a fifteen-minute check against a throwaway instance, and it is worth doing before you migrate years of history into the application.
Where Investbrain is the wrong tool
The material makes several limits visible. First, market data quality is delegated. Investbrain's fallback chain handles an unreachable provider, not a provider that returns a plausible but incorrect price. If your holdings include instruments that free-tier market data covers poorly (thinly traded equities, certain funds, non-US listings), the fallback list will not save you, because the first provider may answer successfully with nothing useful. Second, the LLM chat is only as grounded as the context the application assembles, and the README itself warns about model limitations. Do not treat its output as analysis. Third, the licence. The repository metadata reports NOASSERTION, which means GitHub could not map the LICENSE file to a known SPDX identifier. That is not the same as "no licence," but it does mean you should read the file rather than assume MIT or Apache terms. If your organisation has a policy against dependencies with unclassified licences, this blocks adoption until someone reads it. Fourth, self-hosting means you own availability. There is no described managed option, so database migrations, backups and upgrades are your responsibility.
How it differs from hosted trackers and from plain spreadsheets
The obvious alternative is a hosted portfolio tracker, where the vendor runs the database, handles provider contracts, and pushes updates. The difference is not features, it is the trust boundary. With a hosted tracker your transaction history lives on someone else's infrastructure and the provider integrations are invisible to you. Investbrain inverts that: you hold the database, you hold the API keys, and you can read the provider implementation because it is a PHP class in the repository. The cost is that you also hold the operational burden, which the hosted option absorbs. A second alternative is the spreadsheet. A spreadsheet has no provider fallback, no scheduled quote retrieval, and no chat layer, but it also has no Docker dependency, no .env file to misconfigure, and no upgrade path to manage. Investbrain is worth the extra machinery when you have enough positions and enough brokerages that manual price updates have become a recurring chore. Below that threshold, the spreadsheet wins on effort. The provider interface is what tips the comparison for developers specifically: writing a MarketDataInterface implementation against a data source you already pay for is a bounded piece of work, and it is not something a hosted tracker will let you do.
Upgrades, releases, and ongoing cost
The release history in the material shows v1.3.0 in June 2026, preceded by v1.2.9 and v1.2.8 in March 2026, with a last push in August 2026. That cadence suggests active maintenance rather than a dormant project, though the gap between v1.3.0 and the most recent push is not explained by the material available here. Upgrading a Docker Compose deployment means pulling a new image and restarting, but Laravel applications typically carry database migrations, and the README's updating section is not included in the excerpt provided, so I cannot state what the upgrade procedure actually requires. Check that section before you upgrade a production instance. Ongoing cost is mostly external: market data providers such as Twelve Data, Finnhub, Alpaca and Alpha Vantage have their own pricing tiers, and the README links to Finnhub's pricing page, which implies free tiers are limited. LLM usage is billed by whichever provider you configure, or is free if you run Ollama locally at the cost of hardware. The software itself carries no described fee. On licensing, the NOASSERTION label means you should read the LICENSE file before distributing a modified version or bundling Investbrain into something you ship. I am not giving legal advice here; the point is that the licence terms are not summarised in the repository metadata and therefore have to be read directly.
Editorial conclusion
Adopt Investbrain if you already run Docker and want your transaction history in a database you control, and if you are comfortable reading .env.example to wire up an LLM provider or an OpenAI-compatible local endpoint. Do not adopt it if you need a vendor to handle uptime, or if you cannot accept a licence that GitHub reports as NOASSERTION. Before committing real portfolio data, check the LICENSE file in the repository root, confirm which market data providers your chosen plan actually covers, and test the fallback chain by setting MARKET_DATA_PROVIDER to a provider you have not configured so you can see how the application behaves when every provider in the list fails.
Community notes