Skip to content

Dungeon-ball/dungeonball_fe

Repository files navigation

DUNGEONBALL

Welcome to DUNGEONBALL! This is a front-end/UI portion of 2-part application deisigned with a separate API backend. This frontend application is responsile for retrieving search and player data from our backend application, and displaying those data to both users and visitors. Users may additionally save players to a personal party, which they can view at any time through a convenient navigation bar.

Implementation

Installation and Setup

  1. Clone and implement the API backend
  2. In a separate repository, clone this repo
  3. Run the following commands to install gem dependencies and create a database:
bundle install
rails db:{create:migrate}

database

  1. This build uses OmniAuth-Twitter to manage oauth login, which requires the use of sensitive keys and access tokens that should not be compromised. We use the gem Figaro to provide access to ENV variables in development and testing, and implement a production strategy unique to our host. To properly implement this application, set the following environment variables (if using Figaro, these can be set in /config/application.yml):
BE_AUTH_KEY: value # Recommended strong password, same as backend
BASE_URL: url # Should reflect the base url of the backend server's deployment in testing/development.
twitter_api_key: value # Obtained through Twitter
twitter_api_secret: value # Obtained through Twitter
  1. Run rails s on your front end and back end applications to ensure both are running simultaneously.
  2. You're up and running! We recommend you run bundle exec rspec and ensure all tests pass before deploying this software.

Dependencies

This appliation was written for

  • rails 5.2.8
  • ruby 2.7.2

Features

Navigation and Authorization

code_flow.png

Welcome Page

welcome user

The landing page renders a search bar that lets both users and visitors search for NFL players by name. If the user is logged in, they will see a link to My Party or to Logout. Otherwise, a visitor will see a link to Sign in with Twitter

welcome visitor

Signing in with Twitter

This process is handled through the omniauth Twitter gem. If the process is successful, the logged-in user is redirected back to the landing page. IF UNSUCCESSFUL...

Searching for players

search results

When a user searches for players from the navigation bar, They are returned a list of players whos names at least partially match the text entered. These names are themselves each a link to that player's show page where a user can see details about a player's Dungeons and Dragons stats.

Players show page

player show user

player show visitor

Here a user or visitor can see the base stats of this football player's character sheet. If a user is logged in, they will see a link to Add Player to My Party, and clicking this ilnk will bring them to their party show page, where they will see that player is added to their party. If not logged in, a visitor will see a link to Sign in with Twitter to add this player to your party

Party show page

party show

Access to this page is restricted to only logged in users. Here a user can see the members of their party, if any have been saved. Each player listed includes a link back to their show page.

Contact

Contributors

To Contribute

Pull Requests can be made to the staging branch of this repository and will be merged on a case-by-case basis.

Further Questions

Please reach out to the owner of this repository with any additional questions.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •