TradeMirror
TradeMirror is a trading journal and performance analytics platform designed for serious retail traders, prop-firm traders, and active market participants who want to improve their consistency. The product helps users log every trade with full context, including entries, exits, risk, strategy, emotions, mistakes, screenshots, and post-trade reflections. It then turns that data into actionable analytics such as win rate, profit factor, expectancy, R-multiple performance, equity curve, drawdown, strategy performance, rule adherence, session analysis, and mistake tracking. TradeMirror is more than a spreadsheet replacement. It is a structured decision-review system that helps traders understand what is actually working, where they are losing money, and which habits are damaging their performance. The platform supports multiple trading accounts, strategy playbooks, weekly reflections, performance goals, and visual dashboards. The next major growth opportunity is AI-powered daily, weekly, and monthly analysis. By integrating AI, TradeMirror can automatically review a trader’s recent performance, identify patterns, summarize mistakes, highlight strengths, and generate personalized coaching-style feedback based on real trading data. Ideal buyer: a fintech founder, trading education business, prop-firm operator, SaaS entrepreneur, or trading community owner looking to acquire a ready-made trading analytics platform with strong expansion potential. Value proposition: TradeMirror gives traders a clearer mirror of their behavior, discipline, and edge, helping them move from emotional trading to measurable, repeatable performance improvement.
Team structure
Lead
lead
Senior Backend Engineer
Senior Frontend Engineer
Mission
You are a senior full-stack product engineer. Build a production-quality trading journal and performance analytics app similar to TradeMirror, with first-class AI analysis for daily, weekly, and monthly trading reviews. Product goal: Create a private trading performance platform that helps traders log trades, track strategies, measure edge, review discipline, and receive AI-generated coaching insights based on their own trading data. The app must feel like a serious trading cockpit, not a marketing site. Tech stack: - Backend: Rails 7 API-only app, PostgreSQL, Active Storage, Devise + JWT auth, optional Google/Apple OAuth. - Frontend: React 18, TypeScript, Vite, React Router, TanStack Query, Zustand, Recharts, Axios. - Deployment: Docker Compose for local development, production Dockerfiles, environment-based config. - Use account-scoped data access everywhere. A user can own multiple trading accounts. Core entities: - User: email, name, timezone, experience_level, onboarding_complete, theme_preference. - Account: user_id, name, broker, account_type, currency, account_size, default_risk_pct, is_default, active. - AccountGoal: weekly_target, monthly_target, max_drawdown_pct, win_rate_goal. - Strategy: user_id, name, description, current_version, timeframe, market_type, max_risk_pct, target_rr, active. - StrategyRule: strategy_id, text, active, position. - StrategyVersion: strategy_id, version, summary, applied_date. - Trade: account_id, strategy_id, instrument, direction, entry_at, entry_price, stop_loss, take_profit, position_size, risk_pct, risk_reward, exit_at, exit_price, outcome, pnl_dollar, r_multiple, status, entry_reason, notes, confidence_score, plan_adhered, rule_violations, discipline_rating, mistakes, tags, mae, mfe, screenshots. - Reflection: account_id, period_type daily/weekly/monthly, period_start, content. - AIAnalysisReport: account_id, period_type daily/weekly/monthly, period_start, period_end, status, input_snapshot JSONB, output JSONB, model, generated_at, error_message. Backend requirements: - Implement REST endpoints under /api/v1. - Include auth endpoints for sign up, sign in, sign out, current user, onboarding, profile/avatar. - Include CRUD for accounts, goals, strategies, strategy versions, trades, screenshots, reflections. - Trade model must calculate risk_reward, pnl_dollar, and r_multiple server-side. - Analytics service must expose: summary, equity_curve, calendar, win_rate_trend, r_distribution, by_strategy, by_instrument, long_vs_short, rule_adherence, mistakes, best_worst_days, session_analysis. - Add tests for analytics edge cases: no trades, no losses, breakeven trades, multi-account isolation, timezone/session calculations, and low sample sizes. - Keep API response contracts consistent and covered by request specs. AI analysis requirements: - Integrate an LLM provider behind an AIAnalysisService abstraction. - Store AI outputs in AIAnalysisReport so reports can be regenerated, audited, cached, and displayed historically. - Add endpoints: GET /accounts/:id/ai_reports?period_type= GET /accounts/:id/ai_reports/:id POST /accounts/:id/ai_reports/generate with period_type and period_start - Add background jobs: DailyAnalysisJob runs after market day or user-local evening. WeeklyAnalysisJob runs at the end of the user’s trading week. MonthlyAnalysisJob runs after month close. - Use the user’s timezone when computing periods. - Never send raw secrets or unrelated user data to the AI provider. - AI output must be strict JSON with: title, executive_summary, key_metrics, what_worked, what_hurt, discipline_review, pattern_alerts, strategy_notes, risk_notes, next_actions, questions_for_journal, confidence_level. - Add guardrails: The assistant must not provide financial advice, trade signals, or predictions. It should coach process, risk, discipline, and review habits using only the user’s historical data. It must mention low confidence when sample size is small. AI report logic: - Daily report: summarize today’s trades, emotional/discipline patterns, mistakes, rule adherence, session quality, and one next-session focus. - Weekly report: compare week vs goals, identify best/worst setups, recurring mistakes, strategy adherence, drawdown risk, and 3 concrete process improvements. - Monthly report: broader performance review with equity curve behavior, expectancy, profit factor, strategy ranking, instrument/session breakdown, goal progress, and next month focus plan. - Include deterministic metrics in the prompt context and ask the model to reason from them, not recalculate them. - Validate AI JSON before saving. If validation fails, retry once with a repair prompt. Frontend requirements: - Build protected app shell with sidebar navigation: Dashboard, Trades, Strategies, Analytics, AI Reviews, Journal, Accounts, Profile. - Dashboard shows KPIs, win-rate trend, recent trades, and latest AI insight cards. - Trades area supports list, filters, detail page, multi-step new trade form, screenshot upload, tags, mistakes, notes, MAE/MFE. - Strategies area supports strategy rules, versions, active/archive state, and strategy performance. - Analytics page uses tabs: Overview, Edge, Discipline, Review. - AI Reviews page shows Daily, Weekly, Monthly tabs, report history, generate/regenerate buttons, loading states, failure states, and structured report sections. - Journal page supports daily/weekly/monthly reflections and links AI questions into reflection prompts. - UI style: calm premium trading dashboard, dark and light themes, clear green/red performance semantics, dense but readable charts, no landing-page fluff inside the app. Quality bar: - Provide migrations, models, controllers, serializers/payload methods, services, jobs, and frontend pages/components. - Include seed data for demo use. - Include Docker Compose setup and .env.example. - Add backend RSpec coverage and frontend build/lint checks. - Make empty states useful and low-sample analytics honest. - Ensure all account-scoped queries are protected from cross-user access. - Avoid brittle naming mismatches between backend analytics keys and frontend expectations.