A full-stack web application for creating and managing personal notes, built with the MERN stack (MongoDB, Express, React, Node.js) and TypeScript.
- 🔐 User authentication with secure sessions
- 📝 Create, read, update, and delete notes
- 🎨 Clean and responsive UI using Bootstrap
- 🔒 Protected routes and API endpoints
- ⚡ Real-time updates
- 🌐 Client-side routing
- 🛡️ Type safety with TypeScript
- React
- TypeScript
- React Bootstrap for UI components
- React Hook Form for form handling
- CSS Modules for styling
- Node.js
- Express.js
- TypeScript
- MongoDB with Mongoose
- express-session for authentication
- bcrypt for password hashing
- envalid for environment validation
- Node.js (v14 or higher)
- MongoDB Atlas account
- npm or yarn
-
Clone the repository
git clone https://github.com/claudiaaziz/NoteIt.git cd NoteIt
-
Install dependencies for both frontend and backend
# Install backend dependencies cd backend npm install # Install frontend dependencies cd ../frontend npm install
-
Create a
.env
file in the backend directory with the following variables:MONGO_CONNECTION_STRING=your_mongodb_connection_string PORT=5000 SESSION_SECRET=your_session_secret
-
Start the development servers
In the backend directory:
npm run dev
In the frontend directory:
npm start
The app will be available at
http://localhost:3000
- User registration and login
- Session-based authentication
- Protected routes
- Secure password hashing
- Create new notes
- View all notes
- Update existing notes
- Delete notes
- Notes are private to each user
- Responsive design
- Loading states
- Error handling
- Form validation
- Clean and intuitive interface
POST /api/users/signup
- Register a new userPOST /api/users/login
- Login userGET /api/users
- Get current userPOST /api/users/logout
- Logout user
GET /api/notes
- Get all notes for current userPOST /api/notes
- Create a new noteGET /api/notes/:noteId
- Get a specific notePATCH /api/notes/:noteId
- Update a noteDELETE /api/notes/:noteId
- Delete a note