Skip to content

yaejinHan/Safe-Travel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Safe Travel!

Overview

Now in the age of coronavirus, it has become crucial to keep social distancing wherever we go. This application 'Safe Travel' provides users and guest users timetables of New York subway trains. If users think that at certain time, there will be more subway riders than usual, they can choose to make a note of private ride reservation details specifying date, time and location. Users can also save subway train timetables they use often in their account so that they have access to the updated timetable whenever they are in my-page.

Data Model

The application will store Users, and Subway Trains' Timetable

  • users can have two lists (1. my reserved rides - which is consisted of objects; 2. my subway schedule - which is consisted of TrainSchSchema)
  • each list can have multiple items

An Example User:

{
  firstName: "Yaejin",
  lastName: "Han",
  nickname: "yhyh",
  email: "[email protected]",
  password: // a password hash,
  secretToken: // secret token generated by module randomstring,
  confirmedUser: true or false,
  myRides: [{date: "01/01/2021", time: "13:20", location: "NYU Bobst Library"}],
  myTrainSch: [{trainName: "2", link: "https://new.mta.info/document/...."}]
}

An Example of Subway train timetable list:

{
  trainName: "2",
  link: "https://new.mta.info/document/...."
}

Final Version of Schema in User.js starts from line:

https://github.com/nyu-csci-ua-0480-034-fall-2020/yaejinHan-final-project/blob/f226ee3ea5ef0c42091496ca2a6e254f03fa20b7/models/User.js#L3

Wireframes

/ - main page or home page

main

/login - login page

login

/users/register - registration page

register

/my-page - user's page after successful login

myPage

/users/reserve-a-ride - ride reservation page

reserveRide

/users/reserved-rides - page that shows user's reserved rides

reservedRides

/saved-subway-table - page that shows user's saved subway timetables

savedSubwaySch

/users/filter-ride-by-date - page that filters user's saved rides by date

filterRide

Site map

siteMap

User Stories or Use Cases

  1. as a non-registered user, I can view subway timetable of different subway trains using "Train Timetable" dropdown menu
  2. as a non-registered user, I can sign up to the site
  3. as a user, I can log in to the site
  4. as a user, I can add subway train timetables that I use often to my page
  5. as a user, I can reserve a ride to my page
  6. as a user, I can view my reserved rides and saved time tables
  7. as a user, I can filter my reserved rides by date

Research Topics

  • Integrate email verification for sign up
    • used email verification for a new user sign up
    • used a nodemailer module
    • nodemailer module sends an email to the address entered by the user
    • included in the email is the secret token generated by the module randomstring which will be used to authenticate the user to set him/her as a confirmed user for the site
  • Integrate user login and registration
    • used passport-local strategy for authentication
    • used bcryptjs for crypting password
    • doesn't allow users to access my-page until they've logged in to the site
  • Integrate Flash Messages in login, and registration process
    • used module connect-flash to do this
    • has error and success flash messages show up depending on to the situation
    • Created a flashMsg.hbs inside views/partials for flashMsg template reuse

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published