Welcome to the Contact List Application, a user-friendly platform that allows you to manage and organize your contacts effortlessly. This application offers features like user authentication, adding and managing contacts, viewing archived (recently deleted) contacts,restoring contacts from archive and searching through contacts with various filters.
The demo of the website link
- Login: Existing users can securely log in to their accounts.
- Signup: New users can register by providing the required details.
- Add, edit, and delete contacts with details such as name, phone number, email, address, designation, and more.
- View a list of all saved contacts in a user-friendly format.
- Search for contacts using various criteria, such as name, phone number, or designation.
- Use filters to narrow down contact searches based on specific fields.
- View recently deleted contacts in an archive.
- Users can restore the contacts back from archive
- Users can permanantely delete the contacts in archive
- A clean, responsive user interface designed for simplicity and efficiency.
- The application is fully containerized using Docker for easy deployment and scalability.
- React (Vite): For a fast and modern frontend experience.
- CSS: Responsive styling for an intuitive user interface.
- Go (Gin): For a fast and robust backend API.
- GORM: ORM for database interaction.
- PostgreSQL: A reliable relational database for storing contacts and user information.
project-root/
├── Frontend/ # Frontend React application
│ ├── src/ # React source code
│ ├── public/ # Static assets
│ ├── package.json # Client-side dependencies
│ ├── Dockerfile # Dockerfile for Frontend
├── Backend/ # Backend Go application
│ ├── controllers/ # API route handlers
│ ├── models/ # Database models (GORM)
│ ├── database/ # Database connection configuration
│ │ └── connection.go # Database connection setup
│ ├── main.go # Application entry point
│ ├── go.mod # Backend dependencies
│ ├── Dockerfile # Dockerfile for Backend
│ └── .env # Backend environment variables
└── README.md # Documentation
type User struct {
ID uuid.UUID `gorm:"type:uuid;default:uuid_generate_v4();primaryKey" json:"id"`
Name string `json:"name"`
Email string `gorm:"unique" json:"email"`
Password string `json:"password"`
}
type Contact struct {
ID uuid.UUID `gorm:"type:uuid;default:uuid_generate_v4();primaryKey" json:"id"`
UserID uuid.UUID `gorm:"type:uuid;not null;index" json:"userid"`
ContactName string `json:"contactname"`
ContactEmail string `gorm:"unique" json:"contactemail"`
ContactPhoneNumber string `gorm:"unique" json:"contactphonenumber"`
Address string `json:"address"`
Designation string `json:"designation"`
ReportingManager string `json:"reporting_manager"`
}
type ArchiveContact struct {
ID uuid.UUID `json:"id"`
UserID uuid.UUID `json:"userid"`
ContactName string `json:"contactname"`
ContactEmail string `json:"contactemail"`
ContactPhoneNumber string `json:"contactphonenumber"`
Address string `json:"address"`
Designation string `json:"designation"`
ReportingManager string `json:"reporting_manager"`
}
POST /login
:Login to existing accountPOST /signup
:Register as a new user
POST /addcontact
Add a new contactGET /getcontacts/:userId
Fetch all exisiting contacts of that userPUT /updatecontact
Update contact detailsDELETE /deletecontact/:id
Delete a contactGET /archivecontacts/:userId
Fetch all contacts from archivePOST /restorecontact
Restore the contacts from archiveDELETE /deletearchivecontact/:id
Permanantely delete a contact from archive