A full-stack Note-Taking Web App built with Node.js, Express, MongoDB, and EJS, featuring Google OAuth login, session-based access, and a responsive UI.
- 🔐 Google OAuth Authentication (via Passport.js)
- 🗒️ Create, Edit, and Delete Notes
- 🔍 Search notes by title or content
- 📃 Pagination support
- 🧠 EJS templating with Bootstrap 5 layout
- 💾 Session storage with MongoDB using connect-mongo
- ❌ Custom 404 error page
- 🧩 Dynamic layout switching based on login status
| Layer | Technology |
|---|---|
| Frontend | EJS, Bootstrap 5, Custom CSS |
| Backend | Node.js, Express.js |
| Auth | Passport.js (Google OAuth 2.0) |
| Database | MongoDB + Mongoose |
| Session Store | express-session + connect-mongo |
git clone https://github.com/laxman-goud/notes-app.git
cd notes-appnpm installCreate a .env file in the root directory using the provided .env.example:
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GOOGLE_CALLBACK_URL=http://localhost:5000/google/callback
MONGO_URI=your_mongodb_connection_string
SESSION_SECRET=your_session_secretnpm run devVisit: http://localhost:5000
notes-app/
├── app.js # Entry point
├── .env.example # Sample environment variables
├── public/ # Static files (CSS, images)
├── server/
│ ├── config/ # DB connection
│ ├── controllers/ # Route handlers
│ ├── middleware/ # Authentication middleware
│ ├── models/ # Mongoose models
│ └── routes/ # Express routes
├── views/ # EJS templates
│ ├── layouts/ # Layout templates
│ ├── partials/ # Header/Footer includes
│ ├── dashboard/ # Dashboard views
│ └── 404.ejs # Custom 404 page
You can deploy this app on:
- Render
- Vercel (for frontend only + API)
- Heroku
Make sure to update your .env GOOGLE_CALLBACK_URL to match your deployed URL (e.g. https://yourapp.onrender.com/google/callback).
Contributions are welcome! 🎉
Feel free to fork this project, open an issue, or submit a pull request with your improvements.
Please make sure your changes are clear, concise, and follow the contributing guidelines.
Made with ❤️ by Laxman Goud