How Does BreathTime’s Petition System Actually Work?
BreathTime is a small civic platform: people propose petitions, sign them, and leave a few words of support. This post walks through exactly how each of those steps works today — including the parts that are deliberately simple, and the parts that don't exist yet.
Step 1: Proposing a Petition
Any registered, logged-in user can suggest a petition through the Propose a Petition page. A proposal has three fields:
- a title
- a description of what should change and why
- an addressee — the government, institution or organisation the petition is aimed at
The form is a React page that sends the proposal to an API route; the server checks that the user is signed in (NextAuth) and saves it to the database (Prisma + MySQL) with the status pending.
Step 2: Moderation
Every proposal is read by a person. In the admin panel, proposals are listed newest first, with the author's name. For each one, the administrator can:
- approve it, or
- reject it,
optionally adding a comment. Either way, the author gets an in-app notification — and on a rejection, the admin's comment is included so they know why.
Approval is a decision, not an automatic switch: a live petition is then published by an administrator, who sets its title, description, addressee, category and signature goal (1,000 by default). Users can't publish petitions directly — that's on purpose for a platform this young. Every petition that goes live has been looked at by a human first.
Step 3: Signing
Each petition has its own page (/petitions/<id>), rendered on the server with Next.js's App Router. When someone presses Sign:
- You must be logged in. Guests can't sign; the request is refused until you sign in or register. The petition also has to be active.
- One person, one signature. The server checks whether you've already signed, and the database enforces it too, with a unique constraint on petition + user.
- The signature is saved. It's stored together with an update to the petition's signature count, and the petition's author receives a notification.
- Your page refreshes. You see the new count straight away. Other visitors see it the next time they load the page — there are no live, real-time updates.
Step 4: Leaving a Comment
When you sign, you can add an optional comment — a sentence on why it matters to you — and choose whether your signature is public. Public signatures, with their comments, are shown under the petition (the most recent 20).
There is no separate discussion thread yet, and no automatic word filter: comments are attached to signatures, and only people who have signed can leave one.
What Isn't There (Yet)
An honest list, because it's an early-stage platform:
- No pagination in the admin proposal list — fine at today's volume, not forever.
- No audit log of admin decisions.
- No real-time updates — counts and comments refresh on page load.
- No automated moderation — every proposal is reviewed by a person.
The Stack Behind It
- Next.js 16 (App Router) — server-rendered petition pages and API routes
- Prisma 5 + MySQL 8 — separate tables for petitions, signatures and proposals
- NextAuth v4 (credentials + JWT) — sign-in and sessions
- Tailwind CSS v4 — the interface, available in 48 languages
- Three.js — the animated globe on the homepage: yellow dots for the locations of registered users, green for users active in the last 15 minutes, and your own dot green when you're logged in, red when you're not
A Real Example
The first petition on the platform is the one BreathTime is named after: “BreathTime – globalny dzień oddechu dla naszej planety” (a global day of breath for our planet), addressed to the Polish government. It proposes that once a month, on the second Sunday, we pause commercial flights, cut combustion-vehicle traffic and scale back non-critical industrial production — as a constructive alternative to disruptive protest.
At the time of writing it has 8 signatures towards a goal of 1,000. Small numbers, real people — which is exactly where every petition starts.
Wrapping Up
Propose, review, sign, comment: four steps, each kept deliberately simple. If you have a cause worth putting in front of decision-makers, propose a petition — and if you think the process itself could work better, tell us.
