Complete debugging infrastructure with Sentry and Logflare integration
A sophisticated Node.js debugging and infrastructure project that implements a comprehensive agent-based architecture system for Claude Code. This repository provides production-ready debugging infrastructure with Sentry error tracking, Logflare logging, database integration via Supabase, and advanced code analysis through Sourcegraph integration.
- Node.js 18+
- Supabase project (for database)
- Sentry project (for error tracking)
- Logflare account (for logging)
# Clone the repository
git clone <your-repo-url>
cd Claude_debug
# Install dependencies
npm install
# Copy and configure environment
cp .env.example .env
# Edit .env with your credentials
# Run the application
npm start🤖 Agent-Based Architecture
- Specialized sub-agents for different tasks
- Code writing with mandatory analysis
- Database operations with safety guardrails
- Documentation orchestration
🔍 Production Debugging
- Sentry error tracking and performance monitoring
- Logflare structured logging with correlation IDs
- Automated log correlation and analysis
- Sourcegraph code search integration
🗄️ Database Management
- Supabase PostgreSQL integration
- Automated schema synchronization
- Migration system with rollback support
- Row Level Security (RLS) policies
📊 Testing Infrastructure
- Parallel test execution
- Agent-based test orchestration
- Database connection testing
- Performance benchmarking
├── docs/ # 📚 All documentation
│ ├── README.md # This file
│ ├── ARCHITECTURE.md # System architecture
│ ├── CLAUDE.md # Claude Code instructions
│ └── INITIALIZATION_GUIDE.md
├── database/ # 🗄️ Database management
│ ├── schema/ # Schema definitions
│ ├── samples/ # Sample data
│ ├── exports/ # Export artifacts
│ └── migrations/ # Version-controlled migrations
├── src/ # 💻 Source code
├── tools/ # 🛠️ All development and production tools
│ ├── production/ # 🏗️ Production infrastructure
│ ├── development/ # 🧪 Development aids
│ └── testing/ # 🧪 Testing framework
└── .claude/agents/ # 🤖 Agent system
- Code Writer: Production code with logging and error tracking
- Debugger: Log correlation and error analysis
- Supabase Architect: Database operations with safety guardrails
- Documentation Orchestrator: Living documentation maintenance
- Sentry Integration: Error tracking with context and correlation
- Logflare Logging: Structured logs with searchable metadata
- Correlation System: Link errors across services and timeframes
- Migration System: Version-controlled schema changes
- Auto-Export: GitHub Actions sync schema to repository
- Connection Testing: Validate database connectivity and permissions
# Run all tests in parallel
npm test
# Run specific test suites
npm run test:database
npm run test:api
npm run test:integration
# Run tests with orchestrator
npm run test:orchestrator# Run migrations
npm run migrate:up
# Test database connection
npm run test:connection
# Export schema manually
./tools/production/deployment/manual-db-export.sh# Start development server
npm run dev
# Run examples
npm run example:api
npm run example:databaseKey environment variables:
# Supabase Configuration
SUPABASE_URL=your_supabase_url
SUPABASE_ANON_KEY=your_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
# Sentry Configuration
SENTRY_DSN=your_sentry_dsn
SENTRY_ENVIRONMENT=development
# Logflare Configuration
LOGFLARE_API_KEY=your_logflare_key
LOGFLARE_SOURCE_TOKEN=your_source_token- Architecture Guide - System design and components
- Claude Instructions - Agent system documentation
- Setup Guide - Complete setup instructions
- Test Documentation - Testing framework guide
- Code Changes: All code must use the agent system for creation and debugging
- Documentation: Use the documentation orchestrator for updates
- Database: Use the Supabase architect for schema changes
- Testing: Add tests for new functionality
ISC
For issues and questions:
- Check the Architecture Guide
- Review Test Documentation
- Create an issue in the repository