Report a bug in a few fields. Triage it by severity.
A public bug report form and a maintainer queue, built on Next.js 16 and MongoDB, deployed on Vercel.
Designed as a printed defect tag: one signal-orange field, black ink, and a three-cell severity scale.
Live demo · Getting started · How it works · Design · Architecture
Most bug trackers are built for the people fixing bugs. BugReporter starts with the person who just hit one: a single page that asks for a title, what happened, how bad it is and, optionally, where. It gives back a reference straight away. Maintainers get a queue sorted by severity, with search, filters, and one-click resolve and reopen.
Severity is the one thing that matters in triage, so it has one consistent drawing everywhere: three cells filled from the left (high ■■■, medium ■■□, low ■□□) next to the word. It reads without colour, and the reporter sees exactly what each level means before choosing.
The live demo runs on Vercel with a MongoDB Atlas database holding 46 sample reports for a fictional invoicing app.
- Report a bug on the home page. Your report joins the queue straight away.
- Look around the queue from
/triage: choose Look around as a guest for read-only access to every report, with search, filters and sorting. - Resolving and deleting need the maintainer password, which isn't published.
Reporting
- Title, description and severity, plus an optional page address and version.
- Each severity level is explained in plain words on the form itself.
- Errors are listed in a focused summary and next to each field; nothing typed is lost on a failed send.
- A reference (
BR-3F9A1C) on success, and a clean form for the next report.
Triage
- Open and Resolved tabs with live counts.
- Search across titles and descriptions; filter by severity; sort by severity, age or resolution date. Filters live in the URL, so a view can be bookmarked.
- Mark resolved, reopen, or delete after a confirmation dialog.
- Signed in with a shared maintainer password; sessions are signed cookies.
- Optional read-only guest access (
GUEST_ACCESS=on) so a public demo can be explored without risk.
Operations
- Reads the original app's MongoDB data as is: same collection, same fields.
- Failed sign-ins and report submissions are rate-limited per network, with counters kept in MongoDB.
- Missing configuration and database outages produce clear messages, not blank pages.
- Builds with no secrets; designed for Vercel's serverless runtime.
Prerequisites: Node.js 20.9+ and Docker (or any MongoDB URI).
npm install
cp .env.example .env.local
npm run db:up
npm run db:seed # optional sample reports
npm run devMONGODB_URI=mongodb://localhost:27017
MONGODB_DB=bug-reporter
ADMIN_PASSWORD=choose-a-long-password
SESSION_SECRET=output-of-openssl-rand-base64-32Open http://localhost:3000 to report and http://localhost:3000/triage to triage.
Note
Triage uses one shared maintainer password. That suits a small team; see Limitations before relying on it for more.
Scripts
| Command | What it does |
|---|---|
npm run dev |
Development server |
npm run check |
Format check, lint, typecheck and tests |
npm run build |
Production build |
npm run db:up |
Start MongoDB 8 in Docker |
npm run db:seed |
Load 46 sample reports (local only) |
npm run db:down |
Remove the MongoDB container |
Deploying to Vercel
Import the repository, keep the detected Next.js settings, and set MONGODB_URI, ADMIN_PASSWORD and SESSION_SECRET (plus MONGODB_DB if needed) for Production and Preview. MongoDB Atlas must allow connections from Vercel. Full steps are in docs/development.md.
| Route | Who | What |
|---|---|---|
/ |
Anyone | Report form (static page; submits through a server action) |
/sign-in |
Anyone | Maintainer password sign-in, or read-only guest entry |
/triage |
Maintainers, guests | Queue with tabs, search, severity filter and sort |
/triage/[id] |
Maintainers, guests | One report; only maintainers can resolve, reopen or delete |
src/
app/ routes, layouts, error and not-found boundaries
features/reports/ model, validation, queue params, repository, server actions, UI
features/auth/ sign-in form and actions
lib/ env, MongoDB client, session tokens
components/ shared UI (split page, wordmark, icons)
Architecture, data model and trade-offs: docs/architecture.md.
- World: a factory defect tag. A signal-orange field carries the identity; work happens on off-white paper in black ink.
- Type: Schibsted Grotesk for everything, JetBrains Mono only for references, URLs and versions. Nothing below 16px.
- Signature: the three-cell severity scale, identical on the form, in the queue and on the report.
- Contrast: primary ink ≥8:1 and secondary ink ≥7:1, verified numerically. See DESIGN.md and
tokens.css.
npm test # 81 unit and integration tests (Vitest)
npm run db:up && npm run test:e2e # 45 end-to-end scenarios (Playwright)- Unit and integration: validation, queue URL parsing, session tokens and roles, redirect safety, rate-limit grouping, the repository against a real
mongod(including legacy documents), authorization of every triage action, and the report form's states. - End to end: runs against a production build and a real MongoDB. It covers reporting (including keyboard-only use), sign-in and redirects, guest access, search, filters and sorting, resolve, reopen and delete, rate limits, axe accessibility scans (WCAG 2.2 AA) and phone layouts.
CI runs both on every push.
- Schibsted Grotesk and JetBrains Mono, both under the SIL Open Font License, via Fontsource.






