Home

Awesome

<p align="center" style="background-color: #F8A65D;"> <img alt="oss image" src="https://shootismoke.app/static/logo_text_2lines-cf697d3ebc27c385cd2f30e1f6a68c51.svg" width="300px"> </p> <h4 align="center">Know how many cigarettes you smoke based on the pollution of your location.</h4> <p align="center"> <a href="https://github.com/shootismoke/webapp/actions"> <img alt="Github Actions" src="https://github.com/shootismoke/webapp/workflows/CI/badge.svg?branch=master" /> </a> <a href="https://codeclimate.com/github/shootismoke/webapp/maintainability"> <img alt="codeclimate" src="https://api.codeclimate.com/v1/badges/9fc8ebb000978f14b6d0/maintainability" /> </a> <a href="https://spectrum.chat/shootismoke"> <img alt="spectrum" src="https://withspectrum.github.io/badge/badge.svg" /> </a> </p> <br />

:rocket: Website: https://shootismoke.app

:hammer: Build it yourself

Run the following commands:

# Clone this repo
git clone https://github.com/shootismoke/webapp && cd webapp

# Install dependencies.
yarn install

# Fill in secret tokens.
cp .env.example .env.development

# Run the MongoDB daemon locally.
mongod --dbpath /path/to/my/db

# Run the app.
yarn dev

The webapp will launch at http://localhost:3000. It uses Next.js, you can check out their docs.

Note: A Docker images is in the works.

Use your own API tokens

For local development, all API secret tokens should live in the .env.development file for development, as described in the Next.js docs.

Env VariableDescriptionUrlComments
NEXT_PUBLIC_AQICN_TOKENWorld Air Quality Index, used in frontend.http://aqicn.org/apiRequired. You can use the public one in .env.example for development.
NEXT_PUBLIC_SENTRY_API_KEYSentry bug tracking.https://sentry.ioOptional.
NEXT_PUBLIC_AMPLITUDE_API_KEYAmplitude analyticshttps://amplitude.comOptional. Note: we respect DNT, and we never track PII.
BACKEND_SECRETSecret used in headers between frontend and backend API calls. Please note that CORS is also enabled.n/aRequired. Defaults to ssshhh! .
BACKEND_AQICN_TOKENWorld Air Quality Index, used in backend.http://aqicn.org/apiRequired. You can use the public one in .env.example for development.
BACKEND_MAILGUN_API_KEY and BACKEND_MAILGUN_DOMAINCredentials used for sending emails with Mailgun.https://www.mailgun.com/Optional. Only used in the script to send emails.
BACKEND_MONGODB_ATLAS_URIConnection string to MongoDB.https://www.mongodb.com/cloud/atlasRequired. Defaults to mongodb://localhost/shootismoke.

:raising_hand: Contribute

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!

More information on contributing here.

:microscope: Tests

The codebase is covered by different types of tests:

:newspaper: License

GPL-3.0. See LICENSE file for more information.

:star: Credits

Created with pride by Marcelo & Amaury.