Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ammar027/inotes
https://github.com/ammar027/inotes
mern mongodb mongoose nodejs
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/ammar027/inotes
- Owner: ammar027
- Created: 2024-08-25T11:37:44.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2024-09-11T17:40:36.000Z (3 months ago)
- Last Synced: 2024-09-12T01:42:58.127Z (3 months ago)
- Topics: mern, mongodb, mongoose, nodejs
- Language: JavaScript
- Homepage: https://ammars-inotes.vercel.app/
- Size: 1.93 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# iNotes - Cloud-based Note Taking App
iNotes is a simple, secure, and cloud-based note-taking app where users can create, update, and delete their notes. It provides a responsive interface with light/dark theme support, user authentication, and notes stored securely in the cloud.
## Features
- **User Authentication:** Login and Signup functionality.
- **JWT Authentication:** Secure access to resources using JSON Web Tokens.
- **Notes Management:** Add, update, delete, and view notes.
- **Responsive Design:** Mobile-friendly UI with Bootstrap.
- **Theme Support:** Switch between light, dark, and system-based themes.
- **RESTful API:** Backend built with Express.js and MongoDB.
## Tech Stack### Frontend:
- **React.js:** A JavaScript library for building user interfaces.
- **React Router DOM:** For routing between pages.
- **Axios:** For making HTTP requests.
- **FontAwesome:** For icons and visual elements.
- **Bootstrap:** For responsive layout and styling.
### Backend:
- **Node.js**: A JavaScript runtime environment for building the backend.
- **Express.js**: A lightweight web framework for handling routes and requests.
- **MongoDB Atlas**: Cloud database for storing users and notes.
- **JWT (JSON Web Token)**: For secure authentication.### Deployment:
- **Frontend**: Vercel.
- **Backend**: Render (or other deployment platform supporting Node.js).## Installation and Setup
1. **Clone the repository:**
```bash
git clone https://github.com/ammar027/inotes.git
cd inotes2. **Setup Backend:**
- Create a `.env` file in the `backend/` folder.
- Add the following environment variables:```env
MONGO_URI="mongodb+srv://:@/?retryWrites=true&w=majority"
JWT_SECRET="your_jwt_secret_key"
```- Install backend dependencies and start the server:
```bash
cd backend
npm install
npm start
```3. **Setup Frontend:**
- Go to the root directory of the project and install frontend dependencies:
```bash
cd ../
npm install
```- Start the React frontend development server:
```bash
npm start
```4. **Run Backend and Frontend Together:**
To run both the backend and frontend together, use the following command:
```bash
npm run both
```This will run the backend on `http://localhost:5000` and the frontend on `http://localhost:3000`.
## Environment Variables
| Key | Description |
| --------------- | ----------------------------------------- |
| `MONGO_URI` | MongoDB connection string |
| `JWT_SECRET` | Secret key for JWT authentication |## API Endpoints
| Method | Endpoint | Description |
| ------ | ---------------------- | ------------------------------------- |
| GET | `/api/notes/fetchallnotes` | Fetch all notes for authenticated user |
| POST | `/api/notes/addnote` | Add a new note |
| PUT | `/api/notes/updatenote/:id` | Update an existing note |
| DELETE | `/api/notes/deletenote/:id` | Delete a note |
| POST | `/api/auth/login` | Log in the user |
| POST | `/api/auth/createuser` | Create a new user |## Deployment
### Frontend Deployment on Vercel
1. Push the frontend code to a GitHub repository.
2. Go to [Vercel](https://vercel.com/) and connect the repository.
3. Add the necessary environment variables, such as API URLs.
4. Deploy the project.### Backend Deployment on Render
1. Push the backend code to a GitHub repository.
2. Go to [Render](https://render.com/) and connect the repository.
3. Set up a web service and add environment variables (e.g., `MONGO_URI`, `JWT_SECRET`).
4. Deploy the backend.## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.