A secure and scalable REST API for the iNoteBook application. This backend provides user authentication, note management, and MongoDB database integration using Node.js and Express.js.
- π User Authentication (JWT)
- π€ User Registration & Login
- π Create Notes
- π Read Notes
- βοΈ Update Notes
- ποΈ Delete Notes
- π‘οΈ Protected Routes
- π RESTful API Architecture
- π¦ MongoDB Database Integration
- Node.js
- Express.js
- MongoDB
- Mongoose
- JWT Authentication
- bcrypt.js
- dotenv
backend/
βββ bin/
βββ middleware/
βββ models/
βββ routes/
βββ db.js
βββ app.js
βββ package.json
βββ .env
git clone https://github.com/CodeWithMSami/iNoteBook-Backend.git
cd iNoteBook-Backendnpm installCreate a .env file in the root directory:
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
PORT=3000Development:
npm run devProduction:
npm start| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/createuser |
Register a new user |
| POST | /api/auth/login |
Login user |
| POST | /api/auth/getuser |
Get authenticated user |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/notes/fetchallnotes |
Fetch all notes |
| POST | /api/notes/addnote |
Create note |
| PUT | /api/notes/updatenote/:id |
Update note |
| DELETE | /api/notes/deletenote/:id |
Delete note |
Protected routes require a valid JWT token in the request header:
auth-token: YOUR_JWT_TOKEN- Email Verification
- Password Reset
- Note Categories
- File Attachments
- Rate Limiting
- API Documentation
Contributions are welcome. Feel free to fork the repository, create a feature branch, and submit a pull request.
This project is licensed under the MIT License.
Developed with β€οΈ by CodeWithMSami