For the #twiliohackathon we are building a mobile application called Memmo to generate alerts in case any user has been too close to a person who now has covid-19. More info
We will collect the geolocation of each user (4am - 10pm). When new cases of COVID-19 are reported we will search for each new patient on our platform. If we find one, we will notify other users who have been within 2 meters of the patient in the last 14 days.
- Node.js web server using Express.js
- Basic web user interface using Handlebars for templating and Bootstrap for UI
- Unit tests using
mocha
andchai
- Running using containers with Docker
- Automated CI testing using GitHub Actions
- Linting and formatting using ESLint and Prettier
- Docker Compose
- A Google Cloud Platform account - more info
- A Twilio account - sign up
Before we begin, we need to collect all the config values we need to run the application:
Config Value | Description |
---|---|
Account Sid | Your primary Twilio account identifier - find this in the Console. |
Auth Token | Used to authenticate - just like the above, you'll find this here. |
Phone number | A Twilio phone number in E.164 format - you can get one here |
After the above requirements have been met:
- Clone this repository and
cd
into it
git clone https://github.com/sjdonado/memmo_back.git
cd memmo_back
- Set your environment variables
Rename docker-compose.yml.example as docker-compose.yml Open docker-compose.yml and fill the next fields
TWILIO_ACCOUNT_SID
TWILIO_AUTH_TOKEN
TWILIO_SERVICE_VERIFY_SID
TWILIO_SERVICE_NOTIFICATION_SID
TWILIO_SERVICE_NOTIFICATION_SID
TWILIO_PHONE_NUMBER
See Twilio Account Settings to locate the necessary environment variables.
Finally, create a firebase project and a service account More info, download the JSON key and follow the next steps:
- Fill each one
FIREBASE
field at docker-compose.yml with the service_account.json variables
- Run the application
docker-compose up
Alternatively, you can use this command to start the server in development mode. It will reload whenever you change any files.
docker-compose up
- Navigate to http://localhost:3000
That's it!
You can run the tests locally by typing:
docker-compose run --rm api npm test
Additionally to trying out this application locally, you can deploy it to Heroku.
Please be aware that some Heroku addons might charge you for the usage.
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for Contributing.
All contributions are subject to our Code of Conduct.