SkillCourt v14.0
================


App GitHub: https://github.com/creye111/SkillCourt-AndroidApp
WebSite Github: https://github.com/Domur/skill-court-laravel
SkillCourt.com


### Developers
* Carlos Reyes
* Drew Blumenthal
* Daniel Barbosa
* Luis Miranda
* Ricardo Ruiz
* Chris Solis
### Product Owner
* Guðmundur Traustason 


### Structure of the Code directory


.
├── AndroidApp
│   ├── SkillCourt-AndroidApp-Fall2020Folder
│   │   └── SkillCourt-AndroidApp-master
│   │       ├── FA2020.iml
│   │       ├── README.md
│   │       ├── app
│   │       │   ├── build.gradle
│   │       │   ├── google-services.json
│   │       │   ├── gradle
│   │       │   │   └── wrapper
│   │       │   │       ├── gradle-wrapper.jar
│   │       │   │       └── gradle-wrapper.properties
│   │       │   ├── gradlew
│   │       │   ├── gradlew.bat
│   │       │   ├── proguard-rules.pro
│   │       │   └── src
│   │       │       └── main
│   │       │           ├── AndroidManifest.xml
│   │       │           ├── admin_icon-playstore.png
│   │       │           ├── ic_launcher-web.png
│   │       │           ├── java
│   │       │           │   └── com
│   │       │           │       └── skillcourt
│   │       │           │           ├── adapters
│   │       │           │           │   ├── DragNDropPadViewAdapter.java
│   │       │           │           │   ├── GroupGamePageAdapter.java
│   │       │           │           │   ├── PadListViewAdapter.java
│   │       │           │           │   ├── PadViewAdapter.java
│   │       │           │           │   └── PlayerViewAdapter.java
│   │       │           │           ├── connection
│   │       │           │           │   └── NsdConnection.java
│   │       │           │           ├── services
│   │       │           │           │   ├── ConnectionService.java
│   │       │           │           │   ├── DataSyncher.java
│   │       │           │           │   ├── GameService.java
│   │       │           │           │   └── HttpService.java
│   │       │           │           ├── structures
│   │       │           │           │   ├── ClubInfo.java
│   │       │           │           │   ├── ClubListAdapter.java
│   │       │           │           │   ├── ClubRegistrationFragment.java
│   │       │           │           │   ├── Game.java
│   │       │           │           │   ├── GroupInfo.java
│   │       │           │           │   ├── GroupListAdapter.java
│   │       │           │           │   ├── GroupRegistrationFragment.java
│   │       │           │           │   ├── MultiSpinner.java
│   │       │           │           │   ├── Pad.java
│   │       │           │           │   ├── Player.java
│   │       │           │           │   ├── PlayerData.java
│   │       │           │           │   ├── PlayerInfo.java
│   │       │           │           │   ├── PlayerInfoListAdapter.java
│   │       │           │           │   ├── PlayerRegistrationFragment.java
│   │       │           │           │   ├── Sequence.java
│   │       │           │           │   ├── SessionData.java
│   │       │           │           │   ├── SessionListAdapter.java
│   │       │           │           │   ├── StationCreationPage.java
│   │       │           │           │   ├── StationDetailAdapter.java
│   │       │           │           │   ├── StationDetails.java
│   │       │           │           │   ├── StationInfoFragment.java
│   │       │           │           │   ├── StationListAdapter.java
│   │       │           │           │   ├── StationUpdateFragment.java
│   │       │           │           │   └── StatsListAdapter.java
│   │       │           │           └── ui
│   │       │           │               ├── configuration
│   │       │           │               │   ├── CreateSequenceFragment.java
│   │       │           │               │   ├── PadConfigFragment.java
│   │       │           │               │   ├── PadInput.java
│   │       │           │               │   ├── Rectangle.java
│   │       │           │               │   └── math_vector.java
│   │       │           │               ├── game
│   │       │           │               │   ├── CreateGameFragment.java
│   │       │           │               │   ├── GameData.java
│   │       │           │               │   ├── GameModeFragment.java
│   │       │           │               │   ├── GameOverFragment.java
│   │       │           │               │   ├── GameTabsFragment.java
│   │       │           │               │   ├── SelectDuo.java
│   │       │           │               │   ├── SelectSolo.java
│   │       │           │               │   ├── SelectTrio.java
│   │       │           │               │   └── StartGameFragment.java
│   │       │           │               └── main
│   │       │           │                   ├── AdminFragment.java
│   │       │           │                   ├── AppLoginDialogFragment.java
│   │       │           │                   ├── BaseFragment.java
│   │       │           │                   ├── ClubsFragment.java
│   │       │           │                   ├── DatabaseHelper.java
│   │       │           │                   ├── GlobalStationsFragment.java
│   │       │           │                   ├── GraphStats.java
│   │       │           │                   ├── GroupsFragment.java
│   │       │           │                   ├── HomeFragment.java
│   │       │           │                   ├── MainActivity.java
│   │       │           │                   ├── NonBottomNavigationFragments.java
│   │       │           │                   ├── PlayersFragment.java
│   │       │           │                   ├── SequencesFragment.java
│   │       │           │                   ├── StationFragment.java
│   │       │           │                   ├── StatsFragment.java
│   │       │           │                   └── ViewPagerAdapter.java
│   │       │           └── res
│   │       │               └── xml
│   │       │                   └── file_paths.xml
│   │       ├── build.gradle
│   │       ├── gradle
│   │       │   └── wrapper
│   │       │       ├── gradle-wrapper.jar
│   │       │       └── gradle-wrapper.properties
│   │       ├── gradle.properties
│   │       ├── gradlew
│   │       ├── gradlew.bat
│   │       ├── local.properties
│   │       ├── pad_emulator.py
│   │       └── settings.gradle
│   └── android-dir.txt
├── Database
│	└── SkillCourtWebDatabase.sql
├── FA2020_README.md
├── Kubernetes-Deployment
│   ├── README.md
│   └── skillcourt.yaml
├── WebSite
│   ├── skill-court-laravel-master
│   │   ├── README.md
│   │   ├── build-laravel-image
│   │   ├── run-laravel.ps1
│   │   ├── run-laravel.sh
│   │   └── skill-court
│   │       ├── README.md
│   │       ├── app
│   │       │   ├── Club.php
│   │       │   ├── Console
│   │       │   │   └── Kernel.php
│   │       │   ├── Exceptions
│   │       │   │   └── Handler.php
│   │       │   ├── Http
│   │       │   │   ├── Controllers
│   │       │   │   │   ├── Auth
│   │       │   │   │   │   ├── ConfirmPasswordController.php
│   │       │   │   │   │   ├── ForgotPasswordController.php
│   │       │   │   │   │   ├── LoginController.php
│   │       │   │   │   │   ├── RegisterController.php
│   │       │   │   │   │   ├── ResetPasswordController.php
│   │       │   │   │   │   └── VerificationController.php
│   │       │   │   │   ├── ClubController.php
│   │       │   │   │   ├── ContactFormController.php
│   │       │   │   │   ├── Controller.php
│   │       │   │   │   ├── ImageUploadController.php
│   │       │   │   │   ├── MobileController.php
│   │       │   │   │   ├── ModalController.php
│   │       │   │   │   ├── PageController.php
│   │       │   │   │   ├── PlayerController.php
│   │       │   │   │   ├── PlayerDashController.php
│   │       │   │   │   ├── ProfileController.php
│   │       │   │   │   ├── SplashTutorialController.php
│   │       │   │   │   └── UserController.php
│   │       │   │   ├── Helpers.php
│   │       │   │   ├── Kernel.php
│   │       │   │   ├── Middleware
│   │       │   │   │   ├── Authenticate.php
│   │       │   │   │   ├── CheckForMaintenanceMode.php
│   │       │   │   │   ├── EncryptCookies.php
│   │       │   │   │   ├── MobileAccessMiddleware.php
│   │       │   │   │   ├── RedirectIfAuthenticated.php
│   │       │   │   │   ├── TrimStrings.php
│   │       │   │   │   ├── TrustHosts.php
│   │       │   │   │   ├── TrustProxies.php
│   │       │   │   │   └── VerifyCsrfToken.php
│   │       │   │   └── Requests
│   │       │   │       ├── ClubRequest.php
│   │       │   │       ├── PasswordRequest.php
│   │       │   │       ├── ProfileRequest.php
│   │       │   │       └── UserRequest.php
│   │       │   ├── Mail
│   │       │   │   └── SkillCourtContactFormMail.php
│   │       │   ├── Models
│   │       │   │   ├── Permission.php
│   │       │   │   └── Role.php
│   │       │   ├── Providers
│   │       │   │   ├── AppServiceProvider.php
│   │       │   │   ├── AuthServiceProvider.php
│   │       │   │   ├── BroadcastServiceProvider.php
│   │       │   │   ├── EventServiceProvider.php
│   │       │   │   └── RouteServiceProvider.php
│   │       │   ├── Rules
│   │       │   │   └── CurrentPasswordCheckRule.php
│   │       │   └── User.php
│   │       ├── artisan
│   │       ├── bootstrap
│   │       │   ├── app.php
│   │       │   └── cache
│   │       ├── composer\ 2.lock
│   │       ├── composer\ 3.lock
│   │       ├── composer.json
│   │       ├── composer.lock
│   │       ├── config
│   │       │   ├── app.php
│   │       │   ├── auth.php
│   │       │   ├── broadcasting.php
│   │       │   ├── cache.php
│   │       │   ├── cors.php
│   │       │   ├── database.php
│   │       │   ├── filesystems.php
│   │       │   ├── hashing.php
│   │       │   ├── laratrust.php
│   │       │   ├── logging.php
│   │       │   ├── mail.php
│   │       │   ├── queue.php
│   │       │   ├── services.php
│   │       │   ├── session.php
│   │       │   └── view.php
│   │       ├── database
│   │       │   ├── factories
│   │       │   │   └── UserFactory.php
│   │       │   ├── migrations
│   │       │   │   ├── 2014_10_12_000000_create_users_table.php
│   │       │   │   ├── 2014_10_12_100000_create_password_resets_table.php
│   │       │   │   ├── 2019_08_19_000000_create_failed_jobs_table.php
│   │       │   │   ├── 2020_09_24_143756_add_last_login_to_users_table.php
│   │       │   │   └── 2020_10_23_153012_laratrust_setup_tables.php
│   │       │   └── seeds
│   │       │       ├── DatabaseSeeder.php
│   │       │       ├── LaratrustSeeder.php
│   │       │       └── UsersTableSeeder.php
│   │       ├── package.json
│   │       ├── phpunit.xml
│   │       ├── public
│   │       │   ├── black
│   │       │   │   ├── css
│   │       │   │   │   ├── black-dashboard.css
│   │       │   │   │   ├── black-dashboard.css.map
│   │       │   │   │   ├── black-dashboard.min.css
│   │       │   │   │   ├── lity.css
│   │       │   │   │   ├── lity.min.css
│   │       │   │   │   ├── nucleo-icons.css
│   │       │   │   │   └── theme.css
│   │       │   │   ├── demo
│   │       │   │   ├── fonts
│   │       │   │   ├── img
│   │       │   │   ├── js
│   │       │   │   │   ├── black-dashboard.js
│   │       │   │   │   ├── black-dashboard.js.map
│   │       │   │   │   ├── black-dashboard.min.js
│   │       │   │   │   ├── clubtheme.js
│   │       │   │   │   ├── core
│   │       │   │   │   │   ├── bootstrap.min.js
│   │       │   │   │   │   ├── jquery.min.js
│   │       │   │   │   │   └── popper.min.js
│   │       │   │   │   ├── padanimation.js
│   │       │   │   │   ├── plugins
│   │       │   │   │   │   ├── bootstrap-notify.js
│   │       │   │   │   │   ├── chartjs.min.js
│   │       │   │   │   │   ├── jquery.js
│   │       │   │   │   │   ├── lity.js
│   │       │   │   │   │   ├── lity.min.js
│   │       │   │   │   │   ├── perfect-scrollbar.jquery.min.js
│   │       │   │   │   │   └── zepto.js
│   │       │   │   │   └── theme.js
│   │       │   │   └── scss
│   │       │   │       ├── black-dashboard
│   │       │   ├── contactform
│   │       │   │   ├── Readme.txt
│   │       │   │   └── contactform.js
│   │       │   ├── css
│   │       │   ├── favicon.ico
│   │       │   ├── fonts
│   │       │   ├── images
│   │       │   ├── img
│   │       │   ├── index.php
│   │       │   ├── js
│   │       │   ├── robots.txt
│   │       │   ├── skin
│   │       │   ├── uploads
│   │       │   │   └── avatars
│   │       │   └── web.config
│   │       ├── resources
│   │       │   ├── js
│   │       │   ├── lang
│   │       │   │   └── en
│   │       │   ├── sass
│   │       │   │   ├── _variables.scss
│   │       │   │   └── app.scss
│   │       │   └── views
│   │       │       ├── admin
│   │       │       │   ├── club_players.blade.php
│   │       │       │   └── clubdashboard.blade.php
│   │       │       ├── alerts
│   │       │       │   ├── feedback.blade.php
│   │       │       │   └── success.blade.php
│   │       │       ├── auth
│   │       │       │   ├── login.blade.php
│   │       │       │   ├── passwords
│   │       │       │   │   ├── confirm.blade.php
│   │       │       │   │   ├── email.blade.php
│   │       │       │   │   └── reset.blade.php
│   │       │       │   ├── register.blade.php
│   │       │       │   └── verify.blade.php
│   │       │       ├── contact
│   │       │       │   └── create.blade.php
│   │       │       ├── dashboard.blade.php
│   │       │       ├── emails
│   │       │       │   └── contact
│   │       │       │       └── contact-form.blade.php
│   │       │       ├── layouts
│   │       │       │   ├── app.blade.php
│   │       │       │   ├── footer.blade.php
│   │       │       │   ├── navbars
│   │       │       │   │   ├── navbar.blade.php
│   │       │       │   │   ├── navs
│   │       │       │   │   │   ├── auth.blade.php
│   │       │       │   │   │   └── guest.blade.php
│   │       │       │   │   └── sidebar.blade.php
│   │       │       │   └── welcome.blade.php
│   │       │       ├── pages
│   │       │       │   ├── icons.blade.php
│   │       │       │   ├── leaderboard.blade.php
│   │       │       │   ├── map.blade.php
│   │       │       │   ├── maps.blade.php
│   │       │       │   ├── new_user.blade.php
│   │       │       │   ├── notifications.blade.php
│   │       │       │   ├── rtl.blade.php
│   │       │       │   ├── table_list.blade.php
│   │       │       │   ├── tutorial.blade.php
│   │       │       │   ├── typography.blade.php
│   │       │       │   └── upgrade.blade.php
│   │       │       ├── partials
│   │       │       │   └── popup.blade.php
│   │       │       ├── player
│   │       │       │   └── index.blade.php
│   │       │       ├── profile
│   │       │       │   └── edit.blade.php
│   │       │       ├── skill.blade.php
│   │       │       └── users
│   │       │           ├── index.blade.php
│   │       │           └── players.blade.php
│   │       ├── routes
│   │       │   ├── api.php
│   │       │   ├── channels.php
│   │       │   ├── console.php
│   │       │   └── web.php
│   │       ├── server.php
│   │       ├── storage
│   │       │   ├── app
│   │       │   │   └── public
│   │       │   ├── framework
│   │       │   │   ├── cache
│   │       │   │   │   └── data
│   │       │   │   ├── sessions
│   │       │   │   ├── testing
│   │       │   │   └── views
│   │       │   └── logs
│   │       ├── tests
│   │       │   ├── CreatesApplication.php
│   │       │   ├── Feature
│   │       │   │   └── ExampleTest.php
│   │       │   ├── TestCase.php
│   │       │   └── Unit
│   │       │       └── ExampleTest.php
│   │       ├── vendor
│   └── websit-dir.txt
├── pad_emulator.py
└── structure-2020-12-13.txt


87 directories, 11589 files




### Installation Guide
### Website
1. Install Docker
   >https://docs.docker.com/get-docker/
2. Install IDE of your choice.
   >To install Visual Studio code: https://docs.docker.com/get-docker/
3. Clone project repository.
   >Navigate to the following repository:  https://github.com/Domur/skill-court-laravel
   >Copy the HTTPS link
   >Open Terminal/Command Prompt
   >Execute the following command: git clone <https-link.
4. Set up Docker Image
   >Execute the following command: docker build -f build-laravel-image -t skillcourt/laravel:dev --no-cache .
   >Run Docker Container
      * Execute the following command: bash run-laravel.sh (Mac/Linux).
      * Execute the following command: .\run-laravel.ps1 (Windows).
5. Access Running Server
   >Navigate to: localhost:8000.
6. Common Issues
   >In case of any missing classes or general errors when running the server, execute the following command: composer install
   >Should the issues persist, attempt to identify the missing package and install it manually. 
	
### Android App
1. Install Java Development Kit (JDK) 8
   >http://www.oracle.com/technetwork/java/javase/downloads/index.html
2. Install Android Studio
   >https://developer.android.com/studio/
3. Import SkillCourt Android App from Git
   >File -> New -> Project from Version Control -> GitHub. 
   >Then enter your github username and password.
   >Select the repository and hit clone. 
   >The github repo will be created as a new project in android studio.

#### Other content used for the project is in the reference portion of the documentation. 
#### The youtube videos located in the Video directory are very helpful to set up the SkillCourt project.






### USER MANUALS ###


### Website 
SkillCourt Website
A. Register User (Admin)
-----------------------------------
    How to register an admin user:
1. On an active server, navigate to the hosted SkillCourt Site.
2. Click Login on the navigation bar.
3. At the Login page, click on the text “Create account?”
4. Proceed to fill out the registration form with valid inputs. 
5. Click Get Started

B. Navigate Club Dashboard (Admin)
-----------------------------------
    How to Navigate the Dashboard:
1. After successfully registering, the user is redirected to a welcome page.
a. Select Continue to proceed to the home page of the dashboard.
b. Select Learn More to be redirected to the tutorial page of the dashboard.
2. At the home page of the dashboard, you will see player statistics classified by groups.
a. If you are a brand new user, this page will be empty.
3. From any page of the dashboard, there is access to your profile, notifications, search, club list, and leaderboard. 

C. Utilize Player Dashboard (Admin and Player)
-----------------------------------
    How to Use the Player Dashboard:
1. As both admins and players, you are able to view player statistics in a visual and intuitive way when navigating to a player dashboard.
2. If the player has previous data, a time-series graph will allow stored data to be selected and be displayed.
a. Session Hits are color-coded blue.
b. Session Misses are color-coded red.
 **The graph will be empty if there is no data to be selected.
3. On the player dashboard, you may also choose any game and session to be displayed on the Pad Animation Diagram.
a. Once a session has been selected, the Diagram will display a color coded pad layout and timing chart. 
b. Right of the Diagram are controls for the playback of the session being displayed on the Diagram.
i. Click Start to begin playback of a selected session.
ii. Click Pause to stop an ongoing session playback.
iii. Click Reset to return to the initial point of the playback.
**The diagram will be empty if there is no data to be selected.




User Manual:
Android Application
1. Creating Station Pad Layout
   1. Open Application, and ensure at least 2 pads are connected.
   2. Press Play Button
   3. Once on Home Screen, press Pad Settings button
   4. Click “Stations”Button on the top right corner.
   5. Click Add Stations Button
   6. Fill Name, and Description fields
   7. Click the Pad Selection multi-spinner and select the pads for the station.
   8. On the bottom of the screen, use move gestures to draw pads.
      1. Undo button allows to remove most recently placed pad.
      2. Move button allows you to move the canvas and toggle drawability.
   9. Once you have drawn the number of pads you initially selected, start assigning pad ids to each drawn Pad by clicking on the associated spinner. The spinner will show a list of connected pads.
   10. Once finished, click the save button.
      1. If you get a prompt saying not enough pads, verify that you have drawn exactly as many pads as you selected in the pad selection multispinner.
2. Global Stations
   1. Open application
   2. Log in to your Club Owner account. Upon login you will be moved to the home screen.
   3. Press the Pad Settings button.
   4. Press the Stations button at the top right corner of the screen.
   5. Press on the Global Stations button. As list of global stations will show up with a checkmark next to each one.
   6. Press the checkbox next to each station you wish to use.
   7. Press the Add Selected Stations button when done. Now, all global stations you selected will be available to use.
      1. Keep in mind that you must add stations with ids 1-6 in order to use the default game modes associated with those stations.
3. Group Play
   1. Ensure you have at least 2 pads connected, and that you have registered at least one player on your device.
   2. Click the play button on the homescreen. On the top you will see the Solo, Duo, and Trio tabs. You can switch tabs by swiping left and right.
   3. Select the player profile for each player using the respective spinner.
      1. (Optional) Select which color will be assigned to each spinner.
   4. Click the bottom button to proceed.
      1. Select the game mode.
      2. Alternatively, select the station with the station spinner. Then select the random or manual game mode. This is to use custom timing, and delay settings.
   5. Press the pads to create the sequence one by one.
   6. Press play and the game should being.
4. Updating Stations/Reassigning Pads
   1. Once on the stations list screen, click the station for which you want to update pads. Once clicked, a station information screen will appear with three button.
   2. Press the update button. A dialog box will appear, with a list of pad assignment spinners.
   3. For each pad, press the spinner to select from a dropdown list of pad ids to reassign. Note that the pad arrangement below should describe which pad is in which location.
   4. Press the Update button in the Dialog box to update the station. The assigned pads should change to your selection.