Apamea
Wealth-tracking platform for stocks, crypto and real estate, where every valuation, return and currency effect is computed server-side and reported in EUR.


Architecture Overview
graph TB
subgraph Web["apps/web — React 19 + Vite"]
A[TanStack Router] --> B[TanStack Query]
B --> C[Recharts panels]
A --> D[Zustand stores]
end
subgraph Contracts["packages/core"]
E[Zod schemas + response types]
end
subgraph Server["apps/server — NestJS on Fastify"]
F[Controller] --> G[Service]
G --> H[Loader]
G --> I[Calculator]
G --> J[Presenter]
end
subgraph Data
K[(PostgreSQL via Drizzle)]
L[Market data port]
M[(Redis cache)]
end
B <-->|REST| F
E --> A
E --> F
H --> K
I --> L
L --> N[Twelve Data / EODHD]
G --> M
A wealth-tracking application built at Poyesis. It follows one portfolio across three asset verticals — listed equities, crypto and real estate — over a single model underneath: a portfolio holds positions and assets, and each of those is made up of lots, the individual purchases that carry the cost basis.
All business and display math runs on the server. Unit costs, market value, realized and unrealized profit, money-weighted return, allocation shares and the currency effect reach the frontend as finished numbers, so the browser renders and never recalculates. EUR is the reporting currency: anything that sums across holdings is converted from that holding's local trading currency first.
Server domains are split by role rather than by convenience. A service orchestrates a loader, a calculator and a presenter; the loader owns every query against its table; the calculator carries its formula on the line above the arithmetic. Frontend and backend share their contracts as Zod schemas in one package, so each route is typed once for both sides.
Key Features:
- One portfolio spanning stock positions, crypto assets and real-estate projects
- Per-lot cost basis with weighted-average unit price, commission, VAT and FX fees
- Money-weighted return (XIRR) and cost-basis multiple per holding
- Value curves against a benchmark index, with the currency effect isolated
- Price-evolution tables across configurable look-back horizons
- Dividend tracking from both manual entries and position closes
- Real-estate projects with business plans, a deal pipeline and all-or-nothing CSV transaction import
- Geocoded property locations on an interactive map
- Passkey-capable authentication and presigned S3 attachments
- French interface throughout
Tech Stack:
- Frontend: React 19, Vite 7, TanStack Router/Query/Table, Zustand, Recharts, Tailwind v4
- Backend: NestJS 11 on Fastify, Drizzle ORM, PostgreSQL, Redis
- Contracts: TypeScript, Zod 4 schemas shared across the monorepo
- Integrations: Twelve Data and EODHD market data, Better Auth, AWS S3, Resend, Slack
- Tooling: pnpm workspaces, Turborepo, Node 24
Proprietary work for an employer, so the repository stays private.