Know how many cigarettes you smoke based on the pollution of your location. π©π¬
Air pollution is a burning issue facing our planet today. Rapid industrialization and urbanization has made the problem extremely difficult to contain. Cities around the world are witnessing rising levels of air contamination, with Beijing, Kanpur and New Delhi recording some of the worst figures in recent years.
Air pollution has dire implications on human health and well-being. It affects plant and animal life, and also disrupts the ecosystem. It changes our environment irreversibly, often leaving it beyond repair. This calls for an urgent need to curb air pollution.
There are various things we can do to eliminate the causes and minimize the effects of air pollution. There is a macro and a micro level to dealing with pollution. While the government and the private sector need to rethink policies for controlling air pollution on a broader scale, we as citizens can fight air pollution in our homes and offices by installing air quality monitors and air purification devices.
This app is bootstrapped with Expo, you can download the Expo app on the App Store or Play Store, and enter the url provided below. We have 2 release channels:
Release Channel | Version | Description | Url |
---|---|---|---|
Production | v1.4.2 | Same version as Sh**t! I Smoke on the App Store and Play Store. | https://exp.host/@amaurymartiny/shoot-i-smoke?release-channel=production-v1.4.2 |
Staging | v1.5.0 | Latest version currently in development: newest features, may contain bugs. | https://exp.host/@amaurymartiny/shoot-i-smoke |
Before developing the app, you need to fetch your own API tokens for the following services:
Service | Url | Comments |
---|---|---|
World Air Quality Index | http://aqicn.org/api/ | Required. You can use the dummy one in app.example.json for development. |
Algolia Places | https://community.algolia.com/places/ (Get Started button on the bottom) |
Optional, lower API rates if not provided. |
Google Maps for iOS | https://developers.google.com/maps/documentation/ios-sdk/start | Optional in development. |
Google Maps for Android | https://developers.google.com/maps/documentation/android-api/ | Optional in development. |
Sentry Bug Tracking | https://sentry.io | Optional. |
Amplitude Analytics | https://amplitude.com | Optional. Note: we never track PII. |
Then run the following commands:
git clone https://github.com/amaurymartiny/shoot-i-smoke
cd shoot-i-smoke
yarn install
# Copy the file that contains secrets
cp app.example.json app.json
yarn start
In app.json
, replace all the placeholders for API keys and tokens with the ones you generated for yourself. For those that are optional, you can just put null
(without quotes).
This app is created with Expo, using React Native. When you run yarn start
, the Expo packager will show, and you can either:
- install the Expo app, scan the displayed QR code, and run the app on your mobile phone directly.
- open the Android simulator.
- open the iOS simulator.
All the code lives in the App/
folder. The app itself is pretty small, so it should be fairly easy to navigate through the files.
If you find a bug, or if you have an idea for this app, please file an issue here. We really appreciate feedback and inputs!
π¬π§π«π·πͺπΈπ¨π³ You may also contribute with translations with our online tool POEditor.
For code contribution, the codebase heavily relies on functional programming principles via the fp-ts
library. The codebase itself is quite simple, so even if you're beginner to functional programming, it shouldn't be hard to follow along.
More information on contributing here.
The codebase unfortunately isn't much covered by tests. Check out the *.spec.js
files in the project for tests. If you're interested to help out, have a look at #19.
GPL-3.0. See LICENSE file for more information.
Created with β€ by Marcelo & Amaury.
A huge thanks to the following contributors for their amazing work: