A modern, responsive note-taking application built with React and Node.js. Features a clean, Apple Notes-inspired interface with real-time saving, search functionality, and intuitive organization tools.
- Create & Edit Notes: Rich text editing with auto-save
- Smart Organization: Pin important notes, soft-delete with restore
- Powerful Search: Real-time search in titles and content
- Multiple Views: All, Pinned, and Deleted Notes
- Keyboard Navigation: Fully keyboard-accessible
- Responsive Design: Optimized for all devices
- Dark Theme: Sleek, modern dark interface
- Fullscreen Mode: Distraction-free writing
- Real-Time Saving: Auto-save with visual confirmation
- Smooth Animations: Polished transitions and micro-interactions
- Collapsible Sidebar: Maximize writing area
- Note Statistics: Live count of all note categories
- Confirmation Dialogs: Safe deletions with prompts
- Error Handling: Graceful UI and retry options
- Loading States: Visual feedback during operations
- Theme Customization: Light/Dark toggle
- Color Themes: Custom color palettes
- User Profiles: Personal settings and preferences
- Dashboard: Insights and analytics for notes
- React 18.2.0
- Webpack 5 (custom setup)
- Babel (ESNext support)
- Lucide React (icons)
- Custom CSS (responsive + variables)
- Node.js
- Express.js 4.18.2
- MongoDB
- Mongoose 8.0.3
- Nodemon – auto restart server
- Express Validator – input validation
- CORS – cross-origin requests
- Helmet – HTTP security
- Morgan – request logging
Ensure the following are installed:
node --version
npm --version
mongod --version
git clone https://github.com/cherrycreamsoda/notebook-react.git
cd notebook-react-app
cd server
npm install
# Database
MONGODB_URI=mongodb://localhost:27017/notebook
# Server
PORT=5000
NODE_ENV=development
# Frontend
FRONTEND_URL=http://localhost:3000
# Security
JWT_SECRET=your-super-secret-jwt-key-here
Windows:
net start MongoDB
macOS (with Homebrew):
brew services start mongodb-community
Linux:
sudo systemctl start mongod
# Development (with auto-restart)
npm run dev
# Production
npm start
Runs on: http://localhost:5000
cd .. # Back to root
npm install
REACT_APP_API_URL=http://localhost:5000/api
# Development server
npm start
# OR auto-open browser
npm run dev
Runs on: http://localhost:3000
Method | Endpoint | Description |
---|---|---|
GET | /api/notes |
Get all notes (optional filters) |
GET | /api/notes?view=pinned |
Get pinned notes |
GET | /api/notes?view=deleted |
Get deleted notes |
GET | /api/notes?search=query |
Search notes |
POST | /api/notes |
Create a new note |
PUT | /api/notes/:id |
Update a note |
PUT | /api/notes/:id/pin |
Toggle pin |
PUT | /api/notes/:id/restore |
Restore a soft-deleted note |
DELETE | /api/notes/:id |
Soft delete a note |
DELETE | /api/notes/:id/permanent |
Permanently delete a note |
Method | Endpoint | Description |
---|---|---|
GET | /api/health |
Check API status |
notebook-react-app/
├── public/
│ └── index.html
├── src/
│ ├── components/
│ │ ├── Sidebar.jsx
│ │ ├── MainContent.jsx
│ │ ├── GlassmorphicFAB.jsx
│ │ ├── LoadingSpinner.jsx
│ │ ├── ErrorMessage.jsx
│ │ └── ConfirmationDialog.jsx
│ ├── contexts/
│ │ └── ThemeContext.jsx
│ ├── services/
│ │ └── api.js
│ ├── styles/
│ │ ├── App.css
│ │ ├── Sidebar.css
│ │ ├── MainContent.css
│ │ └── ...
│ ├── App.jsx
│ └── index.js
├── server/
│ ├── config/
│ │ └── database.js
│ ├── models/
│ │ └── Note.js
│ ├── routes/
│ │ └── notes.js
│ ├── middleware/
│ │ └── errorHandler.js
│ ├── server.js
│ └── .env
├── webpack.config.js
├── babel.config.json
├── package.json
└── README.md
npm start # Start development
npm run dev # Dev with auto-open browser
npm run build # Production build
npm run dev # Start with nodemon
npm start # Start production server
- 🔄 Hot Reload: Auto-reloads for both frontend and backend
- 🐞 Debugging: Use browser console + server logs
- 🧠 DB Explorer: Use MongoDB Compass to view data
- 🔬 API Testing: Try Postman or Insomnia for endpoints
Error: Cannot connect to MongoDB
Fix: Ensure MongoDB is running and URI is correct.
Error: Port 3000/5000 is already in use
Fix: Change port in .env
or kill the process.
Error: Access to fetch blocked by CORS policy
Fix: Confirm backend CORS settings match frontend origin.
mongo
use notebook
db.dropDatabase()
- Build project:
npm run build
- Deploy
/dist
folder - Add env var:
REACT_APP_API_URL=https://your-backend-domain.com/api
- Set environment variables
- Use MongoDB Atlas as your database
- Whitelist frontend domain in CORS settings
# Backend
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/notebook
PORT=5000
NODE_ENV=production
FRONTEND_URL=https://your-frontend-domain.com
# Frontend
REACT_APP_API_URL=https://your-backend-domain.com/api
- Fork the repo
- Create your feature branch:
git checkout -b feature-name
- Commit your changes:
git commit -am 'Add feature'
- Push branch:
git push origin feature-name
- Submit a pull request
Hamza Zain
GitHub: @cherrycreamsoda
- Icons by Lucide
- Built with love and modern web tools ❤️
Happy Note-Taking! 📝✨