A couple of years ago, I was building the backend for a startup solo while working a day job. Classic mistake.
I was the only developer, shipping fast, and I didn't have time to set up "proper" observability. Every hour spent configuring Prometheus or integrating a full-fledged error tracking system was an hour not building features.
So how did I find out about bugs?
Customer complaints.
Most nights looked like this:
- Finish work
- Grab dinner
- SSH into the server
- Grep through logs for stack traces
- Try to piece together what happened
- Fix it (hopefully)
- Repeat
It was a Node.js monolith, so at least stack traces plus code context were usually enough. But the workflow was terrible.
The "Good Enough" Solution
One night I got fed up and wrote a tiny Express middleware that did three things:
- Caught unhandled exceptions
- Stored the stack trace and some metadata (method, path, status code, timestamp)
- Dumped everything into Postgres
That was it.
Suddenly, instead of hunting through logs, I could just query a table of errors. I could see what broke, when it broke, and roughly why. It wasn't fancy, but it worked—and it dramatically reduced my debugging time.
Then I had a thought:
I already have stack traces. I own the code. Why not add AI analysis?
Enter StackWise
That experiment eventually became StackWise — an open-source, self-hosted error tracking and AI-assisted debugging tool.
Here's how it works today:
The Stack
Node.js SDK
Express middleware that captures errors and sends structured data to the backend.
FastAPI backend
Receives and stores error events in PostgreSQL (using JSON payloads).
AI analysis pipeline
When a new error comes in, StackWise asynchronously:
- Parses the stack trace
- Pulls relevant source code from your Git repo (if connected)
- Analyzes the stack trace + actual code
- Stores a plain-English explanation of what likely went wrong
Web dashboard
Browse errors, view AI analysis, filter by status code, and search by message or path.
This isn't magic — it's just structured context, selective code fetching, and a carefully designed prompt — but it's surprisingly effective for the right use case.
What It's Good For (and What It's Not)
StackWise is built for small teams running monoliths or simple service architectures who want something lightweight, self-hosted, and practical.
It's not trying to replace Sentry or Prometheus.
It's not built for massive distributed systems where you need request tracing across dozens of microservices.
It does work well for:
- MVPs and early-stage startups
- Small teams (1–5 developers)
- Monoliths or simple APIs
- Teams that want to self-host and own their data
- Developers who want AI help understanding errors without paying per-seat SaaS fees
What's Next (and Why I Need Help)
StackWise works well for what I originally built it for, but there's a lot more it could become.
Immediate goals:
- Python SDK (Flask + FastAPI), so StackWise isn’t Node-only
- Better search and filtering in the dashboard as error volume grows
- UI/UX improvements — the UI works, but I’m not a designer, and it shows
- Security hardening, including:
- Rate limiting
- Safeguards against error floods / issue bombs
- Custom AI model support, so users aren’t locked into OpenAI and can plug in their own models or providers
Future ideas:
- Smarter error grouping and deduplication
- Integrations with Slack / Discord / email
- Support for distributed tracing
- AI-generated fix suggestions or patch branches for human review
- Jira (and issue tracker) integration:
- Automatically create bug tickets from analyzed errors
- Pre-fill tickets with stack traces, AI root-cause analysis, and suggested fixes
The problem is: I can't do all of this alone.
Open Source, for Real
StackWise is fully open source, self-hosted, and actively evolving. I'm not trying to sell a SaaS (at least not right now). I just want to build something useful for developers who've been in the same situation I was.
If you:
- Have debugged production issues at midnight
- Want to contribute to a real project (not a tutorial repo)
- Are learning Python, Node.js, FastAPI, or Next
- Find AI-assisted debugging interesting
I'd love your feedback or contributions.
👉 Repo: github.com/shr-chauhan/stackwise
Feedback Welcome
This project grew out of a very specific pain, and I'm curious how it resonates with others.
- Would you use something like this?
- What's missing?
- Is self-hosted error tracking still worth it in 2025?
- How could AI analysis be more useful?
Drop a comment or open an issue. I'm here to learn and build — not pretend I have all the answers.
TL;DR: I built a self-hosted error tracker with AI analysis because I was tired of debugging production bugs at midnight. It's open source, works well for monoliths and simpler architectures, and I'm looking for contributors.
If you found this interesting, give the repo a ⭐ or share your debugging horror stories in the comments below!
Top comments (0)