Skip to content

Latest commit

 

History

History
74 lines (50 loc) · 3.67 KB

dev-doc.md

File metadata and controls

74 lines (50 loc) · 3.67 KB

Development

The web app uses

If you wish to modify the code for the webapp, then look into src directory.

The webapp is setup in a way that it is made up of

  • html partials written in pug templating language
  • css partials written in sass templating language
  • js config for third party services info written in yaml templating language

...all of which is compiled into a single index.html file which lives under public directory. Styles are compiled into a single style.css file under public/css directory and third party services info is compiled into a single thirdpartyservices.js under public/js referenced directly in the index.html file.

To compile the code under src folder, simply execute the helper bash script render.sh at the root of the repo inside a terminal:

./render.sh

This will generate the index.html, style.css and thirdpartyservices.js files at their required directory path.

Open index.html to view the full webapp 🎉

Contributing more 3rd Party Service's links

The webapp uses a JSON array to populate the list of 3rd party services section. This JSON array is generated from another yaml file.

If you want contribute a new 3rd party service for the section then open a Pull Request which simply adds a new item in the YAML file src/includes/yaml/thirdpartyservices.yml

The format is very simple and you only need to provide the below fields:

- name: Google Play Services
  model: gps
  gps: false
  logo: images/third_party_logos/gps.png
  link:
    privacy: https://www.google.com/policies/privacy/
    terms: https://policies.google.com/terms

Note: The value of model is the same as the the field below it. i.e model: gps and gps: false. This is required by the code. Make sure this is maintained.

Additionally, you also will have to drop the logo image into the public/images/third_party_logos/ folder. Make sure the logo is 160 × 160 in size.

Deployment

In order to deploy with the web app and Firebase hosting you would need to setup Firebase CLI.

Setup Firebase CLI

The instructions to set it up differ based on the operating system, which is explained here.

However you can also use the below command to setup/update the Firebase CLI, which will take care of everything (including detecting the OS you are running):

curl -sL firebase.tools | bash

Server and test locally

To serve locally for testing, run: firebase serve --only hosting

Deploy to Production

Note: This can only be done by maintainers who have access to Firebase console!

  • First, login by executing command: firebase login
  • Next,To deploy to production,run: firebase deploy -m "3.0.9"