Prototype for ValetBike project
Smith College CSC223: Software Engineering
This prototype review is a reflection of the process that Hydabike has completed so far. It aims to help us evaluate the features still under development and determine next steps for delivering a final software product. It also allows us to think about our team collabration for ensuring future success.
Feature | Location | Function |
---|---|---|
Map | Home Page | Includes a map with hoverable popups for riders to see all the stations and available bikes |
Sign Up | User | Checks for input validity with a unique username, password,and email |
Log in | User | Checks log-in information, directs user to profile and supports renting process. Users can also request email vertification for forgotten passwords |
User Profile | User | Basic account information, chosen membership, and history of past bike transactions |
About | About | Mission of Hydrabike, values, and information about the team |
Find Stations | Find Stations | If users have a specific station in mind, they can use it (instead of the map) |
Resources | Resources | User can find a small diagram on how to use the platform, can also find questions and answers relevant to the site's functions |
Memberships | Memberships | User can choose membership options and pricing plans. They will be redirected to sign up before purchase |
Check Out | Only when user makes purchase | In order to make purchase, user will be redirected to the stripe platform for easy payment options |
- Install Docker
- Don't forget to configure Docker permission
- Make sure you can run Docker without sudo with:
docker run hello-world
- Install the Compose plugin or Compose standalone.
- Create a Stripe account at https://stripe.com/
- Get the API key at Account Settings > API keys. By default you should find two keys, the test secret key and the test publishable key.
- Create a local copy of this project with:
git clone https://github.com/abeltranandrade/valetbike.git
- Alternatively, you can clone with SSH:
git clone [email protected]:abeltranandrade/valetbike.git
- Note: you should run that command when you are in the folder where you want to store the repo
(e.g./Users/<your_username>/Development
) - Enter the project folder:
cd valetbike
Create an .env
file in your project folder containing the information you obtained from Step 3:
STRIPE_SECRET_KEY=your_stripe_secret_key
STRIPE_PUBLIC_KEY=your_stripe_public_key
You can optionally configure the database by adding into the above file:
MYSQL_USERNAME=username
MYSQL_PASSWORD=password
- Run
docker-compose up -d
. - The server should be running at
http://localhost:3000
(orhttp://0.0.0.0:3000
). - Stop the server with
docker-compose down
. - Check service's stdout output with
docker-compose logs -f
.
HydraBike runs on Ruby 3.1.2 and Rails 7.0.3.1. It is essential that you configure your environment to use these precise versions of the language and framework.
On Mac it is strongly recommended that you use asdf to install Ruby. On Windows you should set up your environment through the Windows Subsystem for Linux (WSL). The guides below explain how to do so in detail:
Be sure to complete all the installation procedures in the relevant guide before continuing on to the next step.
- Create a local copy of this project with:
git clone https://github.com/abeltranandrade/valetbike.git
- Alternatively, you can clone with SSH:
git clone [email protected]:abeltranandrade/valetbike.git
- Note: you should run that command when you are in the folder where you want to store the repo
(e.g./Users/<your_username>/Development
) - Enter the project folder:
cd valetbike
- Enter the directory you just created:
cd valetbike
- Add
.tool-versions
to app directory to ensure the right ruby is always used:asdf local ruby 3.1.2
- Install required gems with:
bundle install
- Install tailwindcss with:
rails tailwindcss:install
- Add a file called
.env
to the valetbike root directory - Ensure that it includes the credentials you setup when installing MySQL:
MYSQL_USERNAME=root
MYSQL_PASSWORD=YOURPASSWORD
MYSQL_SOCKET=/tmp/mysql.sock # For Mac
MYSQL_SOCKET=/var/run/mysqld/mysqld.sock # For Windows
-
Note: Your socket might not be at the above two locations. Find where your MySQL socket resides with
mysql_config --socket
-
Alternatively, you might want to set a different username other than
root
to isolate your application. However, you will have to set up this user with appropriate credentials and authorization as follow.
Again, this step is only needed if you had set up your username with anything other than root
in the previous step.
- Access the database with
mysql -u root -p
and enter your password. - You have entered the MySQL CLI. Create new user with:
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
Make sure your new username and password matched what you entered in previous step. - Grant permission to
valetbike_development
andvaletbike_test
to this user (it's okay even if these two tables have not been created):
GRANT ALL PRIVILEGES ON valetbike_development.* TO 'username'@'localhost';
GRANT ALL PRIVILEGES ON valetbike_test.* TO 'username'@'localhost';
- Use rails to create both the development and test databases with:
rake db:create
- Or use mysql to just create the development database with:
mysql -u username -p
CREATE DATABASE valetbike_development;
exit
- Then run the database migrations with:
rake db:migrate
- Seed the database with:
rake db:seed
- Create a Stripe account at https://stripe.com/
- Get the API key at Account Settings > API keys. By default you should find two keys, the test secret key and the test publishable key.
- Add these keys to the environment file
.env
...
STRIPE_SECRET_KEY=sk_test_XXXX
STRIPE_PUBLISHABLE_KEY=sk_test_XXXX
- Generate bike product on Stripe with:
rake stripe:products:create
- Launch the web server using
rackup
orrails s
(short forrails server
) orbin/dev
- If using
rackup
open http://localhost:9292 (or http://127.0.0.1:9292) in a browser - If using
rails s
orbin/dev
open http://localhost:3000 (or http://127.0.0.1:3000) in a browser - You should see ValetBike welcome page.
- Adriana Beltran Andrade
- Helen Y. Glover
- M. Phuong Phan
- Bobi Arce Mack
- Jingwen Xiang
Welcome to Hydrabikes, a bike sharing collabration for all.
Once you clone the project and open it using 'rails s' or 'rackup', you will be on the greeted on the home page. This page includes a map of bikes and stations in Nipmoc Notch. If you hover over the map, you would see a hand icon that will allow you to click and grab the map. Hover over the markers to see available bike.
On the top there is a navigation bar which every webpage will include for easy access to our features. If you're hoping to use Hydrabike in a different language, there is a Google Translate feature in the footer. Additionally, our contact information is open to your questions or concerns.
Do you want to learn a little more about Valetbike before signing up? Check out our About page to see our mission and team members. One of our founding principles is to keep the users at the center of the process.
Do you have questions? Check out our Resources Page for FAQs. We also have resources and articles about biking to explore!
If you are ready to create an account, click on the Sign Up to get started. Once you created a account and aree signed in, check out your new user profile in the account page.
Now that you are a new member of the Hydrabike community, navigate to the home page and map to rent a bike. On our rent page includes a variety of membership options and pricing plans suited for your lifestyle. Select a option and checkout with Paypal.
Thank you so much for purchasing a bike from Hydrabike! Enjoy your ride!
Make sure when you are done using the website to log out. Logging back in is simple, just click the sign in again!