Skip to content

an AI assisted complaint management system for Ethiopian electric utility

Notifications You must be signed in to change notification settings

dan-kingo/AICMS

Repository files navigation

AI-Assisted Complaint Management System

πŸ–ΌοΈ Project Screenshots

πŸ” Home Page

Login Screenshot


🏠 Admin Dashboard

Dashboard Screenshot


πŸ‘€ Profile Page

Profile Screenshot


βš™οΈ Complaint History Page

Settings Screenshot

πŸš€ Overview

The AI-Assisted Complaint Management System is a comprehensive web-based platform designed to streamline complaint handling for the Ethiopian Electric Utility. Built with modern technologies including React, Vite, ShadCN, TailwindCSS, Framer Motion, and React Router DOM, this system provides a fast, responsive, and visually appealing user experience with intelligent complaint processing capabilities.

✨ Key Features

  • πŸ€– AI-Powered Complaint Categorization - Automatic classification for faster resolutions
  • πŸ“Š Real-Time Tracking - Monitor complaint progress instantly
  • πŸ” Secure Authentication - User registration, login, and OTP verification
  • πŸ“± Responsive Design - Optimized for all devices
  • 🌐 Multi-Language Support - English and Amharic localization
  • πŸŒ™ Dark/Light Mode - Theme switching capability
  • πŸ’¬ AI Chatbot - Powered by Gemini for instant assistance
  • πŸ“§ Email Notifications - Real-time updates on complaint status
  • πŸ“ˆ Analytics Dashboard - Insights for administrators

πŸ›  Tech Stack

  • Framework: React 19 + Vite ⚑
  • UI Components: ShadCN/UI πŸ–ŒοΈ
  • Styling: TailwindCSS 4.0 🎨
  • Routing: React Router DOM πŸ—οΈ
  • Animation: Framer Motion ✨
  • State Management: Zustand 🐻
  • Form Handling: React Hook Form + Zod
  • HTTP Client: Axios
  • Internationalization: React i18next
  • Programming Language: TypeScript

πŸ“¦ Installation

Prerequisites

  • Node.js (v18 or higher)
  • npm or yarn package manager

1. Clone the Repository

git clone https://github.com/dan-kingo/AICMS.git
cd AICMS

2. Install Dependencies

npm install

3. Environment Setup

Create a .env file in the root directory:

VITE_API_URL=https://aicms-api.onrender.com
VITE_WEB3FORMS_ACCESS_KEY=your_web3forms_key

4. Start the Development Server

npm run dev

The application will be available at http://localhost:5173/

πŸ“Œ Project Structure

πŸ“¦ AICMS
 ┣ πŸ“‚ public
 ┃ ┣ πŸ“œ icons8-flash-100.png
 ┃ β”— πŸ“œ _redirects
 ┣ πŸ“‚ src
 ┃ ┣ πŸ“‚ assets
 ┃ ┃ ┣ πŸ“‚ constants          # Application constants and configurations
 ┃ ┃ ┃ ┣ πŸ“œ changePassword.ts
 ┃ ┃ ┃ ┣ πŸ“œ complaintCategory.ts
 ┃ ┃ ┃ ┣ πŸ“œ complaints.ts
 ┃ ┃ ┃ ┣ πŸ“œ contact.ts
 ┃ ┃ ┃ ┣ πŸ“œ FAQ.ts
 ┃ ┃ ┃ ┣ πŸ“œ features.ts
 ┃ ┃ ┃ ┣ πŸ“œ formData.ts
 ┃ ┃ ┃ ┣ πŸ“œ icons.ts
 ┃ ┃ ┃ ┣ πŸ“œ issueOptions.ts
 ┃ ┃ ┃ ┣ πŸ“œ loginData.ts
 ┃ ┃ ┃ ┣ πŸ“œ navLinks.ts
 ┃ ┃ ┃ ┣ πŸ“œ profileData.ts
 ┃ ┃ ┃ ┣ πŸ“œ registerData.ts
 ┃ ┃ ┃ ┣ πŸ“œ sidebarItems.ts
 ┃ ┃ ┃ β”— πŸ“œ social.ts
 ┃ ┃ β”— πŸ“‚ images             # Static images and assets
 ┃ ┣ πŸ“‚ components           # Reusable UI components
 ┃ ┃ ┣ πŸ“‚ ui                 # ShadCN UI components
 ┃ ┃ ┣ πŸ“œ Chatbot.tsx
 ┃ ┃ ┣ πŸ“œ ComplaintCategorySelect.tsx
 ┃ ┃ ┣ πŸ“œ ComplaintCheckboxes.tsx
 ┃ ┃ ┣ πŸ“œ ComplaintForm.tsx
 ┃ ┃ ┣ πŸ“œ ContactForm.tsx
 ┃ ┃ ┣ πŸ“œ ContactInfo.tsx
 ┃ ┃ ┣ πŸ“œ CustomDialogComponent.tsx
 ┃ ┃ ┣ πŸ“œ CustomDropdown.tsx
 ┃ ┃ ┣ πŸ“œ CustomSidebar.tsx
 ┃ ┃ ┣ πŸ“œ CustomTable.tsx
 ┃ ┃ ┣ πŸ“œ DarkModeToggle.tsx
 ┃ ┃ ┣ πŸ“œ DashboardNavbar.tsx
 ┃ ┃ ┣ πŸ“œ DeleteAccount.tsx
 ┃ ┃ ┣ πŸ“œ EditProfileForm.tsx
 ┃ ┃ ┣ πŸ“œ FAQAccordion.tsx
 ┃ ┃ ┣ πŸ“œ FeatureCard.tsx
 ┃ ┃ ┣ πŸ“œ Footer.tsx
 ┃ ┃ ┣ πŸ“œ LanguageSwitcher.tsx
 ┃ ┃ ┣ πŸ“œ LoginForm.tsx
 ┃ ┃ ┣ πŸ“œ Map.tsx
 ┃ ┃ ┣ πŸ“œ Navbar.tsx
 ┃ ┃ ┣ πŸ“œ NotificationDropdown.tsx
 ┃ ┃ ┣ πŸ“œ ProfilePictureUpload.tsx
 ┃ ┃ ┣ πŸ“œ RegisterForm.tsx
 ┃ ┃ ┣ πŸ“œ SearchInput.tsx
 ┃ ┃ ┣ πŸ“œ SocialLink.tsx
 ┃ ┃ β”— πŸ“œ theme-provider.tsx
 ┃ ┣ πŸ“‚ contexts            # React contexts for state management
 ┃ ┃ ┣ πŸ“œ AuthContext.tsx
 ┃ ┃ β”— πŸ“œ AuthProvider.tsx
 ┃ ┣ πŸ“‚ hooks               # Custom React hooks
 ┃ ┃ ┣ πŸ“œ use-mobile.ts
 ┃ ┃ ┣ πŸ“œ useAuth.ts
 ┃ ┃ ┣ πŸ“œ useComplaint.ts
 ┃ ┃ ┣ πŸ“œ useComplaintAI.ts
 ┃ ┃ ┣ πŸ“œ useContact.ts
 ┃ ┃ ┣ πŸ“œ useDeleteAccount.ts
 ┃ ┃ ┣ πŸ“œ useForgotPassword.ts
 ┃ ┃ ┣ πŸ“œ useLogin.ts
 ┃ ┃ ┣ πŸ“œ useLogout.ts
 ┃ ┃ ┣ πŸ“œ useMessage.ts
 ┃ ┃ ┣ πŸ“œ usePassword.ts
 ┃ ┃ ┣ πŸ“œ useRegister.ts
 ┃ ┃ ┣ πŸ“œ useResetPassword.ts
 ┃ ┃ ┣ πŸ“œ useUpdate.ts
 ┃ ┃ ┣ πŸ“œ useUser.ts
 ┃ ┃ β”— πŸ“œ useUserComplaints.ts
 ┃ ┣ πŸ“‚ locales             # Internationalization files
 ┃ ┃ ┣ πŸ“‚ en
 ┃ ┃ ┃ β”— πŸ“œ translation.json
 ┃ ┃ β”— πŸ“‚ am
 ┃ ┃   β”— πŸ“œ translation.json
 ┃ ┣ πŸ“‚ pages               # Main application pages
 ┃ ┃ ┣ πŸ“œ About.tsx
 ┃ ┃ ┣ πŸ“œ ChangePassword.tsx
 ┃ ┃ ┣ πŸ“œ ComplaintHistory.tsx
 ┃ ┃ ┣ πŸ“œ Contact.tsx
 ┃ ┃ ┣ πŸ“œ Dashboard.tsx
 ┃ ┃ ┣ πŸ“œ Error.tsx
 ┃ ┃ ┣ πŸ“œ FAQs.tsx
 ┃ ┃ ┣ πŸ“œ ForgotPassword.tsx
 ┃ ┃ ┣ πŸ“œ HelpAndSupport.tsx
 ┃ ┃ ┣ πŸ“œ Home.tsx
 ┃ ┃ ┣ πŸ“œ Layout.tsx
 ┃ ┃ ┣ πŸ“œ Login.tsx
 ┃ ┃ ┣ πŸ“œ MakeComplaint.tsx
 ┃ ┃ ┣ πŸ“œ OTPVerification.tsx
 ┃ ┃ ┣ πŸ“œ Register.tsx
 ┃ ┃ ┣ πŸ“œ ResetPassword.tsx
 ┃ ┃ ┣ πŸ“œ Settings.tsx
 ┃ ┃ ┣ πŸ“œ UserProfile.tsx
 ┃ ┃ β”— πŸ“œ index.ts
 ┃ ┣ πŸ“‚ store               # Zustand state management
 ┃ ┃ ┣ πŸ“œ complaintStore.ts
 ┃ ┃ ┣ πŸ“œ notificationsStore.ts
 ┃ ┃ β”— πŸ“œ userStore.ts
 ┃ ┣ πŸ“‚ utils               # Utility functions and schemas
 ┃ ┃ ┣ πŸ“œ changePasswordSchema.ts
 ┃ ┃ ┣ πŸ“œ complaintValidation.ts
 ┃ ┃ ┣ πŸ“œ contactFormSchema.ts
 ┃ ┃ ┣ πŸ“œ loginFormSchema.ts
 ┃ ┃ ┣ πŸ“œ profileUpdateSchema.ts
 ┃ ┃ β”— πŸ“œ registerFormSchema.ts
 ┃ ┣ πŸ“œ App.tsx             # Main app component
 ┃ ┣ πŸ“œ main.tsx            # Application entry point
 ┃ ┣ πŸ“œ routes.tsx          # Route configurations
 ┃ ┣ πŸ“œ i18n.ts             # Internationalization setup
 ┃ ┣ πŸ“œ index.css           # Global styles
 ┃ β”— πŸ“œ vite-env.d.ts       # Vite type definitions
 ┣ πŸ“œ index.html            # Root HTML file
 ┣ πŸ“œ tailwind.config.js    # TailwindCSS configuration
 ┣ πŸ“œ vite.config.ts        # Vite configuration
 ┣ πŸ“œ components.json       # ShadCN configuration
 ┣ πŸ“œ tsconfig.app.json     # TypeScript configuration
 ┣ πŸ“œ tsconfig.json         # TypeScript configuration
 ┣ πŸ“œ tsconfig.node.json    # TypeScript configuration
 ┣ πŸ“œ babel.config.cjs      # Babel configuration
 ┣ πŸ“œ eslint.config.js      # ESLint configuration
 ┣ πŸ“œ netlify.toml          # Netlify deployment config
 ┣ πŸ“œ render.yaml           # Render deployment config
 β”— πŸ“œ package.json          # Dependencies and scripts

πŸš€ Core Features

πŸ” Authentication System

  • User registration with OTP verification
  • Secure login/logout functionality
  • Password reset via email
  • Protected routes and role-based access

πŸ“ Complaint Management

  • Submit complaints with file attachments
  • AI-powered automatic categorization
  • Real-time status tracking
  • Complaint history and search functionality

πŸ€– AI Integration

  • Intelligent complaint classification
  • Automated response suggestions
  • Gemini-powered chatbot assistance
  • Smart issue detection and routing

πŸ“Š Dashboard & Analytics

  • User profile management
  • Complaint statistics and insights
  • Real-time notifications
  • Progress tracking visualizations

🌐 User Experience

  • Responsive design for all devices
  • Dark/Light theme switching
  • Multi-language support (EN/AM)
  • Smooth animations and transitions
  • Accessibility-focused design

πŸ“„ Routing Structure

The application uses React Router DOM for navigation:

const router = createBrowserRouter([
  {
    path: "/",
    element: <Layout />,
    errorElement: <Error />,
    children: [
      { index: true, element: <Home /> },
      { path: "about", element: <About /> },
      { path: "faqs", element: <FAQs /> },
      { path: "contact-us", element: <Contact /> },
    ],
  },
  {
    path: "register",
    element: <Register />,
  },
  {
    path: "login",
    element: <Login />,
  },
  {
    path: "/dashboard",
    element: <Dashboard />,
    children: [
      { index: true, element: <UserProfile /> },
      { path: "add-complaint", element: <MakeComplaint /> },
      { path: "change-password", element: <ChangePassword /> },
      { path: "help", element: <HelpAndSupport /> },
      { path: "settings", element: <Settings /> },
      { path: "complaints", element: <ComplaintHistory /> },
    ],
  },
]);

🎨 Customizing Styles

The project uses TailwindCSS with custom theme configuration. Modify src/index.css to customize fonts, colors, and spacing:

@theme {
  --font-roboto: "Roboto", sans-serif;
  --font-poppins: "Poppins";
  --font-inter: "Inter";
  --font-palanquin: "Palanquin";
  --color-primary: #ff784b;
  --color-secondary: #c6635a;
  --color-body: #f2f2f2;
  --color-dark: #212121;
}

🌍 Deployment

Build for Production

npm run build

Preview Production Build

npm run preview

Deployment Platforms

The project is configured for deployment on:

  • Netlify (via netlify.toml)
  • Render (via render.yaml)
  • Vercel (zero-config deployment)

πŸ”§ Available Scripts

npm run dev          # Start development server
npm run build        # Build for production
npm run lint         # Run ESLint
npm run preview      # Preview production build
npm run extract:i18n # Extract translation strings

🌐 Internationalization

The application supports multiple languages using react-i18next:

  • English (EN) - Default language
  • Amharic (AM) - Ethiopian local language

Translation files are located in src/locales/[language]/translation.json

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ‘₯ Team

  • Developer: Dan-Kingo
  • Organization: Ethiopian Electric Utility
  • Contact: GitHub Profile

πŸ™ Acknowledgments

  • Ethiopian Electric Utility for project requirements
  • ShadCN/UI for beautiful component library
  • React community for excellent ecosystem
  • All contributors and testers

Status: βœ… Production Ready - The system is fully functional and deployed for the Ethiopian Electric Utility complaint management operations.

About

an AI assisted complaint management system for Ethiopian electric utility

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages