Skip to content

Muhammad-Ahmed-Rayyan/FixTrack

Repository files navigation

Real-Time Issue Reporting and Tracking System

Last Commit TypeScript CSS languages


Built with the tools and technologies:

React Vite Firebase TypeScript Leaflet Cloudinary


🧠 Project Summary

FixTrack is a web-based application designed for real-time reporting, tracking, and resolution of issues. It provides a platform for users to submit issues with location data, and for administrators to manage and monitor the status of these issues. The interactive map interface allows for easy visualization of issue locations and supports department-based management for better organization.

πŸ”— Check it out: FixTrack


πŸš€ Features

  • πŸ” User Authentication: Secure user registration and login functionality.
  • πŸ—ΊοΈ Interactive Map: Users can report issues by selecting a location on an interactive map powered by Leaflet.
  • πŸ“ Issue Reporting: Submit detailed reports including title, description, image (via Cloudinary), and location.
  • πŸ“Š Dashboard: View, filter, and manage all reported issues in one place.
  • πŸ”” Real-Time Updates: Issue data and statuses update in real-time through Firebase.
  • πŸ€– Chatbot Integration: An intelligent chatbot assists users with reporting or tracking issues.
  • πŸ‘₯ Role-Based Access:
    • Department Admins can view and manage reports related only to their respective departments (e.g., road, sanitation, etc.).
    • Super Admins have full access β€” they can view/manage all reports and handle user management.
  • 🧭 Location-Based Reporting: Each issue is tagged with its geographic coordinates for accurate placement on the map.
  • 🎨 Responsive Design: Fully responsive and mobile-friendly UI built with React and custom CSS.

πŸ”§ Setup & Installation

Make sure Node.js and npm are installed on your system.

# Clone the repo
git clone https://github.com/Muhammad-Ahmed-Rayyan/FixTrack.git
cd FixTrack

# Install required libraries
npm install

# Run the development server
npm run dev

πŸ”‘ API Configuration

To ensure FixTrack runs properly with all connected services (Firebase, Gemini, and Cloudinary), you need to replace configuration values inside the existing project files.

βš™οΈ 1. Environment Variables β€” FixTrack/.env

Replace the existing values in your .env file with the following environment variables:

VITE_API_KEY="YOUR-FIREBASE-CONSOLE-APP-API-KEY"
VITE_AUTH_DOMAIN="YOUR-FIREBASE-CONSOLE-APP-AUTH-DOMAIN"
VITE_PROJECT_ID="YOUR-FIREBASE-CONSOLE-APP-PROJECT-ID"
VITE_STORAGE_BUCKET="YOUR-FIREBASE-CONSOLE-APP-STORAGE-BUCKET"
VITE_MESSAGING_SENDER_ID="YOUR-FIREBASE-CONSOLE-APP-MESSAGING-SENDER-ID"
VITE_APP_ID="YOUR-FIREBASE-CONSOLE-APP-ID"
VITE_GEMINI_API_KEY="YOUR-GEMINI-API-KEY"

You can obtain these values from:

  • Firebase Console:

    • Go to your Firebase project β†’ Project Settings β†’ General.
    • Under Your Apps, select your web app to view the configuration keys.
  • Gemini API (for AI Integration):

    • Visit Google AI Studio to generate your Gemini API Key. -Replace "YOUR-GEMINI-API-KEY" with your actual Gemini key in the .env file.

☁️ 2. Cloudinary Configuration β€” FixTrack/src/components/IssueForm.tsx

Replace or update the following constants in the IssueForm.tsx component:

const CLOUD_NAME = 'YOUR-CLOUDINARY-CLOUD-NAME';
const UPLOAD_PRESET = 'YOUR-CLOUDINARY-UPLOAD-PRESET';

You can find these in your Cloudinary Console:

  • Open your Cloudinary Dashboard.
  • Copy your Cloud Name and Upload Preset (or create a new preset under Settings β†’ Upload).
  • Replace the placeholders above with your actual credentials.

πŸ—ƒοΈ Project Structure

FixTrack
β”œβ”€β”€ public
β”‚   β”œβ”€β”€ assets
β”‚   β”œβ”€β”€ logo
β”‚   β”‚   β”œβ”€β”€ FixTrack.ico
β”‚   β”‚   └── FixTrack.png
β”‚   β”œβ”€β”€ index.html
β”‚   └── vite.svg
β”œβ”€β”€ src
β”‚   β”œβ”€β”€ animation
β”‚   β”‚   └── Map_Pinging.json
β”‚   β”œβ”€β”€ components
β”‚   β”‚   β”œβ”€β”€ BuiltWith
β”‚   β”‚   β”‚   β”œβ”€β”€ BuiltWith.css
β”‚   β”‚   β”‚   └── BuiltWith.tsx
β”‚   β”‚   β”œβ”€β”€ ContactUs
β”‚   β”‚   β”‚   β”œβ”€β”€ ContactUs.css
β”‚   β”‚   β”‚   └── ContactUs.tsx
β”‚   β”‚   β”œβ”€β”€ Footer
β”‚   β”‚   β”‚   β”œβ”€β”€ Footer.css
β”‚   β”‚   β”‚   └── Footer.tsx
β”‚   β”‚   β”œβ”€β”€ Home
β”‚   β”‚   β”‚   β”œβ”€β”€ Home.css
β”‚   β”‚   β”‚   └── Home.tsx
β”‚   β”‚   β”œβ”€β”€ HowItWorks
β”‚   β”‚   β”‚   β”œβ”€β”€ HowItWorks.css
β”‚   β”‚   β”‚   └── HowItWorks.tsx
β”‚   β”‚   β”œβ”€β”€ LoadingSpinner
β”‚   β”‚   β”‚   β”œβ”€β”€ LoadingSpinner.css
β”‚   β”‚   β”‚   └── LoadingSpinner.tsx
β”‚   β”‚   β”œβ”€β”€ Navbar
β”‚   β”‚   β”‚   β”œβ”€β”€ Navbar.css
β”‚   β”‚   β”‚   └── Navbar.tsx
β”‚   β”‚   β”œβ”€β”€ OurTeam
β”‚   β”‚   β”‚   β”œβ”€β”€ OurTeam.css
β”‚   β”‚   β”‚   └── OurTeam.tsx
β”‚   β”‚   β”œβ”€β”€ Auth.css
β”‚   β”‚   β”œβ”€β”€ Auth.tsx
β”‚   β”‚   β”œβ”€β”€ Chatbot.css
β”‚   β”‚   β”œβ”€β”€ Chatbot.tsx
β”‚   β”‚   β”œβ”€β”€ Dashboard.css
β”‚   β”‚   β”œβ”€β”€ Dashboard.tsx
β”‚   β”‚   β”œβ”€β”€ IssueForm.css
β”‚   β”‚   β”œβ”€β”€ IssueForm.tsx
β”‚   β”‚   β”œβ”€β”€ IssueList.css
β”‚   β”‚   β”œβ”€β”€ IssueList.tsx
β”‚   β”‚   β”œβ”€β”€ Profile.css
β”‚   β”‚   β”œβ”€β”€ Profile.tsx
β”‚   β”‚   β”œβ”€β”€ ProfileMenu.css
β”‚   β”‚   β”œβ”€β”€ ProfileMenu.tsx
β”‚   β”‚   β”œβ”€β”€ UserManagement.css
β”‚   β”‚   └── UserManagement.css
β”‚   β”œβ”€β”€ pages
β”‚   β”‚   β”œβ”€β”€ LandingPage.css
β”‚   β”‚   β”œβ”€β”€ LandingPage.test.tsx
β”‚   β”‚   └── LandingPage.tsx
β”‚   β”œβ”€β”€ App.css
β”‚   β”œβ”€β”€ App.tsx
β”‚   β”œβ”€β”€ firebaseConfig.ts
β”‚   β”œβ”€β”€ index.css
β”‚   β”œβ”€β”€ main.tsx
β”‚   β”œβ”€β”€ setupTests.ts
β”‚   β”œβ”€β”€ types.ts
β”‚   └── vite-env.d.ts
β”œβ”€β”€ .env
β”œβ”€β”€ .eslintrc.cjs
β”œβ”€β”€ .firebaserc
β”œβ”€β”€ cors.json
β”œβ”€β”€ firebase.json
β”œβ”€β”€ firebase.rules
β”œβ”€β”€ index.html
β”œβ”€β”€ package-lock.json
β”œβ”€β”€ package.json
β”œβ”€β”€ tsconfig.json
β”œβ”€β”€ tsconfig.node.json
β”œβ”€β”€ vite.config.ts
└── vitest.config.ts

πŸ”₯ Firebase Configuration

This project uses Firebase for backend services.
To set it up:

  1. Create a new project in the Firebase Console.
  2. Add a new web app to your Firebase project.
  3. Copy the Firebase configuration object.

βš™οΈ Firebase Deployment & Hosting

This project uses Firebase Hosting for deployment. Below are the steps and commands used to configure, build, and deploy FixTrack from Firebase Studio:

# Log in to Firebase
firebase login

# Link your local project to a Firebase project
firebase use --add

# Initialize Firebase Hosting (select "dist" or your build folder)
firebase init hosting

# Build the production-ready project
npm run build

# Deploy to Firebase Hosting
firebase deploy --only hosting

After deployment, your production files will be available online via the Firebase Hosting URL. The optimized build files are located in the dist directory.


⭐ Love this project? Don’t forget to star it!

About

Real-Time Issue Reporting and Tracking Application

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5

Languages