Official-Sponsor-of-Democracy / osd

0 stars 2 forks source link

services #7

Open JoeyDelahoussaye opened 5 years ago

JoeyDelahoussaye commented 5 years ago

client: business-signup post request ('/business-signup', sends sign up info from business user and sends it to server) server: business-signup post handler('business-signup', receives business info, makes google civic api call for next congressional/president election data, saves all info to db, return 201, call email api and send business ref # and email template)

client: employee-signup post request ('/employee-signup', sends name, email address, phone number and business ref #) server: employee-signup post handler('employee-signup', finds next election in area from database, saves it and employee info as entry in db, return 201)

timer: makes api call to google places for library locations, calls email api to send election info to employee along with 'set up a gameplan' link

client: employee-go-vote1 post request ('/employee-go-vote1', sends name, email address, phone number and business ref # and sends to server) server: employee-signup post handler('employee-signup', finds next election in area from database, saves it and employee info as entry in db) and map with libraries and home address)

client: employee-go-vote2 post request ('/employee-go-vote2', sends selected library address and home address) server: employee-go-vote2 post handler('employee-go-vote2', makes api call to google distance, returns drive time, makes sendgrid call, sends business owner and employee gameplan)

client: employee-i-voted post request ('/employee-i-voted', sends yes or no with business ref # and name) server: employee-i-voted post handler('employee-i-voted', adds tally to db)

server: 10 days after election, makes api call to sendgrid, sends business owner stats email, makes api call to find next election, replaces current election entry

get calls ('/login', retrieves profile data)