Skip to content

skwid138/MN-Senate-Constituent-Contact-Form

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Constituent Contact Form

Problem

  • Constituents need an easier way to contact their Senators via the web.

Solution

  • One form with the ability to select by Senator or District
  • Inputs for Constituent's name, phone number, mailing address, email address, and a message for their Senator.
  • A checkbox to prove the user is human
  • A submit button that sends the message to the Senator's eamil and stores the input in a database.

Technologies

Backend

  • Node.js
  • Express.js
  • dotenv
  • Request
  • pg w/ PostgreSQL

Frontend

  • AngularJS
  • AngularJS Material
  • AngularJS reCaptcha
  • Google Civiv API
  • Google reCaptcha

How To Use

  • Fork and Clone the repository.
  • Navigate to the directory in terminal
  • From terminal run npm install
  • Once that completes create a .env file in the root directory
    (the SMTP settings are currently setup for soho's mail server)
    • EMAIL_UN=[email here]
    • EMAIL_PW=[email password here]
    • GOOGLE_API=[Google API key here]
    • SECRET=[Google reCaptcha secret here]
    • PORT=8080
  • There is a SQL script that will setup the database
    • Create a database named mn-senate
    • run the database.sql script to setup the tables and constraints
  • From terminal run npm start (you'll see the console display 'server is listening on port'...)
  • Open a browser and visit the url http://127.0.0.1:8080 (or port specified in .env file)

About

Code Challenge for a Web Developer position with the MN Senate

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published