Skip to content

About

Report a bug in a few fields, triage it by severity. Next.js 16, TypeScript, MongoDB, deployed on Vercel.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

BugReporter

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.

Next.js 16 TypeScript 6 MongoDB Vercel

Live demo · Getting started · How it works · Design · Architecture

The triage queue: 31 open reports listed highest severity first, each with a three-cell severity scale, title, excerpt, reference and date

The idea

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.

field ink paper high resolved

Try it

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.

Screenshots

The report form beside the orange “Found a bug?” column
Report form. Each severity level is explained before you choose it.
The report form with an error summary and inline errors
Validation. A focused summary links to each field; nothing typed is lost.
Report received, with reference BR-… in large type
Received. The reporter gets a reference straight away.
The queue filtered to medium-severity reports matching “invoice”
Search and filters. “7 of 31 open reports match”, and the view lives in the URL.
A high-severity report with its description and details
Report detail. The description, page, version and dates, plus resolve and delete.
A confirmation dialog asking whether to delete the report permanently
Delete confirmation. Focus starts on “Keep report”; resolving is suggested instead.
Maintainer sign-in with a “Look around as a guest” option
Sign-in. Maintainers use the password; visitors can browse as a read-only guest.
Captured 22 October 2026 from the production deployment. The layouts also adapt to tablets and phones; the end-to-end suite checks phone widths for sideways scrolling and tap-target size.

Features

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.

Getting started

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 dev
MONGODB_URI=mongodb://localhost:27017
MONGODB_DB=bug-reporter
ADMIN_PASSWORD=choose-a-long-password
SESSION_SECRET=output-of-openssl-rand-base64-32

Open 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.

How it works

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.

Design

  • 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.

Testing

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.

Acknowledgements

About

Report a bug in a few fields, triage it by severity. Next.js 16, TypeScript, MongoDB, deployed on Vercel.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages