See your money's real future β inflation-adjusted portfolio projection
Compound growth & DCA simulation Β· Real vs. nominal value Β· AI financial assistant
Most financial calculators show you nominal numbers β big future balances that quietly lose their purchasing power to inflation. MoneyTrace computes the numbers in today's money, so you see not only how much you'll have, but what it will actually buy.
It's an open-source, privacy-first investment projection engine:
- Core calculations run in your browser β no account or application database is required, and portfolio data stays in local storage. Optional AI requests send relevant context to the provider or demo proxy you select.
- Deterministic finance engine β pure, testable math orchestrated in
src/engine/; the UI only renders results. - AI that understands your portfolio β an optional chat assistant and forecast tool that reads your actual projection context and answers real questions (e.g. "What happens if I increase my DCA by 5% annually?").
| π Real vs. Nominal value | Track both the raw balance and its inflation-adjusted purchasing power β two curves, one honest picture. |
| π° Compound growth & DCA engine | Simulate up to 50 years: initial capital, monthly DCA, annual contribution increases, withdrawals, optional estimated gain tax, and inflation. |
| π± Multi-currency | USD, EUR, GBP, JPY, TRY, BRL, INR and more, with automatic locale-aware number formatting. |
| π Reference currency tracking | Benchmark local-currency portfolios against USD (or any reference) with projected FX growth. |
| π€ AI Financial Assistant | Floating chat widget that analyzes your active projection β returns, horizons, DCA variants β and sends its context only when you use the selected AI provider. |
| β‘ AI Economic Forecasting | One click to estimate inflation, returns, and exchange rates, and auto-fill your portfolio inputs. |
| π Bring your own key | Gemini, OpenAI, or any OpenAI-compatible API (OpenRouter, Groq, Ollama, LM Studioβ¦). A hosted Demo API mode lets visitors try the AI for free, with server-enforced quotas. |
| π― Scenario management | Create, clone, edit, compare, and pin baseline scenarios β pre-seeded with Optimistic, Market Growth, Conservative, and Custom. |
| π Interactive charts | Portfolio growth (nominal vs. real vs. invested), reference-currency valuation, and inflation impact visualizations. |
| π Export & import | CSV export of year- and month-level tables; JSON backup/restore of all scenarios. |
| π i18n | English and Turkish, switch seamlessly. |
| π Privacy-first | No advertising trackers or analytics cookies; Vercel Web Analytics provides cookie-free aggregate usage metrics. Zustand persist keeps portfolio data in localStorage. |
How: Start with the default scenario, ~10 years, and capture the main view (portfolio form + summary cards + table).
How: Scroll to the chart section β growth vs. real balance vs. invested capital, reference currency line, and inflation impact card.
How: Create 2β3 scenarios (e.g. Market Growth vs. Conservative), open Compare and capture the side-by-side table.
How: Open the AI Forecast modal, run a forecast, and capture the filled-in parameters.
How: Open the chat FAB (bottom-right), ask one of the question, and capture the conversation.
How: Open the Settings dialog and capture the AI configuration (provider, key, model, base URL, Demo API toggle).
| Category | Choice |
|---|---|
| Frontend | React 19 Β· TypeScript Β· Vite 8 |
| Styling | Tailwind CSS v4 (@tailwindcss/vite) Β· @base-ui/react Β· CVA + cn() |
| State | Zustand + persist (localStorage) |
| Charts | Recharts |
| i18n | i18next Β· react-i18next |
| AI (client) | src/lib/ai-service.ts Β· ai-chat-service.ts β Gemini / OpenAI / OpenAI-compatible |
| Backend (optional) | Vercel Edge Function api/demo.ts + Upstash Redis quota counters |
- Turkish is served from
/; English is served from/en. Information and legal pages have matching locale-specific URLs and reciprocalhreflanglinks. npm run buildprerenders all public routes, generates route-specific metadata and JSON-LD, createssitemap.xml,robots.txt, and404.html, then verifies the SEO output.- The canonical production origin is
https://moneytrace.metee.com.tr, configured inAPP_CONFIG.app.siteUrl. - Social previews use the localized 1200Γ630 images in
public/og-image-{tr,en}.png.
git clone https://github.com/Metee01/MoneyTrace.git
cd MoneyTrace
npm install
npm run dev # β http://localhost:5173Useful scripts:
| Script | Purpose |
|---|---|
npm run dev |
Start the Vite dev server |
npm run build |
Typecheck, production build, static route generation, and SEO verification |
npm run lint Β· npm run format |
ESLint Β· Prettier |
npm test |
Deterministic engine + store + AI tools tests (via tsx) |
π Environment variables & demo proxy (for deploying your own instance)
| Variable | Where | Purpose |
|---|---|---|
VITE_DEMO_PROXY_URL |
.env / Vercel |
Enables the hosted Demo API option; points at /api/demo |
DEMO_API_KEY |
Vercel only | Shared demo key β lives in the edge function, never ships in the bundle |
The proxy in api/demo.ts enforces per-user quotas (5 forecasts / 15 chat messages), per-IP daily caps, a 3s chat cooldown, and optional persistent counters via Upstash Redis β see api/demo.ts for details.
ββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββ
β Browser β β Vercel (optional) β
β PortfolioForm β engine/ β AI β /api/demo (Edge Function) β
β (pure, deterministic) β ββββΆ β β’ owns DEMO_API_KEY β
β Zustand persist (local) β β β’ quota + rate limiting β
β AI service / chat (BYOK) β β β’ Upstash Redis (optional) β
ββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββ
β² all financial math
β stays on device
src/engine/β pure, framework-free financial math (compound growth, inflation adjustment, currency conversion), orchestrated bycalculateProjection; deterministic, rounded to 2 decimals.src/config/index.tsβ single source of truth (APP_CONFIG): app metadata, AI models, demo quotas, engine limits.- UI components never compute financials themselves β they only consume the engine.
src/
βββ components/ UI β portfolio form, projection cards/table/charts,
β scenarios, chat widget, layout
βββ config/ APP_CONFIG β single source of truth (app, AI, engine)
βββ engine/ Pure financial math (compound-growth, inflation-adjust, β¦)
βββ lib/ AI services, demo-proxy client, formatters, export, i18n
βββ store/ Zustand stores with persist (portfolio, settings)
βββ locales/ en / tr translation dictionaries
βββ seo/ canonical routes, metadata, and browser head sync
βββ types/ Shared TypeScript types
api/demo.ts Vercel serverless Demo API proxy
scripts/ Static-page generation and SEO verification
Found a bug or have an idea? Open an issue or PR β CONTRIBUTING.md has the details.
Released under the MIT License. Made for people who want to know the real price of their future πΈ





