How honzaprikryl/tradenza works
Tradenza is a self-hostable trading journal. The main workflow is to create or import trades, organize them by account, strategy, and tags, then review trade execution and analyze performance. A parallel discipline workflow tracks trading rules and daily habits over time. The graph combines sampled server-action and UI relationships with README-documented product capabilities; unsampled subsystems are represented at their supported paths, and their internal wiring is not assumed.
Main entry points: progress.ts Discipline actions · page.tsx Trades list · index.ts Postgres database · strategies.ts Strategy actions
Components 26
Trade journal
- Trade import
src/components/trade-import - Trades list
src/app/(app)/trades/page.tsx - Trade detail
src/components/trades/TradeDetailClient.tsx - Trading accounts
src/app/(app)/accounts/page.tsx - Tags and categories
src/lib/actions/tags.ts - Trade actions
src/lib/actions/trades.ts - Import actions
src/lib/actions/wizard.ts
Analysis and setups
- Custom dashboard
src/components/dashboard/DashboardClient.tsx - Trade statistics
src/components/stats/StatsClient.tsx - Strategies and playbooks
src/components/strategies/StrategiesClient.tsx - Strategy actions
src/lib/actions/strategies.ts - Statistics computation
src/lib/stats-compute.ts - Dashboard computation
src/lib/dashboard/compute.ts
Discipline tracking
- Progress overview
src/app/(app)/progress/page.tsx - Daily review
src/components/progress/DayReviewClient.tsx - Rule manager
src/components/progress/RulesManager.tsx - Discipline actions
src/lib/actions/progress.ts - Discipline scoring
src/lib/progress-compute.ts - Trade adherence
src/lib/actions/adherence.ts - Adherence logic
src/lib/adherence.ts
Application platform
- Postgres database
src/lib/db/index.ts - Clerk authentication
src/app/api/webhooks/clerk/route.ts - Action validation
src/lib/safe-action.ts - Global settings
src/lib/global-settings.ts - Rate-limit feedback
src/components/ui/rate-limit-toast.tsx
Other components
- Trader
Connections 36
- Trader → Trade import: imports trades
README.md - Trader → Trades list: reviews trades
README.md - Trader → Custom dashboard: views performance
README.md - Trader → Progress overview: tracks discipline
README.md - Trade import → Import actions: submits import
- Trades list → Trade actions: loads trades
src/app/(app)/trades/page.tsx - Trades list → Trading accounts: loads accounts
src/app/(app)/trades/page.tsx - Trades list → Tags and categories: loads tags
src/app/(app)/trades/page.tsx - Trades list → Strategies and playbooks: loads strategies
src/app/(app)/trades/page.tsx - Trades list → Trade statistics: loads statistics
src/app/(app)/trades/page.tsx - Trade detail → Trade actions: loads trade
src/components/trades/TradeDetailClient.tsx - Trade detail → Strategy actions: loads strategy
src/components/trades/TradeDetailClient.tsx - Trade detail → Trade adherence: loads review
src/components/trades/TradeDetailClient.tsx - Import actions → Postgres database: persists imports
- Trade actions → Postgres database: reads and writes
src/lib/actions/trades.ts - Tags and categories → Postgres database: reads and writes
src/lib/actions/tags.ts - Custom dashboard → Dashboard computation: uses dashboard data
src/components/dashboard/DashboardClient.tsx - Strategies and playbooks → Strategy actions: deletes strategy
src/components/strategies/StrategiesClient.tsx - Strategy actions → Postgres database: queries strategies
src/lib/actions/strategies.ts - Strategy actions → Statistics computation: computes trade metrics
src/lib/actions/strategies.ts - Progress overview → Discipline actions: loads progress
src/app/(app)/progress/page.tsx - Progress overview → Daily review: renders review
src/app/(app)/progress/page.tsx - Daily review → Discipline actions: updates daily review
src/components/progress/DayReviewClient.tsx - Rule manager → Discipline actions: changes rules
src/components/progress/RulesManager.tsx - Discipline actions → Discipline scoring: scores discipline
src/lib/actions/progress.ts - Discipline actions → Postgres database: reads and writes
src/lib/actions/progress.ts - Strategies and playbooks → Trade adherence: reviews adherence
- Trade adherence → Adherence logic: uses adherence rules
src/lib/actions/adherence.ts - Trade adherence → Postgres database: reads and writes
src/lib/actions/adherence.ts - Discipline actions → Action validation: uses guarded actions
src/lib/actions/progress.ts - Trade adherence → Action validation: uses guarded actions
src/lib/actions/adherence.ts - Strategy actions → Action validation: uses guarded actions
src/lib/actions/strategies.ts - Daily review → Rate-limit feedback: handles rate limits
src/components/progress/DayReviewClient.tsx - Rule manager → Rate-limit feedback: handles rate limits
src/components/progress/RulesManager.tsx - Discipline actions → Global settings: reads preferences
src/lib/actions/progress.ts - Clerk authentication → Postgres database: syncs user records
src/app/api/webhooks/clerk/route.ts