A full-stack web application for managing customer complaints with role-based access control.
- 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
- React with TypeScript
- Tailwind CSS for styling
- Firebase Authentication
- Axios for API calls
- Node.js with Express
- TypeScript
- MySQL database
- Node.js (v16 or higher)
- MySQL (v8.0 or higher)
- Firebase account
- npm or yarn
- Create a MySQL database:
CREATE DATABASE ComplaintManagementDB;
- Run the schema file:
mysql -u your_username -p ComplaintManagementDB < backend/src/db/schema.sql
- Navigate to the backend directory:
cd backend
- Install dependencies:
npm install
-
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
-
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
-
Start the backend server:
npm run dev
- Navigate to the frontend directory:
cd frontend
- Install dependencies:
npm install
-
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
-
Start the frontend development server:
npm run dev