Skip to content

Latest commit

Β 

History

History
153 lines (118 loc) Β· 3.45 KB

File metadata and controls

153 lines (118 loc) Β· 3.45 KB

πŸ“ Notes Maker Application

A full-stack notes application built with the MERN stack (MongoDB, Express.js, React, Node.js).

Features

  • ✨ Create, Read, Update, and Delete notes
  • 🏷️ Categorize notes (General, Work, Personal, Ideas, Todo)
  • πŸ“± Responsive design
  • 🎨 Beautiful gradient UI
  • ⚑ Real-time updates
  • πŸ—‚οΈ Sort notes by last updated

Tech Stack

Frontend:

  • React 18
  • Axios for API calls
  • CSS3 with modern styling

Backend:

  • Node.js
  • Express.js
  • MongoDB with Mongoose
  • CORS enabled

Prerequisites

Before running this application, make sure you have the following installed:

  • Node.js (v14 or higher)
  • MongoDB (running locally or MongoDB Atlas URI)
  • npm or yarn

Installation

1. Clone or navigate to the project directory

cd notes-app

2. Setup Backend

cd backend
npm install

Create a .env file in the backend directory (already created with default values):

PORT=5000
MONGODB_URI=mongodb://localhost:27017/notesapp

Note: If you're using MongoDB Atlas, replace the MONGODB_URI with your Atlas connection string.

3. Setup Frontend

cd ../frontend
npm install

Running the Application

1. Start MongoDB

Make sure MongoDB is running on your system:

# If using local MongoDB
mongod

Or ensure your MongoDB Atlas cluster is accessible.

2. Start the Backend Server

cd backend
npm start
# Or for development with auto-restart:
npm run dev

The backend server will run on http://localhost:5000

3. Start the Frontend

Open a new terminal window:

cd frontend
npm start

The React app will run on http://localhost:3000 and automatically open in your browser.

API Endpoints

Method Endpoint Description
GET /api/notes Get all notes
GET /api/notes/:id Get a single note
POST /api/notes Create a new note
PUT /api/notes/:id Update a note
DELETE /api/notes/:id Delete a note

Project Structure

NoteMaker/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ models/
β”‚   β”‚   └── Note.js          # Mongoose Note model
β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   └── notes.js         # API routes
β”‚   β”œβ”€β”€ .env                 # Environment variables
β”‚   β”œβ”€β”€ server.js            # Express server setup
β”‚   └── package.json
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ public/
β”‚   β”‚   └── index.html
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   β”œβ”€β”€ NoteForm.js
β”‚   β”‚   β”‚   β”œβ”€β”€ NoteForm.css
β”‚   β”‚   β”‚   β”œβ”€β”€ NoteList.js
β”‚   β”‚   β”‚   β”œβ”€β”€ NoteList.css
β”‚   β”‚   β”‚   β”œβ”€β”€ NoteItem.js
β”‚   β”‚   β”‚   └── NoteItem.css
β”‚   β”‚   β”œβ”€β”€ App.js
β”‚   β”‚   β”œβ”€β”€ App.css
β”‚   β”‚   β”œβ”€β”€ index.js
β”‚   β”‚   └── index.css
β”‚   └── package.json
└── README.md

Usage

  1. Create a Note: Fill in the title, select a category, write your content, and click "Add Note"
  2. Edit a Note: Click the "Edit" button on any note card, modify the content, and click "Update Note"
  3. Delete a Note: Click the "Delete" button on any note card and confirm the deletion
  4. View Notes: All notes are displayed in a grid layout, sorted by last updated time

Future Enhancements

  • πŸ” Search functionality
  • 🏷️ Tags support
  • πŸ“Ž File attachments
  • πŸ‘€ User authentication
  • πŸŒ™ Dark mode
  • πŸ“€ Export notes
  • ☁️ Cloud sync