A modern notes application built with React frontend and Supabase backend for storing and managing notes.
- ✨ Create, read, update, and delete notes
- 🎨 Modern, responsive UI with glassmorphism design
- ⚡ Real-time data synchronization with Supabase
- 📱 Mobile-friendly interface
- 🔄 Inline editing capabilities
- 📅 Automatic timestamps
- Frontend: React 18
- Backend: Supabase (PostgreSQL + Real-time)
- Build Tool: Vite
- Styling: CSS3 with modern design patterns
- Node.js (v16 or higher)
- npm or yarn
- Supabase account
# Install dependencies
npm install- Go to supabase.com and create a new project
- Once your project is created, go to Settings > API
- Copy your Project URL and anon public key
Update the src/supabase.js file with your Supabase credentials:
const supabaseUrl = 'YOUR_SUPABASE_PROJECT_URL'
const supabaseAnonKey = 'YOUR_SUPABASE_ANON_KEY'In your Supabase dashboard, go to SQL Editor and run this query to create the notes table:
CREATE TABLE notes (
id BIGSERIAL PRIMARY KEY,
title TEXT NOT NULL,
content TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE DEFAULT TIMEZONE('utc'::text, NOW()) NOT NULL,
updated_at TIMESTAMP WITH TIME ZONE DEFAULT TIMEZONE('utc'::text, NOW()) NOT NULL
);
-- Enable Row Level Security (RLS)
ALTER TABLE notes ENABLE ROW LEVEL SECURITY;
-- Create a policy that allows all operations (for demo purposes)
-- In production, you should implement proper authentication and authorization
CREATE POLICY "Allow all operations" ON notes FOR ALL USING (true);# Start development server
npm run devThe application will be available at http://localhost:3000
src/
├── App.jsx # Main application component
├── App.css # Application styles
├── main.jsx # Application entry point
└── supabase.js # Supabase client configuration
- Create a Note: Fill in the title and content fields, then click "Add Note"
- Edit a Note: Click the "Edit" button on any note to modify it inline
- Delete a Note: Click the "Delete" button to remove a note (with confirmation)
- View Notes: All notes are displayed in a responsive grid layout
The application uses Supabase's auto-generated REST API:
GET /notes- Fetch all notesPOST /notes- Create a new notePUT /notes/:id- Update a noteDELETE /notes/:id- Delete a note
The application uses custom CSS with a modern design. You can modify src/App.css to customize the appearance.
You can extend the notes table by adding more columns like:
tags(for categorizing notes)user_id(for multi-user support)is_favorite(for bookmarking)
Consider adding these features:
- Search functionality
- Note categories/tags
- Rich text editing
- File attachments
- User authentication
- Push your code to GitHub
- Connect your repository to Vercel
- Add your Supabase environment variables
- Deploy!
- Build the project:
npm run build - Upload the
distfolder to Netlify - Add your Supabase environment variables
For production, consider using environment variables:
VITE_SUPABASE_URL=your_supabase_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_keyThen update src/supabase.js:
const supabaseUrl = import.meta.env.VITE_SUPABASE_URL
const supabaseAnonKey = import.meta.env.VITE_SUPABASE_ANON_KEY- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT License - feel free to use this project for your own applications!
If you encounter any issues:
- Check the browser console for errors
- Verify your Supabase configuration
- Ensure the database table is created correctly
- Check that RLS policies are set up properly