NoteNexus is a note-taking application built using Node.js, Express, MongoDB, and EJS, with additional support for guest access, authentication, and a clean user interface.
This web application is live. Click here
- User Registration & Login: Secure authentication using JWT with bcrypt password hashing.
- Guest Access: Allows temporary guest users to explore the app.
- CRUD Operations: Users can create, view, edit, and delete notes.
- Search & Filtering: Full-text search based on note title.
- Notes Management: Archive, delete, and restore notes.
- Responsive UI: Built with Tailwind CSS for a mobile-first design.
- Error Handling: Comprehensive error handling with proper HTTP status codes.
- Secure Cookies: Tokens are stored in cookies with secure attributes in production.
- Backend: Node.js, Express.js, MongoDB, JWT, bcrypt
- Templating: EJS
- Frontend: Tailwind CSS
- Validation: Zod
- Session Management: Cookies, JWT
- nanoid: For unique slug generation.
- dotenv: For environment configuration.
- node-cron: For scheduling automated tasks like deleting inactive users.
Ensure you have the following installed:
- Node.js (v16+)
- MongoDB
-
Clone this repository:
git clone https://github.com/mk-manishkumar/NoteNexus.git cd note-taking-app
-
Install the dependencies:
npm install
-
Set up environment variables:
- Create a
.env
file in the root directory, or copy from.env.sample
:cp .env.sample .env
- Fill in the required environment variables (see Environment Variables).
- Create a
-
Start the development server:
npm run dev
- Run MongoDB on your machine (or use MongoDB Atlas).
- Use the following commands to start the app:
npm run dev
- Open your browser and go to
http://localhost:3000
.
Variable | Description | Example Value |
---|---|---|
JWT_SECRET |
Secret for user JWT tokens | yourJWTSecret |
GUEST_JWT_SECRET |
Secret for guest JWT tokens | yourGuestJWTSecret |
MONGO_URI |
MongoDB connection string | mongodb://localhost/noteApp |
NODE_ENV |
Environment (development/production) | development |
PORT |
Port for running the application | 3000 |
├── config/ # Configuration files
├── controllers/ # Controllers for handling routes
├── middleware/ # Custom middleware functions
├── models/ # Mongoose schemas and models
├── public/ # Static files (CSS, JS, images)
├── routes/ # Route definitions
├── src/ # Tailwind build
├── utils/ # Utility functions and helpers
├── views/ # EJS templates
├── .env.sample # Environment variables example
└── server.js # Main server file
While this application is fully functional, some possible future enhancements include:
- Adding a Rich Text Editor for note creation.
- Integrating OAuth for social login options.
- Expanding the guest functionality to retain notes temporarily.
This project is open source and available under the MIT License.
- Twitter - Manish Kumar
- Email - manish.login01@gmail.com