A full-stack Notes Management application built with Node.js/Express backend and MongoDB database.
A simple yet powerful notes management application where users can create, read, update, and delete notes with search and pagination functionality.
- Add Note: Create notes with a title and description
- Edit Note: Edit existing notes
- Delete Note: Remove notes
- View Notes List: Browse all notes with pagination
- Search Notes: Search notes by title or description
- Pagination: Navigate through notes with configurable page size
- Validation: Input validation with meaningful error messages
- Responsive Design: Works on desktop, tablet, and mobile devices
- Backend: Node.js with Express.js
- Database: MongoDB with Mongoose
- Frontend: React with Axios
- Styling: CSS3 with responsive design
- Environment: dotenv for configuration management
notes-management-app/
├── server.js # Express server
├── models/
│ └── Note.js # MongoDB Note schema
├── controllers/
│ └── notesController.js # API business logic
├── routes/
│ └── notes.js # API route definitions
├── middleware/
│ └── errorHandler.js # Error handling middleware
├── frontend/ # React application
│ ├── public/index.html
│ ├── src/
│ │ ├── App.js
│ │ ├── App.css
│ │ └── components/
│ │ ├── NoteForm.js
│ │ ├── NoteList.js
│ │ └── NoteItem.js
│ └── package.json
├── package.json
├── .env.example
└── README.md
- Node.js (v14 or higher)
- MongoDB (local or cloud instance)
- npm
- Clone the repository
- Install backend dependencies:
npm install- Create
.envfile from template:
cp .env.example .env- Update
.envwith your MongoDB URI and preferred port:
MONGODB_URI=mongodb://localhost:27017/notes-management
PORT=5000
NODE_ENV=development
- Install frontend dependencies:
cd frontend
npm install
cd ..Start the backend server:
npm start # Production mode
npm run dev # Development mode with auto-reloadIn a new terminal, start the frontend:
cd frontend
npm startBackend runs on http://localhost:5000
Frontend runs on http://localhost:3000
GET /api/notes?page=1&limit=10&search=query
Query Parameters:
page(optional): Page numberlimit(optional): Notes per pagesearch(optional): Search term
POST /api/notes
Content-Type: application/json
{
"title": "My Note",
"description": "Note content here"
}
GET /api/notes/:id
PUT /api/notes/:id
Content-Type: application/json
{
"title": "Updated Title",
"description": "Updated content"
}
DELETE /api/notes/:id
- Title: Required, maximum 100 characters
- Description: Required, maximum 5000 characters
The API returns structured error responses with appropriate HTTP status codes:
{
"success": false,
"error": "Error message"
}Common status codes:
200 OK: Successful request201 Created: Resource created400 Bad Request: Invalid input404 Not Found: Resource not found500 Internal Server Error: Server error
npm start- Start production servernpm run dev- Start development server with auto-reloadnpm test- Run tests
- Use camelCase for variables and functions
- Use PascalCase for classes and components
- Add comments for complex logic
- Handle errors properly
The React frontend includes:
- Create, edit, and delete notes
- Real-time search
- Pagination controls
- Form validation with error messages
- Responsive design
- Character count for inputs
- Timestamp display
See frontend/README.md for frontend-specific documentation.
- Ensure MongoDB is running
- Check MONGODB_URI in .env file
- Verify database user permissions
- Change PORT in .env file
- Or kill the process using the port
- Verify backend is running on port 5000
- Check browser console for errors
- Verify REACT_APP_API_URL in frontend/.env
- User authentication
- Note categories and tags
- Rich text editor support
- Note sharing and collaboration
- Dark mode
- Mobile app (React Native)
- Advanced search and filtering
- Note version history
This project is licensed under the MIT License.
Contributions are welcome. Please feel free to submit pull requests.
For issues or questions, please create an issue in the repository.