├── Android
├── app
│ ├── .gitignore
│ ├── src
│ │ ├── main
│ │ │ ├── res
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ │ ├── ic_launcher.xml
│ │ │ │ │ └── ic_launcher_round.xml
│ │ │ │ ├── values
│ │ │ │ │ ├── strings.xml
│ │ │ │ │ ├── colors.xml
│ │ │ │ │ └── themes.xml
│ │ │ │ ├── values-night
│ │ │ │ │ └── themes.xml
│ │ │ │ ├── drawable-v24
│ │ │ │ │ └── ic_launcher_foreground.xml
│ │ │ │ ├── layout
│ │ │ │ │ ├── activity_tracker.xml
│ │ │ │ │ └── activity_main.xml
│ │ │ │ └── drawable
│ │ │ │ │ └── ic_launcher_background.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── ambulansetracker
│ │ │ │ │ ├── LoginResult.java
│ │ │ │ │ ├── Driver.java
│ │ │ │ │ ├── RetrofitInterface.java
│ │ │ │ │ ├── TrackerActivity.java
│ │ │ │ │ ├── TrackerService.java
│ │ │ │ │ └── MainActivity.java
│ │ │ └── AndroidManifest.xml
│ │ ├── test
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── ambulansetracker
│ │ │ │ └── ExampleUnitTest.java
│ │ └── androidTest
│ │ │ └── java
│ │ │ └── com
│ │ │ └── ambulansetracker
│ │ │ └── ExampleInstrumentedTest.java
│ ├── proguard-rules.pro
│ └── build.gradle
├── .idea
│ ├── .name
│ ├── .gitignore
│ ├── dictionaries
│ │ └── Olivier.xml
│ ├── compiler.xml
│ ├── vcs.xml
│ ├── misc.xml
│ ├── gradle.xml
│ └── jarRepositories.xml
├── README.md
├── settings.gradle
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── .gitignore
├── build.gradle
├── gradle.properties
├── gradlew.bat
└── gradlew
├── Web
└── clients
│ ├── admin
│ ├── public
│ │ ├── robots.txt
│ │ ├── favicon.ico
│ │ ├── logo192.png
│ │ ├── logo512.png
│ │ ├── icons
│ │ │ ├── amb1.gif
│ │ │ ├── amb2.gif
│ │ │ ├── amb3.gif
│ │ │ ├── newamb.gif
│ │ │ ├── siren.png
│ │ │ ├── newamb2.gif
│ │ │ ├── newamb3.gif
│ │ │ ├── newamb4.gif
│ │ │ ├── working.gif
│ │ │ ├── ambulance.png
│ │ │ ├── isworking.gif
│ │ │ ├── ambulance (1).png
│ │ │ ├── ambulance (2).png
│ │ │ └── ambulance-svgrepo-com.svg
│ │ ├── manifest.json
│ │ └── index.html
│ ├── postcss.config.js
│ ├── Dockerfile
│ ├── tailwind.config.js
│ ├── src
│ │ ├── setupTests.js
│ │ ├── App.test.js
│ │ ├── reportWebVitals.js
│ │ ├── index.css
│ │ ├── index.js
│ │ ├── App.css
│ │ ├── logo.svg
│ │ ├── App.js
│ │ └── dist
│ │ │ └── output.css
│ ├── .gitignore
│ ├── package.json
│ └── README.md
│ ├── amb-driver
│ ├── public
│ │ ├── robots.txt
│ │ ├── favicon.ico
│ │ ├── logo192.png
│ │ ├── logo512.png
│ │ ├── icons
│ │ │ ├── amb1.gif
│ │ │ ├── amb2.gif
│ │ │ ├── amb3.gif
│ │ │ ├── newamb.gif
│ │ │ ├── siren.png
│ │ │ ├── newamb2.gif
│ │ │ ├── newamb3.gif
│ │ │ ├── newamb4.gif
│ │ │ ├── working.gif
│ │ │ ├── ambulance.png
│ │ │ ├── isworking.gif
│ │ │ ├── ambulance (1).png
│ │ │ ├── ambulance (2).png
│ │ │ └── ambulance-svgrepo-com.svg
│ │ ├── manifest.json
│ │ └── index.html
│ ├── postcss.config.js
│ ├── Dockerfile
│ ├── tailwind.config.js
│ ├── src
│ │ ├── setupTests.js
│ │ ├── App.test.js
│ │ ├── reportWebVitals.js
│ │ ├── components
│ │ │ ├── LearnMore.js
│ │ │ ├── Home.js
│ │ │ ├── SignupForm.js
│ │ │ ├── Driver.js
│ │ │ └── LoginForm.js
│ │ ├── index.css
│ │ ├── index.js
│ │ ├── App.js
│ │ ├── App.css
│ │ ├── Hooks
│ │ │ └── useGeolocation.js
│ │ └── dist
│ │ │ └── output.css
│ ├── .gitignore
│ ├── config-overrides.js
│ ├── package.json
│ └── README.md
│ └── hospital-display
│ ├── public
│ ├── robots.txt
│ ├── favicon.ico
│ ├── logo192.png
│ ├── logo512.png
│ ├── icons
│ │ ├── siren.png
│ │ ├── ambulance.png
│ │ ├── ambulance (1).png
│ │ ├── ambulance (2).png
│ │ └── ambulance-svgrepo-com.svg
│ ├── manifest.json
│ └── index.html
│ ├── postcss.config.js
│ ├── src
│ ├── config
│ │ └── HospitalCoords.js
│ ├── setupTests.js
│ ├── App.test.js
│ ├── reportWebVitals.js
│ ├── index.css
│ ├── components
│ │ ├── Coords.js
│ │ ├── Coord.js
│ │ └── Nav.js
│ ├── index.js
│ └── App.js
│ ├── Dockerfile
│ ├── tailwind.config.js
│ ├── package.json
│ └── README.md
├── server
├── Dockerfile
├── Models
│ └── Driver.js
├── package.json
├── index.js
└── routes
│ └── Auth.js
├── .gitignore
├── CONTRIBUTING.md
├── LICENSE
├── .github
└── PR_Template.md
├── README.md
├── docker-compose.yml
└── CODE_OF_CONDUCT.md
/Android/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/Android/.idea/.name:
--------------------------------------------------------------------------------
1 | AmbulanseTracker
--------------------------------------------------------------------------------
/Android/README.md:
--------------------------------------------------------------------------------
1 | # Comment made by Olivier
--------------------------------------------------------------------------------
/Android/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 |
--------------------------------------------------------------------------------
/Android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 | rootProject.name = "AmbulanseTracker"
--------------------------------------------------------------------------------
/Web/clients/admin/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/Web/clients/amb-driver/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/Web/clients/hospital-display/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/Web/clients/admin/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/admin/public/favicon.ico
--------------------------------------------------------------------------------
/Web/clients/admin/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/admin/public/logo192.png
--------------------------------------------------------------------------------
/Web/clients/admin/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/admin/public/logo512.png
--------------------------------------------------------------------------------
/Android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/Web/clients/admin/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | tailwindcss: {},
4 | autoprefixer: {},
5 | },
6 | }
7 |
--------------------------------------------------------------------------------
/Web/clients/admin/public/icons/amb1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/admin/public/icons/amb1.gif
--------------------------------------------------------------------------------
/Web/clients/admin/public/icons/amb2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/admin/public/icons/amb2.gif
--------------------------------------------------------------------------------
/Web/clients/admin/public/icons/amb3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/admin/public/icons/amb3.gif
--------------------------------------------------------------------------------
/Web/clients/admin/public/icons/newamb.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/admin/public/icons/newamb.gif
--------------------------------------------------------------------------------
/Web/clients/admin/public/icons/siren.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/admin/public/icons/siren.png
--------------------------------------------------------------------------------
/Web/clients/amb-driver/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/amb-driver/public/favicon.ico
--------------------------------------------------------------------------------
/Web/clients/amb-driver/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/amb-driver/public/logo192.png
--------------------------------------------------------------------------------
/Web/clients/amb-driver/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/amb-driver/public/logo512.png
--------------------------------------------------------------------------------
/Web/clients/admin/public/icons/newamb2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/admin/public/icons/newamb2.gif
--------------------------------------------------------------------------------
/Web/clients/admin/public/icons/newamb3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/admin/public/icons/newamb3.gif
--------------------------------------------------------------------------------
/Web/clients/admin/public/icons/newamb4.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/admin/public/icons/newamb4.gif
--------------------------------------------------------------------------------
/Web/clients/admin/public/icons/working.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/admin/public/icons/working.gif
--------------------------------------------------------------------------------
/Web/clients/amb-driver/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | tailwindcss: {},
4 | autoprefixer: {},
5 | },
6 | }
7 |
--------------------------------------------------------------------------------
/Web/clients/admin/public/icons/ambulance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/admin/public/icons/ambulance.png
--------------------------------------------------------------------------------
/Web/clients/admin/public/icons/isworking.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/admin/public/icons/isworking.gif
--------------------------------------------------------------------------------
/Web/clients/amb-driver/public/icons/amb1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/amb-driver/public/icons/amb1.gif
--------------------------------------------------------------------------------
/Web/clients/amb-driver/public/icons/amb2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/amb-driver/public/icons/amb2.gif
--------------------------------------------------------------------------------
/Web/clients/amb-driver/public/icons/amb3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/amb-driver/public/icons/amb3.gif
--------------------------------------------------------------------------------
/Web/clients/amb-driver/public/icons/newamb.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/amb-driver/public/icons/newamb.gif
--------------------------------------------------------------------------------
/Web/clients/amb-driver/public/icons/siren.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/amb-driver/public/icons/siren.png
--------------------------------------------------------------------------------
/Web/clients/hospital-display/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | tailwindcss: {},
4 | autoprefixer: {},
5 | },
6 | }
7 |
--------------------------------------------------------------------------------
/Web/clients/admin/public/icons/ambulance (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/admin/public/icons/ambulance (1).png
--------------------------------------------------------------------------------
/Web/clients/admin/public/icons/ambulance (2).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/admin/public/icons/ambulance (2).png
--------------------------------------------------------------------------------
/Web/clients/amb-driver/public/icons/newamb2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/amb-driver/public/icons/newamb2.gif
--------------------------------------------------------------------------------
/Web/clients/amb-driver/public/icons/newamb3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/amb-driver/public/icons/newamb3.gif
--------------------------------------------------------------------------------
/Web/clients/amb-driver/public/icons/newamb4.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/amb-driver/public/icons/newamb4.gif
--------------------------------------------------------------------------------
/Web/clients/amb-driver/public/icons/working.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/amb-driver/public/icons/working.gif
--------------------------------------------------------------------------------
/Web/clients/hospital-display/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/hospital-display/public/favicon.ico
--------------------------------------------------------------------------------
/Web/clients/hospital-display/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/hospital-display/public/logo192.png
--------------------------------------------------------------------------------
/Web/clients/hospital-display/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/hospital-display/public/logo512.png
--------------------------------------------------------------------------------
/Web/clients/amb-driver/public/icons/ambulance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/amb-driver/public/icons/ambulance.png
--------------------------------------------------------------------------------
/Web/clients/amb-driver/public/icons/isworking.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/amb-driver/public/icons/isworking.gif
--------------------------------------------------------------------------------
/Web/clients/hospital-display/public/icons/siren.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/hospital-display/public/icons/siren.png
--------------------------------------------------------------------------------
/Android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Web/clients/amb-driver/public/icons/ambulance (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/amb-driver/public/icons/ambulance (1).png
--------------------------------------------------------------------------------
/Web/clients/amb-driver/public/icons/ambulance (2).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/amb-driver/public/icons/ambulance (2).png
--------------------------------------------------------------------------------
/Web/clients/hospital-display/src/config/HospitalCoords.js:
--------------------------------------------------------------------------------
1 | export const hospitalLatitude = 17.761146480492354;
2 | export const hospitalLongitude = 83.31641637015535;
--------------------------------------------------------------------------------
/Android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Web/clients/hospital-display/public/icons/ambulance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/hospital-display/public/icons/ambulance.png
--------------------------------------------------------------------------------
/Android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/Android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/server/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:alpine
2 |
3 | WORKDIR /app
4 | COPY package.json .
5 | COPY package-lock.json .
6 |
7 | COPY ./ ./
8 | RUN npm i
9 | CMD ["npm", "run" , "start"]
--------------------------------------------------------------------------------
/Android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/Android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/Web/clients/hospital-display/public/icons/ambulance (1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/hospital-display/public/icons/ambulance (1).png
--------------------------------------------------------------------------------
/Web/clients/hospital-display/public/icons/ambulance (2).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/csgeeek/Ambulance-tracker/HEAD/Web/clients/hospital-display/public/icons/ambulance (2).png
--------------------------------------------------------------------------------
/Web/clients/admin/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:alpine
2 |
3 | WORKDIR /app
4 | COPY package.json .
5 | COPY package-lock.json .
6 |
7 | COPY ./ ./
8 | RUN npm i
9 | CMD ["npm", "run" , "start"]
--------------------------------------------------------------------------------
/Web/clients/amb-driver/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:alpine
2 |
3 | WORKDIR /app
4 | COPY package.json .
5 | COPY package-lock.json .
6 |
7 | COPY ./ ./
8 | RUN npm i
9 | CMD ["npm", "run" , "start"]
--------------------------------------------------------------------------------
/Web/clients/amb-driver/tailwind.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | content: [
3 | "./src/**/*.{js,jsx,ts,tsx}",
4 | ],
5 | theme: {
6 | extend: {},
7 | },
8 | plugins: [],
9 | }
--------------------------------------------------------------------------------
/Web/clients/hospital-display/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:alpine
2 |
3 | WORKDIR /app
4 | COPY package.json .
5 | COPY package-lock.json .
6 |
7 | COPY ./ ./
8 | RUN npm i
9 | CMD ["npm", "run" , "start"]
--------------------------------------------------------------------------------
/Web/clients/hospital-display/tailwind.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | content: [
3 | "./src/**/*.{js,jsx,ts,tsx}",
4 | ],
5 | theme: {
6 | extend: {},
7 | },
8 | plugins: [],
9 | }
--------------------------------------------------------------------------------
/Android/.idea/dictionaries/Olivier.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | coords
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Android/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Web/clients/admin/tailwind.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('tailwindcss').Config} */
2 | module.exports = {
3 | content: ["./src/**/*.{html,js}"],
4 | theme: {
5 | extend: {},
6 | },
7 | plugins: [],
8 | }
9 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | #clients
3 | #amb-driver
4 | clients/amb-driver/node_modules
5 |
6 | #Hospital-display
7 | clients/hospital-display/node_modules
8 |
9 |
10 | #server
11 | server/node_modules
12 | server/.env
13 |
--------------------------------------------------------------------------------
/Android/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Android/app/src/main/java/com/ambulansetracker/LoginResult.java:
--------------------------------------------------------------------------------
1 | package com.ambulansetracker;
2 |
3 | public class LoginResult {
4 | String driver;
5 |
6 | public String getDriver() {
7 | return driver;
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Web/clients/admin/src/setupTests.js:
--------------------------------------------------------------------------------
1 | // jest-dom adds custom jest matchers for asserting on DOM nodes.
2 | // allows you to do things like:
3 | // expect(element).toHaveTextContent(/react/i)
4 | // learn more: https://github.com/testing-library/jest-dom
5 | import '@testing-library/jest-dom';
6 |
--------------------------------------------------------------------------------
/Android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Sep 20 18:50:27 CEST 2022
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
7 |
--------------------------------------------------------------------------------
/Web/clients/amb-driver/src/setupTests.js:
--------------------------------------------------------------------------------
1 | // jest-dom adds custom jest matchers for asserting on DOM nodes.
2 | // allows you to do things like:
3 | // expect(element).toHaveTextContent(/react/i)
4 | // learn more: https://github.com/testing-library/jest-dom
5 | import '@testing-library/jest-dom';
6 |
--------------------------------------------------------------------------------
/Web/clients/hospital-display/src/setupTests.js:
--------------------------------------------------------------------------------
1 | // jest-dom adds custom jest matchers for asserting on DOM nodes.
2 | // allows you to do things like:
3 | // expect(element).toHaveTextContent(/react/i)
4 | // learn more: https://github.com/testing-library/jest-dom
5 | import '@testing-library/jest-dom';
6 |
--------------------------------------------------------------------------------
/Web/clients/admin/src/App.test.js:
--------------------------------------------------------------------------------
1 | import { render, screen } from '@testing-library/react';
2 | import App from './App';
3 |
4 | test('renders learn react link', () => {
5 | render( );
6 | const linkElement = screen.getByText(/learn react/i);
7 | expect(linkElement).toBeInTheDocument();
8 | });
9 |
--------------------------------------------------------------------------------
/Web/clients/amb-driver/src/App.test.js:
--------------------------------------------------------------------------------
1 | import { render, screen } from '@testing-library/react';
2 | import App from './App';
3 |
4 | test('renders learn react link', () => {
5 | render( );
6 | const linkElement = screen.getByText(/learn react/i);
7 | expect(linkElement).toBeInTheDocument();
8 | });
9 |
--------------------------------------------------------------------------------
/Android/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 | .cxx
15 | local.properties
16 |
--------------------------------------------------------------------------------
/Web/clients/hospital-display/src/App.test.js:
--------------------------------------------------------------------------------
1 | import { render, screen } from '@testing-library/react';
2 | import App from './App';
3 |
4 | test('renders learn react link', () => {
5 | render( );
6 | const linkElement = screen.getByText(/learn react/i);
7 | expect(linkElement).toBeInTheDocument();
8 | });
9 |
--------------------------------------------------------------------------------
/Android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | AmbulanseTracker
3 | SignUp
4 | Login
5 | Password
6 | Username
7 | Start Tracking
8 |
--------------------------------------------------------------------------------
/Android/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Web/clients/admin/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/server/Models/Driver.js:
--------------------------------------------------------------------------------
1 | const mongoose = require('mongoose');
2 |
3 | const DriverSchema = new mongoose.Schema({
4 | name: {
5 | type: String,
6 | required: true,
7 | },
8 | password: {
9 | type: String,
10 | required: true
11 | },
12 | ambNumber: {
13 | type: String,
14 | required: true,
15 | },
16 | });
17 |
18 | module.exports = mongoose.model('Driver', DriverSchema);
--------------------------------------------------------------------------------
/Web/clients/amb-driver/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/Android/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 |
--------------------------------------------------------------------------------
/Web/clients/admin/src/reportWebVitals.js:
--------------------------------------------------------------------------------
1 | const reportWebVitals = onPerfEntry => {
2 | if (onPerfEntry && onPerfEntry instanceof Function) {
3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
4 | getCLS(onPerfEntry);
5 | getFID(onPerfEntry);
6 | getFCP(onPerfEntry);
7 | getLCP(onPerfEntry);
8 | getTTFB(onPerfEntry);
9 | });
10 | }
11 | };
12 |
13 | export default reportWebVitals;
14 |
--------------------------------------------------------------------------------
/Web/clients/amb-driver/src/reportWebVitals.js:
--------------------------------------------------------------------------------
1 | const reportWebVitals = onPerfEntry => {
2 | if (onPerfEntry && onPerfEntry instanceof Function) {
3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
4 | getCLS(onPerfEntry);
5 | getFID(onPerfEntry);
6 | getFCP(onPerfEntry);
7 | getLCP(onPerfEntry);
8 | getTTFB(onPerfEntry);
9 | });
10 | }
11 | };
12 |
13 | export default reportWebVitals;
14 |
--------------------------------------------------------------------------------
/Web/clients/hospital-display/src/reportWebVitals.js:
--------------------------------------------------------------------------------
1 | const reportWebVitals = onPerfEntry => {
2 | if (onPerfEntry && onPerfEntry instanceof Function) {
3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
4 | getCLS(onPerfEntry);
5 | getFID(onPerfEntry);
6 | getFCP(onPerfEntry);
7 | getLCP(onPerfEntry);
8 | getTTFB(onPerfEntry);
9 | });
10 | }
11 | };
12 |
13 | export default reportWebVitals;
14 |
--------------------------------------------------------------------------------
/Web/clients/amb-driver/src/components/LearnMore.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Link } from "react-router-dom";
3 |
4 | const LearnMore = () => {
5 | return (
6 |
7 | Signing up drivers can only be done by Administrators. To add a user, please contact the administrator of this project at
Link .
8 |
Back
9 |
10 | );
11 | };
12 |
13 | export default LearnMore;
--------------------------------------------------------------------------------
/Android/app/src/test/java/com/ambulansetracker/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.ambulansetracker;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/Android/app/src/main/java/com/ambulansetracker/Driver.java:
--------------------------------------------------------------------------------
1 | package com.ambulansetracker;
2 |
3 | import java.io.Serializable;
4 |
5 | public class Driver implements Serializable {
6 | private String name;
7 | private String ambNumber;
8 | private String desc;
9 |
10 | public String getName() {
11 | return name;
12 | }
13 |
14 | public String getAmbNumber() {
15 | return ambNumber;
16 | }
17 |
18 | public String getDesc() {
19 | return desc;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Web/clients/admin/src/index.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
4 |
5 | body {
6 | margin: 0;
7 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
8 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
9 | sans-serif;
10 | -webkit-font-smoothing: antialiased;
11 | -moz-osx-font-smoothing: grayscale;
12 | }
13 |
14 | code {
15 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
16 | monospace;
17 | }
--------------------------------------------------------------------------------
/Web/clients/amb-driver/src/index.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
4 |
5 | body {
6 | margin: 0;
7 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
8 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
9 | sans-serif;
10 | -webkit-font-smoothing: antialiased;
11 | -moz-osx-font-smoothing: grayscale;
12 | }
13 |
14 | code {
15 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
16 | monospace;
17 | }
18 |
--------------------------------------------------------------------------------
/Web/clients/hospital-display/src/index.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
4 |
5 | body {
6 | margin: 0;
7 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
8 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
9 | sans-serif;
10 | -webkit-font-smoothing: antialiased;
11 | -moz-osx-font-smoothing: grayscale;
12 | }
13 |
14 | code {
15 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
16 | monospace;
17 | }
18 |
--------------------------------------------------------------------------------
/Web/clients/hospital-display/src/components/Coords.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Coord from './Coord';
3 |
4 | const Coords = ( { coords } ) => {
5 | return (
6 | <>
7 | {
8 | coords.length === 0? Nothing to display :
9 |
10 | {coords.map((coord, index) => {
11 | return
12 | })}
13 |
14 | }
15 | >
16 | )
17 | }
18 |
19 | export default Coords
--------------------------------------------------------------------------------
/Android/app/src/main/java/com/ambulansetracker/RetrofitInterface.java:
--------------------------------------------------------------------------------
1 | package com.ambulansetracker;
2 |
3 | import android.preference.PreferenceManager;
4 |
5 | import java.util.HashMap;
6 |
7 | import retrofit2.Call;
8 | import retrofit2.http.Body;
9 | import retrofit2.http.GET;
10 | import retrofit2.http.Header;
11 | import retrofit2.http.POST;
12 |
13 | public interface RetrofitInterface {
14 | @POST("/api/auth/login")
15 | Call executeLogin(@Body HashMap hashMap);
16 | @GET("/api/auth/name")
17 | Call validateToken(@Header("x-access-token") String token);
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/Web/clients/admin/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom/client';
3 | import './index.css';
4 | import App from './App';
5 | import reportWebVitals from './reportWebVitals';
6 |
7 | const root = ReactDOM.createRoot(document.getElementById('root'));
8 | root.render(
9 |
10 |
11 |
12 | );
13 |
14 | // If you want to start measuring performance in your app, pass a function
15 | // to log results (for example: reportWebVitals(console.log))
16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
17 | reportWebVitals();
18 |
--------------------------------------------------------------------------------
/Web/clients/admin/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/Web/clients/amb-driver/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom/client';
3 | import './index.css';
4 | import App from './App';
5 | import reportWebVitals from './reportWebVitals';
6 |
7 | const root = ReactDOM.createRoot(document.getElementById('root'));
8 | root.render(
9 |
10 |
11 |
12 | );
13 |
14 | // If you want to start measuring performance in your app, pass a function
15 | // to log results (for example: reportWebVitals(console.log))
16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
17 | reportWebVitals();
18 |
--------------------------------------------------------------------------------
/Web/clients/amb-driver/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/Web/clients/hospital-display/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom/client';
3 | import './index.css';
4 | import App from './App';
5 | import reportWebVitals from './reportWebVitals';
6 |
7 | const root = ReactDOM.createRoot(document.getElementById('root'));
8 | root.render(
9 |
10 |
11 |
12 | );
13 |
14 | // If you want to start measuring performance in your app, pass a function
15 | // to log results (for example: reportWebVitals(console.log))
16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
17 | reportWebVitals();
18 |
--------------------------------------------------------------------------------
/Android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 | buildscript {
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath "com.android.tools.build:gradle:4.1.2"
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | google()
18 | jcenter()
19 | }
20 | }
21 |
22 | task clean(type: Delete) {
23 | delete rootProject.buildDir
24 | }
--------------------------------------------------------------------------------
/Web/clients/hospital-display/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/server/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "server",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "start": "node index.js",
8 | "dev": "nodemon index.js",
9 | "test": "echo \"Error: no test specified\" && exit 1"
10 | },
11 | "keywords": [],
12 | "author": "",
13 | "license": "ISC",
14 | "dependencies": {
15 | "bcrypt": "^5.0.1",
16 | "cors": "^2.8.5",
17 | "dotenv": "^16.0.1",
18 | "express": "^4.18.1",
19 | "jsonwebtoken": "^8.5.1",
20 | "mongoose": "^6.3.3",
21 | "socket.io": "^4.5.0"
22 | },
23 | "devDependencies": {
24 | "nodemon": "^2.0.16"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # CONTRIBUTING to Ambulance Tracker
2 |
3 | ### What can I contribute to?
4 | - You can work on current issues.
5 | - If you think that there could be an improvement or a bug fix, you can create an issue and work on it.
6 |
7 |
8 | ### How to contribute
9 | - Fork this [repo](https://github.com/Yaswanth820/Ambulance-tracker)
10 | - Clone the forked repo
11 | - [Create your branch](https://www.atlassian.com/git/tutorials/using-branches/git-checkout#:~:text=New%20Branches&text=The%20git%20branch%20command%20can,to%20switch%20to%20that%20branch.)
12 | - [Run project locally](https://github.com/Yaswanth820/Ambulance-tracker/blob/main/README.md)
13 | - Make changes
14 | - git push
15 | - Open a PR for reviewing
16 |
17 | #### Happy coding 🎉
18 |
--------------------------------------------------------------------------------
/Web/clients/admin/src/App.css:
--------------------------------------------------------------------------------
1 | .App {
2 | text-align: center;
3 | }
4 |
5 | .App-logo {
6 | height: 40vmin;
7 | pointer-events: none;
8 | }
9 |
10 | @media (prefers-reduced-motion: no-preference) {
11 | .App-logo {
12 | animation: App-logo-spin infinite 20s linear;
13 | }
14 | }
15 |
16 | .App-header {
17 | background-color: #282c34;
18 | min-height: 100vh;
19 | display: flex;
20 | flex-direction: column;
21 | align-items: center;
22 | justify-content: center;
23 | font-size: calc(10px + 2vmin);
24 | color: white;
25 | }
26 |
27 | .App-link {
28 | color: #61dafb;
29 | }
30 |
31 | @keyframes App-logo-spin {
32 | from {
33 | transform: rotate(0deg);
34 | }
35 | to {
36 | transform: rotate(360deg);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Web/clients/amb-driver/config-overrides.js:
--------------------------------------------------------------------------------
1 | const webpack = require('webpack');
2 | module.exports = function override(config, env) {
3 | config.resolve.fallback = {
4 | url: require.resolve('url'),
5 | fs: require.resolve('fs'),
6 | assert: require.resolve('assert'),
7 | crypto: require.resolve('crypto-browserify'),
8 | http: require.resolve('stream-http'),
9 | https: require.resolve('https-browserify'),
10 | os: require.resolve('os-browserify/browser'),
11 | buffer: require.resolve('buffer'),
12 | stream: require.resolve('stream-browserify'),
13 | };
14 | config.plugins.push(
15 | new webpack.ProvidePlugin({
16 | process: 'process/browser',
17 | Buffer: ['buffer', 'Buffer'],
18 | }),
19 | );
20 |
21 | return config;
22 | }
--------------------------------------------------------------------------------
/Android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/Web/clients/amb-driver/src/App.js:
--------------------------------------------------------------------------------
1 | import './dist/output.css';
2 | import './App.css';
3 | import Driver from './components/Driver';
4 | import { BrowserRouter as Router, Route, Routes } from "react-router-dom";
5 |
6 | import Home from './components/Home';
7 | import LoginForm from './components/LoginForm';
8 | import SignupForm from './components/SignupForm';
9 |
10 |
11 | const App = () => {
12 | return (
13 |
14 |
15 |
16 | } />
17 | } />
18 | } />
19 | } />
20 | } />
21 |
22 |
23 |
24 | );
25 | }
26 |
27 | export default App;
--------------------------------------------------------------------------------
/Android/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
--------------------------------------------------------------------------------
/Android/app/src/main/res/values-night/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
--------------------------------------------------------------------------------
/Android/app/src/androidTest/java/com/ambulansetracker/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.ambulansetracker;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.platform.app.InstrumentationRegistry;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24 | assertEquals("com.ambulansetracker", appContext.getPackageName());
25 | }
26 | }
--------------------------------------------------------------------------------
/Android/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Web/clients/amb-driver/src/App.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
4 |
5 | @layer base {
6 | [type="text"],
7 | [type="email"],
8 | [type="url"],
9 | [type="password"],
10 | [type="number"],
11 | [type="date"],
12 | [type="datetime-local"],
13 | [type="month"],
14 | [type="search"],
15 | [type="tel"],
16 | [type="time"],
17 | [type="week"],
18 | [multiple],
19 | textarea,
20 | select {
21 | @apply w-full border-gray-300 rounded-lg shadow-sm focus:border-indigo-500 focus:ring-indigo-500;
22 | }
23 | [type="checkbox"],
24 | [type="radio"] {
25 | @apply border-gray-300 rounded text-indigo-600 focus:ring-indigo-500;
26 | }
27 | }
28 |
29 | .App{
30 | overflow-x: hidden;
31 | }
32 | .amb{
33 | height: auto;
34 | animation: ambulance 5.5s infinite linear;
35 | }
36 |
37 | @keyframes ambulance{
38 | from{
39 | transform: translateX(-30%);
40 | }
41 | to{
42 | transform: translateX(80%);
43 | }
44 | }
--------------------------------------------------------------------------------
/Web/clients/amb-driver/src/Hooks/useGeolocation.js:
--------------------------------------------------------------------------------
1 | import { useState, useEffect } from 'react';
2 |
3 | const useGeolocation = () => {
4 |
5 | const [location, setLocation] = useState({
6 | coord:{
7 | loaded: false,
8 | lat: null,
9 | lng: null
10 | }
11 | });
12 |
13 | // learn more about useEffect
14 | useEffect(() => {
15 | const success = (pos) => {
16 | const crd = pos.coords;
17 | setLocation({
18 | coord:{
19 | loaded: true,
20 | lat: crd.latitude,
21 | lng: crd.longitude
22 | }
23 | });
24 | };
25 |
26 | const error = (err) => {
27 | console.warn('ERROR(' + err.code + '): ' + err.message);
28 | };
29 |
30 | const options = {
31 | enableHighAccuracy: true,
32 | timeout: 2000,
33 | };
34 |
35 | const id = navigator.geolocation.watchPosition(success, error, options);
36 |
37 | return () => {
38 | navigator.geolocation.clearWatch(id);
39 | }
40 | }, []);
41 |
42 | return location;
43 | }
44 |
45 | export default useGeolocation;
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Balaji Yaswanth Vankala
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Android/.idea/jarRepositories.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Web/clients/admin/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "admin",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^5.16.4",
7 | "@testing-library/react": "^13.3.0",
8 | "@testing-library/user-event": "^13.5.0",
9 | "react": "^18.2.0",
10 | "react-dom": "^18.2.0",
11 | "react-router-dom": "^6.3.0",
12 | "react-scripts": "5.0.1",
13 | "web-vitals": "^2.1.4"
14 | },
15 | "scripts": {
16 | "start": "react-scripts start",
17 | "build": "react-scripts build",
18 | "test": "react-scripts test",
19 | "eject": "react-scripts eject"
20 | },
21 | "eslintConfig": {
22 | "extends": [
23 | "react-app",
24 | "react-app/jest"
25 | ]
26 | },
27 | "browserslist": {
28 | "production": [
29 | ">0.2%",
30 | "not dead",
31 | "not op_mini all"
32 | ],
33 | "development": [
34 | "last 1 chrome version",
35 | "last 1 firefox version",
36 | "last 1 safari version"
37 | ]
38 | },
39 | "devDependencies": {
40 | "autoprefixer": "^10.4.7",
41 | "postcss": "^8.4.14",
42 | "tailwindcss": "^3.1.5"
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/Android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app"s APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Automatically convert third-party libraries to use AndroidX
19 | android.enableJetifier=true
--------------------------------------------------------------------------------
/Web/clients/hospital-display/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "hospital-display",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@headlessui/react": "^1.6.3",
7 | "@heroicons/react": "^1.0.6",
8 | "@testing-library/jest-dom": "^5.16.4",
9 | "@testing-library/react": "^13.2.0",
10 | "@testing-library/user-event": "^13.5.0",
11 | "react": "^18.1.0",
12 | "react-dom": "^18.1.0",
13 | "react-scripts": "5.0.1",
14 | "socket.io-client": "^4.5.0",
15 | "web-vitals": "^2.1.4"
16 | },
17 | "scripts": {
18 | "start": "react-scripts start",
19 | "build": "react-scripts build",
20 | "test": "react-scripts test",
21 | "eject": "react-scripts eject"
22 | },
23 | "eslintConfig": {
24 | "extends": [
25 | "react-app",
26 | "react-app/jest"
27 | ]
28 | },
29 | "browserslist": {
30 | "production": [
31 | ">0.2%",
32 | "not dead",
33 | "not op_mini all"
34 | ],
35 | "development": [
36 | "last 1 chrome version",
37 | "last 1 firefox version",
38 | "last 1 safari version"
39 | ]
40 | },
41 | "devDependencies": {
42 | "autoprefixer": "^10.4.7",
43 | "postcss": "^8.4.14",
44 | "tailwindcss": "^3.0.24"
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/Web/clients/amb-driver/src/components/Home.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { useNavigate } from 'react-router-dom';
3 |
4 | const Home = () => {
5 |
6 | const navigate = useNavigate();
7 | const handleLogin = () => {
8 | navigate('/login');
9 | }
10 | const handleSignup = () => {
11 | navigate('/signup');
12 | }
13 | return (
14 |
15 |
Hello Ambulance driver
16 |
17 |
18 |
19 |
20 | Sign in
21 | Sign Up
22 |
23 |
24 |
25 | )
26 | }
27 |
28 | export default Home;
--------------------------------------------------------------------------------
/Android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/server/index.js:
--------------------------------------------------------------------------------
1 | const PORT = process.env.PORT || 5000;
2 |
3 | const dotenv = require('dotenv')
4 | dotenv.config();
5 |
6 | const express = require('express');
7 | const app = express();
8 | const http = require('http');
9 | const server = http.createServer(app);
10 |
11 | const cors = require('cors');
12 |
13 | const mongoose = require('mongoose');
14 | mongoose.connect(process.env.DB_URI, () => console.log('connected to DB'));
15 |
16 | const io = require('socket.io')(server, { cors: { origin: "*" } });
17 |
18 |
19 | // MIDDLEWARES
20 | app.use(cors());
21 | app.use(express.json());
22 |
23 | const authRoutes = require('./routes/Auth.js');
24 | app.use('/api/auth', authRoutes);
25 |
26 | app.get('/', (req, res) => {
27 | res.send('Hello');
28 | });
29 |
30 | server.listen(PORT, () => console.log(`socket server listening on port ${PORT}`));
31 | let sid = '';
32 |
33 | io.on('connection', (socket) => {
34 | console.log('Client connected');
35 |
36 | let uniqId = '';
37 | socket.on('send-id', (data) => {
38 | sid = data;
39 | });
40 |
41 | socket.on('send-coords', (data) => {
42 | const parsedData = JSON.parse(data);
43 | uniqId = parsedData.id;
44 | socket.to(sid).emit('reply', data);
45 | });
46 |
47 | socket.on('disconnect', () => {
48 | socket.to(sid).emit('disconnect-client', uniqId);
49 | });
50 | });
--------------------------------------------------------------------------------
/Web/clients/hospital-display/src/App.js:
--------------------------------------------------------------------------------
1 | import { useState } from 'react';
2 | import { io } from 'socket.io-client';
3 | import Coords from './components/Coords';
4 | import Nav from './components/Nav';
5 |
6 | const socket = io('http://localhost:5000');
7 |
8 | function App() {
9 |
10 | const [coords, setCoords] = useState([]);
11 | document.title="Ambulance Tracker"
12 | socket.on('reply', (datum) => {
13 | const parsedData = JSON.parse(datum);
14 | setCoords(prev => {
15 |
16 | let index = prev.length;
17 | let part1 = prev.slice(0, index);
18 | let part2 = prev.slice(index);
19 |
20 | prev.map(coord => {
21 | if (coord.id === parsedData.id) {
22 | index = prev.indexOf(coord);
23 | part1 = prev.slice(0, index);
24 | part2 = prev.slice(index + 1);
25 | }
26 | return null;
27 | });
28 |
29 | return [...part1, parsedData, ...part2];
30 | });
31 | });
32 |
33 | socket.on('disconnect-client', (uniqid) => {
34 | setCoords(prev => {
35 | return prev.filter(coord => coord.id !== uniqid);
36 | });
37 | })
38 |
39 | const sendID = () => {
40 | console.log('ID sent');
41 | socket.emit('send-id', socket.id);
42 | }
43 |
44 | return (
45 |
46 |
47 |
48 |
49 | );
50 | }
51 |
52 | export default App;
--------------------------------------------------------------------------------
/Web/clients/amb-driver/src/components/SignupForm.js:
--------------------------------------------------------------------------------
1 | import { Link } from 'react-router-dom';
2 |
3 | const SignupForm = () => {
4 | return (
5 |
6 |
7 |
8 |
9 | Ready to Sign up?
10 | Contact the Administrator
11 |
12 |
13 |
14 |
18 | Login
19 |
20 |
21 |
22 |
26 | Learn more
27 |
28 |
29 |
30 |
31 |
32 |
33 | )
34 | }
35 |
36 | export default SignupForm;
--------------------------------------------------------------------------------
/.github/PR_Template.md:
--------------------------------------------------------------------------------
1 | ## Related Issue
2 | - Mention issue for which this pull request is a part of (please mention issue number # )
3 |
4 | ## Proposed Changes
5 | - Change 1
6 | - Chnage 2
7 |
8 | ## Additional Info
9 | - Any additional information or context
10 |
11 | ## Checklist
12 |
13 |
14 |
15 | - [ ] ✅ My code follows the code style of this project.
16 | - [ ] 📝 My change requires a change to the documentation.
17 | - [ ] 🎀 I have updated the documentation accordingly.
18 | - [ ] 🌟 ed the repo
19 |
20 |
21 | - [ ] Bug fix (non-breaking change which fixes an issue)
22 | - [ ] New feature (non-breaking change which adds functionality)
23 | - [ ] Breaking change (fix or feature that would cause existing functionality to change)
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 | ## Output Screenshots
39 | | Screenshot #1 | Screenshot #2 |
40 | | ----------- | ----------- |
41 | | Title goes here | Title goes here |
42 | | Image goes here | Image goes here |
43 |
--------------------------------------------------------------------------------
/Android/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.application'
3 | }
4 |
5 | android {
6 | compileSdkVersion 32
7 | buildToolsVersion "30.0.3"
8 |
9 | defaultConfig {
10 | applicationId "com.ambulansetracker"
11 | minSdkVersion 26
12 | targetSdkVersion 32
13 | versionCode 1
14 | versionName "1.0"
15 |
16 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
17 | }
18 |
19 | buildTypes {
20 | release {
21 | minifyEnabled false
22 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
23 | }
24 | }
25 | compileOptions {
26 | sourceCompatibility JavaVersion.VERSION_1_8
27 | targetCompatibility JavaVersion.VERSION_1_8
28 | }
29 | }
30 |
31 | dependencies {
32 | implementation ('io.socket:socket.io-client:2.1.0') {
33 | // excluding org.json which is provided by Android
34 | exclude group: 'org.json', module: 'json'
35 | }
36 | implementation 'com.squareup.okhttp3:okhttp:3.10.0'
37 | implementation 'com.google.android.gms:play-services-location:20.0.0'
38 | implementation 'com.squareup.retrofit2:retrofit:2.3.0'
39 | implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
40 | implementation 'androidx.appcompat:appcompat:1.5.1'
41 | implementation 'com.google.android.material:material:1.6.1'
42 | implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
43 | testImplementation 'junit:junit:4.+'
44 | androidTestImplementation 'androidx.test.ext:junit:1.1.3'
45 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
46 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Smart Siren (Ambulance-Tracker) 🚑
2 |
3 | This web app assists hospitals by bridging the communication gap between Ambulance driver and hospital management especially during emergency cases. This web app successfully tracks and alerts hospital management by which delay in treatment of patient can be reduced. This could potentially save lives.
4 |
5 | This webapp notifies hospital when an ambulance is within 3km range of a hospital. This will be very useful at times of emergency cases which assists in timely treatement of patients. This works by tracking ambulance location(coordinates) in real-time. The location stats will also be updated in realtime on hospital's display board.
6 |
7 | This webapp was built using `ReactJS`, `Node.js`, `Express`, `MongoDB`, `Socket.io`, `Geo-location API`, `TailwindCSS`.
8 |
9 | To install the webapp, run the following commands:-
10 |
11 | - https://github.com/csgeeek/Ambulance-tracker.git
12 | - npm install (in server, clients folders)
13 |
14 | To initialize the project follow the below steps:-
15 |
16 | - Download and install MongoDB compass
17 | - Create a database with in the MongoDB compass application
18 | - Create a .env file in the server folder with the following details DB_URI=https://localhost:27017/
19 |
20 | Run the project => `npm start`
21 |
22 | ## Links
23 | Check out the working of my project [here](https://youtu.be/KkqGRHMl9Sk).
24 |
25 | Check out the deployed web app [here](https://react-amb-driver.herokuapp.com/ ).
26 |
27 | ## UML diagram
28 | 
29 |
30 | ## Upcoming Features
31 | Integrate with UHS.
32 |
33 | ## Fun-Fact
34 | This project has got selected for `Google Startup Bootcamp`.
35 |
36 | ❤❤
37 |
--------------------------------------------------------------------------------
/Web/clients/admin/public/icons/ambulance-svgrepo-com.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/Web/clients/amb-driver/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "amb-driver",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^5.16.4",
7 | "@testing-library/react": "^13.2.0",
8 | "@testing-library/user-event": "^13.5.0",
9 | "assert": "^2.0.0",
10 | "buffer": "^6.0.3",
11 | "crypto-browserify": "^3.12.0",
12 | "fs": "^0.0.1-security",
13 | "https-browserify": "^1.0.0",
14 | "jsonwebtoken": "^8.5.1",
15 | "nanoid": "^3.3.4",
16 | "os": "^0.1.2",
17 | "os-browserify": "^0.3.0",
18 | "process": "^0.11.10",
19 | "react": "^18.1.0",
20 | "react-app-rewired": "^2.2.1",
21 | "react-dom": "^18.1.0",
22 | "react-router-dom": "^6.3.0",
23 | "react-scripts": "5.0.1",
24 | "react-toastify": "^9.0.2",
25 | "socket.io-client": "^4.5.0",
26 | "stream": "^0.0.2",
27 | "stream-browserify": "^3.0.0",
28 | "stream-http": "^3.2.0",
29 | "web-vitals": "^2.1.4"
30 | },
31 | "scripts": {
32 | "start": "react-app-rewired start",
33 | "build": "react-app-rewired build",
34 | "test": "react-app-rewired test",
35 | "eject": "react-app-rewired eject"
36 | },
37 | "eslintConfig": {
38 | "extends": [
39 | "react-app",
40 | "react-app/jest"
41 | ]
42 | },
43 | "browserslist": {
44 | "production": [
45 | ">0.2%",
46 | "not dead",
47 | "not op_mini all"
48 | ],
49 | "development": [
50 | "last 1 chrome version",
51 | "last 1 firefox version",
52 | "last 1 safari version"
53 | ]
54 | },
55 | "devDependencies": {
56 | "autoprefixer": "^10.4.7",
57 | "postcss": "^8.4.14",
58 | "tailwindcss": "^3.0.24",
59 | "webpack": "^5.72.1",
60 | "webpack-cli": "^4.9.2",
61 | "webpack-dev-server": "^4.9.0"
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/Web/clients/amb-driver/public/icons/ambulance-svgrepo-com.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/Web/clients/hospital-display/public/icons/ambulance-svgrepo-com.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/Android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
15 |
18 |
21 |
22 |
23 |
24 |
30 |
--------------------------------------------------------------------------------
/Web/clients/admin/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
15 |
16 |
25 | Admin
26 |
27 |
28 |
29 | You need to enable JavaScript to run this app.
30 |
31 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/Web/clients/hospital-display/src/components/Coord.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { hospitalLatitude, hospitalLongitude } from '../config/HospitalCoords';
3 |
4 | function classNames(...classes) {
5 | return classes.filter(Boolean).join(' ')
6 | }
7 |
8 | const Coord = ({ data }) => {
9 | const getDistanceFromLatLonInKm = (lat1,lon1,lat2,lon2) => {
10 | if(lat2 === null || lon2 === null){
11 | return -1;
12 | }
13 | var R = 6371; // Radius of the earth in km
14 | var dLat = deg2rad(lat2-lat1); // deg2rad below
15 | var dLon = deg2rad(lon2-lon1);
16 | var a = Math.sin(dLat/2) * Math.sin(dLat/2) + Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) * Math.sin(dLon/2) * Math.sin(dLon/2);
17 | var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
18 | var d = R * c;
19 | return d;
20 | }
21 |
22 | const deg2rad = (deg) => {
23 | return deg * (Math.PI/180);
24 | }
25 |
26 |
27 | let tlat = hospitalLatitude, tlng = hospitalLongitude;
28 |
29 | return (
30 | <>
31 | 3? 'border-green-800': 'border-red-900', 'border-l-4 p-4 m-2 bg-gray-200' )}>
32 |
Ambulance Number : { data.ambNumber }
33 |
Name : { data.name }
34 |
Description : { data.desc }
35 | {
36 | data.loaded ?
Distance : {Math.round(getDistanceFromLatLonInKm(tlat, tlng, data.lat, data.lng) * 100) / 100} km :
Location not loaded
37 | }
38 |
39 | >
40 | )
41 | }
42 |
43 | export default Coord;
--------------------------------------------------------------------------------
/Web/clients/amb-driver/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
15 |
16 |
25 | Driver Page
26 |
27 |
28 |
29 | You need to enable JavaScript to run this app.
30 |
31 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/Web/clients/hospital-display/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
12 |
13 |
17 |
18 |
27 | Hospital display
28 |
29 |
30 | You need to enable JavaScript to run this app.
31 |
32 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '3.8'
2 |
3 | services:
4 |
5 | mongo:
6 | image: mongo
7 | restart: always
8 | environment:
9 | MONGO_INITDB_ROOT_USERNAME: ${USERNAME}
10 | MONGO_INITDB_ROOT_PASSWORD: ${PASSWORD}
11 |
12 | mongo-express:
13 | image: mongo-express
14 | restart: always
15 | ports:
16 | - 8081:8081
17 |
18 | server:
19 | build :
20 | dockerfile: Dockerfile
21 | context: ./server
22 | depends_on:
23 | - mongo
24 | - mongo-express
25 | volumes:
26 | - /app/node_modules
27 | - ./server:/app
28 | environment:
29 | - DB_URI=${DB_URI}
30 | ports:
31 | - 5000:5000
32 |
33 | admin:
34 | build:
35 | dockerfile: Dockerfile
36 | context: ./Web/clients/admin
37 | depends_on:
38 | - server
39 | volumes:
40 | - /app/node_modules
41 | - ./Web/clients/admin:/app
42 | ports:
43 | - 3002:3000
44 |
45 | amb-driver:
46 | build:
47 | dockerfile: Dockerfile
48 | context : ./Web/clients/amb-driver
49 | depends_on:
50 | - server
51 | volumes:
52 | - /app/node_modules
53 | - ./Web/clients/amb-driver:/app
54 | ports:
55 | - 3000:3000
56 |
57 | hospital-display:
58 | build:
59 | dockerfile: Dockerfile
60 | context : ./Web/clients/hospital-display
61 | depends_on:
62 | - server
63 | volumes:
64 | - /app/node_modules
65 | - ./Web/clients/hospital-display:/app
66 | ports:
67 | - 3001:3000
68 |
69 |
70 | # PORTS (inside the docker network & host network)
71 | # ------------------------------------------------
72 | # SERVER is listened on port 5000
73 | # ADMIN is listened on port 3002
74 | # HOSPITAL-DISPLAY is listened on port 3001
75 | # AMB-DRIVER is listened on port 3000
76 | # * You may need to change the proxy settings in order to get the application working on the internet
77 |
--------------------------------------------------------------------------------
/Android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/Web/clients/admin/src/logo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Android/app/src/main/res/layout/activity_tracker.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
18 |
19 |
27 |
28 |
37 |
38 |
48 |
49 |
58 |
--------------------------------------------------------------------------------
/Android/app/src/main/java/com/ambulansetracker/TrackerActivity.java:
--------------------------------------------------------------------------------
1 | package com.ambulansetracker;
2 |
3 | import androidx.annotation.NonNull;
4 | import androidx.appcompat.app.AppCompatActivity;
5 | import androidx.core.app.ActivityCompat;
6 |
7 | import android.Manifest;
8 | import android.content.Intent;
9 | import android.content.pm.PackageManager;
10 | import android.location.Location;
11 | import android.location.LocationListener;
12 | import android.location.LocationManager;
13 | import android.os.Bundle;
14 | import android.view.View;
15 | import android.widget.Button;
16 | import android.widget.TextView;
17 | import android.widget.Toast;
18 |
19 | import java.net.URISyntaxException;
20 | import java.util.ArrayList;
21 | import java.util.List;
22 |
23 | import io.socket.client.IO;
24 | import io.socket.client.Socket;
25 |
26 | import static android.Manifest.permission.ACCESS_COARSE_LOCATION;
27 | import static android.Manifest.permission.ACCESS_FINE_LOCATION;
28 |
29 | public class TrackerActivity extends AppCompatActivity {
30 | Driver driver;
31 | private final String URL = "http://192.168.0.129:5000";
32 | private Socket socket;
33 | final static public String DRIVER_KEY_SERVICE = "driver_key_service";
34 | TextView textViewName;
35 | TextView textViewAmbNumber;
36 | TextView textViewDesc;
37 |
38 |
39 | Button buttonStartTracking;
40 |
41 | @Override
42 | protected void onCreate(Bundle savedInstanceState) {
43 | super.onCreate(savedInstanceState);
44 | setContentView(R.layout.activity_tracker);
45 | driver = (Driver) getIntent().getExtras().get(MainActivity.DRIVER_KEY);
46 | initComponents();
47 | }
48 |
49 | private void initConnection() throws URISyntaxException {
50 | socket = IO.socket(URL);
51 | socket.connect();
52 | }
53 |
54 |
55 | private void initComponents() {
56 | textViewName = findViewById(R.id.textViewName);
57 | textViewAmbNumber = findViewById(R.id.textViewAmbNumber);
58 | textViewDesc = findViewById(R.id.textViewDesc);
59 | buttonStartTracking = findViewById(R.id.buttonStartTracking);
60 | textViewName.setText(driver.getName());
61 | textViewAmbNumber.setText(driver.getAmbNumber());
62 | textViewDesc.setText(driver.getDesc());
63 | buttonStartTracking.setOnClickListener(new View.OnClickListener() {
64 | @Override
65 | public void onClick(View view) {
66 | startService(new Intent(TrackerActivity.this, TrackerService.class).putExtra(TrackerActivity.DRIVER_KEY_SERVICE, driver));
67 | }
68 | });
69 | }
70 |
71 |
72 | }
--------------------------------------------------------------------------------
/Web/clients/amb-driver/src/components/Driver.js:
--------------------------------------------------------------------------------
1 | import { useEffect, useState } from 'react';
2 | import { useNavigate } from 'react-router-dom';
3 | import jwt from 'jsonwebtoken';
4 |
5 | import useGeolocation from '../Hooks/useGeolocation';
6 | import { io } from 'socket.io-client';
7 |
8 | import { customAlphabet } from 'nanoid'
9 |
10 | const nanoid = customAlphabet('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', 8);
11 |
12 |
13 | const ID = nanoid();
14 |
15 | const socket = io('http://localhost:5000');
16 |
17 | const Driver = () => {
18 |
19 | const navigate = useNavigate();
20 |
21 | const [name, setName] = useState('');
22 | const [desc, setDesc] = useState('');
23 | const [ambNumber, setAmbNumber] = useState('');
24 |
25 | const coord = useGeolocation().coord;
26 | const loaded = coord.loaded;
27 | const latitude = coord.lat;
28 | const longitude = coord.lng;
29 | console.log(latitude, longitude);
30 |
31 | socket.emit('send-coords', JSON.stringify({ id: ID, ambNumber: ambNumber, name: name, loaded: loaded, lat: latitude, lng: longitude, desc: desc }));
32 | const populateName = async () => {
33 | const req = await fetch('http://localhost:5000/api/auth/name', {
34 | headers: {
35 | 'x-access-token': localStorage.getItem('token'),
36 | },
37 | })
38 |
39 | const data = await req.json()
40 | if (data.status === 'ok') {
41 | setName(data.name)
42 | setAmbNumber(data.ambNumber)
43 | setDesc(data.desc)
44 | } else {
45 | alert(data.error)
46 | }
47 | }
48 |
49 | useEffect(() => {
50 | const token = localStorage.getItem('token');
51 | if (token) {
52 | const driver = jwt.decode(token);
53 | if (!driver) {
54 | localStorage.removeItem('token');
55 | navigate('/login');
56 | }
57 | else {
58 | populateName();
59 | }
60 | }
61 | else {
62 | navigate('/login');
63 | }
64 | }, [navigate]);
65 |
66 |
67 | const handleLogout = () => {
68 | localStorage.removeItem('token');
69 | window.location.reload();
70 | }
71 | return (
72 | <>
73 |
74 |
Hello {name}
75 | {
76 | latitude === null || longitude === null ?
Cannot access location
:
Your location is being tracked. Latitude: {latitude} Longitude: {longitude}
77 | }
78 |
79 |
80 | Logout
81 |
82 |
83 | >
84 | )
85 | }
86 |
87 | export default Driver;
--------------------------------------------------------------------------------
/server/routes/Auth.js:
--------------------------------------------------------------------------------
1 | const Driver = require('../Models/Driver');
2 | const mongoose = require('mongoose');
3 | const express = require('express');
4 | const router = express.Router();
5 | const jwt = require('jsonwebtoken');
6 | const bcrypt = require('bcrypt');
7 |
8 | router.get('/', async (req, res) => {
9 | try {
10 | const drivers = await Driver.find();
11 | res.send(drivers);
12 | }
13 | catch (e) {
14 | res.send(e);
15 | }
16 | });
17 |
18 | router.get('/name', async (req, res) => {
19 | const token = req.headers['x-access-token']
20 |
21 | try {
22 | const decoded = jwt.verify(token, 'secret')
23 | const name = decoded.name
24 |
25 | const driver = await Driver.findOne({ name: name })
26 |
27 | return res.json({ status: 'ok', name: driver.name, ambNumber: decoded.ambNumber, desc: decoded.desc })
28 | } catch (error) {
29 | // console.log(error)
30 | res.json({ status: 'error', error: 'invalid token' })
31 | }
32 | });
33 |
34 |
35 | router.post('/signup', async (req, res) => {
36 |
37 | const hashedPassword = await bcrypt.hash(req.body.password, 10);
38 | const driverData = {
39 | name: req.body.name,
40 | password: hashedPassword,
41 | ambNumber: req.body.ambNumber
42 | };
43 | try {
44 | //checking username or ambulance exists in database already and sending response
45 | const usernameexists= await Driver.findOne({ name: driverData.name });
46 | const ambulanceexists= await Driver.findOne({ ambNumber:driverData.ambNumber});
47 |
48 | if(usernameexists)
49 | {
50 | res.send({check: '1'});
51 | return;
52 | }
53 | if(ambulanceexists)
54 | {
55 | res.send({check: '2'});
56 | return;
57 | }
58 | //await driverData.save();
59 | await Driver.create(driverData);
60 | res.send({ status: 'ok' });
61 | }
62 | catch (e) {
63 | res.send({ status: 'error', error: e });
64 | }
65 | });
66 |
67 |
68 | router.post('/login', async (req, res) => {
69 |
70 | const driver = await Driver.findOne({ name: req.body.name });
71 | if (driver == null) {
72 | return res.status(400).json({ status: 'err', driver: false, error: 'Cannot find driver' });
73 | }
74 | const isMatch = await bcrypt.compare(req.body.password, driver.password);
75 | if (isMatch) {
76 | const token = jwt.sign({
77 | name: driver.name,
78 | ambNumber: driver.ambNumber,
79 | desc: req.body.desc
80 | }, 'secret', { expiresIn: '24h' });
81 |
82 | return res.json({ status: 'ok', driver: token });
83 | } else {
84 | return res.status(404).json({ status: 'err', driver: false });
85 | }
86 | });
87 |
88 | module.exports = router;
--------------------------------------------------------------------------------
/Android/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
19 |
20 |
30 |
31 |
38 |
39 |
47 |
48 |
58 |
59 |
69 |
--------------------------------------------------------------------------------
/Web/clients/amb-driver/src/components/LoginForm.js:
--------------------------------------------------------------------------------
1 | import { useState } from 'react';
2 | import { Link } from 'react-router-dom';
3 |
4 | const LoginForm = () => {
5 | const [name, setName] = useState('')
6 | const [password, setPassword] = useState('')
7 | const [desc, setDesc] = useState('')
8 | async function loginUser(event) {
9 | event.preventDefault();
10 |
11 | const response = await fetch('http://localhost:5000/api/auth/login', {
12 | method: 'POST',
13 | headers: {
14 | 'Content-Type': 'application/json',
15 | },
16 | body: JSON.stringify({
17 | name,
18 | password,
19 | desc
20 | }),
21 | })
22 |
23 | const data = await response.json()
24 | // console.log(data);
25 | if (data.driver) {
26 | localStorage.setItem('token', data.driver)
27 | alert('Login successful')
28 | window.location.href = '/driver';
29 | } else {
30 | alert(`Please check your ${name} and ${password}`)
31 | }
32 | }
33 |
34 | return (
35 |
36 |
37 |
38 |
39 |
40 | Haven't registered?
41 | Sign up
42 |
43 |
44 |
45 |
82 |
83 | )
84 | }
85 |
86 | export default LoginForm;
--------------------------------------------------------------------------------
/Web/clients/admin/README.md:
--------------------------------------------------------------------------------
1 | # Getting Started with Create React App
2 |
3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
4 |
5 | ## Available Scripts
6 |
7 | In the project directory, you can run:
8 |
9 | ### `npm start`
10 |
11 | Runs the app in the development mode.\
12 | Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
13 |
14 | The page will reload when you make changes.\
15 | You may also see any lint errors in the console.
16 |
17 | ### `npm test`
18 |
19 | Launches the test runner in the interactive watch mode.\
20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
21 |
22 | ### `npm run build`
23 |
24 | Builds the app for production to the `build` folder.\
25 | It correctly bundles React in production mode and optimizes the build for the best performance.
26 |
27 | The build is minified and the filenames include the hashes.\
28 | Your app is ready to be deployed!
29 |
30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
31 |
32 | ### `npm run eject`
33 |
34 | **Note: this is a one-way operation. Once you `eject`, you can't go back!**
35 |
36 | If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
37 |
38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
39 |
40 | You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
41 |
42 | ## Learn More
43 |
44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
45 |
46 | To learn React, check out the [React documentation](https://reactjs.org/).
47 |
48 | ### Code Splitting
49 |
50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
51 |
52 | ### Analyzing the Bundle Size
53 |
54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
55 |
56 | ### Making a Progressive Web App
57 |
58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
59 |
60 | ### Advanced Configuration
61 |
62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
63 |
64 | ### Deployment
65 |
66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
67 |
68 | ### `npm run build` fails to minify
69 |
70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
71 |
--------------------------------------------------------------------------------
/Web/clients/amb-driver/README.md:
--------------------------------------------------------------------------------
1 | # Getting Started with Create React App
2 |
3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
4 |
5 | ## Available Scripts
6 |
7 | In the project directory, you can run:
8 |
9 | ### `npm start`
10 |
11 | Runs the app in the development mode.\
12 | Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
13 |
14 | The page will reload when you make changes.\
15 | You may also see any lint errors in the console.
16 |
17 | ### `npm test`
18 |
19 | Launches the test runner in the interactive watch mode.\
20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
21 |
22 | ### `npm run build`
23 |
24 | Builds the app for production to the `build` folder.\
25 | It correctly bundles React in production mode and optimizes the build for the best performance.
26 |
27 | The build is minified and the filenames include the hashes.\
28 | Your app is ready to be deployed!
29 |
30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
31 |
32 | ### `npm run eject`
33 |
34 | **Note: this is a one-way operation. Once you `eject`, you can't go back!**
35 |
36 | If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
37 |
38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
39 |
40 | You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
41 |
42 | ## Learn More
43 |
44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
45 |
46 | To learn React, check out the [React documentation](https://reactjs.org/).
47 |
48 | ### Code Splitting
49 |
50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
51 |
52 | ### Analyzing the Bundle Size
53 |
54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
55 |
56 | ### Making a Progressive Web App
57 |
58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
59 |
60 | ### Advanced Configuration
61 |
62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
63 |
64 | ### Deployment
65 |
66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
67 |
68 | ### `npm run build` fails to minify
69 |
70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
71 |
--------------------------------------------------------------------------------
/Web/clients/hospital-display/README.md:
--------------------------------------------------------------------------------
1 | # Getting Started with Create React App
2 |
3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
4 |
5 | ## Available Scripts
6 |
7 | In the project directory, you can run:
8 |
9 | ### `npm start`
10 |
11 | Runs the app in the development mode.\
12 | Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
13 |
14 | The page will reload when you make changes.\
15 | You may also see any lint errors in the console.
16 |
17 | ### `npm test`
18 |
19 | Launches the test runner in the interactive watch mode.\
20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
21 |
22 | ### `npm run build`
23 |
24 | Builds the app for production to the `build` folder.\
25 | It correctly bundles React in production mode and optimizes the build for the best performance.
26 |
27 | The build is minified and the filenames include the hashes.\
28 | Your app is ready to be deployed!
29 |
30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
31 |
32 | ### `npm run eject`
33 |
34 | **Note: this is a one-way operation. Once you `eject`, you can't go back!**
35 |
36 | If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
37 |
38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
39 |
40 | You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
41 |
42 | ## Learn More
43 |
44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
45 |
46 | To learn React, check out the [React documentation](https://reactjs.org/).
47 |
48 | ### Code Splitting
49 |
50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
51 |
52 | ### Analyzing the Bundle Size
53 |
54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
55 |
56 | ### Making a Progressive Web App
57 |
58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
59 |
60 | ### Advanced Configuration
61 |
62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
63 |
64 | ### Deployment
65 |
66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
67 |
68 | ### `npm run build` fails to minify
69 |
70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
71 |
--------------------------------------------------------------------------------
/Web/clients/hospital-display/src/components/Nav.js:
--------------------------------------------------------------------------------
1 | import { Disclosure } from '@headlessui/react'
2 | import { MenuIcon, XIcon } from '@heroicons/react/outline'
3 |
4 | function classNames(...classes) {
5 | return classes.filter(Boolean).join(' ')
6 | }
7 |
8 | export default function Nav({ onsendID }) {
9 | const navigation = [
10 | { name: 'Dashboard', href: '#', current: true },
11 | { name: 'View List', href: '#', current: false, onClick: onsendID },
12 | ]
13 | return (
14 |
15 | {({ open }) => (
16 | <>
17 |
18 |
19 |
20 | {/* Mobile menu button*/}
21 |
22 | Open main menu
23 | {open ? (
24 |
25 | ) : (
26 |
27 | )}
28 |
29 |
30 |
31 |
32 |
33 |
34 |
Hospital display
35 |
36 |
37 |
38 |
39 | {navigation.map((item) => (
40 |
50 | {item.name}
51 |
52 | ))}
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | {navigation.map((item) => (
63 |
74 | {item.name}
75 |
76 | ))}
77 |
78 |
79 | >
80 | )}
81 |
82 | )
83 | }
--------------------------------------------------------------------------------
/Web/clients/admin/src/App.js:
--------------------------------------------------------------------------------
1 | import './dist/output.css';
2 | import { useState } from 'react';
3 |
4 | const App = () => {
5 |
6 | const [name, setName] = useState('');
7 | const [password, setPassword] = useState('');
8 | const [ambNumber, setAmbNumber] = useState('');
9 |
10 | async function registerUser(event) {
11 | event.preventDefault();
12 |
13 | const response = await fetch('http://localhost:5000/api/auth/signup', {
14 | method: 'POST',
15 | headers: {
16 | 'Content-Type': 'application/json',
17 | },
18 | body: JSON.stringify({
19 | name,
20 | password,
21 | ambNumber,
22 | }),
23 | })
24 |
25 | const data = await response.json();
26 | console.log(data);
27 | if(data.check === '1')
28 | {
29 | alert('username already taken');
30 | }
31 | else if(data.check === '2')
32 | {
33 | alert('ambulance Number already exists');
34 | }
35 | else if (data.status === 'ok') {
36 | alert('Driver registered successfully');
37 | }
38 | }
39 |
40 | return (
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
124 |
125 |
126 | )
127 | }
128 |
129 | export default App;
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | We as members, contributors, and leaders pledge to make participation in our
6 | community a harassment-free experience for everyone, regardless of age, body
7 | size, visible or invisible disability, ethnicity, sex characteristics, gender
8 | identity and expression, level of experience, education, socio-economic status,
9 | nationality, personal appearance, race, religion, or sexual identity
10 | and orientation.
11 |
12 | We pledge to act and interact in ways that contribute to an open, welcoming,
13 | diverse, inclusive, and healthy community.
14 |
15 | ## Our Standards
16 |
17 | Examples of behavior that contributes to a positive environment for our
18 | community include:
19 |
20 | * Demonstrating empathy and kindness toward other people
21 | * Being respectful of differing opinions, viewpoints, and experiences
22 | * Giving and gracefully accepting constructive feedback
23 | * Accepting responsibility and apologizing to those affected by our mistakes,
24 | and learning from the experience
25 | * Focusing on what is best not just for us as individuals, but for the
26 | overall community
27 |
28 | Examples of unacceptable behavior include:
29 |
30 | * The use of sexualized language or imagery, and sexual attention or
31 | advances of any kind
32 | * Trolling, insulting or derogatory comments, and personal or political attacks
33 | * Public or private harassment
34 | * Publishing others' private information, such as a physical or email
35 | address, without their explicit permission
36 | * Other conduct which could reasonably be considered inappropriate in a
37 | professional setting
38 |
39 | ## Enforcement Responsibilities
40 |
41 | Community leaders are responsible for clarifying and enforcing our standards of
42 | acceptable behavior and will take appropriate and fair corrective action in
43 | response to any behavior that they deem inappropriate, threatening, offensive,
44 | or harmful.
45 |
46 | Community leaders have the right and responsibility to remove, edit, or reject
47 | comments, commits, code, wiki edits, issues, and other contributions that are
48 | not aligned to this Code of Conduct, and will communicate reasons for moderation
49 | decisions when appropriate.
50 |
51 | ## Scope
52 |
53 | This Code of Conduct applies within all community spaces, and also applies when
54 | an individual is officially representing the community in public spaces.
55 | Examples of representing our community include using an official e-mail address,
56 | posting via an official social media account, or acting as an appointed
57 | representative at an online or offline event.
58 |
59 | ## Enforcement
60 |
61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
62 | reported to the community leaders responsible for enforcement at
63 | .
64 | All complaints will be reviewed and investigated promptly and fairly.
65 |
66 | All community leaders are obligated to respect the privacy and security of the
67 | reporter of any incident.
68 |
69 | ## Enforcement Guidelines
70 |
71 | Community leaders will follow these Community Impact Guidelines in determining
72 | the consequences for any action they deem in violation of this Code of Conduct:
73 |
74 | ### 1. Correction
75 |
76 | **Community Impact**: Use of inappropriate language or other behavior deemed
77 | unprofessional or unwelcome in the community.
78 |
79 | **Consequence**: A private, written warning from community leaders, providing
80 | clarity around the nature of the violation and an explanation of why the
81 | behavior was inappropriate. A public apology may be requested.
82 |
83 | ### 2. Warning
84 |
85 | **Community Impact**: A violation through a single incident or series
86 | of actions.
87 |
88 | **Consequence**: A warning with consequences for continued behavior. No
89 | interaction with the people involved, including unsolicited interaction with
90 | those enforcing the Code of Conduct, for a specified period of time. This
91 | includes avoiding interactions in community spaces as well as external channels
92 | like social media. Violating these terms may lead to a temporary or
93 | permanent ban.
94 |
95 | ### 3. Temporary Ban
96 |
97 | **Community Impact**: A serious violation of community standards, including
98 | sustained inappropriate behavior.
99 |
100 | **Consequence**: A temporary ban from any sort of interaction or public
101 | communication with the community for a specified period of time. No public or
102 | private interaction with the people involved, including unsolicited interaction
103 | with those enforcing the Code of Conduct, is allowed during this period.
104 | Violating these terms may lead to a permanent ban.
105 |
106 | ### 4. Permanent Ban
107 |
108 | **Community Impact**: Demonstrating a pattern of violation of community
109 | standards, including sustained inappropriate behavior, harassment of an
110 | individual, or aggression toward or disparagement of classes of individuals.
111 |
112 | **Consequence**: A permanent ban from any sort of public interaction within
113 | the community.
114 |
115 | ## Attribution
116 |
117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118 | version 2.0, available at
119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120 |
121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct
122 | enforcement ladder](https://github.com/mozilla/diversity).
123 |
124 | [homepage]: https://www.contributor-covenant.org
125 |
126 | For answers to common questions about this code of conduct, see the FAQ at
127 | https://www.contributor-covenant.org/faq. Translations are available at
128 | https://www.contributor-covenant.org/translations.
129 |
--------------------------------------------------------------------------------
/Android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Attempt to set APP_HOME
10 | # Resolve links: $0 may be a link
11 | PRG="$0"
12 | # Need this for relative symlinks.
13 | while [ -h "$PRG" ] ; do
14 | ls=`ls -ld "$PRG"`
15 | link=`expr "$ls" : '.*-> \(.*\)$'`
16 | if expr "$link" : '/.*' > /dev/null; then
17 | PRG="$link"
18 | else
19 | PRG=`dirname "$PRG"`"/$link"
20 | fi
21 | done
22 | SAVED="`pwd`"
23 | cd "`dirname \"$PRG\"`/" >/dev/null
24 | APP_HOME="`pwd -P`"
25 | cd "$SAVED" >/dev/null
26 |
27 | APP_NAME="Gradle"
28 | APP_BASE_NAME=`basename "$0"`
29 |
30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31 | DEFAULT_JVM_OPTS=""
32 |
33 | # Use the maximum available, or set MAX_FD != -1 to use that value.
34 | MAX_FD="maximum"
35 |
36 | warn () {
37 | echo "$*"
38 | }
39 |
40 | die () {
41 | echo
42 | echo "$*"
43 | echo
44 | exit 1
45 | }
46 |
47 | # OS specific support (must be 'true' or 'false').
48 | cygwin=false
49 | msys=false
50 | darwin=false
51 | nonstop=false
52 | case "`uname`" in
53 | CYGWIN* )
54 | cygwin=true
55 | ;;
56 | Darwin* )
57 | darwin=true
58 | ;;
59 | MINGW* )
60 | msys=true
61 | ;;
62 | NONSTOP* )
63 | nonstop=true
64 | ;;
65 | esac
66 |
67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68 |
69 | # Determine the Java command to use to start the JVM.
70 | if [ -n "$JAVA_HOME" ] ; then
71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72 | # IBM's JDK on AIX uses strange locations for the executables
73 | JAVACMD="$JAVA_HOME/jre/sh/java"
74 | else
75 | JAVACMD="$JAVA_HOME/bin/java"
76 | fi
77 | if [ ! -x "$JAVACMD" ] ; then
78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79 |
80 | Please set the JAVA_HOME variable in your environment to match the
81 | location of your Java installation."
82 | fi
83 | else
84 | JAVACMD="java"
85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86 |
87 | Please set the JAVA_HOME variable in your environment to match the
88 | location of your Java installation."
89 | fi
90 |
91 | # Increase the maximum file descriptors if we can.
92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93 | MAX_FD_LIMIT=`ulimit -H -n`
94 | if [ $? -eq 0 ] ; then
95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96 | MAX_FD="$MAX_FD_LIMIT"
97 | fi
98 | ulimit -n $MAX_FD
99 | if [ $? -ne 0 ] ; then
100 | warn "Could not set maximum file descriptor limit: $MAX_FD"
101 | fi
102 | else
103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104 | fi
105 | fi
106 |
107 | # For Darwin, add options to specify how the application appears in the dock
108 | if $darwin; then
109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110 | fi
111 |
112 | # For Cygwin, switch paths to Windows format before running java
113 | if $cygwin ; then
114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116 | JAVACMD=`cygpath --unix "$JAVACMD"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Escape application args
158 | save () {
159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160 | echo " "
161 | }
162 | APP_ARGS=$(save "$@")
163 |
164 | # Collect all arguments for the java command, following the shell quoting and substitution rules
165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166 |
167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169 | cd "$(dirname "$0")"
170 | fi
171 |
172 | exec "$JAVACMD" "$@"
173 |
--------------------------------------------------------------------------------
/Android/app/src/main/java/com/ambulansetracker/TrackerService.java:
--------------------------------------------------------------------------------
1 | package com.ambulansetracker;
2 |
3 | import android.Manifest;
4 | import android.app.NotificationChannel;
5 | import android.app.NotificationManager;
6 | import android.app.PendingIntent;
7 | import android.app.Service;
8 | import android.content.Context;
9 | import android.content.Intent;
10 | import android.content.pm.PackageManager;
11 |
12 | import android.os.Build;
13 | import android.os.Bundle;
14 | import android.os.IBinder;
15 | import android.os.Looper;
16 |
17 | import android.preference.PreferenceManager;
18 | import android.util.Log;
19 |
20 |
21 | import androidx.annotation.NonNull;
22 | import androidx.annotation.Nullable;
23 | import androidx.annotation.RequiresApi;
24 | import androidx.core.app.ActivityCompat;
25 | import androidx.core.app.NotificationCompat;
26 |
27 | import com.google.android.gms.location.LocationCallback;
28 | import com.google.android.gms.location.LocationRequest;
29 | import com.google.android.gms.location.LocationResult;
30 | import com.google.android.gms.location.LocationServices;
31 | import com.google.android.gms.location.Priority;
32 |
33 | import org.json.JSONException;
34 | import org.json.JSONObject;
35 |
36 | import java.net.URISyntaxException;
37 |
38 | import io.socket.client.IO;
39 | import io.socket.client.Socket;
40 |
41 |
42 | public class TrackerService extends Service {
43 | private final String URL = "http://192.168.0.129:5000";
44 | private final String COORDS_EVENT = "send-coords";
45 | Driver driver;
46 | Socket socket;
47 | LocationCallback locationCallback = new LocationCallback() {
48 | @Override
49 | public void onLocationResult(@NonNull LocationResult locationResult) {
50 | super.onLocationResult(locationResult);
51 | Log.d("LOCATION", locationResult.getLastLocation().getLongitude() + " " + locationResult.getLastLocation().getLatitude());
52 | JSONObject jsonObject = new JSONObject();
53 | if(locationResult.getLastLocation()!=null) {
54 | try {
55 | jsonObject.put("id", socket.id());
56 | jsonObject.put("loaded", true);
57 | jsonObject.put("name", driver.getName());
58 | jsonObject.put("ambNumber", driver.getAmbNumber());
59 | jsonObject.put("desc", driver.getDesc());
60 | jsonObject.put("latitude", locationResult.getLastLocation().getLatitude());
61 | jsonObject.put("longitude", locationResult.getLastLocation().getLongitude());
62 | socket.emit(COORDS_EVENT, jsonObject.toString());
63 | Log.d("EMIT", "onLocationResult: DATA SEND");
64 | } catch (JSONException e) {
65 | e.printStackTrace();
66 | }
67 | }
68 | }
69 | };
70 |
71 | @Nullable
72 | @Override
73 | public IBinder onBind(Intent intent) {
74 | return null;
75 | }
76 |
77 | @Override
78 | public void onCreate() {
79 | super.onCreate();
80 | }
81 |
82 | @RequiresApi(api = Build.VERSION_CODES.O)
83 | @Override
84 | public int onStartCommand(Intent intent, int flags, int startId) {
85 | driver = (Driver) intent.getExtras().get(TrackerActivity.DRIVER_KEY_SERVICE);
86 | try {
87 | startLocationService();
88 | } catch (Exception ex) {
89 | Log.d("TRACKER", "onStartCommand: " + ex.getMessage());
90 | System.out.println(ex.getMessage());
91 | System.exit(0);
92 | }
93 | return Service.START_STICKY;
94 | }
95 |
96 | @Override
97 | public void onDestroy() {
98 | super.onDestroy();
99 | // PreferenceManager.getDefaultSharedPreferences(getApplicationContext()).edit().remove("x-access-token").apply();
100 | // socket.close();
101 | }
102 | @RequiresApi(api = Build.VERSION_CODES.O)
103 | private void startLocationService() throws URISyntaxException {
104 | socket = IO.socket(URL);
105 | socket.connect();
106 | String channelID = "channelID";
107 | NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
108 | Intent resIntent = new Intent();
109 | PendingIntent pendingIntent = PendingIntent.getActivity(getApplicationContext(), 0, resIntent, PendingIntent.FLAG_UPDATE_CURRENT);
110 | NotificationCompat.Builder builder = new NotificationCompat.Builder(getApplicationContext(), channelID);
111 | builder.setContentTitle("Title");
112 | builder.setContentText("TEXT");
113 | builder.setContentIntent(pendingIntent);
114 | builder.setAutoCancel(false);
115 | builder.setPriority(NotificationCompat.PRIORITY_HIGH);
116 | builder.setDefaults(NotificationCompat.DEFAULT_ALL);
117 |
118 | NotificationChannel notificationChannel = new NotificationChannel(channelID, "TITLE", NotificationManager.IMPORTANCE_HIGH);
119 | notificationChannel.setDescription("DISC");
120 | notificationManager.createNotificationChannel(notificationChannel);
121 | LocationRequest locationRequest = LocationRequest.create().setInterval(2000).setFastestInterval(1000 * 3).setPriority(Priority.PRIORITY_HIGH_ACCURACY);
122 | if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
123 | // TODO: Consider calling
124 | // ActivityCompat#requestPermissions
125 | // here to request the missing permissions, and then overriding
126 | // public void onRequestPermissionsResult(int requestCode, String[] permissions,
127 | // int[] grantResults)
128 | // to handle the case where the user grants the permission. See the documentation
129 | // for ActivityCompat#requestPermissions for more details.
130 | return;
131 | }
132 | LocationServices.getFusedLocationProviderClient(this).requestLocationUpdates(locationRequest, locationCallback, Looper.getMainLooper());
133 | startForeground(321, builder.build());
134 | }
135 | }
136 |
--------------------------------------------------------------------------------
/Android/app/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
15 |
20 |
25 |
30 |
35 |
40 |
45 |
50 |
55 |
60 |
65 |
70 |
75 |
80 |
85 |
90 |
95 |
100 |
105 |
110 |
115 |
120 |
125 |
130 |
135 |
140 |
145 |
150 |
155 |
160 |
165 |
170 |
171 |
--------------------------------------------------------------------------------
/Android/app/src/main/java/com/ambulansetracker/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.ambulansetracker;
2 |
3 | import androidx.annotation.NonNull;
4 | import androidx.appcompat.app.AppCompatActivity;
5 | import androidx.core.app.ActivityCompat;
6 |
7 | import android.content.Intent;
8 | import android.content.SharedPreferences;
9 | import android.os.Bundle;
10 | import android.preference.PreferenceManager;
11 | import android.view.View;
12 | import android.widget.Button;
13 | import android.widget.EditText;
14 | import android.widget.Toast;
15 |
16 | import java.util.ArrayList;
17 | import java.util.HashMap;
18 |
19 | import retrofit2.Call;
20 | import retrofit2.Callback;
21 | import retrofit2.Response;
22 | import retrofit2.Retrofit;
23 | import retrofit2.converter.gson.GsonConverterFactory;
24 |
25 | import static android.Manifest.permission.ACCESS_COARSE_LOCATION;
26 | import static android.Manifest.permission.ACCESS_FINE_LOCATION;
27 | import static android.Manifest.permission.INTERNET;
28 | import static android.Manifest.permission.FOREGROUND_SERVICE;
29 |
30 |
31 | public class MainActivity extends AppCompatActivity {
32 |
33 | // finals
34 | final static public String DRIVER_KEY = "driver_key";
35 | ArrayList permissions;
36 | ArrayList permissionsToRequest;
37 | ArrayList permissionsRejected;
38 | private final static int ALL_PERMISSIONS_RESULT = 101;
39 |
40 | SharedPreferences sharedPreferences;
41 | private final String URL = "http://192.168.0.129:5000";
42 | EditText editTextUsername;
43 | EditText editTextPassword;
44 | Button buttonLogin;
45 | Retrofit retrofit;
46 | RetrofitInterface retrofitInterface;
47 | @Override
48 | protected void onCreate(Bundle savedInstanceState) {
49 | super.onCreate(savedInstanceState);
50 | // check for permissions
51 | permissions = new ArrayList<>();
52 | permissionsRejected = new ArrayList<>();
53 | permissions.add(ACCESS_FINE_LOCATION);
54 | permissions.add(ACCESS_COARSE_LOCATION);
55 | permissions.add(INTERNET);
56 | permissions.add(FOREGROUND_SERVICE);
57 | permissionsToRequest = findUnAskedPermissions(permissions);
58 | if(permissionsToRequest.size()>0)
59 | ActivityCompat.requestPermissions(MainActivity.this,
60 | permissionsToRequest.toArray(new String[permissionsToRequest.size()]),
61 | ALL_PERMISSIONS_RESULT);
62 | // init Retrofit
63 | retrofit = new Retrofit.Builder().baseUrl(URL).addConverterFactory(GsonConverterFactory.create()).build();
64 | retrofitInterface = retrofit.create(RetrofitInterface.class);
65 | sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
66 | setContentView(R.layout.activity_main);
67 | initComponents();
68 | }
69 |
70 | private void validateToken() {
71 |
72 | String token = sharedPreferences.getString("x-access-token", null);
73 | if (token==null)
74 | return;
75 | Call call = retrofitInterface.validateToken(token);
76 |
77 | call.enqueue(new Callback() {
78 | @Override
79 | public void onResponse(Call call, Response response) {
80 | // token is active
81 | if(response.code()==200) {
82 | Driver driver = response.body();
83 | Intent intent = new Intent(MainActivity.this, TrackerActivity.class);
84 | intent.putExtra(MainActivity.DRIVER_KEY, driver);
85 | startActivity(intent);
86 | finish();
87 | Toast.makeText(MainActivity.this, "Valid token", Toast.LENGTH_LONG);
88 | }
89 | // invalid or expired token
90 | if(response.code()==404) {
91 | Toast.makeText(MainActivity.this, "Invalid token", Toast.LENGTH_LONG);
92 | }
93 | }
94 |
95 | @Override
96 | public void onFailure(Call call, Throwable t) {
97 | Toast.makeText(MainActivity.this, t.getMessage(), Toast.LENGTH_LONG);
98 | }
99 | });
100 | }
101 |
102 | private void initComponents() {
103 | editTextUsername = findViewById(R.id.editTextUsername);
104 | editTextPassword = findViewById(R.id.editTextPassword);
105 | buttonLogin = findViewById(R.id.buttonLogin);
106 | buttonLogin.setOnClickListener(new View.OnClickListener() {
107 | @Override
108 | public void onClick(View view) {
109 | handleLogin();
110 | }
111 | });
112 | }
113 |
114 | private void handleLogin() {
115 | HashMap hashMap = new HashMap<>();
116 | hashMap.put("name", editTextUsername.getText().toString());
117 | hashMap.put("password", editTextPassword.getText().toString());
118 | Call call = retrofitInterface.executeLogin(hashMap);
119 | call.enqueue(new Callback() {
120 | @Override
121 | public void onResponse(Call call, Response response) {
122 | // login successful
123 | if(response.code()==200) {
124 | sharedPreferences.edit().putString("x-access-token", response.body().driver).apply();
125 | Toast.makeText(MainActivity.this, "Logged in",
126 | Toast.LENGTH_LONG).show();
127 | validateToken();
128 | }
129 | // wrong credentials
130 | if(response.code()==404) {
131 | Toast.makeText(MainActivity.this, "Wrong Credentials",
132 | Toast.LENGTH_LONG).show();
133 | }
134 | }
135 |
136 | @Override
137 | public void onFailure(Call call, Throwable t) {
138 | Toast.makeText(MainActivity.this, t.getMessage(),
139 | Toast.LENGTH_LONG).show();
140 | }
141 | });
142 | }
143 | @Override
144 | public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
145 | super.onRequestPermissionsResult(requestCode, permissions, grantResults);
146 | switch (requestCode) {
147 |
148 | case ALL_PERMISSIONS_RESULT:
149 | for (String perms : permissionsToRequest) {
150 | if (!hasPermission(perms)) {
151 | permissionsRejected.add(perms);
152 | }
153 | }
154 |
155 | if (permissionsRejected.size() > 0) {
156 | // TODO app didn't get all permissions
157 | Toast.makeText(this, "I don't have permissions", Toast.LENGTH_LONG);
158 | }
159 |
160 | break;
161 | }
162 |
163 | }
164 | private ArrayList findUnAskedPermissions(ArrayList wanted) {
165 | ArrayList result = new ArrayList<>();
166 | for (String permission : wanted) {
167 | if(!hasPermission(permission))
168 | result.add(permission);
169 | }
170 | return result;
171 | }
172 |
173 | private boolean hasPermission(String permission) {
174 | int a = ActivityCompat.checkSelfPermission(this, permission);
175 | return a != -1;
176 | }
177 | }
--------------------------------------------------------------------------------
/Web/clients/admin/src/dist/output.css:
--------------------------------------------------------------------------------
1 | /*
2 | ! tailwindcss v3.0.24 | MIT License | https://tailwindcss.com
3 | */
4 |
5 | /*
6 | 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
7 | 2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
8 | */
9 |
10 | *,
11 | ::before,
12 | ::after {
13 | box-sizing: border-box;
14 | /* 1 */
15 | border-width: 0;
16 | /* 2 */
17 | border-style: solid;
18 | /* 2 */
19 | border-color: #e5e7eb;
20 | /* 2 */
21 | }
22 |
23 | ::before,
24 | ::after {
25 | --tw-content: '';
26 | }
27 |
28 | /*
29 | 1. Use a consistent sensible line-height in all browsers.
30 | 2. Prevent adjustments of font size after orientation changes in iOS.
31 | 3. Use a more readable tab size.
32 | 4. Use the user's configured `sans` font-family by default.
33 | */
34 |
35 | html {
36 | line-height: 1.5;
37 | /* 1 */
38 | -webkit-text-size-adjust: 100%;
39 | /* 2 */
40 | /* 3 */
41 | tab-size: 4;
42 | /* 3 */
43 | font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
44 | /* 4 */
45 | }
46 |
47 | /*
48 | 1. Remove the margin in all browsers.
49 | 2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
50 | */
51 |
52 | body {
53 | margin: 0;
54 | /* 1 */
55 | line-height: inherit;
56 | /* 2 */
57 | }
58 |
59 | /*
60 | 1. Add the correct height in Firefox.
61 | 2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
62 | 3. Ensure horizontal rules are visible by default.
63 | */
64 |
65 | hr {
66 | height: 0;
67 | /* 1 */
68 | color: inherit;
69 | /* 2 */
70 | border-top-width: 1px;
71 | /* 3 */
72 | }
73 |
74 | /*
75 | Add the correct text decoration in Chrome, Edge, and Safari.
76 | */
77 |
78 | abbr:where([title]) {
79 | -webkit-text-decoration: underline dotted;
80 | text-decoration: underline dotted;
81 | }
82 |
83 | /*
84 | Remove the default font size and weight for headings.
85 | */
86 |
87 | h1,
88 | h2,
89 | h3,
90 | h4,
91 | h5,
92 | h6 {
93 | font-size: inherit;
94 | font-weight: inherit;
95 | }
96 |
97 | /*
98 | Reset links to optimize for opt-in styling instead of opt-out.
99 | */
100 |
101 | a {
102 | color: inherit;
103 | text-decoration: inherit;
104 | }
105 |
106 | /*
107 | Add the correct font weight in Edge and Safari.
108 | */
109 |
110 | b,
111 | strong {
112 | font-weight: bolder;
113 | }
114 |
115 | /*
116 | 1. Use the user's configured `mono` font family by default.
117 | 2. Correct the odd `em` font sizing in all browsers.
118 | */
119 |
120 | code,
121 | kbd,
122 | samp,
123 | pre {
124 | font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
125 | /* 1 */
126 | font-size: 1em;
127 | /* 2 */
128 | }
129 |
130 | /*
131 | Add the correct font size in all browsers.
132 | */
133 |
134 | small {
135 | font-size: 80%;
136 | }
137 |
138 | /*
139 | Prevent `sub` and `sup` elements from affecting the line height in all browsers.
140 | */
141 |
142 | sub,
143 | sup {
144 | font-size: 75%;
145 | line-height: 0;
146 | position: relative;
147 | vertical-align: baseline;
148 | }
149 |
150 | sub {
151 | bottom: -0.25em;
152 | }
153 |
154 | sup {
155 | top: -0.5em;
156 | }
157 |
158 | /*
159 | 1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
160 | 2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
161 | 3. Remove gaps between table borders by default.
162 | */
163 |
164 | table {
165 | text-indent: 0;
166 | /* 1 */
167 | border-color: inherit;
168 | /* 2 */
169 | border-collapse: collapse;
170 | /* 3 */
171 | }
172 |
173 | /*
174 | 1. Change the font styles in all browsers.
175 | 2. Remove the margin in Firefox and Safari.
176 | 3. Remove default padding in all browsers.
177 | */
178 |
179 | button,
180 | input,
181 | optgroup,
182 | select,
183 | textarea {
184 | font-family: inherit;
185 | /* 1 */
186 | font-size: 100%;
187 | /* 1 */
188 | line-height: inherit;
189 | /* 1 */
190 | color: inherit;
191 | /* 1 */
192 | margin: 0;
193 | /* 2 */
194 | padding: 0;
195 | /* 3 */
196 | }
197 |
198 | /*
199 | Remove the inheritance of text transform in Edge and Firefox.
200 | */
201 |
202 | button,
203 | select {
204 | text-transform: none;
205 | }
206 |
207 | /*
208 | 1. Correct the inability to style clickable types in iOS and Safari.
209 | 2. Remove default button styles.
210 | */
211 |
212 | button,
213 | [type='button'],
214 | [type='reset'],
215 | [type='submit'] {
216 | -webkit-appearance: button;
217 | /* 1 */
218 | background-color: transparent;
219 | /* 2 */
220 | background-image: none;
221 | /* 2 */
222 | }
223 |
224 | /*
225 | Use the modern Firefox focus style for all focusable elements.
226 | */
227 |
228 | :-moz-focusring {
229 | outline: auto;
230 | }
231 |
232 | /*
233 | Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
234 | */
235 |
236 | :-moz-ui-invalid {
237 | box-shadow: none;
238 | }
239 |
240 | /*
241 | Add the correct vertical alignment in Chrome and Firefox.
242 | */
243 |
244 | progress {
245 | vertical-align: baseline;
246 | }
247 |
248 | /*
249 | Correct the cursor style of increment and decrement buttons in Safari.
250 | */
251 |
252 | ::-webkit-inner-spin-button,
253 | ::-webkit-outer-spin-button {
254 | height: auto;
255 | }
256 |
257 | /*
258 | 1. Correct the odd appearance in Chrome and Safari.
259 | 2. Correct the outline style in Safari.
260 | */
261 |
262 | [type='search'] {
263 | -webkit-appearance: textfield;
264 | /* 1 */
265 | outline-offset: -2px;
266 | /* 2 */
267 | }
268 |
269 | /*
270 | Remove the inner padding in Chrome and Safari on macOS.
271 | */
272 |
273 | ::-webkit-search-decoration {
274 | -webkit-appearance: none;
275 | }
276 |
277 | /*
278 | 1. Correct the inability to style clickable types in iOS and Safari.
279 | 2. Change font properties to `inherit` in Safari.
280 | */
281 |
282 | ::-webkit-file-upload-button {
283 | -webkit-appearance: button;
284 | /* 1 */
285 | font: inherit;
286 | /* 2 */
287 | }
288 |
289 | /*
290 | Add the correct display in Chrome and Safari.
291 | */
292 |
293 | summary {
294 | display: list-item;
295 | }
296 |
297 | /*
298 | Removes the default spacing and border for appropriate elements.
299 | */
300 |
301 | blockquote,
302 | dl,
303 | dd,
304 | h1,
305 | h2,
306 | h3,
307 | h4,
308 | h5,
309 | h6,
310 | hr,
311 | figure,
312 | p,
313 | pre {
314 | margin: 0;
315 | }
316 |
317 | fieldset {
318 | margin: 0;
319 | padding: 0;
320 | }
321 |
322 | legend {
323 | padding: 0;
324 | }
325 |
326 | ol,
327 | ul,
328 | menu {
329 | list-style: none;
330 | margin: 0;
331 | padding: 0;
332 | }
333 |
334 | /*
335 | Prevent resizing textareas horizontally by default.
336 | */
337 |
338 | textarea {
339 | resize: vertical;
340 | }
341 |
342 | /*
343 | 1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
344 | 2. Set the default placeholder color to the user's configured gray 400 color.
345 | */
346 |
347 | input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
348 | opacity: 1;
349 | /* 1 */
350 | color: #9ca3af;
351 | /* 2 */
352 | }
353 |
354 | input:-ms-input-placeholder, textarea:-ms-input-placeholder {
355 | opacity: 1;
356 | /* 1 */
357 | color: #9ca3af;
358 | /* 2 */
359 | }
360 |
361 | input::placeholder,
362 | textarea::placeholder {
363 | opacity: 1;
364 | /* 1 */
365 | color: #9ca3af;
366 | /* 2 */
367 | }
368 |
369 | /*
370 | Set the default cursor for buttons.
371 | */
372 |
373 | button,
374 | [role="button"] {
375 | cursor: pointer;
376 | }
377 |
378 | /*
379 | Make sure disabled buttons don't get the pointer cursor.
380 | */
381 |
382 | :disabled {
383 | cursor: default;
384 | }
385 |
386 | /*
387 | 1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
388 | 2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
389 | This can trigger a poorly considered lint error in some tools but is included by design.
390 | */
391 |
392 | img,
393 | svg,
394 | video,
395 | canvas,
396 | audio,
397 | iframe,
398 | embed,
399 | object {
400 | display: block;
401 | /* 1 */
402 | vertical-align: middle;
403 | /* 2 */
404 | }
405 |
406 | /*
407 | Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
408 | */
409 |
410 | img,
411 | video {
412 | max-width: 100%;
413 | height: auto;
414 | }
415 |
416 | /*
417 | Ensure the default browser behavior of the `hidden` attribute.
418 | */
419 |
420 | [hidden] {
421 | display: none;
422 | }
423 |
424 | [type='text'],[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='search'],[type='tel'],[type='time'],[type='week'],[multiple],textarea,select {
425 | -webkit-appearance: none;
426 | appearance: none;
427 | background-color: #fff;
428 | border-color: #6b7280;
429 | border-width: 1px;
430 | border-radius: 0px;
431 | padding-top: 0.5rem;
432 | padding-right: 0.75rem;
433 | padding-bottom: 0.5rem;
434 | padding-left: 0.75rem;
435 | font-size: 1rem;
436 | line-height: 1.5rem;
437 | --tw-shadow: 0 0 #0000;
438 | }
439 |
440 | [type='text']:focus, [type='email']:focus, [type='url']:focus, [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='week']:focus, [multiple]:focus, textarea:focus, select:focus {
441 | outline: 2px solid transparent;
442 | outline-offset: 2px;
443 | --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);
444 | --tw-ring-offset-width: 0px;
445 | --tw-ring-offset-color: #fff;
446 | --tw-ring-color: #2563eb;
447 | --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
448 | --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
449 | box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
450 | border-color: #2563eb;
451 | }
452 |
453 | input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
454 | color: #6b7280;
455 | opacity: 1;
456 | }
457 |
458 | input:-ms-input-placeholder, textarea:-ms-input-placeholder {
459 | color: #6b7280;
460 | opacity: 1;
461 | }
462 |
463 | input::placeholder,textarea::placeholder {
464 | color: #6b7280;
465 | opacity: 1;
466 | }
467 |
468 | ::-webkit-datetime-edit-fields-wrapper {
469 | padding: 0;
470 | }
471 |
472 | ::-webkit-date-and-time-value {
473 | min-height: 1.5em;
474 | }
475 |
476 | ::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field {
477 | padding-top: 0;
478 | padding-bottom: 0;
479 | }
480 |
481 | select {
482 | background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
483 | background-position: right 0.5rem center;
484 | background-repeat: no-repeat;
485 | background-size: 1.5em 1.5em;
486 | padding-right: 2.5rem;
487 | -webkit-print-color-adjust: exact;
488 | print-color-adjust: exact;
489 | }
490 |
491 | [multiple] {
492 | background-image: initial;
493 | background-position: initial;
494 | background-repeat: unset;
495 | background-size: initial;
496 | padding-right: 0.75rem;
497 | -webkit-print-color-adjust: unset;
498 | print-color-adjust: unset;
499 | }
500 |
501 | [type='checkbox'],[type='radio'] {
502 | -webkit-appearance: none;
503 | appearance: none;
504 | padding: 0;
505 | -webkit-print-color-adjust: exact;
506 | print-color-adjust: exact;
507 | display: inline-block;
508 | vertical-align: middle;
509 | background-origin: border-box;
510 | -webkit-user-select: none;
511 | -ms-user-select: none;
512 | user-select: none;
513 | flex-shrink: 0;
514 | height: 1rem;
515 | width: 1rem;
516 | color: #2563eb;
517 | background-color: #fff;
518 | border-color: #6b7280;
519 | border-width: 1px;
520 | --tw-shadow: 0 0 #0000;
521 | }
522 |
523 | [type='checkbox'] {
524 | border-radius: 0px;
525 | }
526 |
527 | [type='radio'] {
528 | border-radius: 100%;
529 | }
530 |
531 | [type='checkbox']:focus,[type='radio']:focus {
532 | outline: 2px solid transparent;
533 | outline-offset: 2px;
534 | --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);
535 | --tw-ring-offset-width: 2px;
536 | --tw-ring-offset-color: #fff;
537 | --tw-ring-color: #2563eb;
538 | --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
539 | --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
540 | box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
541 | }
542 |
543 | [type='checkbox']:checked,[type='radio']:checked {
544 | border-color: transparent;
545 | background-color: currentColor;
546 | background-size: 100% 100%;
547 | background-position: center;
548 | background-repeat: no-repeat;
549 | }
550 |
551 | [type='checkbox']:checked {
552 | background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
553 | }
554 |
555 | [type='radio']:checked {
556 | background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");
557 | }
558 |
559 | [type='checkbox']:checked:hover,[type='checkbox']:checked:focus,[type='radio']:checked:hover,[type='radio']:checked:focus {
560 | border-color: transparent;
561 | background-color: currentColor;
562 | }
563 |
564 | [type='checkbox']:indeterminate {
565 | background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");
566 | border-color: transparent;
567 | background-color: currentColor;
568 | background-size: 100% 100%;
569 | background-position: center;
570 | background-repeat: no-repeat;
571 | }
572 |
573 | [type='checkbox']:indeterminate:hover,[type='checkbox']:indeterminate:focus {
574 | border-color: transparent;
575 | background-color: currentColor;
576 | }
577 |
578 | [type='file'] {
579 | background: unset;
580 | border-color: inherit;
581 | border-width: 0;
582 | border-radius: 0;
583 | padding: 0;
584 | font-size: unset;
585 | line-height: inherit;
586 | }
587 |
588 | [type='file']:focus {
589 | outline: 1px solid ButtonText;
590 | outline: 1px auto -webkit-focus-ring-color;
591 | }
592 |
593 | [type="text"], [type="email"], [type="url"], [type="password"], [type="number"], [type="date"], [type="datetime-local"], [type="month"], [type="search"], [type="tel"], [type="time"], [type="week"], [multiple], textarea, select {
594 | width: 100%;
595 | border-radius: 0.5rem;
596 | --tw-border-opacity: 1;
597 | border-color: rgb(209 213 219 / var(--tw-border-opacity));
598 | --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
599 | --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
600 | box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
601 | }
602 |
603 | [type="text"]:focus, [type="email"]:focus, [type="url"]:focus, [type="password"]:focus, [type="number"]:focus, [type="date"]:focus, [type="datetime-local"]:focus, [type="month"]:focus, [type="search"]:focus, [type="tel"]:focus, [type="time"]:focus, [type="week"]:focus, [multiple]:focus, textarea:focus, select:focus {
604 | --tw-border-opacity: 1;
605 | border-color: rgb(99 102 241 / var(--tw-border-opacity));
606 | --tw-ring-opacity: 1;
607 | --tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity));
608 | }
609 |
610 | [type="checkbox"], [type="radio"] {
611 | border-radius: 0.25rem;
612 | --tw-border-opacity: 1;
613 | border-color: rgb(209 213 219 / var(--tw-border-opacity));
614 | --tw-text-opacity: 1;
615 | color: rgb(79 70 229 / var(--tw-text-opacity));
616 | }
617 |
618 | [type="checkbox"]:focus, [type="radio"]:focus {
619 | --tw-ring-opacity: 1;
620 | --tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity));
621 | }
622 |
623 | *, ::before, ::after {
624 | --tw-translate-x: 0;
625 | --tw-translate-y: 0;
626 | --tw-rotate: 0;
627 | --tw-skew-x: 0;
628 | --tw-skew-y: 0;
629 | --tw-scale-x: 1;
630 | --tw-scale-y: 1;
631 | --tw-pan-x: ;
632 | --tw-pan-y: ;
633 | --tw-pinch-zoom: ;
634 | --tw-scroll-snap-strictness: proximity;
635 | --tw-ordinal: ;
636 | --tw-slashed-zero: ;
637 | --tw-numeric-figure: ;
638 | --tw-numeric-spacing: ;
639 | --tw-numeric-fraction: ;
640 | --tw-ring-inset: ;
641 | --tw-ring-offset-width: 0px;
642 | --tw-ring-offset-color: #fff;
643 | --tw-ring-color: rgb(59 130 246 / 0.5);
644 | --tw-ring-offset-shadow: 0 0 #0000;
645 | --tw-ring-shadow: 0 0 #0000;
646 | --tw-shadow: 0 0 #0000;
647 | --tw-shadow-colored: 0 0 #0000;
648 | --tw-blur: ;
649 | --tw-brightness: ;
650 | --tw-contrast: ;
651 | --tw-grayscale: ;
652 | --tw-hue-rotate: ;
653 | --tw-invert: ;
654 | --tw-saturate: ;
655 | --tw-sepia: ;
656 | --tw-drop-shadow: ;
657 | --tw-backdrop-blur: ;
658 | --tw-backdrop-brightness: ;
659 | --tw-backdrop-contrast: ;
660 | --tw-backdrop-grayscale: ;
661 | --tw-backdrop-hue-rotate: ;
662 | --tw-backdrop-invert: ;
663 | --tw-backdrop-opacity: ;
664 | --tw-backdrop-saturate: ;
665 | --tw-backdrop-sepia: ;
666 | }
667 |
668 | .mx-auto {
669 | margin-left: auto;
670 | margin-right: auto;
671 | }
672 |
673 | .mt-6 {
674 | margin-top: 1.5rem;
675 | }
676 |
677 | .mt-2 {
678 | margin-top: 0.5rem;
679 | }
680 |
681 | .mt-8 {
682 | margin-top: 2rem;
683 | }
684 |
685 | .mb-0 {
686 | margin-bottom: 0px;
687 | }
688 |
689 | .mt-1 {
690 | margin-top: 0.25rem;
691 | }
692 |
693 | .ml-2 {
694 | margin-left: 0.5rem;
695 | }
696 |
697 | .block {
698 | display: block;
699 | }
700 |
701 | .flex {
702 | display: flex;
703 | }
704 |
705 | .h-12 {
706 | height: 3rem;
707 | }
708 |
709 | .min-h-screen {
710 | min-height: 100vh;
711 | }
712 |
713 | .w-auto {
714 | width: auto;
715 | }
716 |
717 | .w-full {
718 | width: 100%;
719 | }
720 |
721 | .flex-col {
722 | flex-direction: column;
723 | }
724 |
725 | .items-center {
726 | align-items: center;
727 | }
728 |
729 | .justify-center {
730 | justify-content: center;
731 | }
732 |
733 | .space-y-6 > :not([hidden]) ~ :not([hidden]) {
734 | --tw-space-y-reverse: 0;
735 | margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));
736 | margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));
737 | }
738 |
739 | .rounded-lg {
740 | border-radius: 0.5rem;
741 | }
742 |
743 | .rounded-md {
744 | border-radius: 0.375rem;
745 | }
746 |
747 | .border {
748 | border-width: 1px;
749 | }
750 |
751 | .border-transparent {
752 | border-color: transparent;
753 | }
754 |
755 | .bg-gray-100 {
756 | --tw-bg-opacity: 1;
757 | background-color: rgb(243 244 246 / var(--tw-bg-opacity));
758 | }
759 |
760 | .bg-white {
761 | --tw-bg-opacity: 1;
762 | background-color: rgb(255 255 255 / var(--tw-bg-opacity));
763 | }
764 |
765 | .bg-indigo-600 {
766 | --tw-bg-opacity: 1;
767 | background-color: rgb(79 70 229 / var(--tw-bg-opacity));
768 | }
769 |
770 | .py-12 {
771 | padding-top: 3rem;
772 | padding-bottom: 3rem;
773 | }
774 |
775 | .px-6 {
776 | padding-left: 1.5rem;
777 | padding-right: 1.5rem;
778 | }
779 |
780 | .py-8 {
781 | padding-top: 2rem;
782 | padding-bottom: 2rem;
783 | }
784 |
785 | .py-2 {
786 | padding-top: 0.5rem;
787 | padding-bottom: 0.5rem;
788 | }
789 |
790 | .px-4 {
791 | padding-left: 1rem;
792 | padding-right: 1rem;
793 | }
794 |
795 | .text-center {
796 | text-align: center;
797 | }
798 |
799 | .text-3xl {
800 | font-size: 1.875rem;
801 | line-height: 2.25rem;
802 | }
803 |
804 | .text-sm {
805 | font-size: 0.875rem;
806 | line-height: 1.25rem;
807 | }
808 |
809 | .text-4xl {
810 | font-size: 2.25rem;
811 | line-height: 2.5rem;
812 | }
813 |
814 | .font-extrabold {
815 | font-weight: 800;
816 | }
817 |
818 | .font-medium {
819 | font-weight: 500;
820 | }
821 |
822 | .text-gray-900 {
823 | --tw-text-opacity: 1;
824 | color: rgb(17 24 39 / var(--tw-text-opacity));
825 | }
826 |
827 | .text-gray-600 {
828 | --tw-text-opacity: 1;
829 | color: rgb(75 85 99 / var(--tw-text-opacity));
830 | }
831 |
832 | .text-indigo-600 {
833 | --tw-text-opacity: 1;
834 | color: rgb(79 70 229 / var(--tw-text-opacity));
835 | }
836 |
837 | .text-gray-700 {
838 | --tw-text-opacity: 1;
839 | color: rgb(55 65 81 / var(--tw-text-opacity));
840 | }
841 |
842 | .text-white {
843 | --tw-text-opacity: 1;
844 | color: rgb(255 255 255 / var(--tw-text-opacity));
845 | }
846 |
847 | .shadow {
848 | --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
849 | --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
850 | box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
851 | }
852 |
853 | .shadow-sm {
854 | --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
855 | --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
856 | box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
857 | }
858 |
859 | .hover\:bg-indigo-700:hover {
860 | --tw-bg-opacity: 1;
861 | background-color: rgb(67 56 202 / var(--tw-bg-opacity));
862 | }
863 |
864 | .hover\:text-indigo-500:hover {
865 | --tw-text-opacity: 1;
866 | color: rgb(99 102 241 / var(--tw-text-opacity));
867 | }
868 |
869 | .focus\:outline-none:focus {
870 | outline: 2px solid transparent;
871 | outline-offset: 2px;
872 | }
873 |
874 | .focus\:ring-2:focus {
875 | --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
876 | --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
877 | box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
878 | }
879 |
880 | .focus\:ring-indigo-500:focus {
881 | --tw-ring-opacity: 1;
882 | --tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity));
883 | }
884 |
885 | .focus\:ring-offset-2:focus {
886 | --tw-ring-offset-width: 2px;
887 | }
888 |
889 | .amb{
890 | height: 500px;
891 | width: auto;
892 | }
893 |
894 | @media (min-width: 480px) {
895 | .sm\:mx-auto {
896 | margin-left: auto;
897 | margin-right: auto;
898 | }
899 |
900 | .sm\:w-full {
901 | width: 100%;
902 | }
903 |
904 | .sm\:max-w-md {
905 | max-width: 28rem;
906 | }
907 |
908 | .sm\:px-10 {
909 | padding-left: 2.5rem;
910 | padding-right: 2.5rem;
911 | }
912 | }
913 |
914 | @media (min-width: 1024px) {
915 | .lg\:px-8 {
916 | padding-left: 2rem;
917 | padding-right: 2rem;
918 | }
919 | }
920 |
--------------------------------------------------------------------------------
/Web/clients/amb-driver/src/dist/output.css:
--------------------------------------------------------------------------------
1 | /*
2 | ! tailwindcss v3.0.24 | MIT License | https://tailwindcss.com
3 | */
4 |
5 | /*
6 | 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
7 | 2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
8 | */
9 |
10 | *,
11 | ::before,
12 | ::after {
13 | box-sizing: border-box;
14 | /* 1 */
15 | border-width: 0;
16 | /* 2 */
17 | border-style: solid;
18 | /* 2 */
19 | border-color: #e5e7eb;
20 | /* 2 */
21 | }
22 |
23 | ::before,
24 | ::after {
25 | --tw-content: '';
26 | }
27 |
28 | /*
29 | 1. Use a consistent sensible line-height in all browsers.
30 | 2. Prevent adjustments of font size after orientation changes in iOS.
31 | 3. Use a more readable tab size.
32 | 4. Use the user's configured `sans` font-family by default.
33 | */
34 |
35 | html {
36 | line-height: 1.5;
37 | /* 1 */
38 | -webkit-text-size-adjust: 100%;
39 | /* 2 */
40 | /* 3 */
41 | tab-size: 4;
42 | /* 3 */
43 | font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
44 | /* 4 */
45 | }
46 |
47 | /*
48 | 1. Remove the margin in all browsers.
49 | 2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
50 | */
51 |
52 | body {
53 | margin: 0;
54 | /* 1 */
55 | line-height: inherit;
56 | /* 2 */
57 | }
58 |
59 | /*
60 | 1. Add the correct height in Firefox.
61 | 2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
62 | 3. Ensure horizontal rules are visible by default.
63 | */
64 |
65 | hr {
66 | height: 0;
67 | /* 1 */
68 | color: inherit;
69 | /* 2 */
70 | border-top-width: 1px;
71 | /* 3 */
72 | }
73 |
74 | /*
75 | Add the correct text decoration in Chrome, Edge, and Safari.
76 | */
77 |
78 | abbr:where([title]) {
79 | -webkit-text-decoration: underline dotted;
80 | text-decoration: underline dotted;
81 | }
82 |
83 | /*
84 | Remove the default font size and weight for headings.
85 | */
86 |
87 | h1,
88 | h2,
89 | h3,
90 | h4,
91 | h5,
92 | h6 {
93 | font-size: inherit;
94 | font-weight: inherit;
95 | }
96 |
97 | /*
98 | Reset links to optimize for opt-in styling instead of opt-out.
99 | */
100 |
101 | a {
102 | color: inherit;
103 | text-decoration: inherit;
104 | }
105 |
106 | /*
107 | Add the correct font weight in Edge and Safari.
108 | */
109 |
110 | b,
111 | strong {
112 | font-weight: bolder;
113 | }
114 |
115 | /*
116 | 1. Use the user's configured `mono` font family by default.
117 | 2. Correct the odd `em` font sizing in all browsers.
118 | */
119 |
120 | code,
121 | kbd,
122 | samp,
123 | pre {
124 | font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
125 | /* 1 */
126 | font-size: 1em;
127 | /* 2 */
128 | }
129 |
130 | /*
131 | Add the correct font size in all browsers.
132 | */
133 |
134 | small {
135 | font-size: 80%;
136 | }
137 |
138 | /*
139 | Prevent `sub` and `sup` elements from affecting the line height in all browsers.
140 | */
141 |
142 | sub,
143 | sup {
144 | font-size: 75%;
145 | line-height: 0;
146 | position: relative;
147 | vertical-align: baseline;
148 | }
149 |
150 | sub {
151 | bottom: -0.25em;
152 | }
153 |
154 | sup {
155 | top: -0.5em;
156 | }
157 |
158 | /*
159 | 1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
160 | 2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
161 | 3. Remove gaps between table borders by default.
162 | */
163 |
164 | table {
165 | text-indent: 0;
166 | /* 1 */
167 | border-color: inherit;
168 | /* 2 */
169 | border-collapse: collapse;
170 | /* 3 */
171 | }
172 |
173 | /*
174 | 1. Change the font styles in all browsers.
175 | 2. Remove the margin in Firefox and Safari.
176 | 3. Remove default padding in all browsers.
177 | */
178 |
179 | button,
180 | input,
181 | optgroup,
182 | select,
183 | textarea {
184 | font-family: inherit;
185 | /* 1 */
186 | font-size: 100%;
187 | /* 1 */
188 | line-height: inherit;
189 | /* 1 */
190 | color: inherit;
191 | /* 1 */
192 | margin: 0;
193 | /* 2 */
194 | padding: 0;
195 | /* 3 */
196 | }
197 |
198 | /*
199 | Remove the inheritance of text transform in Edge and Firefox.
200 | */
201 |
202 | button,
203 | select {
204 | text-transform: none;
205 | }
206 |
207 | /*
208 | 1. Correct the inability to style clickable types in iOS and Safari.
209 | 2. Remove default button styles.
210 | */
211 |
212 | button,
213 | [type='button'],
214 | [type='reset'],
215 | [type='submit'] {
216 | -webkit-appearance: button;
217 | /* 1 */
218 | background-color: transparent;
219 | /* 2 */
220 | background-image: none;
221 | /* 2 */
222 | }
223 |
224 | /*
225 | Use the modern Firefox focus style for all focusable elements.
226 | */
227 |
228 | :-moz-focusring {
229 | outline: auto;
230 | }
231 |
232 | /*
233 | Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
234 | */
235 |
236 | :-moz-ui-invalid {
237 | box-shadow: none;
238 | }
239 |
240 | /*
241 | Add the correct vertical alignment in Chrome and Firefox.
242 | */
243 |
244 | progress {
245 | vertical-align: baseline;
246 | }
247 |
248 | /*
249 | Correct the cursor style of increment and decrement buttons in Safari.
250 | */
251 |
252 | ::-webkit-inner-spin-button,
253 | ::-webkit-outer-spin-button {
254 | height: auto;
255 | }
256 |
257 | /*
258 | 1. Correct the odd appearance in Chrome and Safari.
259 | 2. Correct the outline style in Safari.
260 | */
261 |
262 | [type='search'] {
263 | -webkit-appearance: textfield;
264 | /* 1 */
265 | outline-offset: -2px;
266 | /* 2 */
267 | }
268 |
269 | /*
270 | Remove the inner padding in Chrome and Safari on macOS.
271 | */
272 |
273 | ::-webkit-search-decoration {
274 | -webkit-appearance: none;
275 | }
276 |
277 | /*
278 | 1. Correct the inability to style clickable types in iOS and Safari.
279 | 2. Change font properties to `inherit` in Safari.
280 | */
281 |
282 | ::-webkit-file-upload-button {
283 | -webkit-appearance: button;
284 | /* 1 */
285 | font: inherit;
286 | /* 2 */
287 | }
288 |
289 | /*
290 | Add the correct display in Chrome and Safari.
291 | */
292 |
293 | summary {
294 | display: list-item;
295 | }
296 |
297 | /*
298 | Removes the default spacing and border for appropriate elements.
299 | */
300 |
301 | blockquote,
302 | dl,
303 | dd,
304 | h1,
305 | h2,
306 | h3,
307 | h4,
308 | h5,
309 | h6,
310 | hr,
311 | figure,
312 | p,
313 | pre {
314 | margin: 0;
315 | }
316 |
317 | fieldset {
318 | margin: 0;
319 | padding: 0;
320 | }
321 |
322 | legend {
323 | padding: 0;
324 | }
325 |
326 | ol,
327 | ul,
328 | menu {
329 | list-style: none;
330 | margin: 0;
331 | padding: 0;
332 | }
333 |
334 | /*
335 | Prevent resizing textareas horizontally by default.
336 | */
337 |
338 | textarea {
339 | resize: vertical;
340 | }
341 |
342 | /*
343 | 1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
344 | 2. Set the default placeholder color to the user's configured gray 400 color.
345 | */
346 |
347 | input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
348 | opacity: 1;
349 | /* 1 */
350 | color: #9ca3af;
351 | /* 2 */
352 | }
353 |
354 | input:-ms-input-placeholder, textarea:-ms-input-placeholder {
355 | opacity: 1;
356 | /* 1 */
357 | color: #9ca3af;
358 | /* 2 */
359 | }
360 |
361 | input::placeholder,
362 | textarea::placeholder {
363 | opacity: 1;
364 | /* 1 */
365 | color: #9ca3af;
366 | /* 2 */
367 | }
368 |
369 | /*
370 | Set the default cursor for buttons.
371 | */
372 |
373 | button,
374 | [role="button"] {
375 | cursor: pointer;
376 | }
377 |
378 | /*
379 | Make sure disabled buttons don't get the pointer cursor.
380 | */
381 |
382 | :disabled {
383 | cursor: default;
384 | }
385 |
386 | /*
387 | 1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
388 | 2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
389 | This can trigger a poorly considered lint error in some tools but is included by design.
390 | */
391 |
392 | img,
393 | svg,
394 | video,
395 | canvas,
396 | audio,
397 | iframe,
398 | embed,
399 | object {
400 | display: block;
401 | /* 1 */
402 | vertical-align: middle;
403 | /* 2 */
404 | }
405 |
406 | /*
407 | Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
408 | */
409 |
410 | img,
411 | video {
412 | max-width: 100%;
413 | height: auto;
414 | }
415 |
416 | /*
417 | Ensure the default browser behavior of the `hidden` attribute.
418 | */
419 |
420 | [hidden] {
421 | display: none;
422 | }
423 |
424 | [type='text'],[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='search'],[type='tel'],[type='time'],[type='week'],[multiple],textarea,select {
425 | -webkit-appearance: none;
426 | appearance: none;
427 | background-color: #fff;
428 | border-color: #6b7280;
429 | border-width: 1px;
430 | border-radius: 0px;
431 | padding-top: 0.5rem;
432 | padding-right: 0.75rem;
433 | padding-bottom: 0.5rem;
434 | padding-left: 0.75rem;
435 | font-size: 1rem;
436 | line-height: 1.5rem;
437 | --tw-shadow: 0 0 #0000;
438 | }
439 |
440 | [type='text']:focus, [type='email']:focus, [type='url']:focus, [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='week']:focus, [multiple]:focus, textarea:focus, select:focus {
441 | outline: 2px solid transparent;
442 | outline-offset: 2px;
443 | --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);
444 | --tw-ring-offset-width: 0px;
445 | --tw-ring-offset-color: #fff;
446 | --tw-ring-color: #2563eb;
447 | --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
448 | --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
449 | box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
450 | border-color: #2563eb;
451 | }
452 |
453 | input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
454 | color: #6b7280;
455 | opacity: 1;
456 | }
457 |
458 | input:-ms-input-placeholder, textarea:-ms-input-placeholder {
459 | color: #6b7280;
460 | opacity: 1;
461 | }
462 |
463 | input::placeholder,textarea::placeholder {
464 | color: #6b7280;
465 | opacity: 1;
466 | }
467 |
468 | ::-webkit-datetime-edit-fields-wrapper {
469 | padding: 0;
470 | }
471 |
472 | ::-webkit-date-and-time-value {
473 | min-height: 1.5em;
474 | }
475 |
476 | ::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field {
477 | padding-top: 0;
478 | padding-bottom: 0;
479 | }
480 |
481 | select {
482 | background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
483 | background-position: right 0.5rem center;
484 | background-repeat: no-repeat;
485 | background-size: 1.5em 1.5em;
486 | padding-right: 2.5rem;
487 | -webkit-print-color-adjust: exact;
488 | print-color-adjust: exact;
489 | }
490 |
491 | [multiple] {
492 | background-image: initial;
493 | background-position: initial;
494 | background-repeat: unset;
495 | background-size: initial;
496 | padding-right: 0.75rem;
497 | -webkit-print-color-adjust: unset;
498 | print-color-adjust: unset;
499 | }
500 |
501 | [type='checkbox'],[type='radio'] {
502 | -webkit-appearance: none;
503 | appearance: none;
504 | padding: 0;
505 | -webkit-print-color-adjust: exact;
506 | print-color-adjust: exact;
507 | display: inline-block;
508 | vertical-align: middle;
509 | background-origin: border-box;
510 | -webkit-user-select: none;
511 | -ms-user-select: none;
512 | user-select: none;
513 | flex-shrink: 0;
514 | height: 1rem;
515 | width: 1rem;
516 | color: #2563eb;
517 | background-color: #fff;
518 | border-color: #6b7280;
519 | border-width: 1px;
520 | --tw-shadow: 0 0 #0000;
521 | }
522 |
523 | [type='checkbox'] {
524 | border-radius: 0px;
525 | }
526 |
527 | [type='radio'] {
528 | border-radius: 100%;
529 | }
530 |
531 | [type='checkbox']:focus,[type='radio']:focus {
532 | outline: 2px solid transparent;
533 | outline-offset: 2px;
534 | --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);
535 | --tw-ring-offset-width: 2px;
536 | --tw-ring-offset-color: #fff;
537 | --tw-ring-color: #2563eb;
538 | --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
539 | --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
540 | box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
541 | }
542 |
543 | [type='checkbox']:checked,[type='radio']:checked {
544 | border-color: transparent;
545 | background-color: currentColor;
546 | background-size: 100% 100%;
547 | background-position: center;
548 | background-repeat: no-repeat;
549 | }
550 |
551 | [type='checkbox']:checked {
552 | background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
553 | }
554 |
555 | [type='radio']:checked {
556 | background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");
557 | }
558 |
559 | [type='checkbox']:checked:hover,[type='checkbox']:checked:focus,[type='radio']:checked:hover,[type='radio']:checked:focus {
560 | border-color: transparent;
561 | background-color: currentColor;
562 | }
563 |
564 | [type='checkbox']:indeterminate {
565 | background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");
566 | border-color: transparent;
567 | background-color: currentColor;
568 | background-size: 100% 100%;
569 | background-position: center;
570 | background-repeat: no-repeat;
571 | }
572 |
573 | [type='checkbox']:indeterminate:hover,[type='checkbox']:indeterminate:focus {
574 | border-color: transparent;
575 | background-color: currentColor;
576 | }
577 |
578 | [type='file'] {
579 | background: unset;
580 | border-color: inherit;
581 | border-width: 0;
582 | border-radius: 0;
583 | padding: 0;
584 | font-size: unset;
585 | line-height: inherit;
586 | }
587 |
588 | [type='file']:focus {
589 | outline: 1px solid ButtonText;
590 | outline: 1px auto -webkit-focus-ring-color;
591 | }
592 |
593 | [type="text"], [type="email"], [type="url"], [type="password"], [type="number"], [type="date"], [type="datetime-local"], [type="month"], [type="search"], [type="tel"], [type="time"], [type="week"], [multiple], textarea, select {
594 | width: 100%;
595 | border-radius: 0.5rem;
596 | --tw-border-opacity: 1;
597 | border-color: rgb(209 213 219 / var(--tw-border-opacity));
598 | --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
599 | --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
600 | box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
601 | }
602 |
603 | [type="text"]:focus, [type="email"]:focus, [type="url"]:focus, [type="password"]:focus, [type="number"]:focus, [type="date"]:focus, [type="datetime-local"]:focus, [type="month"]:focus, [type="search"]:focus, [type="tel"]:focus, [type="time"]:focus, [type="week"]:focus, [multiple]:focus, textarea:focus, select:focus {
604 | --tw-border-opacity: 1;
605 | border-color: rgb(99 102 241 / var(--tw-border-opacity));
606 | --tw-ring-opacity: 1;
607 | --tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity));
608 | }
609 |
610 | [type="checkbox"], [type="radio"] {
611 | border-radius: 0.25rem;
612 | --tw-border-opacity: 1;
613 | border-color: rgb(209 213 219 / var(--tw-border-opacity));
614 | --tw-text-opacity: 1;
615 | color: rgb(79 70 229 / var(--tw-text-opacity));
616 | }
617 |
618 | [type="checkbox"]:focus, [type="radio"]:focus {
619 | --tw-ring-opacity: 1;
620 | --tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity));
621 | }
622 |
623 | *, ::before, ::after {
624 | --tw-translate-x: 0;
625 | --tw-translate-y: 0;
626 | --tw-rotate: 0;
627 | --tw-skew-x: 0;
628 | --tw-skew-y: 0;
629 | --tw-scale-x: 1;
630 | --tw-scale-y: 1;
631 | --tw-pan-x: ;
632 | --tw-pan-y: ;
633 | --tw-pinch-zoom: ;
634 | --tw-scroll-snap-strictness: proximity;
635 | --tw-ordinal: ;
636 | --tw-slashed-zero: ;
637 | --tw-numeric-figure: ;
638 | --tw-numeric-spacing: ;
639 | --tw-numeric-fraction: ;
640 | --tw-ring-inset: ;
641 | --tw-ring-offset-width: 0px;
642 | --tw-ring-offset-color: #fff;
643 | --tw-ring-color: rgb(59 130 246 / 0.5);
644 | --tw-ring-offset-shadow: 0 0 #0000;
645 | --tw-ring-shadow: 0 0 #0000;
646 | --tw-shadow: 0 0 #0000;
647 | --tw-shadow-colored: 0 0 #0000;
648 | --tw-blur: ;
649 | --tw-brightness: ;
650 | --tw-contrast: ;
651 | --tw-grayscale: ;
652 | --tw-hue-rotate: ;
653 | --tw-invert: ;
654 | --tw-saturate: ;
655 | --tw-sepia: ;
656 | --tw-drop-shadow: ;
657 | --tw-backdrop-blur: ;
658 | --tw-backdrop-brightness: ;
659 | --tw-backdrop-contrast: ;
660 | --tw-backdrop-grayscale: ;
661 | --tw-backdrop-hue-rotate: ;
662 | --tw-backdrop-invert: ;
663 | --tw-backdrop-opacity: ;
664 | --tw-backdrop-saturate: ;
665 | --tw-backdrop-sepia: ;
666 | }
667 |
668 | .mx-auto {
669 | margin-left: auto;
670 | margin-right: auto;
671 | }
672 |
673 | .mt-6 {
674 | margin-top: 1.5rem;
675 | }
676 |
677 | .mt-2 {
678 | margin-top: 0.5rem;
679 | }
680 |
681 | .mt-8 {
682 | margin-top: 2rem;
683 | }
684 |
685 | .mb-0 {
686 | margin-bottom: 0px;
687 | }
688 |
689 | .mt-1 {
690 | margin-top: 0.25rem;
691 | }
692 |
693 | .ml-2 {
694 | margin-left: 0.5rem;
695 | }
696 |
697 | .block {
698 | display: block;
699 | }
700 |
701 | .flex {
702 | display: flex;
703 | }
704 |
705 | .h-12 {
706 | height: 3rem;
707 | }
708 |
709 | .min-h-screen {
710 | min-height: 100vh;
711 | }
712 |
713 | .w-auto {
714 | width: auto;
715 | }
716 |
717 | .w-full {
718 | width: 100%;
719 | }
720 |
721 | .flex-col {
722 | flex-direction: column;
723 | }
724 |
725 | .items-center {
726 | align-items: center;
727 | }
728 |
729 | .justify-center {
730 | justify-content: center;
731 | }
732 |
733 | .space-y-6 > :not([hidden]) ~ :not([hidden]) {
734 | --tw-space-y-reverse: 0;
735 | margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));
736 | margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));
737 | }
738 |
739 | .rounded-lg {
740 | border-radius: 0.5rem;
741 | }
742 |
743 | .rounded-md {
744 | border-radius: 0.375rem;
745 | }
746 |
747 | .border {
748 | border-width: 1px;
749 | }
750 |
751 | .border-transparent {
752 | border-color: transparent;
753 | }
754 |
755 | .bg-gray-100 {
756 | --tw-bg-opacity: 1;
757 | background-color: rgb(243 244 246 / var(--tw-bg-opacity));
758 | }
759 |
760 | .bg-white {
761 | --tw-bg-opacity: 1;
762 | background-color: rgb(255 255 255 / var(--tw-bg-opacity));
763 | }
764 |
765 | .bg-indigo-600 {
766 | --tw-bg-opacity: 1;
767 | background-color: rgb(79 70 229 / var(--tw-bg-opacity));
768 | }
769 |
770 | .py-12 {
771 | padding-top: 3rem;
772 | padding-bottom: 3rem;
773 | }
774 |
775 | .px-6 {
776 | padding-left: 1.5rem;
777 | padding-right: 1.5rem;
778 | }
779 |
780 | .py-8 {
781 | padding-top: 2rem;
782 | padding-bottom: 2rem;
783 | }
784 |
785 | .py-2 {
786 | padding-top: 0.5rem;
787 | padding-bottom: 0.5rem;
788 | }
789 |
790 | .px-4 {
791 | padding-left: 1rem;
792 | padding-right: 1rem;
793 | }
794 |
795 | .text-center {
796 | text-align: center;
797 | }
798 |
799 | .text-3xl {
800 | font-size: 1.875rem;
801 | line-height: 2.25rem;
802 | }
803 |
804 | .text-sm {
805 | font-size: 0.875rem;
806 | line-height: 1.25rem;
807 | }
808 |
809 | .text-4xl {
810 | font-size: 2.25rem;
811 | line-height: 2.5rem;
812 | }
813 |
814 | .font-extrabold {
815 | font-weight: 800;
816 | }
817 |
818 | .font-medium {
819 | font-weight: 500;
820 | }
821 |
822 | .text-gray-900 {
823 | --tw-text-opacity: 1;
824 | color: rgb(17 24 39 / var(--tw-text-opacity));
825 | }
826 |
827 | .text-gray-600 {
828 | --tw-text-opacity: 1;
829 | color: rgb(75 85 99 / var(--tw-text-opacity));
830 | }
831 |
832 | .text-indigo-600 {
833 | --tw-text-opacity: 1;
834 | color: rgb(79 70 229 / var(--tw-text-opacity));
835 | }
836 |
837 | .text-gray-700 {
838 | --tw-text-opacity: 1;
839 | color: rgb(55 65 81 / var(--tw-text-opacity));
840 | }
841 |
842 | .text-white {
843 | --tw-text-opacity: 1;
844 | color: rgb(255 255 255 / var(--tw-text-opacity));
845 | }
846 |
847 | .shadow {
848 | --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
849 | --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
850 | box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
851 | }
852 |
853 | .shadow-sm {
854 | --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
855 | --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
856 | box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
857 | }
858 |
859 | .hover\:bg-indigo-700:hover {
860 | --tw-bg-opacity: 1;
861 | background-color: rgb(67 56 202 / var(--tw-bg-opacity));
862 | }
863 |
864 | .hover\:text-indigo-500:hover {
865 | --tw-text-opacity: 1;
866 | color: rgb(99 102 241 / var(--tw-text-opacity));
867 | }
868 |
869 | .focus\:outline-none:focus {
870 | outline: 2px solid transparent;
871 | outline-offset: 2px;
872 | }
873 |
874 | .focus\:ring-2:focus {
875 | --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
876 | --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
877 | box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
878 | }
879 |
880 | .focus\:ring-indigo-500:focus {
881 | --tw-ring-opacity: 1;
882 | --tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity));
883 | }
884 |
885 | .focus\:ring-offset-2:focus {
886 | --tw-ring-offset-width: 2px;
887 | }
888 |
889 | .amb{
890 | height: 500px;
891 | width: auto;
892 | }
893 |
894 | @media (min-width: 480px) {
895 | .sm\:mx-auto {
896 | margin-left: auto;
897 | margin-right: auto;
898 | }
899 |
900 | .sm\:w-full {
901 | width: 100%;
902 | }
903 |
904 | .sm\:max-w-md {
905 | max-width: 28rem;
906 | }
907 |
908 | .sm\:px-10 {
909 | padding-left: 2.5rem;
910 | padding-right: 2.5rem;
911 | }
912 | }
913 |
914 | @media (min-width: 1024px) {
915 | .lg\:px-8 {
916 | padding-left: 2rem;
917 | padding-right: 2rem;
918 | }
919 | }
920 |
--------------------------------------------------------------------------------