This is a full-stack notes application built with Node.js for the backend and Angular for the frontend. It allows users to sign up, log in, add, edit, delete, and view notes. The backend server is built with Express.js and MongoDB, and the frontend is built with Angular and Tailwind CSS.
- Features
- Technologies Used
- Prerequisites
- Installation
- Running the Application
- API Endpoints
- Usage
- License
- User authentication with JWT
- Add, edit, delete, and view notes
- Search notes by title or content
- Forgot and reset password functionality
- Responsive design using Tailwind CSS
- Backend: Node.js, Express.js, MongoDB, Mongoose, JWT, Nodemailer
- Frontend: Angular, Tailwind CSS
- Authentication: JSON Web Tokens (JWT)
- Node.js (v14.x or later)
- Angular CLI (v18.x or later)
- MongoDB (local or remote instance)
-
Clone the repository:
git clone https://github.com/manthanank/notes-app.git cd notes-app/backend
-
Install dependencies:
npm install
-
Create a
.env
file in thebackend
directory with the following content:PORT=5000 MONGO_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret [email protected] EMAIL_PASS=your-email-password
-
Start the backend server:
npm start
-
Navigate to the frontend directory:
cd notes-app
-
Install dependencies:
npm install
-
Start the frontend server:
ng serve
- The backend server will run on
https://localhost:3000
. - The frontend server will run on
https://localhost:4200
.
- POST /api/auth/signup: Create a new user
- POST /api/auth/login: Authenticate a user and get a token
- POST /api/auth/forgot-password: Send password reset email
- POST /api/auth/reset-password/:token: Reset user password
- GET /api/notes: Get all notes for the authenticated user
- POST /api/notes: Add a new notes
- PUT /api/notes/:id: Update an existing notes
- DELETE /api/notes/:id: Delete an notes
- GET /api/notes/:id: Get an notes by ID
- GET /api/notes/search?query=keyword: Search notes by title or content
- Sign Up: Create a new account by navigating to the sign-up page.
- Log In: Log in with your credentials to access the notes app.
- Forgot Password: If you forget your password, use the forgot password link to reset it.
- Reset Password: Follow the instructions in the reset password email to set a new password.
- Add notes: Use the form to add a new notes.
- View Notes: View all notes on the home page.
- Edit notes: Click on an notes to edit its details.
- Delete notes: Click the delete button to remove an notes.
- Log Out: Click the log out button to log out of your account.
- Search notes: Use the search bar to search for notes by title.
This project is licensed under the MIT License. See the LICENSE file for details.