Skip to content

Latest commit

 

History

History
99 lines (70 loc) · 2.42 KB

File metadata and controls

99 lines (70 loc) · 2.42 KB

Contact Management Application

A full-stack contact management system with authentication, pagination, search, and role-based access control.

Features

  • JWT authentication with refresh tokens
  • Contact CRUD with photo upload
  • Server-side search (name/email) with 2-second debounce
  • Pagination and sorting
  • Role-based access control (Admin/User)
  • CSV export

Quick Start

Prerequisites

  • Docker & Docker Compose

Installation & Deployment

  1. Clone the repository:

    git clone https://github.com/HarshP4585/contactManagement
    cd contactManagement
  2. Configure environment variables:

    Edit the .env file in the project root:

    # Database
    DB_HOST=db
    DB_PORT=5432
    DB_USERNAME=postgres
    DB_PASSWORD=your_secure_password
    DB_DATABASE=contact_management
    
    # Ports
    BACKEND_PORT=3002
    FRONTEND_PORT=3001
    
    # JWT Secrets (generate strong secrets!)
    JWT_SECRET=your_jwt_secret_min_32_chars
    JWT_REFRESH_SECRET=your_refresh_secret_min_32_chars
    
    # Email (optional)
    EMAIL_ID=noreply@yourdomain.com
    # Your password from: https://myaccount.google.com/apppasswords
    EMAIL_PASSWORD=your_app_password
  3. Deploy:

    docker-compose up --build
  4. Access the application:

  5. Default admin credentials:

    • Email: admin@admin.com
    • Password: admin123

Stopping the Application

docker-compose down

Viewing Logs

docker-compose logs -f

Documentation

Screenshots

Home page

image

Admin home page

image

User home page

image

Theme toggle

image

Contact added email

image