A simple and responsive phone book application built using the MERN (MongoDB, Express, React, Node.js) stack. This project allows users to manage their contacts by adding, updating, and deleting phone numbers.
- Add new contacts with name and phone number
- View all contacts in a table format
- Edit existing contacts
- Delete contacts
- Responsive design with a stylish UI
- MongoDB: Database for storing contact information
- Express: Backend framework for handling HTTP requests
- React: Frontend library for building the user interface
- Node.js: Runtime environment for the backend
- Axios: HTTP client for making API requests
- Mongoose: ODM library for MongoDB and Node.js
frontend/: Contains the React applicationsrc/App.js: Main component with all the functionality
backend/: Contains the Express serverindex.js: Server setup and API routesmodel/phonebook.js: Mongoose schema for the phone book
-
Clone the repository:
https://github.com/venky-1710/PhoneBook-MERN-Stack.git cd phone-book-mern -
Install dependencies for backend:
cd server npm install -
Install dependencies for frontend:
cd ../client npm install -
Set up MongoDB connection string in
server/index.js: Replace thedbvariable with your MongoDB connection string. -
Run the backend server:
cd ../server node index.js -
In a new terminal, run the React development server:
cd ../client npm start -
Open your browser and navigate to
http://localhost:3000
- POST
/add-phone: Add a new contact - GET
/get-phone: Retrieve all contacts - PATCH
/update-phone/:id: Update a contact - DELETE
/delete-phone/:id: Delete a contact
- Implement user authentication
- Add search and filter functionality
- Improve error handling and validation
- Enhance UI/UX with animations and transitions
Contributions, issues, and feature requests are welcome. Feel free to check issues page if you want to contribute.