Skip to content
apelpapaPublic

About

React and TypeScript notes app with browser storage, private account notes, Supabase Auth, and a public notes feed.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Jot Notes

A React and TypeScript note-taking app with browser-local notes, private account notes, and a separate public Global Notes feed. Start writing without an account, then sign in when you want notes stored against your account.

Open Jot Notes

What it does

Mode Storage and behavior
Guest notes Create and delete notes without signing in. Notes persist in localStorage by default. Turning off persistence uses sessionStorage, which survives refreshes within the tab session.
Account notes Sign up or sign in with Supabase Auth. The app reads and writes notes directly through Supabase, and Row Level Security limits each account to its own notes.
Global Notes Anyone can read the public feed. Signed-in users can publish a note to a separate global_notes table. The feed shows the latest 100 entries.

The interface also includes light/dark themes, input length limits, loading and service-unavailable states, and a web app manifest with a service worker for installation support.

Guest and account notes are separate collections. Signing in leaves guest notes in the browser where they were written. Only notes published to Global Notes appear in the public feed.

Architecture

flowchart LR
    UI[React / TypeScript] --> Browser[Browser storage: guest notes]
    UI --> Auth[Supabase Auth]
    UI --> DB[Supabase Postgres: users, notes, global_notes]
Loading

Cloudflare Pages serves the static app. The browser connects to Supabase with a publishable key. Database policies scope private notes to their owner, a trigger creates a profile at signup, and column defaults attach new notes to the signed-in user.

Stack

  • Frontend: React, TypeScript, Vite, Tailwind CSS, DaisyUI.
  • Identity and data: Supabase Auth and Postgres (Row Level Security).
  • Hosting: Cloudflare Pages (static).
  • Browser features: local/session storage, theme preferences, web app manifest, and service worker.

Repository map

Path Purpose
src/components/ Note composer, note cards, navigation, account UI, and storage state
src/lib/ Supabase client and query error handling
config/supabase-config.ts Shared public Supabase connection and key validation
supabase/migrations/ Database changes for direct frontend access

Running locally

Use the Node version in .node-version, then run npm ci and npm run dev from the repository root. Vite listens on localhost by default. For testing from another device, use npm run dev -- --host. The app and build share the Supabase URL and publishable key in config/supabase-config.ts. Local development uses the configured project, so select a development project before testing account changes.

Run npm run check for lint, frontend security tests, isolated PostgreSQL migration tests, and a production build.

Deploying to Cloudflare Pages

  • Build command: npm run build
  • Build output directory: dist
  • Supabase connection: config/supabase-config.ts. No Supabase environment variables are required in Pages. Changing projects requires updating the shared config and rebuilding.

Follow the deployment guide to apply database migrations, set up Auth and verify an isolated preview. Cloudflare Pages deployment guide

About

React and TypeScript notes app with browser storage, private account notes, Supabase Auth, and a public notes feed.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages