The COVID-19 Inventory Checklist app was created to help people all over the world maintain an inventory of their home items in a time when resources are more difficult to obtain. The app was designed to bring awareness to individuals with excessive amounts of items in hopes that they may donate their unused products to those in need. It was also made available so that individuals who may not have enough can use the app to see what's available in their area and reach out directly to those with excess.
This app was made as part of the Twilio and Dev.to hackathon.
This application was built using Rails for this backend portion. Please see the below sections on how to run the application on your local environment. Please ensure that you have downloaded the frontend portion of this application, to ensure full functionality of the application as it was designed.
- Ruby on Rails web server using Rails
- JSON Web Token authentication using JWT gem
- Serialization using active_model_serializers gem
- Configuration of environment variables using dotenv gem
- SMS texting capability using
twilio-ruby
gem
- Create a clone of this repo using GitHub's repository cloning functionality
- Locate the folder in your system and follow the steps below to run the server
- Ruby on Rails
- A Twilio account - sign up
This application should give you a ready-made starting point for keeping an inventory checklist of all of your household items. 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/mwong068/covid-19-inventory-checklist-backend-.git
cd covid-19-inventory-checklist-backend-
- Install dependencies
bundle install
- Set your environment variables
Follow the guide at dotenv for Rails.
Create a .env file at the root of the project directory
touch .env
Correctly set up the .env file following the format below:
ACCOUNT_SID=yourkeyhere
AUTH_TOKEN=yourtokenhere
TWILIO_NUMBER=yournumberhere
See Twilio Account Settings to locate the necessary environment variables.
- Set up the database
rails db:create
rails db:migrate
rails db:seed
This will be loaded with starter data so you can see an example of the application functionality.
- Run the application
rails server
- Navigate to http://localhost:3000
After the server is running, you will need to start the frontend portion to see the full application.
- Twilio's Guide to Implementation with Ruby/Rails
- Helpful Guide to using Twilio with Rail
- Sample SMS Texts using Twilio in Rails
This template is open source and welcomes contributions.
No warranty expressed or implied. Software is as is.