MUHAMMAD AHMAD SIDDIQUI

Full Stack & AI Engineer

000

Available for work·Book a call
All Projects/Peace Room

Full Stack Developer

Peace Room

AI conflict-resolution platform, two sides each talk privately with an AI peace guide, share only wording they approve, and work toward an agreement everyone explicitly signs off

Next.js 16React 19TypeScriptTailwind CSS 4Supabase AuthSupabase PostgresRow Level SecuritySupabase RealtimeAnthropic ClaudePinecone (RAG)NodemailerVercel
Peace Room

6

Step guided journey

45

Database migrations

24

API routes

28

Pages and screens

21k

Lines of TypeScript

Overview

Peace Room helps people in an everyday conflict, a neighbour dispute, a rental problem, a shared community space, move from competing requests toward a shared agreement, if they choose to. The person who opens the room describes the situation and their request, then invites the other side. Each participant gets a private conversation with Ria, a neutral AI peace guide that listens, reflects back what it heard and helps them find what they actually need. From that chat Ria drafts a Peace Translation, a calm first-person statement that keeps the person's facts and boundaries but removes insults, mind-reading and threats. Only after the person approves it does it appear in the shared room, where Ria highlights common interests, offers possible options and drafts an agreement as separate commitments that every active participant must approve. Rooms can end as resolved, partially resolved or dissolved, and every one of those is treated as a legitimate outcome.

The Challenge

The product only works if people trust it, so privacy and neutrality had to be enforced by the system, not promised by the interface. Private chats must never reach the other side, the room owner or administrators, and nothing may move into the shared room until its author has approved a specific wording. The AI has to stay neutral, never decide who is right, never claim agreement that was not recorded, and never invent facts, apologies or concessions. Every approval is tied to an exact version of an agreement, so any change of wording has to reset earlier approvals. On top of that sit real-world edge cases: people joining late, leaving, being invited by email, rooms that need to open automatically once both sides are ready, and safety situations that must be blocked or escalated rather than posted.

How We Solved It

1

Passwordless sign-in for everyone

Authentication uses Supabase Auth with an emailed 6-digit code and a magic link generated from the same message, so there are no passwords to store, reset or leak. The code works across devices and survives email scanners that consume links. Invitees come in through their invitation link, which locks the invited email, and verifying that code is also what proves they own the address.

2

Privacy enforced in the database

Every table is protected with Postgres Row Level Security and access goes through security-definer functions, so a participant's private conversation is unreachable to anyone else, including the room owner and admins. Invitation claims, consent, responses and room opening are implemented as guarded database functions across 45 migrations, with locks and idempotency keys so retries and double-clicks never create duplicate messages or double-send emails.

3

Ria, a neutral guide built from written operating rules

Ria runs on Anthropic Claude with a versioned system prompt and a written set of operating rules covering neutrality, privacy boundaries, listening without judgment, truthfulness and what the guide must never say. It asks one calm question at a time, treats the two starting positions as neutral labels rather than facts, and avoids legal, medical or therapy advice. Prompts, rules and tests live in the repository so behaviour changes are reviewable.

4

Peace Translation with human approval

Ria turns a private chat into a draft statement and shows what it changed. The person can make it shorter, gentler or more specific, give their own instruction, edit it by hand, switch between earlier versions, or regenerate it. Nothing is shared until they press Approve and Share, and a room opens only when enough people on each side have approved their wording.

5

Retrieval-augmented guidance with Pinecone

A curated, reviewed knowledge base of listening techniques, de-escalation patterns and well-formed agreement items is stored in Pinecone and retrieved as background for Ria. Scoped personalised retrieval, an outbox for reliable indexing, PII scrubbing and automatic deletion of personal scopes when a room closes keep the retrieval layer from becoming a privacy hole.

6

Shared room, live chat and safety checks

The shared room shows both asks, who is present and only approved statements, with a live discussion over Supabase Realtime. Messages are checked on the server before publishing: threats are blocked, insults trigger a nudge, and Ria can offer a calmer rewrite that the author chooses to post, edit or discard. Ria's notes list common interests and options built only from visible material, and participants react with 'I could live with this' or 'Not for me'.

7

Versioned agreements and honest outcomes

Ria drafts an agreement as separate numbered commitments. Each change creates a new version and earlier approvals do not carry forward, participants can mark items Agree or Needs discussion, and a room counts as resolved only when every active participant has approved the current version. Partial agreement and dissolution are first-class outcomes, and closing sends notification emails and offers an optional, opt-in lessons consent.

8

Account control, reporting and QA

People can withdraw from a room or delete their account and data, anyone can file a safety report that a reviewer sees without the private conversation, and an admin queue handles reports. A written project plan, ERD, flowchart and QA test plan document each flow, and unit tests cover the prompts, safety checks, retrieval scoping and name handling.

Landing & Sign-in

Rooms & Consent

Private Chat & Peace Translation

Shared Room

Agreement & Closing

Safety

Results & Impact

Complete Six-Step Journey

Join, private chat, translation, shared room, agreement and close, with a stepper that adapts to whether the person owns, organises or is invited into the room.

Privacy by Construction

Private conversations are protected by Row Level Security and never visible to the other side, the owner or admins, and personal retrieval data is deleted when a room closes.

AI That Does Not Take Sides

Documented operating rules, versioned prompts and tests keep Ria neutral, truthful and unable to claim agreement that the server has not recorded.

Human Approval at Every Step

Nothing leaves a private chat without an approved Peace Translation, and nothing is agreed without every active participant approving the current agreement version.

Reliable Under Real Use

Idempotent message handling, claim locks, a retry-safe RAG outbox and automatic room opening, hardened through live testing with real accounts and emails.

Outcomes Beyond Win or Lose

Resolved, partially resolved and dissolved rooms each get their own summary, so stepping away or agreeing on part of the problem is treated as a legitimate result.

Original Project

Live product

Sign-up required

app.peace9.org (opens in a new tab)

Client product by Peace9, currently in private beta.

Technical Architecture

FrontendNext.js 16 App Router with Turbopack, React 19, TypeScript and Tailwind CSS 4, with server-rendered per-person pages and client components for chat, translation, shared room and agreement
Auth & DataSupabase Auth with passwordless email codes and magic links, Postgres with Row Level Security and security-definer functions, 45 SQL migrations, Supabase Realtime for the live shared chat
AIAnthropic Claude for private chat, Peace Translation, shared-room notes, calmer rewrites and agreement drafting, driven by versioned prompts and written operating rules
RetrievalPinecone vector index for the curated guidance knowledge base, with scoped retrieval, PII scrubbing and a reliable indexing outbox
EmailNodemailer over SMTP for invitation, shared-room-open and room-closed emails
Quality & Opstsx test suites for prompts, safety checks and retrieval scoping, project plan, ERD and QA test plan docs, deployed on Vercel

Have a similar project?

I'm open to freelance projects and full-time roles. Let's build something great together.