Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MVP RUBY RAILERS #269

Open
wants to merge 267 commits into
base: master
Choose a base branch
from
Open

MVP RUBY RAILERS #269

wants to merge 267 commits into from

Conversation

paolacalle
Copy link

@paolacalle paolacalle commented Dec 12, 2023

RUBY RAILERS

(NEVERMIND)

paolacalle and others added 30 commits November 7, 2023 11:48
adding changes from master
added some ux changes to user, membership + navbar
User can now login
some sign up form validation
stations and bikes association fixed
some UX for tables
created helper methods for alerts and notices
@paolacalle
Copy link
Author

RUBY RAILERS

Instructions for Setting Up the Dev Environment

Environment Configuration:

  1. Clone the repo: https://github.com/paolacalle/valetbike
  2. Open terminal and navigate to the directory where you want to clone this repo.
  3. Run git clone https://github.com/paolacalle/valetbike
  4. Run bundle install
  5. Run rails db:migrate
  6. Run rake db:import_stations["notes/station-data.csv"]
  7. Run rake db:import_bikes["notes/bike-data.csv"]
  8. Run rails assets:precompile

SendGrid Configuration:

  1. Create a SendGrid account at https://app.sendgrid.com/
  2. Go to https://app.sendgrid.com/guide/integrate/langs/ruby
  3. Follow instructions for Sender Authentication at https://app.sendgrid.com/settings/sender_auth
  4. Add ENV['SENDER_EMAIL'] = ‘EMAIL_AUTHENTICATED’
  5. Create an API key
  6. Run echo "SENDGRID_API_KEY='YOUR_API_KEY'" >> .env
  7. Run bundle install

MapBox Configuration:

  1. Create a Mapbox account: https://account.mapbox.com/
  2. Generate a public key
  3. Add the public key to .env as MAPBOX_ACCESS_TOKEN = 'YOUR_API_KEY'

Complete Description of the MVP's Functionality

Session/User using Devise

  • To access any other cool features of the sites, you are required to either login or create an account.

For Logging In:

  • The form does basic data validations.
  • For user creation (sign up), the form and model do basic data validation and also assure that the email does not already exist in the User database.
  • Upon creation, a confirmation token is created that is only valid for 24hrs. This token is used to create a special URL that allows the user to confirm their email and activate their account. This link is sent to the user via the email they are trying to create the account with.
  • If the email is not confirmed after 24hrs, the account attempted creation is deleted.

If the User Forgets Their Password:

  • They can request to reset their password.
  • Like the confirmation, this sends the user a special URL. Once they click on it, they are asked to enter a new password. This link is only valid for 6 hrs.

The User Can Also:

  • Edit their email and password once logged in.
  • Delete their account if they do not have pending payments and active memberships.
  • Receive a warning before account deletion: “Are you 100% sure you want to cancel your account? This action cannot be undone!”
  • Confirm the deletion of their account by typing “BYE VALETBIKE".

Station

  • Options to create a new rental or look at your history of rentals.
  • Filter data by manually searching for an address of a station and/or select distance and click on near me.
  • The near me station asks you to allow your browser to pass down your geo-coordinates which is then used to filter out the stations based on the distance set.
  • In the map, a red marker is set for your location, so that you can visually see the stations near you (colored blue).

Bike

  • Select your location and station, choose a bike, and proceed to Create Rental page.

Rental

  • One active rental at a time.
  • Option to display a QR code for bike unlocking.
  • Option to return the bike at a selected station.
  • Rentals are sorted by time the rental was created (newer at top, older at the bottom).
  • Enter the number of hours and minutes for the rental.
  • The website generates the return by time to show the user when to return the bike.
  • Redirected to the rental index page upon completion.

Flash

  • Differentiated colors for Success, Notice, Alert, and Error to stand out to the user.

Memberships

  • Options for day, month, and year long memberships.
  • Directed to make a payment after selection.
  • Membership includes a created date and an expiration date, and will be destroyed on the expiration date.

Feedback

  • Submit feedback via "Contact Us" in the User dropdown menu or from the link in the footer.
  • Receive a confirmation email upon submission.
  • The feedback also notifies the company via email.

Station Review

  • Leave a review on a specific station by selecting the station and entering a response as well as a star rating out of 5 stars.
  • Receive a confirmation email upon submission.
  • Reviews of stations are available to be seen after clicking View Station from the New Rental page.

Mailers

  • ApplicationMailer controls the mailer for communication of company and user.
  • UserMailer controls communication with user.
  • Devise::Mailer controls communication with user and sessions, registrations, password management, etc.

Summary of Important Changes Since the Prototype

  • Payment Information Management: Users can make payments for selected membership or hourly rate for rental.
  • Membership Management: Users have the ability to add memberships.
  • Displaying Information: The account page should display both membership details and payment information, allowing users to view and manage them easily.
  • Linking Payment Information with Memberships: When a user chooses a membership, they enter new payment information. This requires integrating the payment and membership functionalities.
  • User Attributes and Membership Creation: Users will have a has_payment attribute indicating if they have stored payment information. This attribute is essential for allowing users to create a membership. It is also important for knowing if the user has pending payments.
  • Feedback Form: A feedback form is to be created where users can submit their feedback. This feedback could be stored in a feedback model, with the possibility of displaying good ratings on the home page.
  • Review Station Form: The user has the option to submit a review of a station through a form that collects the specific station, their rating out of 5, and their review of the station. Reviews of stations can be seen after selecting View Station in the map when creating a new rental.
  • Membership Expiration Checks: The system needs to have functionalities to allow users to renew their memberships and to check if their memberships have expired. The user is alerted upon login if membership has expired.
  • Streamlining Station and Location Data: Refactor the code to make communication of station and geocoder data more DRY (Don't Repeat Yourself). This involved merging 'Locations' into 'Station' to simplify the data model.
  • Dynamic Map for Stations: Replace static maps for each station with a dynamic map that shows all stations. This improves user experience by providing a comprehensive view of all available stations in one interactive map.
  • QR Code for Bike Unlocking: Implement QR code functionality for unlocking bikes at stations.
  • Email Configuration for Account Creation: Set up a mailer system to send emails for account creation events. This involves configuring an email service to communicate with users upon account creation.
  • Station Selection Sidebar: Implement a sidebar in the UI to allow users to select a station easily. This sidebar should be intuitive and user-friendly.
  • Search and Nearby Feature on the Map: Integrate a search functionality and a feature to find nearby stations directly onto or above the dynamic map. This makes it easier for users to find stations based on their location or search criteria.
  • Advanced User Login and Logout: Use 'Devise' for advanced user authentication. This includes robust login and logout functionalities, enhancing security and user experience.
  • Connecting Mailer to User Creation and Password Recovery: Link the mailer system to not only account creation but also to the 'forgot password' feature, providing automated email responses for these actions.
  • Connecting Models and Pages: Ensure that the data models (like rentals, stations, users) are properly connected to their respective pages and they are communicating as expected. This involves checking the integration of back-end models with the front-end views.
  • Controller Code Cleanup and Flow Verification: Review and clean up the code in all controllers to ensure they are efficient and follow the correct logic flow. This step is crucial for the maintainability and reliability of the application.
  • Make Pretty: Enhance the visual appeal of the application.
  • Create Footer: Develop a footer for the application.
  • About Us Page: Implement an 'About Us' page linked in the footer, providing information about the company.

Recommended Walkthrough Steps to Observe Key Features

  1. Start by creating a user by selecting create account and entering your information (or fake information, however, the email should be a real email as you will have to confirm it).
  2. To see error messages, leave fields blank or do not include the “@” symbol in your email address.
  3. Using the email you hopefully received, confirm your email address and then log into ValetBike.
  4. Select 'begin membership' from the home page and choose a membership option.
  5. Enter a (fake) credit card number that is 16 digits long then hit Create Payment to "buy" your membership.
  6. Select new rental from the nav bar or from the home page, and then select the station you want to rent from and then the bike you want to rent.
  7. Enter the time in hours and minutes that you would like to rent the bike for and choose Save.
  8. Enter payment, depending on your membership status, by entering a (fake) credit card number that is 16 digits long.
  9. From here you can check out your past rentals through the nav bar, as well as submit feedback by choosing Contact Us from the dropdown menu or from the footer, or from the footer, or leave a review on a station by clicking Review Station from the footer or from Past Rentals
  10. Click the 'about us' link in the footer and peruse as you please
  11. When you are finished browsing, log out using the options in User

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants