Skip to content

An app designed to allow a user ("technician") to update their status, and admin ("dispatcher") to be able to view the status of all the "technicians."

License

Notifications You must be signed in to change notification settings

VenoMidas/TechMate

Repository files navigation

image

TechMate

Duration: Two week sprint

An app designed to allow a user ("technician") to update their status, and admin ("dispatcher") to be able to view the status of all the "technicians."

Deployed version of app on Heroku with Bit.io DB

Screenshot

Screenshot Screenshot

Usage

  1. As a user I want to be able to quickly change my status
  2. As a user I want to be able tp view my current status
  3. As a user I want to be able to update my information
  4. As an admin I want to be able to view the status of all users
  5. As an admin I want to be able to inform technicians when work is dispatched
  6. As a user I want communication to happen instantly

Roadmap

  1. Ability for users to edit the status details
  2. Ability for admin to edit details of the unique status
  3. Ability to sort technicians and admin into teams
  4. Data tracking and analytics to improve process and workflow

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Before you get started, make sure you have the following software installed on your computer:

Installation

  1. Create a database named tech_mate, or modify the pool.js file with your database name.
  2. The queries in the database.sql file are set up to create all the necessary tables to allow the application to run correctly. The project is built on Postgres, so you will need to make sure to have that installed. I recommend using Postico to run those queries as that was used to create the queries,
  3. Open your editor and run npm install in your terminal - this will install required dependencies.
  4. Create a .env file at the root of the project and paste this line into the file:
SERVER_SESSION_SECRET=superDuperSecret

While you're in your new .env file, take the time to replace superDuperSecret with some long random string like 25POUbVtx6RKVNWszd9ERB9Bb6 to keep your application secure. Here's a site that can help you: https://passwordsgenerators.net/. If you don't do this step, create a secret with less than eight characters, or leave it as superDuperSecret, you will get a warning.

  1. Start postgres if it is not already running
  2. run npm run server in your terminal. (Default port is 5000, if port is in use modify server.js port variable.)
  3. run npm run client in a new terminal - this will launch the app in the browser.
  4. Navigate to localhost:3000

Running Tests

Debugging

To debug, you will need to run the client-side separately from the server. Start the client by running the command npm run client. Start the debugging server by selecting the Debug button.

VSCode Toolbar

Then make sure Launch Program is selected from the dropdown, then click the green play arrow.

VSCode Debug Bar

Testing Routes with Postman

To use Postman with this repo, you will need to set up requests in Postman to register a user and login a user at a minimum.

Keep in mind that once you using the login route, Postman will manage your session cookie for you just like a browser, ensuring it is sent with each subsequent request. If you delete the localhost cookie in Postman, it will effectively log you out.

  1. Start the server - npm run server
  2. Import the sample routes JSON file v2 by clicking Import in Postman. Select the file.
  3. Click Collections and Send the following three calls in order:
    1. POST /api/user/register registers a new user, see body to change username/password
    2. POST /api/user/login will login a user, see body to change username/password
    3. GET /api/user will get user information, by default it's not very much

After running the login route above, you can try any other route you've created that requires a logged in user!

Built With

  1. image
  2. image
  3. image
  4. image
  5. image
  6. image
  7. image
  8. image
  9. image
  10. image
  11. image
  12. image
  13. image
  14. image
  15. image
  16. image

Authors

  • **Mark Schumacher - Initial Work - VenoMidas

License

MIT

Acknowledgement

Thanks to Prime Digital Academy and members of the Phrygian cohort who equipped and helped me to make this application a reality.

Support

If you have suggestions or issues, please email me at schuma1022@gmail.com

About

An app designed to allow a user ("technician") to update their status, and admin ("dispatcher") to be able to view the status of all the "technicians."

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published