Giter Club home page Giter Club logo

abhishekpatel946 / smart-vehicle-fleet-manager Goto Github PK

View Code? Open in Web Editor NEW
20.0 4.0 15.0 30.31 MB

App to track vehicle over-speeding, fuel theft alert, accident alert, speed log, fuel log, maintenance log, fuel refill log and displayed it on a dashboard in form of tables, charts, and graphs...

Home Page: https://smart-vehicle-fleet-manager.web.app/

License: MIT License

HTML 5.85% CSS 5.73% JavaScript 87.56% Dockerfile 0.87%
react firebase-auth iot-device mdbreact vehicle forks-shield contributors-shield issues-shield stars-shield dashboard

smart-vehicle-fleet-manager's Introduction

Contributors Forks Stargazers Issues Pull Request Average time to resolve an issue Percentage of issues still open dependencies Maintainability Test Coverage Firebase Deploy CodeQL GitHub release MIT License repo size Open Source? Yes! Ask Me Anything !


Logo

Smart-Vehicle-Fleet-Manager

An awesome Smart-Vehicle-Fleet-Manager to jumpstart your projects!
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents:

About The Project

Smart Vehicle Fleet Manager

This project is based on real life problem face by departments like RVNL and ITD.

We are planning to make a system to manage entire fleet of an organisation, the system can enable vehicle tracking via GPS, detect over speeding, fuel levels, accident detection,emergency response, facilitate anti-theft of vehicle and fuel,travel history [24x7] ,record this entire data, store on Cloud and present the data on a dashboard for easy understanding.

It also reduces dependence and management of manual log books which are required to be maintained and it has many flaws which are exploited, which leads to massive loss of government resources. Using this system Fuel Theft can be stopped too. The system can also facilitate on-time vehicle maintenance. It can be installed on government/private bus,trucks,bikes,site-vehicles,etc. The details can be monitored from a control room or a simple desktop via a dashboard. So fetching information can be very easy and convenient.

What the system will consist of:

  1. Module Installed on the Vehicle
  2. A Cloud Storage Solution
  3. A Dashboard to display the data in form of tables,charts and widgets.

The vehicle will have following sensors installed:

  • GPS
  • Accelerometer
  • Fuel Level Sensor
  • Speedometer
  • An Emergency Button to be used to alert in case of emergency
  • A relay that can remotely turn off vehicle in case of theft.
  • All the data will be recorded and transmitted via the internet using a GSM module which will enable internet connectivity.

The dashboard:

A dashboard will be used to show data fetched from the cloud. The data will be viewed vehicle wise and in the form of tables, charts and graphs. The dashboard can be viewed on smartphone but best viewed on desktop/laptop.

The dashboard will show data such as:

  • Location History
  • Fuel Level
  • Speed History
  • Maintenance Alert
  • Total distance travelled
  • Accident Alert
  • Overspeeding Instances
  • Fuel Refill History

Getting Started 📃

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

  1. Clone the repo
git clone https://github.com/abhishekpatel946/Smart-Vehicle-Fleet-Manager.git
  1. Public Credential for Testing

Username:

Password:

test@123
  1. Open the local copy with a good modern text editor like VS Code or Atom and start coding.

Contributions are what make the open source community such an amazing place to be learn, inspire, and create.

Note: We are open to any contributions small or large. Any contributions you make are greatly appreciated. Make sure first you read the CONTRIBUTION.md if you want to contribute or issue a bug.

To contribute refer the steps below:

  1. Fork the Project
  2. Create your Feature Branch
  3. Commit your Changes (git commit -m 'Add your comment here about your changes')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request
If you need want to feature your name in our contributer's list, Please mention that too

You can also refer to this Directory Structure below:

Basic Directory Structure: 📁

.
├── build
│   ├── asset-manifest.json
│   ├── favicon.ico
│   ├── index.html
│   ├── logo192.png
│   ├── logo512.png
│   ├── manifest.json
│   ├── robots.txt
│   └── static
│       ├── css
│       ├── js
│       └── media
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── docker-compose.yml
├── Dockerfile
├── firebase.json
├── LICENSE
├── package.json
├── package-lock.json
├── public
│   ├── favicon.ico
│   ├── index.html
│   ├── logo192.png
│   ├── logo512.png
│   ├── manifest.json
│   └── robots.txt
├── README.md
├── SECURITY.md
├── src
│   ├── App.css
│   ├── App.js
│   ├── assets
│   │   ├── admin-new.png
│   │   ├── Logo.png
│   │   └── logo-readme.png
│   ├── component
│   │   ├── ContextProvider
│   │   │   ├── Reducer.js
│   │   │   └── StateProvider.js
│   │   ├── dashboard
│   │   │   ├── Dashboard.css
│   │   │   └── Dashboard.js
│   │   ├── dashboard_common
│   │   │   ├── FooterLayout.js
│   │   │   └── HeaderLayout.js
│   │   ├── firebase
│   │   │   └── fireConfig.js
│   │   ├── Login
│   │   │   ├── home.css
│   │   │   └── home.js
│   │   └── Logs
│   │       ├── AccidentAlert.js
│   │       ├── FuelLog.css
│   │       ├── FuelLog.js
│   │       ├── FuelRefillLog.css
│   │       ├── FuelRefillLog.js
│   │       ├── FuelTheftAlert.js
│   │       ├── MaintainanceLog.css
│   │       ├── MaintainenceLog.js
│   │       ├── OverSpeedLog.css
│   │       ├── OverSpeedLog.js
│   │       ├── SpeedLog.css
│   │       └── SpeedLog.js
│   ├── index.css
│   ├── index.js
│   └── serviceWorker.js
└── yarn.lock

License 📄

Distributed under the MIT License. See LICENSE for more information.

Contact ✉️

Discussion forem

Contributers: ✨

Core:


Abhishek Patel

💻 🎨 🚧 👀 💬 📖

Ashutosh Mourya

🎨 📖📢

MuskanKabir

🎨 📖 📢

Acknowledgements

smart-vehicle-fleet-manager's People

Contributors

abhishekpatel946 avatar ashutoshmourya avatar dependabot[bot] avatar imgbotapp avatar muskan-kabirpanthi avatar snyk-bot avatar virendrachouhan85 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

smart-vehicle-fleet-manager's Issues

FirebaseError: Installations: Missing App configuration value: "apiKey" (installations/missing-app-config-values).

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://smart-vehicle-fleet-manager.web.app/'
  2. See an error in the console

Screenshots

It looks like you're using the development build of the Firebase JS SDK.
When deploying Firebase apps to production, it is advisable to only import
the individual SDK components you intend to use.

For the module builds, these are available in the following manner
(replace <PACKAGE> with the name of a component - i.e. auth, database, etc):

CommonJS Modules:
const firebase = require('firebase/app');
require('firebase/<PACKAGE>');

ES Modules:
import firebase from 'firebase/app';
import 'firebase/<PACKAGE>';

Typescript:
import * as firebase from 'firebase/app';
import 'firebase/<PACKAGE>';
Uncaught FirebaseError: Installations: Missing App configuration value: "apiKey" (installations/missing-app-config-values).
    at J (extract-app-config.ts:54)
    at extract-app-config.ts:41
    at e.instanceFactory (index.ts:48)
    at e.getOrInitializeService (provider.ts:194)
    at e.getImmediate (provider.ts:95)
    at e.instanceFactory (index.ts:61)
    at e.getOrInitializeService (provider.ts:194)
    at e.getImmediate (provider.ts:95)
    at e._getService (firebaseApp.ts:127)
    at e.<computed> [as performance] (firebaseNamespaceCore.ts:228)

Desktop (please complete the following information):

  • OS: [Linux]
  • Browser [Chrome]
  • Version [92.0.4515.107 (Official Build) (64-bit)]

Additional context
Add any other context about the problem here.

add ModuleStatus indicator

Module Status indicator

  • Capture the status signal sent by the module.
  • Process that signal and turns into the Active or Inactive state.
  • Display on top of the dashboard for users

add New Vehicle module

New Vehicle addition section

  • add new vehicle using a simple GUI.

  • added in DB vehicle

  • & connect with DB.

build: CI-CD Pipeline

CICD using GitHub action and circleCI.

  • Build GitHub Actions to automate integration.
  • Every PR's and Merge check for integration test or dependencies failure.
  • Build the CD pipeline using circleCI for automating the deployment processes.

Fix the logo

Put the logo

  • inside the navbar before the name "Smart Vehicle Fleet Manager".

make sure the size of the logo is doesn't break the navbar.

logo is always before the name "Smart Vehicle Fleet Manager".

keep it simple and float at the left side of the navbar.

@MuskanKabir @AshutoshMourya

bug arrise in b0606b54d0e7abde5676ba4914b5d339b6c53618

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to navigation panel
  2. Click on 'all navigation buttons'
  3. See all buttons are not working due to preventDeafault.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. Mint20.1]
  • Browser [e.g. chrome]
  • Version [e.g. 89]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Fetch data from Firestrore and visualize

If you want to contribute in then you must be read first CONTRIBUTE.md

Problem will be described in CONTRIBUTE.md

Overview

Fetching data from firestore database and render in-app.

There are 2 things:-

  • first the chart for updated with real-time data
  • second will be a log table to keep track of each record and display

ReDesign a new DB schema for scale

All the points are important for the new schema

  • create a Data_Record entire collection.

  • its subdocuments by RegID and its fields like vehicleID, vehicleNAME.

  • each vehicle has particular its own collection of records of sensor data may be.

  • each collection it will look like same as previously I design for collection -> document -> field.

  • And create a service module.

when the new vehicle adds through the dashboard the code will run like these.
1. vehicle added into the DB as a document with their respective fields.
2. if the vehicle added & then the dummy collection will be created through the script for no reason just the avoid complexity and inconsistency.

Verification at registation stage

Update in Login page

  • delete the signup module.

  • manual register user or org by sysadmin.

  • only register user logged in into system but via third way is not possible.

  • all the access level distribution is under the sysadmin only.

make it more RealTime

  1. Instantly fetch data from Firestore and render.
  2. Without refreshing quickly databind with UI.
  3. Suggestion:- Write an efficient listener for connectivity.

add Test Cases

Add test cases for the dashboard

  • It could be client-side or server-side.

  • also test fetching the data from the firestore basically firestore DB testing.

  • design more test cases are per more feature added in future.

manual maintenance module

  • create a UI for the maintenance component.

  • establish a connection with the Firestore.

  • store data into the docs & check validation at client side.

Documentation: How to get a login for demo page https://smart-vehicle-fleet-manager.web.app/

I assume that https://smart-vehicle-fleet-manager.web.app/ is a demo application, that a new user can see and test the features for this project.
Unfortunately there is no documentation how to login

  • are there demo credentials?
  • where is it possible to register a demo account?

as developer I tried to build and run the docker but that fails at step 9

RUN npm run build

I guess freezing the versions at the previous steps would be good

RUN npm install npm@latest
RUN npm install react-scripts@latest

handle the Scalability

  • manage the no. of the user's in terms of auth.

  • manage the no. of the vehicles for each unique user.

  • switch btw vehicle through the dashboard directly.

  • manage the DB to handling the relationship btw the user & its vehicle.

  • fetch data without page refreshing & in realTime

add Accident alert through notification

Accident Alert Notification

  • Capture newly added data from firestore.
  • Add data into the accident_log.
  • Notify the user through snakbar when notification is new.
  • In case of mark as read do not toggle the snakbar pop up.

add | modify, some CSS for enhancement

Add some CSS for making a dynamic dashboard

  • added your own custom CSS.

  • use MDBootsrap, MaterialUI or React-Bootstrap.

  • using [dot]class CSS if you write your own.

  • comments are present for more readable code

  • tested at your side.

NOTE- if you send a PR for this issue, make sure tick all the checkbox if you do it code for as requested or unchecked if not

Update the README.md file

Change in README.md file*

Description

    • describe the problem statement
    • how to we solve the probelm

Road Map

    • create our project folder structure

Installation

    • prerequisite
    • installation guide

Contribution

    • contribution guidelines
    • define rules for contribution

Render the data on the Dashboard

Data fetch successfully from the firestore, but the problem is that put the data_values in pagination table and most recent data_values display using charts & widgets & also improve the overall performance of application

Note:- Please refer to the CONTRIBUTE.md for a detailed description of the problem.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.