Giter Site home page Giter Site logo

react_immigration_app's Introduction

Immigration Portal


Immigration Portal is an app designed to connect pro-bono lawyers with immigrants looking to file USCIS forms.

This app is comprised of Webpack, React, Redux, and MongoDB. It utilizes the following APIs: Auth0, Smartystreets, and Sendgrid.

Installation

To run this app on your local computer:

//First open your terminal and run:
git clone https://github.com/Shaverda/react_immigration_app.git
cd react_immigration_app
npm install

//Next, in the same react_immigration_app root directory folder, we need to create a .env file. 
//You can create this in Linux in the terminal by running:
touch .env

Obtaining API keys

You now need to retrieve api keys/auth tokens from Sendgrid, Smartystreets, and Auth0. This app uses Sengrid to send emails to our pro bono lawyer partners when users/immigrants have submitted their forms. Smartystreets is used to validate that mailing addresses are entered properly. Auth0 is used for Google logins.

  1. Obtain a Sendgrid API key by signing up here.
  2. Obtain a Smartystreets auth id/auth token by signing up here.
  3. Obtain an Auth0 auth id/domain by signing up here.

You will then add your personal API keys to the .env file.

Edit the contents of this .env file in your favorite text editor (I use Sublime!). The following should be added:

SENDGRID_API_KEY='insert sendgrid api key here'
SMARTYSTREETS_AUTH_ID='insert smartystreets api key here'
SMARTYSTREETS_AUTH_TOKEN='insert smartystreets auth token here'
AUTH_CLIENT_ID='insert auth0 client id here'
AUTH_CLIENT_DOMAIN='insert auth0 client domain here'

To clarify, your API keys/token should be typed within the single quotes marks in place of, for example, 'insert sendgrid api key here'. API keys are usually just a random assortment of letters and numbers. Save this file.

Setting up your Database

This app uses MongoDB in order to quickly and easily create and store data. First, make sure you've installed MongoDB. You will need to create a database and edit the file server.js in the root directory of this project to be able to successfully run the server. Specifically, what needs to be edited is line 28 of server.js:

//This is my specific database's name. 
mongoose.connect("mongodb://localhost/React");

You will need to instead connect to your own database you've created, and then edit that line accordingly with your database name/hostname. For a simple tutorial for creating a MongoDB database, click here. Before we can start our server, we need to have our MongoDB instance running. If you've used your own machine for this like I did, you need to start MongoDB in your terminal by running:

mongod
//occasionnally, you will have difficulty with permissions and instead have to run sudo mongod
//You can then start an actual MongoDB shell by running:
mongo

Time to start our local server in the root directory of react_immigration_portal...

//To start your server
node server

Now you're all up and running. Navigate in your browser to localhost:3000

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

History

Original Project Began in April 2017;

Notes

Credits

Contributors: @Shaverda, @williamwgilmore for a pre-React version of this project

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.