/emerging-headwinds

Similar to Craigslist, with additional functionality, allows management to post tasks/jobs/etc to the web UI via SMS. Built with React, Redux, React-router + Node.js and Twilio

Primary LanguageCSS

README

Build Status

This SPA makes posting jobs and tasks easier. I have tried to keep the code agnostic and modular. I named the app in honor of a friend of mine.

The backend is written in Node.js, frontend is in React with Redux, using React-router. I'm currently using Heroku for my deployment. The UI is a work in progress, and I'll have things looking better shortly.

If you register/login and then wish to logout, for now, after the top level domain, drop in '/account/logout' and you should see a JSON object letting you know that you were successful and that the user is null. I'll add a button in the near future. Similarly, if you're curious to know whether or not you are logged in, instead of entering '/account/logout' put in '/account/currentuser' and have a look at your JSON.

Build Instructions

Note: just a reminder that the Twilio integration in this project won't run on the local server (sorry), so if you wish to SMS your desires to server you'll surely want to deploy to live. I used Heroku, so be sure to check those heroku logs (run: heroku logs on the cli) to see if your messages made it.

  1. git clone this repo, and change directories into the root level directory of the project.

  2. Run npm install (If you have issues check your versions with a npm outdated and npm update. I've had issues in the past where bluebird fights me and I need to drop in a npm rebuild to end the complaints.)

  3. Make a dotEnv file and toss your secrets in there like so:

    • DB_URL=mongodb://localhost/yourProjectNameHere
    • SESSION_SECRET=whateverThisSessionSecretIs
    • TOKEN_SECRET=thowASecretTokenIn!
    • TWILIO_SID=grabThisFromYourTwilioConsole
    • TWILIO_AUTH_TOKEN=grabThisFromYourTwilioConsole
    • TWILIO_FROM=yourTwilioPhoneNumber

    Docs for initial testing with Twilio

  4. Run your testing database and server with: webpack -w, mongod, and nodemon in three separate tabs or windows in your terminal.

  5. Head on over to localhost:3000 in your web browser of choice. When this is working well, you can consider deploying live.

  6. If you would like to incorporate the SMS component, you will need a Twilio account and a phone number for use with this project. You set up a POST webhook under messaging from your Twilio number to your soon-to-be-deployed domain at 'http(s)://www.yourDomainName.com/twilio/task'. Be sure to SMS your Twilio number in the following format: "Title. Category. Description." it will post the SMS job/task request to your server, and will render the post on the app. Neat!

To Do's

  • Finish wiring up react-router, which doesn't currently accept a refresh, server-side or alternative.
  • Polish up and enhance UI
  • Handle the edge-cases with texting in task/jobs, insufficient currently.
  • Give user instructions in format to text their task/jobs to the server
  • Set up more Twilio functions(yeah!):
    • notify the user who posted a job/task when someone replies to their wishes
    • additional fun things
  • gulp and prep project build environment, etc. for proper deployment