A modern, full-stack note-taking application built with React and Node.js. Memora allows you to create, read, update, and delete notes with a beautiful and intuitive user interface.
Try Memora now: https://memora-zepx.onrender.com/
- β¨ Modern UI/UX - Built with React and styled using TailwindCSS and DaisyUI
- π± Responsive Design - Works seamlessly on desktop and mobile devices
- π Rate Limiting - Built-in rate limiting using Upstash Redis for API protection
- β‘ Fast Performance - Optimized with Vite for lightning-fast development and builds
- ποΈ MongoDB Integration - Persistent data storage with MongoDB and Mongoose
- π― CRUD Operations - Full Create, Read, Update, Delete functionality for notes
- π¦ Error Handling - Comprehensive error handling with user-friendly notifications
- π Hot Reload - Development server with hot module replacement
- π Deployed on Render - Live production deployment
- React 19 - Modern JavaScript library for building user interfaces
- Vite - Next-generation frontend tooling
- TailwindCSS - Utility-first CSS framework
- DaisyUI - Beautiful UI components for TailwindCSS
- React Router - Declarative routing for React
- Axios - Promise-based HTTP client
- React Hot Toast - Beautiful toast notifications
- Lucide React - Beautiful & consistent icons
- Node.js - JavaScript runtime environment
- Express.js - Fast, unopinionated web framework
- MongoDB - NoSQL database
- Mongoose - MongoDB object modeling
- Upstash Redis - Serverless Redis for rate limiting
- CORS - Cross-origin resource sharing
- dotenv - Environment variable management
- Render - Cloud platform for hosting the application
- MongoDB Atlas - Cloud database service
Before running this application locally, make sure you have the following installed:
- Node.js (v14 or higher)
- npm or yarn
- MongoDB (local installation or MongoDB Atlas)
- Redis (Upstash Redis account for rate limiting)
-
Clone the repository
git clone https://github.com/yourusername/memora.git cd memora -
Install dependencies for both frontend and backend
npm run build
Or install manually:
# Install backend dependencies cd backend npm install # Install frontend dependencies cd ../frontend npm install # Return to root directory cd ..
-
Environment Setup
Create a
.envfile in thebackenddirectory with your configuration. See the Environment Variables section below for detailed setup instructions. -
Database Setup
- Make sure MongoDB is running on your system
- The application will automatically create the database and collections on first run
Create a .env file in the backend directory and configure the following variables:
# MongoDB Connection (Local)
MONGO_URL=mongodb://localhost:27017/memora
# Server Configuration
PORT=5001
NODE_ENV=development
# Upstash Redis Configuration (Required for rate limiting)
UPSTASH_REDIS_REST_URL=https://your-redis-instance.upstash.io
UPSTASH_REDIS_REST_TOKEN=your_upstash_redis_token# MongoDB Atlas Connection
MONGO_URL=mongodb+srv://username:password@cluster0.xxxxx.mongodb.net/memora?retryWrites=true&w=majority
# Server Configuration
PORT=5001
NODE_ENV=production
# Upstash Redis Configuration
UPSTASH_REDIS_REST_URL=https://your-redis-instance.upstash.io
UPSTASH_REDIS_REST_TOKEN=your_upstash_redis_token- Go to MongoDB Atlas
- Create a free account and cluster
- Create a database user with read/write permissions
- Whitelist your IP address (or use 0.0.0.0/0 for all IPs in development)
- Get your connection string from "Connect" β "Connect your application"
- Go to Upstash Console
- Create a free account
- Create a new Redis database
- Copy the REST URL and Token from the database details page
If you prefer local MongoDB:
- Install MongoDB locally
- Start MongoDB service
- Use
MONGO_URL=mongodb://localhost:27017/memora
-
Start the backend server
cd backend npm run devThe backend will run on
http://localhost:5001 -
Start the frontend development server
cd frontend npm run devThe frontend will run on
http://localhost:5173
-
Build the frontend
cd frontend npm run build -
Start the production server
npm start
The application will be available at
http://localhost:5001
memora/
βββ backend/
β βββ src/
β β βββ config/
β β β βββ db.js # MongoDB connection
β β β βββ upstash.js # Upstash Redis configuration
β β βββ controllers/
β β β βββ notesController.js # Notes CRUD operations
β β βββ middleware/
β β β βββ rateLimiter.js # Rate limiting middleware
β β βββ models/
β β β βββ Note.js # Note schema
β β βββ router/
β β β βββ notesRouter.js # API routes
β β βββ server.js # Express server setup
β βββ package.json
β βββ .env # Environment variables
βββ frontend/
β βββ src/
β β βββ components/
β β β βββ Navbar.jsx
β β β βββ NoteCard.jsx
β β β βββ NotesNotFound.jsx
β β β βββ RateLimitedUI.jsx
β β βββ pages/
β β β βββ HomePage.jsx
β β β βββ CreatePage.jsx
β β β βββ NoteDetailPage.jsx
β β βββ lib/
β β β βββ axios.js # Axios configuration
β β βββ App.jsx
β β βββ main.jsx
β βββ index.html
β βββ package.json
β βββ vite.config.js
β βββ tailwind.config.js
β βββ postcss.config.js
βββ package.json
βββ .gitignore
βββ .env.example # Environment variables template
βββ README.md
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/notes |
Get all notes |
| POST | /api/notes |
Create a new note |
| GET | /api/notes/:id |
Get a specific note |
| PUT | /api/notes/:id |
Update a specific note |
| DELETE | /api/notes/:id |
Delete a specific note |
- Creating Notes: Click the "+" button or navigate to
/createto add new notes - Viewing Notes: All notes are displayed on the home page in a responsive grid
- Editing Notes: Click on any note card to view and edit the note
- Deleting Notes: Use the delete button on note cards to remove notes
- Rate Limiting: The app includes built-in rate limiting to prevent API abuse
The application is deployed on Render and can be accessed at: https://memora-zepx.onrender.com/
- Platform: Render
- Database: MongoDB Atlas
- Redis: Upstash Redis
- Build Command:
npm run build - Start Command:
npm start
- Fork this repository
- Create accounts for MongoDB Atlas and Upstash Redis
- Set up your environment variables in your deployment platform
- Deploy to your preferred platform (Render, Vercel, Heroku, etc.)
- Fork the project
- 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
-
MongoDB Connection Error
- Verify your MongoDB URL is correct
- Check if MongoDB service is running (for local setup)
- Ensure IP whitelist includes your IP (for Atlas)
-
Rate Limiting Not Working
- Verify Upstash Redis credentials
- Check if Redis instance is active
-
Frontend Not Loading
- Make sure backend is running on the correct port
- Check CORS configuration for development
-
Render Deployment Issues
- Ensure all environment variables are set in Render dashboard
- Check build and start commands are correct
Created with β€οΈ by Gurjap Singh
Happy Note-Taking! πβ¨
π Live Demo: https://memora-zepx.onrender.com/
