Skip to content
adarsh-ajayPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

FixMyRoad

A real-time, map-based platform for reporting and managing potholes, built with TypeScript, React, and Node.js. This application empowers users to quickly report road defects and provides an administration interface for tracking and managing these reports, potentially with real-time updates.

Table of Contents

Features

  • Interactive Map: Report potholes using an intuitive map interface powered by Leaflet and React-Leaflet.
  • Real-time Updates: Potentially offers real-time notifications or updates on report statuses via Socket.IO.
  • User-Friendly Interface: Modern and responsive design using React and Framer Motion.
  • State Management: Efficient client-side state management with Zustand.
  • Data Visualization: Dashboards and charts for report statistics using Recharts.
  • Hot Toast Notifications: User feedback with react-hot-toast.

Technologies Used

This project leverages a modern tech stack to deliver a robust and scalable application:

  • Frontend:
    • TypeScript
    • React
    • Leaflet & React-Leaflet (Mapping)
    • Zustand (State Management)
    • Framer Motion (Animations)
    • Recharts (Data Visualization)
    • Socket.IO Client (Real-time communication)
    • React Hot Toast (Notifications)
  • Backend:
    • TypeScript
    • Node.js (Likely Express.js for API)
    • Socket.IO (Real-time communication)
    • MongoDB (Storing User data)

Installation

Follow these steps to set up the project locally.

Prerequisites

Ensure you have the following installed:

  • Node.js (LTS recommended)
  • npm (comes with Node.js)

Backend Setup

  1. Navigate into the backend directory:
    cd backend
  2. Install dependencies:
    npm install
  3. Create a .env file in the backend directory based on a .env.example (if available, otherwise assume PORT and MONGO_URI or similar).
    # Example .env content
    PORT=5000
    # Add your database connection string here, e.g., for MongoDB
    # MONGO_URI=mongodb://localhost:27017/pothole-report
  4. Start the backend server:
    npm start
    The backend should now be running, typically on http://localhost:5000.

Frontend Setup

  1. Navigate into the project (frontend) directory from the root:
    cd project
  2. Install dependencies:
    npm install
  3. Create a .env file in the project directory (e.g., REACT_APP_API_URL, REACT_APP_SOCKET_URL).
    # Example .env content
    REACT_APP_API_URL=http://localhost:5000/api
    REACT_APP_SOCKET_URL=http://localhost:5000
  4. Start the frontend development server:
    npm run dev
    The frontend application should open in your browser, typically at http://localhost:5173.

Usage

Once both the backend and frontend servers are running:

  1. Open your web browser and navigate to http://localhost:5173.
  2. Interact with the map to report new potholes.

Project Structure

The repository is organized into two main parts:

Pothole-report/
├── backend/            # Contains the Node.js/Express server logic and API endpoints
│   ├── src/            # Source code for the backend
│   └── package.json    # Backend dependencies and scripts
├── project/            # Contains the React frontend application
│   ├── src/            # Source code for the frontend (components, pages, state management)
│   └── package.json    # Frontend dependencies and scripts
├── .gitignore          # Specifies intentionally untracked files to ignore
├── package-lock.json   # Records the exact dependency tree (root level)
└── package.json        # Root-level project metadata (can be used for workspaces or global scripts)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages