The Story of Plain: Building a Secret, Zero-Data Decision Engine
Making critical choices especially when navigating high-stakes situations like harassment, unfair treatment, or restrictive agreements can be entirely paralyzing. Fear of retaliation, career damage, or accidental data exposure often keeps individuals silent.
I built Plain to solve this exact problem. It is a completely confidential, zero-data-record, zero-knowledge web application designed to translate complex institutional documents into clear, actionable terms, and help users document sensitive incidents properly without leaving a trace.
Inspiration
The inspiration for Plain came from a harsh reality: traditional help-seeking channels often fail the people who need them most.
When someone faces a difficult situation, their immediate instinct is to search for answers or advice. However, browsing online or utilizing standard enterprise productivity tools creates a permanent digital footprint. Data logs, cloud backups, browser histories, and corporate network monitoring mean that seeking help can unintentionally expose a person before they are ready to step forward.
We wanted to create a "digital safe room" an application that offers immediate, structured guidance (like whether to file a complaint, how to reach a lawyer, or how to preserve evidence) while guaranteeing absolute anonymity. By stripping away data storage vulnerabilities and applying zero-knowledge encryption, Plain allows users to understand their options safely and privately.
What it does
Plain bridges the communication gap between everyday citizens and institutional systems by using two distinct, high-impact processing modes:
1. DECODE Mode (Document Comprehension)
Users who receive dense, confusing, or intimidating documents (such as legal notices, medical reports, or tenancy agreements) can paste text or upload files (PDF, TXT, JPG, PNG up to 5MB). Plain parses the document to generate:
- What it says: A highly readable, plain-language summary.
- What it means for you: A personalized interpretation based on the user's specific context.
- Your action plan: Prioritized, step-by-step instructions with deadlines.
- Your entitlements: A comprehensive list of rights and protections.
- The one question to ask: Direct guidance on reaching out to institutions.
3. REPORT Mode (Structured Incident Recording)
When a user experiences misconduct or unfair treatment, they can select a specific situation category (e.g., Workplace, Housing, Legal, Consumer). Plain walks them through the incident:
- Contextual Intake: The user enters the timeline and details in their own words.
- AI Follow-up: The system presents 3 to 5 targeted follow-up questions to gather necessary facts.
- Actionable Results: Plain extracts key facts into a structured, formal incident record, outlines escalation tiers, provides a ready-to-send formal complaint letter, and creates a categorized evidence checklist.
How we built it
We built Plain with a modern, privacy-first, and zero-knowledge tech stack designed to ensure no unencrypted information ever touches our servers.
Core Tech Stack
- Frontend: Built with React, designed to run entirely in client-side memory.
- Backend: Serverless, isolated API endpoints handling state-changing requests and routing ephemeral processing sessions.
- Client-Side Cryptography: Built using the native Web Crypto API. Plain never handles unencrypted information server-side.
The Security & Encryption Flow
When an account is created, Plain generates a 32-byte random salt directly on the client’s machine. The user’s passphrase is used to derive two key assets:
- An
account_hashderived via PBKDF2 (310,000 iterations, SHA-512) sent to authenticate with the server. - A local, non-exportable
CryptoKeyfor symmetric AES-256-GCM encryption.
Every saved record is bundled into a single user-specific encrypted_blob. When a user logs in, the blob is downloaded and decrypted entirely in the browser's memory. To track overall usage without compromising identity or storing individual records, we utilized a probabilistic tracking filter to estimate active sessions ($S$) safely:
$$\mathbb{E}[S] = N \cdot \left(1 - e^{-\frac{C}{N}}\right)$$
Where $C$ is the count of temporary, anonymized tokens and $N$ is the filter length.
Challenges we ran into
Managing Zero-Knowledge Storage Constraints
Storing all user records inside a single, encrypted blob per account required strict optimization. Because the server cannot index individual records, our client-side state needed to efficiently encrypt the entire payload, update the contents, and upload a fresh blob without performance bottlenecks.
Local Document Extraction & Processing
To protect user identity, we built client-side text extraction using Web Workers for PDF, TXT, and image files. Stripping out Personally Identifiable Information (PII) using robust regex patterns before routing inputs to the AI engine was crucial to guarantee that no identifiable details ever leave the browser.
Suppressing Server Logs
Standard infrastructure naturally logs everything—from server requests to IP addresses. We had to customize our routing and backend policies to explicitly disable access logs and request-body caching, converting our host environment into an ephemeral data pipeline.
Accomplishments that we're proud of
- Zero Footprint Architecture: We successfully launched a platform where users can safely store their most sensitive documentation, knowing that even if the database were entirely exposed, their content remains unreadable without their locally kept passphrase.
- Empowerment Through Structure: Giving users immediate clarity by breaking down legal or institutional jargon into numbered action plans transforms a stressful moment into a guided recovery process.
- High-Speed Browser-Side Extraction: By using Web Workers, we eliminated server-side storage risks and allowed files up to 5MB to be parsed instantly in local memory.
What we learned
- Privacy Is Foundational: True data privacy cannot be bolted on as an afterthought. It dictates the entire software engineering lifecycle—from how the account is authenticated to how text inputs are purged from the memory stack.
- Zero-Recovery Design Requires Clear UX: Since there is no email-based account recovery by design, we learned to incorporate dynamic, real-time passphrase checklists to ensure users build secure, memorable phrases.
- Clear Language Diffuses Crisis: In moments of confusion, users don't need highly artistic or abstract interfaces. They need clean design, direct pathways, and accessible information.
What's next for Plain
- Offline Capabilities via PWA: We are exploring Progressive Web App functionality to allow Plain's local decryption and file-parsing features to operate completely offline, adding a physical layer of security.
- Jurisdiction-Specific Decoding: We plan to expand the Decode and Report modules by dynamically adjusting next steps based on local labor laws and housing regulations.
- Anonymous Legal Directory Integration: Providing a curated, fully encrypted list of verified advocacy organizations, labor attorneys, and support groups directly in the results screen for users ready to execute their action plans.
Built With
- cryptography
- filereader
- html5
- javascript
- node.js
- parsing
- postgresql
- react
- regex-based
- restapis
- serverlessframework
- typescript
- webcryptoapi
- webworkers
Log in or sign up for Devpost to join the conversation.