A full-stack web application similar to Google Keep, built with the MERN stack. Users can create, read, update, and delete notes with titles and descriptions.
- β Create new notes with title and description
- β View all notes in a clean, organized layout
- β Edit existing notes
- β Delete notes
- β Responsive design
- β Real-time updates
- β Error handling and validation
- React.js
- Axios (HTTP client)
- CSS/Tailwind CSS (styling)
- Node.js
- Express.js
- MongoDB
- Mongoose (ODM)
- Nodemon (development)
- CORS (cross-origin requests)
- dotenv (environment variables)
notes-keeper/
βββ client/ # React frontend
β βββ public/
β βββ src/
β β βββ components/
β β β βββ NoteForm.jsx
β β β βββ NoteList.jsx
β β β βββ NoteCard.jsx
β β β βββ Header.jsx
β β βββ services/
β β β βββ api.js
β β βββ App.jsx
β β βββ index.css
β βββ package.json
β
βββ server/ # Express backend
β βββ models/
β β βββ Note.model.js
β βββ controllers/
β β βββ notes.controllers.js
β βββ routes/
β β βββ notes.route.js
β βββ config/
β β βββ Db.js
β βββ index.js
β βββ app.js
β βββ .env
β βββ package.json
β
βββ README.md
- Node.js (v14 or higher)
- MongoDB (local or Atlas)
- npm or yarn
-
Navigate to server directory:
cd server -
Install dependencies:
npm install
-
Create .env file:
touch .env
-
Add environment variables to .env:
PORT=5000 MONGODB_URI=mongodb://localhost:27017/notes-keeper NODE_ENV=developmentFor MongoDB Atlas:
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/notes-keeper -
Start the backend server:
npm start # or with nodemon for development npm run devServer will run on
http://localhost:5000
-
Navigate to client directory:
cd client -
Install dependencies:
npm install
-
Create .env file (if needed):
REACT_APP_API_URL=http://localhost:5000/api/notes -
Start the development server:
npm start
App will run on
http://localhost:8000
http://localhost:5000/api/notes
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Get all notes |
| GET | /:id |
Get single note by ID |
| POST | / |
Create a new note |
| PUT | /:id |
Update a note |
| DELETE | /:id |
Delete a note |
Create Note:
POST /api/notes
Content-Type: application/json
{
"title": "My First Note",
"description": "This is the content of my note"
}Response:
{
"success": true,
"message": "Note created successfully",
"data": {
"_id": "507f1f77bcf86cd799439011",
"title": "My First Note",
"description": "This is the content of my note",
"createdAt": "2025-10-11T10:30:00.000Z",
"updatedAt": "2025-10-11T10:30:00.000Z"
}
}{
_id: ObjectId,
title: String (required, max 100 chars),
description: String (required, max 5000 chars),
createdAt: Timestamp,
updatedAt: Timestamp
}- Open the app in your browser at
http://localhost:8000 - Create a note by filling in the title and description form
- View all notes in the main feed
- Edit a note by clicking the edit button on any note card
- Delete a note by clicking the delete button
- Changes are saved automatically to the database
The app handles various error scenarios:
- Missing or empty fields (validation error)
- Invalid note ID (404 error)
- Database connection issues (500 error)
- Server errors (500 error)
All errors return a consistent JSON response:
{
"success": false,
"message": "Error description",
"error": "Detailed error message"
}- Import the API endpoints
- Test each CRUD operation
- Verify response formats
- Check error handling
- Create note with valid data
- Create note with empty fields (should fail)
- Fetch all notes
- Fetch single note by ID
- Update note title only
- Update note description only
- Update both title and description
- Delete existing note
- Delete non-existent note (should fail)
- Test with invalid ID format (should fail)
- Push code to GitHub
- Connect to Heroku/Render
- Set environment variables
- Deploy
- Build the app:
npm run build - Deploy build folder to Vercel/Netlify
- Update API URL in environment variables
- User authentication & authorization
- Color-coded notes
- Pin important notes
- Archive notes
- Search functionality
- Tags/labels
- Rich text editor
- Image attachments
- Share notes
- Dark mode
- Sorting options
- Note categories
- Ensure MongoDB is running
- Check connection string in .env
- Verify IP whitelist (if using Atlas)
- Ensure
corspackage is installed - Check CORS middleware in app.js
- Verify frontend URL is correct
# Kill process on port 5000
npx kill-port 5000- Check file naming (case-sensitive)
- Verify import paths
- Run
npm installagain
This project is open source and available under the MIT License.
Your Name - GitHub
For issues or questions, please open an issue on GitHub.
Happy Note Taking! πβ¨