A full-stack notes application built with Node.js, Supabase, and vanilla JavaScript. Create, edit, delete, and search through your notes with a beautiful, responsive interface.
- Backend: Node.js with native HTTP module
- Database: Supabase (PostgreSQL)
- Frontend: Vanilla HTML, CSS, JavaScript
- Styling: Tailwind CSS
- Deployment: Netlify, or any Node.js hosting
Method | Endpoint | Description |
---|---|---|
GET |
/api/notes |
Get all notes |
GET |
/api/notes/search?q=query |
Search notes by title or content |
GET |
/api/notes/:id |
Get a specific note by ID |
POST |
/api/notes |
Create a new note |
PUT |
/api/notes/:id |
Update an existing note |
DELETE |
/api/notes/:id |
Delete a note |
- Node.js (v14 or higher)
- Supabase account and project
git clone https://github.com/Gresham24/notes-app.git
cd notes-app
npm install
- Create a new project at supabase.com
- Create a table named
NotesDB
with the following schema:CREATE TABLE NotesDB ( id SERIAL PRIMARY KEY, created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(), note_title TEXT NOT NULL, note_text TEXT NOT NULL );
- Update
lib/supabase.js
with your Supabase URL and API key
npm start
The application will be available at http://localhost:3000
notes-app/
├── lib/
│ ├── notes.js # Database operations (CRUD + Search)
│ └── supabase.js # Supabase configuration
├── public/
│ ├── index.html # Main application interface
│ ├── script.js # Frontend JavaScript logic
│ └── styles.css # Application styling
├── utils/
│ └── serveStatic.js # Static file serving utility
├── server.js # Node.js HTTP server
├── package.json # Dependencies and scripts
└── README.md # Project documentation
The app includes search capabilities:
- Real-time Search: Results update as you type (300ms debounce)
- Case-insensitive: Searches work regardless of letter case
- Multi-field Search: Searches both note titles and content
- Partial Matching: Finds notes containing your search terms
- Clear Search: Reset to view all notes
- Connect your GitHub repository to Vercel
- Set environment variables for Supabase
- Deploy automatically on push
Test the API endpoints using Postman or curl:
# Get all notes
curl http://localhost:3000/api/notes
# Search notes
curl "http://localhost:3000/api/notes/search?q=test"
# Create a note
curl -X POST http://localhost:3000/api/notes \
-H "Content-Type: application/json" \
-d '{"note_title":"Test Note","note_text":"This is a test note"}'
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is open source and available under the MIT License.