Skip to content

Debriefly is an AI-powered post-trade analysis tool that helps traders review, analyze, and optimize their trading performance. It provides automated trade journaling, behavioral insights, and actionable feedback to improve decision-making and consistency.

Notifications You must be signed in to change notification settings

strawhatx/debriefly-ai

Repository files navigation

Debriefly AI

Netlify Status License: MIT

AI-powered trading journal and analysis platform for professional traders

πŸ“– Overview

Debriefly AI is a comprehensive trading journal platform that leverages artificial intelligence to analyze trading performance, identify behavioral patterns, and provide actionable insights to improve trading strategies. The platform combines advanced analytics with an intuitive interface to help traders make data-driven decisions.

✨ Features

  • AI-Powered Analysis: Automated trade analysis using machine learning algorithms
  • Behavioral Insights: Identify trading patterns and emotional triggers
  • Performance Analytics: Comprehensive performance metrics and visualizations
  • Trade Import: Support for multiple broker integrations and CSV imports
  • Session Debriefing: Detailed post-trading session analysis
  • Strategy Optimization: AI-driven strategy recommendations
  • Real-time Data: Live market data integration
  • Multi-Account Support: Manage multiple trading accounts
  • Export Capabilities: Generate reports and export trade data

πŸ› οΈ Tech Stack

Frontend

  • React 18 - Modern React with hooks and functional components
  • TypeScript - Type-safe JavaScript development
  • Vite - Fast build tool and development server
  • Tailwind CSS - Utility-first CSS framework
  • shadcn/ui - High-quality React components
  • Radix UI - Accessible component primitives
  • React Router - Client-side routing
  • React Hook Form - Form state management
  • Zod - Schema validation
  • Zustand - Lightweight state management
  • TanStack Query - Server state management
  • Recharts - Data visualization

Backend & Infrastructure

  • Supabase - Backend-as-a-Service (PostgreSQL, Auth, Edge Functions)
  • AWS Lambda - Serverless computing for AI analysis
  • Netlify - Frontend hosting and deployment
  • Stripe - Payment processing and subscriptions

Development Tools

  • ESLint - Code linting
  • Prettier - Code formatting
  • TypeScript - Static type checking
  • Concurrently - Run multiple commands simultaneously

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Supabase CLI
  • Docker (for local development)

Installation

  1. Clone the repository

    git clone https://github.com/your-username/debriefly-ai.git
    cd debriefly-ai
  2. Install dependencies

    npm install
  3. Set up environment variables

    cp .env.example .env.local

    Fill in your environment variables:

    VITE_SUPABASE_URL=your_supabase_url
    VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
    VITE_STRIPE_PUBLISHABLE_KEY=your_stripe_key
  4. Start Supabase locally

    supabase start
  5. Run the development server

    npm run dev

The application will be available at http://localhost:5173

πŸ—οΈ Development

Project Structure

debriefly-ai/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/          # Reusable UI components
β”‚   β”œβ”€β”€ features/           # Feature-based modules
β”‚   β”œβ”€β”€ hooks/              # Custom React hooks
β”‚   β”œβ”€β”€ pages/              # Route components
β”‚   β”œβ”€β”€ store/              # State management
β”‚   β”œβ”€β”€ types/              # TypeScript type definitions
β”‚   └── utils/              # Utility functions
β”œβ”€β”€ lambda-worker/          # AWS Lambda functions
β”œβ”€β”€ supabase/              # Database migrations and functions
└── public/                # Static assets

Available Scripts

Script Description
npm run dev Start all development services (React, Supabase, Worker)
npm run dev:react Start React development server only
npm run dev:supabase Start Supabase locally
npm run dev:worker Start Lambda worker service
npm run build Build for production
npm run preview Preview production build
npm run lint Run ESLint

Development Workflow

  1. Start all services

    npm run dev
  2. Run Edge Functions locally

    supabase functions serve --env-file supabase/.env
  3. Debug Edge Functions

    supabase functions serve ai-analysis --env-file supabase/.env --inspect-mode brk
  4. Run Lambda Worker

    # Background mode
    docker-compose -f docker-compose.dev.yml up -d
    
    # With logs
    docker-compose -f docker-compose.dev.yml logs -f
    
    # Stop
    docker-compose -f docker-compose.dev.yml down

Database Migrations

# Create a new migration
supabase migrations new [migration_name]

# Apply migrations
supabase db push

# Reset database
supabase db reset

πŸš€ Deployment

Frontend (Netlify)

The frontend is automatically deployed to Netlify on push to main branch.

Manual deployment:

npm run build
netlify deploy --prod --dir=dist

Backend (Supabase)

# Deploy to production
supabase link --project-ref your-project-ref
supabase db push
supabase functions deploy

Lambda Worker (AWS)

cd lambda-worker
npm run deploy

πŸ§ͺ Testing

# Run tests
npm test

# Run tests in watch mode
npm run test:watch

# Run tests with coverage
npm run test:coverage

πŸ“ API Documentation

Authentication

The application uses Supabase Auth with the following providers:

  • Email/Password
  • Google OAuth

Core Endpoints

  • POST /api/trades - Import trade data
  • GET /api/trades - Retrieve trade history
  • POST /api/analysis - Trigger AI analysis
  • GET /api/analysis/:id - Get analysis results

🀝 Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch
    git checkout -b feature/amazing-feature
  3. Make your changes
  4. Add tests (if applicable)
  5. Commit your changes
    git commit -m 'Add amazing feature'
  6. Push to the branch
    git push origin feature/amazing-feature
  7. Open a Pull Request

Code Style

  • Follow the existing code style
  • Use TypeScript for all new code
  • Write meaningful commit messages
  • Add JSDoc comments for complex functions

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ†˜ Support

πŸ™ Acknowledgments


Made with ❀️ by the Debriefly AI team

About

Debriefly is an AI-powered post-trade analysis tool that helps traders review, analyze, and optimize their trading performance. It provides automated trade journaling, behavioral insights, and actionable feedback to improve decision-making and consistency.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •