Skip to content

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

Notifications You must be signed in to change notification settings

prasannavb/ContactBook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Contact List Application

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.


Table of Contents

  1. Features
  2. Demo
  3. Tech Stack
  4. Folder Structure
  5. Database Schema
  6. API Routes

Demo

The demo of the website link

Features

User Authentication:

  • Login: Existing users can securely log in to their accounts.
  • Signup: New users can register by providing the required details.

Contact Management:

  • 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 and Filters:

  • Search for contacts using various criteria, such as name, phone number, or designation.
  • Use filters to narrow down contact searches based on specific fields.

Archive Management:

  • View recently deleted contacts in an archive.
  • Users can restore the contacts back from archive
  • Users can permanantely delete the contacts in archive

Design and Usability:

  • A clean, responsive user interface designed for simplicity and efficiency.

Dockerized Hosting:

  • The application is fully containerized using Docker for easy deployment and scalability.

Tech Stack

Frontend:

  • React (Vite): For a fast and modern frontend experience.
  • CSS: Responsive styling for an intuitive user interface.

Backend:

  • Go (Gin): For a fast and robust backend API.
  • GORM: ORM for database interaction.

Database:

  • PostgreSQL: A reliable relational database for storing contacts and user information.

Folder Structure

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

Database Schema

User

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"`
}

Contacts

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"`
}

Archive Contacts

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"`
}

API Routes

Authentication

  • POST /login:Login to existing account
  • POST /signup:Register as a new user

Contacts

  • POST /addcontactAdd a new contact
  • GET /getcontacts/:userIdFetch all exisiting contacts of that user
  • PUT /updatecontact Update contact details
  • DELETE /deletecontact/:id Delete a contact
  • GET /archivecontacts/:userId Fetch all contacts from archive
  • POST /restorecontact Restore the contacts from archive
  • DELETE /deletearchivecontact/:id Permanantely delete a contact from archive

Copyright ©2024 All rights reserved |Designed by Prasanna V B

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published