This is the frontend for the Contacts Management App, providing a simple user interface to add, edit, delete, and view contacts. It connects to the Django backend API running on port 8000.
- Frontend Port:
5500(e.g., served via Live Server) - Backend API URL:
http://127.0.0.1:8000/contacts/ - Frontend URL:
http://127.0.0.1:5500/Contacts_front_end/index.html - Backend Repository: (Backend GitHub Link is here: )
832301327_contacts_frontend/
├── src/ # Source code directory
│ ├── index.html # Main page
│ ├── style.css # Stylesheet
│ └── script.js # JavaScript logic for API calls and DOM updates
├── README.md # Project guidance
├── codestyle.md # Coding standards
└── LICENSE # License file
-
Ensure Backend is Running
- Run the Django backend at http://127.0.0.1:8000
- Make sure
django-cors-headersis installed and configured
-
Open Frontend
- Open
index.htmldirectly, or use a local server:- In VS Code → Right-click → “Open with Live Server”
- Or run any static server on port
5500
- Open
-
Access the App
- Add new contact (name, email, phone)
- Edit existing contact
- Delete contact
- View all contacts (list fetched from Django API)
| Action | Method | Endpoint |
|---|---|---|
| Get all contacts | GET |
/contacts/ |
| Create contact | POST |
/contacts/ |
| Update contact | PUT |
/contacts/<id>/ |
| Delete contact | DELETE |
/contacts/<id>/ |
- HTML5, CSS3, JavaScript (ES6)
- Fetch API for HTTP requests
- Django REST Framework backend
- Data doesn’t load: Check that Django is running on port
8000 - CORS error: Ensure
django-cors-headersis enabled andhttp://127.0.0.1:5500is inCORS_ALLOWED_ORIGINS - Port conflict: Make sure no other app is using port
5500or8000
This project is open source under the MIT License.