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.
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:
/ - main page or home page
/login - login page
/users/register - registration page
/my-page - user's page after successful login
/users/reserve-a-ride - ride reservation page
/users/reserved-rides - page that shows user's reserved rides
/saved-subway-table - page that shows user's saved subway timetables
/users/filter-ride-by-date - page that filters user's saved rides by date
- as a non-registered user, I can view subway timetable of different subway trains using "Train Timetable" dropdown menu
- as a non-registered user, I can sign up to the site
- as a user, I can log in to the site
- as a user, I can add subway train timetables that I use often to my page
- as a user, I can reserve a ride to my page
- as a user, I can view my reserved rides and saved time tables
- as a user, I can filter my reserved rides by date
- 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