Coder Social home page Coder Social logo

amitxshukla / pandemic-contact-tracing-app Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 1.0 1.31 MB

Angular 12/Firebase - Electronic Visitor register App for storing Host & Guest Records, Picture Attendance with GPS Locations, Contacts tracing using user's mobile phone

Home Page: https://vmscloudsolution.web.app/

License: MIT License

JavaScript 0.88% TypeScript 34.74% HTML 61.88% CSS 2.50%
angular firebase firestore pandemic contact contacts-tracing visitor-management gps-locations picture-attendance guest-records

pandemic-contact-tracing-app's Introduction

Pandemic Contact Tracing, Visitor Management, Mobile Assets/Employee Attendance App

- If you like this project, please consider giving it a star (*) and follow me at GitHub & YouTube.

Objective

An Electronic Visitor register App for storing Host & Guest Records, Picture Attendance with GPS Locations using user's mobile phone

Privacy is key

The idea of contact tracing prompts some concerns regarding medical privacy, and public health officials take those concerns seriously. They are ethically and, in most states, legally bound to protect the information and use it only for public health purposes.

This repository is updated to Angular 12, please download latest Angular and Typescript version. Also, please use NODEJS 14 version.

please don't forget to copy/update tsconfig.json as well.

Tools:

front-end: Angular 12
back-end: Google Firestore / Firebase
Pro Version: AI, Machine Learning Algorithm supported Advance features

send an email to [email protected] for Pro version enquiries.

Features

  1. Admin Panel Access
  2. Paperless Records for Visitors, Contact Tree and Host
  3. Save Visits with Pictures and GPS Locations
  4. Online and/or Offline App
  5. One App for multiple platforms (iOS, Android, Desktop, Cloud etc.)
  6. Instant access to ALL guest/host historical records at guest check-in.
  7. No Thumb expressions or card punching to verify identify.
  8. Auto Face Recognition (Pro version only).
  9. Live Contact instant Notifications (Pro version)
  10. Social Authentication
  11. Online and/or Offline (delayed capture) App
  12. One App for multiple platforms (iOS, Android, Desktop, Cloud etc.)
  13. Store and Access millions of records instantly
  14. Paperless and Mobile on-premise/private cloud App deployement
  15. Instant access to millions of current & historical records at anytime
  16. iOS/Android app (notification enabled) / Advance Custom features (Pro version only)
  17. Unlimited Storage (only limited to server/database hosting)

Let's get started :-

// Before we start, Please make sure you have latest version of node js installed.
// head out to https://nodejs.org/en/ and grab latest nodejs.
// Once you have nodejs installed, open command prompt/terminal window.

$ node -v // make sure, this command comes back with a node version
$ npm -v // make sure, this command comes back with a npm version

// How to Install NodeJS on Windows, Mac, Linux & ChromeOS
// First run
$ sudo apt-get update
// and then if needed
$ sudo apt-get install curl gnupg -y
// for nodejs version 14
$ curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
$ sudo apt-get install -y nodejs

// Install Angular CLI
$ npm install -g @angular/cli
$ ng -v // make sure, this command comes back with a npm version
$ mkdir app
$ cd app
$ ng new CTAPP
$ cd CTAPP
$ ng serve

Setup Google Firestore / Firebase Social Authentication

>> login to https://console.firebase.google.com
create a new project
choose Firestore as your database
Click on Authentication
>> Sign in Methods
>> enable Email/Password
>> enable Google
>> enable FaceBook Auth
  For Facebook authentication, you will need to create a new FaceBook App
  and create APPID and App Secret from Facebook Graph API

Setup Google Firestore / Firebase Database & Role / Rules

rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write: if false;
    }
  match /VMS_LICENSE/{document} {
  // FIX READ later, it should only allow if user knows doc id
  	allow read: if true;
   allow read: if false;
   }
  match /VMS_USERS/{document} {
   allow read, write: if isDocOwner() || isAdmin();
   }
   match /VMS_DATA/{document} {
   allow read, write: if isSignedIn();
   }
   match /VMS_EMPLOYEE/{document} {
   allow read, write: if isSignedIn();
   }
   match /VMS_REGISTER/{document} {
   allow read, write: if isSignedIn();
   }
   match /VMS_CONFIG/{document} {
   // allow read, write, update: if isSignedIn();
   allow read, write, update: if true;
   // change this to isAdmin() later
   }
      // helper functions
    function isDocOwner() {
    // assuming document has a field author which is uid
    // Only the authenticated user who authored the document can read or write
    	return request.auth.uid == resource.data.author;
      // This above read query will fail
    // The query fails even if the current user actually is the author of every story document.
    //  The reason for this behavior is that when Cloud Firestore applies your security rules, 
    //  it evaluates the query against its potential result set,
    //   not against the actual properties of documents in your database. 
    //   If a query could potentially include documents that violate your security rules, 
    //   the query will fail.
    //   on your client app, make sure to include following
    //   .where("author", "==", this.afAuth.auth.currentUser.uid)
    }
    function isSignedIn() {
    // check if user is signed in
          return request.auth.uid != null;
    }
    function isAdmin() {
    return get(/databases/$(database)/documents/VMS_USERS/$(request.auth.uid)).data.isAdmin == true;
    }
}
}

Firebase/Forestore Storage Rules

rules_version = '2';
service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
      // fix these rules later to allow only authorized admin to read images
      allow read, write: if request.auth != null;
    }
  }
}

pandemic-contact-tracing-app's People

Contributors

amitxshukla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ineba

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.