This repo represents the front-end portion of a two-part project for Turing School of Software and Design's Back-End Engineering program.
Have you wanted a space to jot down your dreams the second you wake up? Like the time you had a dream where WWE's Goldberg brought you flowers? How cool would it be if not only could you keep a track record of your dreams, but you were given movie and book recommendations based off of your dream?! In comes our application: Dreambook! Upon signing via a Google account, a user is brought to their dashboard where they can 'Record a Dream' and reference their previous dreams and movie and book recommendations. When recording a dream, users can enter a title for the dream, a description of their dream, and one keyword describing their dream. Users then can select from a dropdown bar a status for their dream, 'Shared' or 'Hidden'. If shared, all Dreambook users will be about to see that dream when visiting the 'Dreams' link from their dashboard and be able to comment on it. If hidden, the dream will only be accessible to the user. Our goal is to have a space where users can keep track of their dreams, get movie and book recommendations based off their dreams, and see what dreams others are having out in the world!
The two repositories that make up this project can be found here: Front-End repo & Back-End repo
- By splitting our project into two repositories, we have successfully implemented Service Oriented Architecture for future scalability. This Front-End repository is responsible for the user-facing views along with all services and controllers necessary to query our backend's API.
- Our team decided to use Google OAuth to log in a user. With Google OAuth, the user never has to provide sensitive credentials to our application.
- One database is utilized on our front-end. This is for saving user information from Google OAuth to log in a user.
These setup instructions are for Mac OS.
This project requires the use of Ruby 2.7.4
and Rails 5.2.8
.
We also use PostgreSQL
as our database.
-
Verify your machine has the correct version of Ruby installed (2.7.4). You can check this by entering
ruby -v
from the command line.- To install, enter
rbenv install 2.7.4
from the command line.
- To install, enter
-
Verify your machine has the correct version of Rails installed (5.2.8). You can check this by entering
rails -v
from the command line.- To install, enter
gem install rails -v 5.2.8
from the command line.
- To install, enter
- Fork & Clone Repo
- Run
bundle install
. - Setup database:
rails db:create
.
- Register a new app with Google Api Console and give consent.
- Add a Credential, setting to 'External use' and 'Web Application', and give it a title (eg. 'Oauth Login'). Add the following URI to the redirect/callback field
http://localhost:3000/auth/google_oauth2/callback
. - Record the given Client_ID and Client_Secret.
- Run
bundle exec figaro install
to set up theapplication.yml
file to hide your sensitive credentials. - Add your credentials to
application.yml
as environment variables:
GOOGLE_CLIENT_ID: <add your client id>
GOOGLE_CLIENT_SECRET: <add your client secret>
RELOCATE_BE_DOMAIN: <add your backend server>
To run our RSpec testing suite, run 'bundle exec rspec' from the command line.
To run this project locally, enter rails server
from the command line and visit http://localhost:3000
to navigate to the homepage. It is encouraged to visit this URL in an Incognito window of your browser to prevent needing to periodically delete cookies.
Start up the Back-End as instructed.
- Tyler Caudill - Turing Student - GitHub Profile - LinkedIn
- Shirley DeCesari - Turing Student - GitHub Profile - LinkedIn
- Nikky Rojas - Turing Student - GitHub Profile - LinkedIn
- Gwendolyn Ruiz - Turing Student - GitHub Profile - LinkedIn
- Bryce Simonds - Turing Student - GitHub Profile - LinkedIn - Turing Alum Profile
- Parker Thompson - Turing Student - GitHub Profile - LinkedIn