A modern, full-stack notes application built with React and Express.js. Write and preview Markdown notes with tagging functionality, search capabilities, dark mode, and offline support via localStorage backup.
- Markdown Editor: Write notes with full Markdown support and live preview
- Tagging System: Organize notes with custom tags for easy categorization
- RESTful API: Backend API for persistent note storage
- Export Notes: Download all notes as JSON for backup or migration
- ** Real-time Search**: Filter notes instantly by title or tags
- ** Dark Mode**: Toggle between light and dark themes with persistent preferences
- ** Offline Backup**: Automatic localStorage backup for offline functionality
- ** Responsive Design**: Modern UI that works on all screen sizes
- ** Performance**: Optimized rendering and state management
- ** Enhanced UI**: Beautiful, modern interface with smooth animations
Before you begin, ensure you have installed:
- Node.js (v16.0.0 or higher)
- npm (comes with Node.js)
-
Clone the repository
git clone https://github.com/chetx27/notes-app-.git cd notes-app- -
Install dependencies
npm install
-
Start the backend server (in one terminal)
node server.js
The server will run on
http://localhost:5000 -
Start the React app (in another terminal)
npm start
The app will open in your browser at
http://localhost:3000
- Click the "+ New Note" button in the sidebar
- Write your content using Markdown syntax in the editor
- Add an optional tag for organization
- Click " Save Note" to persist your note
- Use the search bar at the top of the sidebar
- Search works across note titles and tags
- Results update in real-time as you type
- Click the β button to clear the search
- Click the theme toggle button (π/βοΈ) in the top-right corner
- Your preference is automatically saved
- Theme persists across browser sessions
- Click on any note in the sidebar to load it
- Make your changes in the editor
- Save to update the note
- Click the (trash) icon on any note card
- Confirm the deletion in the dialog
- Click " Export" in the sidebar
- All notes are downloaded as a timestamped JSON file
- Useful for backup or migration purposes
- Notes are automatically backed up to localStorage
- If the server is unavailable, you can still:
- View existing notes
- Create new notes (saved locally)
- Edit and delete notes
- Changes sync automatically when connection is restored
- Description: Retrieve all notes
- Response: Array of note objects
- Example:
GET http://localhost:5000/notes
- Description: Create a new note
- Request Body:
{ "markdown": "# My Note\nContent here", "tag": "important" } - Response: Created note object with ID and timestamp
- Example:
POST http://localhost:5000/notes
- Description: Delete a note by ID
- Response: Success message or 404 if not found
- Example:
DELETE http://localhost:5000/notes/1
notes-app/
βββ public/
β βββ index.html # Main HTML file for React app
βββ src/
β βββ components/
β β βββ SearchBar.js # Search component
β β βββ SearchBar.css # Search styles
β β βββ ThemeToggle.js # Dark mode toggle
β β βββ ThemeToggle.css # Theme toggle styles
β βββ utils/
β β βββ localStorage.js # LocalStorage utilities
β βββ App.js # Main React component
β βββ App.css # App styles with theme support
β βββ index.js # React app entry point
β βββ index.css # Global styles
βββ server.js # Express.js backend server
βββ package.json # Project dependencies and scripts
βββ README.md # This file
βββ LICENSE # MIT License
βββ .gitignore # Git ignore rules
βββ package-lock.json # Dependency lock file
The editor supports standard Markdown syntax:
- Headers:
# H1,## H2,### H3 - Bold:
**bold text** - Italic:
*italic text* - Lists:
- itemor1. item - Links:
[text](url) - Code:
`inline code`or```code block``` - Quotes:
> quote - And more!
- React 18.2.0 - UI library
- react-markdown 10.1.0 - Markdown rendering
- CSS3 - Modern styling with CSS variables for theming
- Express.js 4.22.1 - Web framework
- CORS 2.8.5 - Cross-origin resource sharing
- In-memory storage (server-side)
- LocalStorage (client-side backup)
Deploy the Express server to platforms like:
- Heroku
- Railway
- Render
- Vercel
Important: Update the API endpoint in App.js from http://localhost:5000 to your deployed backend URL.
- Build the production version:
npm run build
- Deploy the
buildfolder to:- Vercel
- Netlify
- GitHub Pages
- Any static hosting service
If port 5000 is already in use, modify server.js:
const PORT = process.env.PORT || 5001; // Change to any available portEnsure the backend CORS configuration includes your frontend URL:
app.use(cors({
origin: 'http://localhost:3000' // or your deployed frontend URL
}));- Check that the backend server is running
- Verify the API endpoint URL in
App.js - Check browser console for error messages
- Notes should still be available in localStorage as backup
- Ensure localStorage is enabled in your browser
- Check browser privacy settings
- Clear cache and try again
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
chetx27
- GitHub: @chetx27