Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

visaoenhance/react-notes-app-supabase

Repository files navigation

React Notes App with Supabase

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.

πŸ”— Live Demo

(Optional: Link to your deployed version)

✨ Features

  • πŸ” 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_notes PostgreSQL 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.

πŸš€ Technologies Used

πŸ› οΈ Setup and Installation

  1. Clone the repository:

    git clone https://github.com/visaoenhance/react-notes-app-supabase.git
    cd react-notes-app-supabase
  2. Install dependencies:

    npm install
    # or
    yarn install
  3. Set up Supabase project:

    • Create a new Supabase project at supabase.io
    • Go to SQL Editor, and run:
      • docs/sql/schema.sql β†’ Creates the notesapp_notes table
      • docs/sql/policies.sql β†’ Sets up RLS and policies
      • docs/sql/demo_data.sql β†’ Inserts demo notes for UUID user
    • Enable Row Level Security on the table
  4. Add your Supabase credentials:

    cp .env.example .env

    Replace the values with your own from Supabase Settings β†’ API

  5. Run locally:

    npm run dev

    Visit: http://localhost:5173

πŸ” Demo Mode vs Auth Mode

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

πŸ“ Folder Structure

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

πŸ–ΌοΈ Preview Screens

πŸ” Login Page

Login

🧾 Dashboard (List View)

Dashboard

✍️ Note Editor

Note Editor

πŸ“„ License

This project is licensed under the MIT License. See LICENSE for full terms.


Happy coding! Have questions? Open an issue.

react-notes-app-supabase

30c97ae2445bfa7ae3f3fc535c861afd827e0549

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /