BugSage is an AI-powered debugging assistant that helps developers analyze logs, understand stack traces, and find root causes across frontend, backend, and infrastructure layers.
- 📝 Paste or upload logs for instant analysis
- 🤖 AI-powered error interpretation and root cause analysis
- 💡 Smart fix suggestions with relevant documentation links
- 🔍 Context-aware analysis based on your tech stack
- 🔒 Secure authentication with Clerk
- Frontend: Next.js + Tailwind CSS
- Backend: Next.js API routes
- AI: OpenAI GPT-4
- Authentication: Clerk
- Database: Supabase
- Deployment: Vercel
-
Clone the repository:
git clone https://github.com/yourusername/bugsage.git cd bugsage -
Install dependencies:
npm install
-
Create a
.env.localfile in the root directory with the following variables:NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key CLERK_SECRET_KEY=your_clerk_secret_key OPENAI_API_KEY=your_openai_api_key NEXT_PUBLIC_SUPABASE_URL=your_supabase_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key -
Run the development server:
npm run dev
-
Open http://localhost:3000 in your browser.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2025 Michael Ilerioluwa Adeniyi. All rights reserved.
"BugSage" is a trademark of Michael Ilerioluwa Adeniyi.
BugSage primarily uses lightweight, isolated component tests:
Our primary testing strategy utilizes lightweight, isolated component tests that don't require external dependencies. This approach allows for:
- Decoupled Testing: Each component is tested in isolation without complex setup
- Fast Execution: Tests run quickly without browser or full React rendering
- Reliable Testing: Components are tested without external dependencies that could fail
Run isolated tests with:
npm run test:isolatedKey isolated tests include:
- Log parser (simple-parser-test.js)
- LogAnalyzer component (test-log-analyzer.js)
- AnalysisHistory component (test-analysis-history.js)
- API route (test-api-route.js)
- Supabase integration (test-supabase.js)
- ErrorBoundary component (test-error-boundary.js)
- Page component (test-page-component.js)
- End-to-end flow (test-e2e-flow.js)
We maintain Jest and Cypress as optional dependencies for specific testing scenarios:
# Install optional testing dependencies
npm install --save-optional @testing-library/jest-dom @testing-library/react jest jest-environment-jsdom cypress
# Run Jest unit tests (if installed)
npm run test:jest
# Run Cypress E2E tests (if installed)
npm run test:e2eOur GitHub Actions workflow automatically runs linting and isolated tests on push and pull requests. The workflow:
- Runs linting checks
- Generates sample log data
- Runs isolated component tests
- Deploys to Vercel on successful tests (main branch only)