GitHub Repo stars GitHub license GitHub last commit
A minimal, beginner-friendly notes application built with React (using Vite) and Supabase. This project demonstrates fundamental concepts including user authentication, CRUD operations against a Supabase database, and basic React routing. It also highlights the use of demo mode for simplified testing and public portfolio use.
(Optional: Link to your deployed version)
- π User Authentication (optional/demo): Built-in support for Supabase Auth, with the ability to bypass for demo.
- π CRUD Operations: Create, Read, Update, and Delete notes using Supabase database.
- π¦ Supabase Integration: Uses
notesapp_notesPostgreSQL table, with RLS policies. - π Demo Mode: Allows public browsing/editing of predefined notes with a demo user UUID.
- π‘οΈ RLS & Security Policies: Full policy-based access using Supabase's built-in RLS.
- πΌοΈ Preview Screenshots: Easily visualize app flow.
- React
- Vite
- Supabase
- React Router
- JavaScript (ES6+)
-
Clone the repository:
git clone https://github.com/visaoenhance/react-notes-app-supabase.git cd react-notes-app-supabase -
Install dependencies:
npm install # or yarn install -
Set up Supabase project:
- Create a new Supabase project at supabase.io
- Go to SQL Editor, and run:
docs/sql/schema.sqlβ Creates thenotesapp_notestabledocs/sql/policies.sqlβ Sets up RLS and policiesdocs/sql/demo_data.sqlβ Inserts demo notes for UUID user
- Enable Row Level Security on the table
-
Add your Supabase credentials:
cp .env.example .env
Replace the values with your own from Supabase Settings β API
-
Run locally:
npm run dev
Visit: http://localhost:5173
This project is configured to default to "Demo Mode," bypassing real authentication.
- Demo user UUID:
00000000-0000-4000-8000-000000000001 - All notes in the demo are associated with that UUID
- You can toggle or update authentication logic to use Supabase Auth instead
react-notes-app-supabase/
βββ docs/
β βββ sql/
β βββ schema.sql
β βββ policies.sql
β βββ demo_data.sql
βββ public/
β βββ preview-login.png
β βββ preview-dashboard.png
β βββ preview-editor.png
βββ src/
β βββ components/
β β βββ Dashboard.jsx
β β βββ Login.jsx
β β βββ NoteEditor.jsx
β βββ App.jsx
β βββ main.jsx
β βββ supabase.js
βββ .env.example
βββ .gitignore
βββ README.md
βββ vite.config.js
This project is licensed under the MIT License. See LICENSE for full terms.
Happy coding! Have questions? Open an issue.
30c97ae2445bfa7ae3f3fc535c861afd827e0549