Skip to content

yogdaan/suraksha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation



Suraksha

Suraksha works as public informer meant to keep people safe wherever they go.

Under heavy development

Index

  1. Introduction
    1. Features
  2. Usage
  3. Pre Requisites
  4. Development
    1. File Structure
    2. Environment
    3. Build
  5. Contribution
    1. Community
    2. Workflow
    3. Best Practice
  6. Credit
  7. License

Introduction

Suraksha is meant to analyze and display data to improve public understanding of our home planet to be safe.

Feature

What are the safety parameters Suraksha will track?

  • Health Issues
    You can track possible health issues all over the world or in your area. Following are some things you can track under it.

    • Mosquito occurrence
    • Zika virus fever
    • AIDS/HIV areas.
    • Other Diseases
  • Environmental Issues
    Knowing about the environmental factors, which can affect your health can also be analyzed. Following are some things you can track under it.

    • UV Index
    • Weather
    • Cloudiness
    • Humidity
    • temperature
    • wind speed
    • wind angle
  • Natural disaster
    You can see the forecast of following:

    • Earthquake
    • Cyclone
    • Tsunami
    • Flood
    • Hurricanes/Tornadoes/
    • Thunderstorms
    • Volcanic eruptions
    • Droughts
  • Other Information

    • Crime Rate
    • Theft Rate
    • other usefull information

How will supernova help me in an emergency?

  • Alert Your Family
    Once click SMS/Email alert to your families. This alert will send your location and other detials, which will make it easy to help you.

  • Help Near Me
    You can look for following things near you:

    • Police Stations
    • Hospitals
    • Public Toilet
    • Medical Stores
    • Fire Station

What other features Supernova have?

  • Accident Detection
    Using information from gyroscope, accelerometer, linear acceleration, rotation vetor and other sensors, Supernova can detect accidents, and can automatically inform your emergency contact about it.

How is it different from other apps?

  • We focus on showing the most relevent information, in a easy andvisual way so users can absorb more information, also support remote access and all this by just one app.

Usage

To use this app, you can download the Android APK from here.

Pre Requisites

You should also be familiar with following to get started.

Development

File Structure

Basic understanding of the file structure is required to do development, here is a level 2 file structure of this project

Supernova-2 is the root folder, and src is where our app lives.


Supernova-2
|--.angular.json
|--config.xml
|--ionic.config.json
|--LICENSE
|--logo.png
|--package-lock.json
|--package.json
|--README.md
|--tsconfig.json
|--tslint.json
|--node_modules/...
|--platforms/...
|--plugins/...
|--resources/...
|--e2e
|   |--app.e2e-spec.ts
|   |--app.po.ts
|   |--tsconfig.e2e.json
|--src
    |--global.scss
    |--index.html
    |--karma.conf.js
    |--main.ts
    |--polyfills.ts
    |--test.ts
    |--tsconfig.app.json
    |--tsconfig.spec.json
    |--app
    |   |--hero-detail/...
    |   |--heroes/...
    |   |--messages/...
    |   |--top/...
    |   |
    |   |--app.component.css
    |   |--app.component.html
    |   |--app.component.spec.ts
    |   |--app.component.ts
    |   |--app.module.ts
    |
    |--assets
    |   |--gitkeep
    |
    |--environments
    |   |--environment.prod.ts
    |   |--environment.ts
    |
    |--lib
    |   |--config.inc.ts
    |   |--hero.ts
    |   |--mock-heroes.ts
    |
    |--module
    |   |--app-routing.module.spec.ts
    |   |--app-routing.module.ts
    |
    |--service
    |   |--hero.service.spec.ts
    |   |--hero.service.ts
    |   |--message.service.spec.ts
    |   |--message.service.ts
    |
    |--style
        |--_base.scss
        |--_config.scss



src folder

File Purpose
app/app.component.{ts,html,css,spec.ts} Root components of what will become a tree of nested components, as the app grow.
app/app.module.ts root module tells angular how to assemble the application.
assets/* Place to put assets like images, gifs etc.
environments/* This folder contains one file for each of your destination environments
lib/* User defined libraries will be stored here.
service/* Services used by components are defined here.
style/* User defined style libraries will be stored here.
index.html Main HTML page, CLI automatically adds all the required file, like js, css etc while building your app.
main.ts Main entry point for your app
polyfills.ts Polyfills help normalize different levels of support of the web standards in different browsers.
global.scss Global style file.
test.ts Main entry point for units tests.
tsconfig.{app|spec}.json TypeScript compiler configuration for the Angular app tsconfig.app.json and for the unit tests tsconfig.spec.json.
karma.conf.js Unit test configuration for the Karma test runner, used when running ng test.

root folder

File Purpose
e2e/ It holds end-to-end tests.
node_modules/ Folder for third party modules listed in package.json.
.editorconfig Simple configuration for your editor to make sure everyone that uses your project has the same basic configuration. Most editors support an .editorconfig file. See Editor-Config for more information.
.gitignore Git configuration to make sure autogenerated files are not commited to source control.
package.json npm configuration listing the third party packages your project uses. You can also add your own custom scripts here.
README.md Basic documentation for your project.
tsconfig.json TypeScript compiler configuration for your IDE to pick up and give you helpful tooling.
tslint.json Linting configuration for TSLint together with Codelyzer, used when running ng lint. Linting helps keep your code style consistent.

Environment

To work on this repository, you need setup the following environment.

Mac

$ brew install node

Linux

  • On Debian, Ubuntu, Linux Mint:
$ sudo apt-get install nodejs npm
  • On Arch Linux
$ sudo pacman -S nodejs npm
  • On RHEL, CentOS
$ sudo yum install epel-release
  • On Fedora
$ sudo dnf install nodejs npm
$ npm install -g @angular/cli
$ sudo npm install -g cordova ionic

Build

  1. Clone the repository.
$ git clone https://github.com/yogdaan/Supernova-2
$ cd Supernova-2
  1. Run in browser.
$ ionic serve
  1. Build for android.
$ ionic cordova build android

Note: You might want to set ANDROID_HOME in .bash_profile.

export ANDROID_HOME=/<installation location>/android-sdk-macosx
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

ionic cordova build android

Contribution

Your contributions are always welcome and appreciated. To keep your experience good, we suggest you read all the guidelines thoroughly, also take some time to understand the workflow for this project. Each contribution is expected to follow best practices and community guidelines. Following are the things you can do to contribute to Meilix

  1. Report a bug
    If you think you have encountered a bug, and we should know about it, feel free to report it here and our community will take care of it.

  2. Request a feature
    You can also request for a feature here, and if the community feels it's viable, it will be picked for development.

  3. Create a pull request
    It can't get better then this, your pull request will be really appreciated by the community. You can get started by picking up any open issues from here and make a pull request.

If you are new to open-source, make sure to check read more about it here and learn more about creating a pull request here.

Community

Supernova is project under Yogdaan.org, and it's community is involved in the development. To get in touch with the community, you can use the following communications channels.

Gitter: https://gitter.im/yogdaan/Lobby
Github: https://github.com/yogdaan

Workflow

Supernova uses the agile methodology, so the version is frequently updated and development is really fast. It follow somewhat modified Git Flow branching methodology.

  1. Master is the equivalent to the git-flow develop branch. It should be fully ready to be shipped and should be stable.

  2. Production is the equivalent to the git-flow master branch. It represents the latest stable version of Supernova available.

  3. FEATURE/NAME is where we work on the new features and other parts of meilix.

Steps to create a pull request

  1. Make a PR to master or any other feature branch only. PR to production won't be accepted
  2. Your code must meet all the best practices and guidelines, other wise it won't be accepted.
  3. It must pass all CI tests.

After this, you changes will be Squash and Merge in master with a conventional commit message.

Production Deployment

  1. Create a PR from master to production.
  2. Wait for CI tests to pass.
  3. Merge the PR.

Why 'Squash and Merge' against Master?

All commits from the PR will be added as a single new commit to master.

  • It keeps the master clean: only commits that represent a complete feature of bugfix will be part of the history.
  • Adding #PR_Number to the commit message allows to check that PR and dive into all the commit history without bringing all the noise into master.

Why 'Merge' against production?

  • It doesn't create a new commit with a different hash, thus it keeps master and production with the same commit history.
  • It allows to check exactly what was deployed and when.

Learn more about it here

Best Practice

Commits

  • Make sure your commit message is crisp and clear, read more about it here
  • When refering to a issue in PR, use special words to automatically close the related issue.
  • Keep each PR very short, which will make it easy to review.

General

  • Comments
    Comments are what's make the communication possible between programmers and developers, they we created for a single main reason, to make the code readable.

    We need to comment our logic, reason and flow for making a algoritham/function in a app. we don't have to comment everything, but everything we is based out of our logic.

  • Documentation
    Documentations are the gates between code base and programmer/humans, they are decrease the time of understanding the code base and make the development process fast.

    Documentation grow, as our code grow, continous addition is a must for documentation to stay relevent.

SCSS and CSS

  • Use hyphen(-) Delimiter
    It makes sheet more readable.
    //This is wrong
    .blackCar{}
    //This is best
    .black-car{}
  • BEM Scheme
    Body Element Modifier(BEM) gives sense to the names, which is globally accepted. let's say we have a paper-car class, here car is body, it's parts are element and any change in its part is modifier. Following should be the best way to name it in Style Sheet.
    //This is how we name the body
    .paper-car{}

    //This is how we name the elements
    .paper-car_seat{}
    .paper-car_glass{}

    //This is how we name the modifier
    .paper-car_seat--blue{}
    .paper-car_seat--black{}
  • Style Sheet with Script File
    Using different class and id name for Style Sheet and Script file is best, it avoids the conflict between them and gives better flow. Using "js-" as a prefix for naming the object is prefered, also avoid using keywords for naming objets, like using 'data' for a naming a object will create a conflict, since it is also used by javascript and JSON.
    <div class="paper-car js-paper-car"></div>

Credit

Logo

License

This project is currently licensed under GNU Lesser General Public License v3.0 (LGPL-3.0).

About

Suraksha is meant to analyze and display data to improve public understanding of our home planet to be safe.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published