Pocket Notes Application Overview Pocket Notes is a simple note-taking application built using Node.js, Express.js, Passport.js for authentication, and MongoDB Atlas for database storage. This application implements CRUD (Create, Read, Update, Delete) operations to manage user notes.
Features User Authentication: Passport.js is used for user authentication, providing a secure and seamless login experience. CRUD Operations: Implemented Create, Read, Update, and Delete operations for managing user notes. MongoDB Atlas Integration: MongoDB Atlas is used as the database to store user notes securely in the cloud. Clean Coding Practices: Followed clean coding patterns to ensure readability, maintainability, and scalability of the codebase. RESTful APIs: Designed and implemented RESTful APIs to provide a standard interface for interacting with the application. Installation Clone the repository:
bash Copy code git clone https://github.com/Sans25VS/Pocket-Notes-Assignment Navigate to the project directory:
bash Copy code cd pocket-notes Install dependencies:
bash Copy code npm install Set up environment variables:
Create a .env file in the root directory. Define the following variables: makefile Copy code PORT=3000 MONGODB_URI=your_mongodb_atlas_connection_uri SESSION_SECRET=your_session_secret Start the server:
bash Copy code npm start Access the application at http://localhost:5000.
API Endpoints GET /notes: Retrieve all notes for the authenticated user. POST /notes: Create a new note. GET /notes/:id: Retrieve a specific note by ID. PUT /notes/:id: Update a specific note by ID. DELETE /notes/:id: Delete a specific note by ID. Authentication POST /register: Register a new user. POST /login: Login with existing credentials. GET /logout: Logout the current user. Dependencies express: ^4.17.1 mongoose: ^5.13.14 passport: ^0.4.1 passport-local: ^1.0.0 Development Dependencies nodemon: ^2.0.15 Contributing Contributions are welcome! Feel free to submit pull requests or open issues for any improvements or bug fixes.
License This project is licensed under the MIT License.
Feel free to modify and add more sections as needed. This README provides a basic structure to get started with your Pocket Notes application.