Skip to content

shop2008/complaint-management

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Customer Complaint Management System

A full-stack web application for managing customer complaints with role-based access control.

Features

  • Complete CRUD operations for complaints
  • Role-based access control (Admin, Manager, Staff, Customer)
  • File attachments support
  • Real-time status updates
  • Customer feedback system
  • Responsive design

Tech Stack

Frontend

  • React with TypeScript
  • Tailwind CSS for styling
  • Firebase Authentication
  • Axios for API calls

Backend

  • Node.js with Express
  • TypeScript
  • MySQL database

Prerequisites

  • Node.js (v16 or higher)
  • MySQL (v8.0 or higher)
  • Firebase account
  • npm or yarn

Setup Instructions

Database Setup

  1. Create a MySQL database:
CREATE DATABASE ComplaintManagementDB;
  1. Run the schema file:
mysql -u your_username -p ComplaintManagementDB < backend/src/db/schema.sql

Backend Setup

  1. Navigate to the backend directory:
cd backend
  1. Install dependencies:
npm install
  1. Set up environment variables:

    • Copy the example environment file:
    cp .env.example .env
    • Open the .env file and update the values with your configuration
    • Make sure to set the correct database credentials and Firebase configuration
  2. Set up Firebase:

    • Create a Firebase project
    • Enable Authentication with email/password
    • Set up Firebase Storage for file uploads
    • Download the service account key
    • Save it as serviceAccountKey.json in the backend directory
  3. Start the backend server:

npm run dev

Frontend Setup

  1. Navigate to the frontend directory:
cd frontend
  1. Install dependencies:
npm install
  1. Set up environment variables:

    • Copy the example environment file:
    cp .env.example .env
    • Open the .env file and update the values with your configuration
    • Make sure to set the correct API URL and Firebase configuration
    • You can get the Firebase configuration values from your Firebase project settings
  2. Start the frontend development server:

npm run dev