Effortlessly manage your contacts with our simple and sleek Contact Management App. Add, edit, and organize your contacts in one place with a beautiful UI and robust backend.
This app is your go-to solution for managing contacts efficiently. It lets you:
- Add new contacts with details like name, email, phone, company, and job title.
- Edit existing contacts with just a click.
- Delete contacts you no longer need.
It’s built using modern web technologies for a fast, reliable, and responsive experience.
- Frontend: React.js + Material-UI
- Backend: Node.js + Express.js
- Database: MongoDB
- API Communication: Axios
Here’s how to set it up:
Make sure you have the following installed:
- Node.js (v16+)
- MongoDB (running locally or on the cloud)
- npm (or yarn)
-
Navigate to the
frontendfolder:cd frontend -
Install the required packages:
npm install
-
Add an environment file: Create a
.envfile in thefrontendfolder and add:REACT_APP_API_URL=http://localhost:5000/api
-
Start the React app:
npm start
🎉 Open your browser and visit http://localhost:3000 to see the app live.
-
Navigate to the
backendfolder:cd backend -
Install backend dependencies:
npm install
-
Add another environment file: Create a
.envfile in thebackendfolder and add:PORT=5000 MONGO_URI=mongodb://localhost:27017/contact-manager
-
Start the backend server:
node server.js
🚀 The backend is now running at http://localhost:5000.
We keep things clean and simple. Here’s the structure of a contact in our database:
| Field | Type | Description |
|---|---|---|
| firstName | String | The contact's first name |
| lastName | String | The contact's last name |
| String | Unique email address | |
| phone | String | Contact phone number |
| company | String | Company name |
| jobTitle | String | Job title |
- React for the UI: It’s fast, component-based, and makes building dynamic interfaces a breeze.
- Material-UI: Styled components save time and ensure a polished look.
- Node.js + Express for APIs: It’s lightweight and great for building RESTful APIs.
- MongoDB for the Database: Perfect for storing JSON-like data and scaling as the app grows.
- Frontend: Displays your contacts in a user-friendly table. You can add, edit, or delete contacts using simple forms.
- Backend: Handles requests to fetch, save, update, or delete contact data.
- Database: Stores your contacts and ensures data consistency.
- Validation Everywhere: We made sure data is validated on both the frontend and backend to avoid errors.
- Preventing Duplicate Emails: Added a unique constraint in the database schema for emails.
- Error Feedback: Errors are caught and shown to users in an understandable way.
We built this to simplify contact management while learning and implementing modern web technologies. Let us know if you have ideas for improvements!