Skip to main content
Back to Projects
Health & WellbeingNext.jsSupabaseTypeScriptRow-Level SecurityWellbeing

GentleR

A calm web app with three short lessons anyone can read and a private journal that saves as you type. A client project: Sameem worked on it as a full-stack engineer.

GentleR
.txt
Export
Autosave with revisions
Saving
Row-level security
Privacy
Client project
Engagement

Facts about the build and who it was for. Any figure here is shown on a public store listing or site linked on this page. See how we present portfolio work.

Walkthrough

2-minute walkthrough: a lesson, writing with autosave, the journal, display settings and the account page.2:12

Screens

Project Story

The Challenge

Most wellbeing apps push streaks, reminders and progress bars, and many quietly track what people write. Someone who just wants a quiet place to read a little and write privately ends up with another app that nags them and doesn't feel private.

What Was Built

Three short lessons anyone can read, each with a teaching, one small optional action, its sources and reflection prompts; a private journal that saves as you type and only says Saved once the server has confirmed it; a revision number on every save, so an entry changed in another tab is flagged instead of overwritten; a list of titles and dates only, export of everything as one .txt file, and account deletion with every entry; row-level security in Postgres, so each entry can only be read by the person who wrote it; and no timers, streaks, reminders or tracking, with larger text, reduced motion and an evening theme.

The Result

Live demo on sample data: the open lessons and three sample journal accounts, with a 2-minute walkthrough recorded on it.

Project Details

GentleR is a small web app for adults: three short lessons that anyone can read without signing up, and one private journal for people with an account. The journal saves as you type, says Saved only once the server has confirmed it, and flags an entry changed in another tab instead of overwriting it. It is a client project: Sameem worked on it as a full-stack engineer, on Next.js 16 and React 19 with Supabase Auth and Postgres, where row-level security lets only the writer read an entry. The live demo is linked from this page, with a 2-minute walkthrough recorded on it.

Tech Stack

Next.js 16 + React 19
Supabase Auth + Postgres
Row-level security
Tailwind CSS
Try the live demo

Opens the project’s page on the demo hub in a new tab, with any logins the demo needs.

Category

Next.js & Supabase
Written by DevoraXReviewed by Sameem Amjad, Founder & Lead Architect EngineerLast updated Based on project records and public sources (engineering write-up)

GentleR is a calm web app for adults: three short lessons that anyone can read without signing up, and one private journal for people with an account. GentleR is a client project: Sameem worked on it as a full-stack engineer for a client. The journal is a "What's on your mind?" box that saves as you type and shows Saved only once the server has confirmed it. Every save carries a revision number, so an entry changed in another tab is flagged instead of overwritten. Row-level security in Postgres means each entry can only be read by the person who wrote it; the whole journal exports as one .txt file, and owners can delete their account with every entry. There are no timers, streaks, reminders or tracking. A demo on sample data is at demoprojectsforclients.sameemamjad.com/projects/gentler, and a 2-minute walkthrough is on this page.

What you can check

  • Live demo on sample data: demoprojectsforclients.sameemamjad.com/projects/gentler (three open lessons and a private journal, with three sample accounts)
  • A 2-minute walkthrough video on this page: a lesson, writing with autosave, the journal, display settings and the account page
  • The demo's well-used sample journal holds 12 entries written over seven weeks

Each item points to something public: a store listing, a live site or a demo build. See our terms for how we present portfolio results.

What problem was GentleR built to solve?

Most wellbeing apps push streaks, reminders and progress bars, and many quietly track what people write. Someone who only wants a quiet place to read a little and write privately ends up with another app that nags them and doesn't feel private.

GentleR is a client project: Sameem worked on it as a full-stack engineer for a client. It is a small web app for adults. Anyone can read three short lessons, and people who sign up keep one private journal. Most of the engineering sits in the journal, and most of that is about trust. The app should never claim a save it hasn't made or overwrite newer writing, and one person's entries should be unreadable to every other account. There is no admin console: every journal is private to its owner.

GentleR is a reading and journaling app. It is not a medical or therapy product and makes no health claims.

How do the lessons work without an account?

The three lessons are open to everyone. Each has a teaching, one small optional action, its sources and reflection prompts. Nothing is collected on a lesson page. A "Write in my journal" button opens a new entry for readers who have an account, and one of the sample journals includes an entry written after a lesson.

Each lesson is a content file checked against a schema when the app is built, so a malformed lesson stops the build instead of reaching readers. The pages are prerendered and served as static files, which suits text that changes rarely. For a handful of lessons edited by a developer, files kept with the code are simpler than a content management system, which can still be added later behind the same lesson shape.

Keeping the lessons outside the account wall lets a reader judge the tone before handing over an email address.

How does the journal save as you type without losing writing?

Autosave is easy to get almost right. A common shortcut is to show "Saved" as soon as the request leaves the browser. GentleR's journal says Saved only once the server has confirmed the save. Until then the indicator says what is true: not saved yet, unsaved changes, saving, or a calm error with a Retry button and a way to copy the text.

The editor's logic is a small, pure state machine with no timers or network calls inside it, so the awkward cases can be unit tested on their own: typing while a save is in flight, a failed save, an automatic retry, a conflict. A thin hook connects it to the page. It saves after a pause in typing and again when the tab is hidden or closed, and the browser warns before someone leaves unsaved work.

If saving keeps failing, the editor keeps a safety copy in the browser's own storage, offers it back the next time the entry is opened, and removes it once a save succeeds. That copy never leaves the device.

What happens when the same entry is open in two tabs?

If an entry is open in two tabs, or on a laptop and a phone, each copy saves on its own schedule. In simple apps whichever saves last wins, and the other writing disappears without a message.

GentleR uses a revision number, a technique usually called optimistic concurrency. A database trigger increases each entry's revision on every update. The editor sends the revision it last loaded with each save, and the update applies only if the entry is still at that revision. If another tab saved in between, nothing is overwritten. The server returns the newer version, and the editor shows "This entry was changed somewhere else" with the time and three buttons: "Keep mine", "Use that version" and "Copy my text". The person's own text stays on screen until they decide.

Collaborative editors merge changes in real time, which is heavy machinery for one author writing in one journal. A revision check is cheap and easy to test, and it tells the person what happened. The cost is that editing on two devices at once means seeing the banner and choosing. The same trigger keeps each entry's owner and creation date fixed, so an edit cannot move an entry to another account or change when it was written.

How does row-level security keep each journal private?

Many apps enforce privacy in application code: every query has to remember to filter by the signed-in user, and one forgotten filter exposes someone else's data. Postgres row-level security moves that rule into the database. Each row records its owner, and a policy checks it against the signed-in user on every read, insert, update and delete, whichever part of the app sent the query.

GentleR's journal table has four owner-only policies, one per operation, and signed-out visitors have no access to the table at all. The app's queries also filter by user, as a second layer. The web app holds only Supabase's publishable key, which is public by design, and no key that bypasses these rules exists in the app or its environment.

The entry list loads titles and dates only, never bodies. Server logs record error codes, never titles or text. With no admin console, there is no screen in the app where anyone can browse other people's writing. DevoraX holds no security or compliance certifications.

How do people take their writing with them, or leave?

From the account page, one button downloads every entry as a single plain-text file, newest first, each with its title, its creation date and, if it was changed later, the date it was edited. Exporting changes nothing. Plain text suits personal writing because it opens on any device without a particular app.

The same page lets the owner delete their account and every entry with it. The dialog asks them to type a word to confirm and offers the export once more. It never shows success itself: the app moves to its account-deleted page only after the database has confirmed.

On a hosted authentication service, removing a user record normally needs a privileged server key, which GentleR does not hold. Instead, a narrow database function runs with higher privileges, deletes only the signed-in user's own account and refuses if nobody is signed in. Entries go with the account through a cascading foreign key, so nothing of theirs stays in the live database.

Why are there no streaks, reminders or tracking?

Engagement features are common in consumer apps because they move the numbers a product team watches. In a wellbeing app they can work against the reason someone opened it: a streak turns a quiet habit into a score to protect. GentleR has no timers, streaks, reminders or tracking, and no analytics or advertising scripts on any page.

A calm interface still takes design work. The display settings offer larger text, an evening theme and a choice of motion. Auto follows the device's reduced-motion setting, Reduced keeps gentle fades with no movement, and Off removes animation altogether. The settings are stored in the browser, so they work without an account and are never sent to a server. A small script applies them before the page draws, so the evening theme never flashes daylight first. System fonts mean no font files are requested from third parties.

Where can you see GentleR?

GentleR's demo is a separate copy running on sample data at demoprojectsforclients.sameemamjad.com/projects/gentler, and the hub page lists the demo logins. The lessons are free to read; the journal needs an account. Three sample accounts show a journal at different stages: a well-used one with 12 entries over seven weeks (some untitled, one written after a lesson, one edited), one with three recent entries, and an empty one showing the first-time experience. The shared demo accounts can't be deleted or have their password changed, so to try account deletion, sign up with any email address. No confirmation email is needed.

This page also carries a 2-minute walkthrough showing a lesson, writing with autosave, the journal, the display settings and the account page.

Why this stack

  • Next.js 16: one codebase serves both halves of the product. The lessons are prerendered as static pages, while the journal and account pages render per request for the signed-in person. Saves and sign-in go through Server Actions, so validation and the user check sit on the server in one place per action, and the export is a single route handler that returns a file.
  • React 19: the editor is the most stateful part of the app, with typing, saving, retries and conflicts able to overlap. React keeps the screen a function of that state, and a hook connects it to the pure autosave state machine. React 19's form actions suit the account flows, where a dialog waits for the server's answer before showing an outcome.
  • TypeScript: a save crosses the browser, a Server Action and the database, and the entry's shape, revision included, has to agree at every step. Typed database rows and schema validation of each action's input turn a mismatch into a compile or validation error rather than a lost save.
  • Supabase Auth + Postgres: accounts, sessions and a relational database in one managed service, with sessions held in cookies so server pages, actions and the browser all see the same signed-in user. Postgres carries the key rules: a trigger increments each entry's revision and fixes its creation date, a cascading foreign key removes entries with their account, and a narrow function handles self-service deletion.
  • Row-level security: each entry's ownership is enforced by the database on every query, rather than by each screen remembering to filter. Owner-only policies cover reading, writing, editing and deleting, and signed-out visitors have no access. Because the app holds only the public key, privacy does not depend on every query in the app being written correctly.
  • Tailwind CSS: the styling layer for a deliberately quiet interface. Its theme tokens sit on CSS variables, so the evening theme, the text sizes and the motion levels are switched by attributes on the page rather than by separate stylesheets.

Start with a free 30-minute call

Tell us where the app is stuck and what has to happen by when. We tell you whether an audit makes sense.

Book your free call