Coder Social home page Coder Social logo

mattheworres / hootdraft Goto Github PK

View Code? Open in Web Editor NEW
42.0 9.0 24.0 8.49 MB

Web based fantasy sports draft app

Home Page: https://hootdraft.com

License: GNU General Public License v3.0

PHP 37.07% HTML 29.66% JavaScript 26.99% Shell 0.38% Less 5.90%
php angularjs fantasy-draft

hootdraft's People

Contributors

dependabot[bot] avatar jchusko avatar justinomics avatar mattheworres avatar scrutinizer-auto-fixer avatar zo0o0ot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hootdraft's Issues

Create a Vagrant box to make development easier

Getting the requisite software installed can be a hassle and also muck up one's local machine. Using software like Vagrant can make this way easier.

Setup and share a Vagrant box that other contributors can use to more easily contribute to the project.

Define and enforce positions on draft depth charts.

Currently, you can drag and drop positions that don't match the depth chart descriptions. It would be nice to define and enforce positions on these charts. The match could be either one to one or one to many, such as the FLEX position(s) that exist in most fantasy sports.

zip and unzip unavailable

I had to sudo apt-get install -yq zip unzip once I ssh'd in since they weren't part of the vagrant install.

Draft Stats Not Generated

Drafts that have finished do not have stats generated, and attempting to do so manually through the Admin interface results in 500 Server errors.

phpdraft.com - player search on NFLE league

Hello Matthew,

Planning on doing some drafts this weekend, and the new web app is really stunning - great work! Just one issue, when using the extended NFL rosters and trying to enter picks, the auto search feature is not working for me - any way you could correct that? Thanks again and have a great weekend!

Replace Client Polling With Sockets

Using a library such as Rachet it might be possible to clean up the implementation of the live draft polling (every 3 seconds) to use a more efficient and clean socket-based connection (ie the server initiates updates when the commissioner makes a change, or a user updates a depth chart).

Leagues by Commissioner broken

Doesn't look to be filtering by the commissioner selected; Furthermore, if you go to a draft then hit back, it pops up "Cannot load Commissioner".

Create exportable "draft review"

It would be nice to have a way to export drafts that have been made here. If the functionality already exists, I apologize.

If we're going from SQL data, what I'm looking for is something like this, potentially configurable:

SELECT 
p.`first_name`,
m.`manager_name`,
dc.`position`,
p.`player_round` AS DraftRound,
p.`player_pick`AS OverallPick
FROM 
`players` p
LEFT JOIN
`managers` m
ON p.`manager_id` = m.`manager_id`
LEFT JOIN 
`depth_chart_positions` dc
ON p.`depth_chart_position_id` = dc.`id`
WHERE
p.`draft_id` = (draft that was completed)

Maybe output as plain CSV text or provide the option for JSON output?

Just a thought.

Best Player Available

As a commissioner OR manager, I want to be able to see the next N number of players who are ranked by some measure as being "the best".

So, this is far and away the number 1 requested feature for the draft board, and I whole heartedly agree. I've wanted to implement this since I began writing the draft board over 8 years ago.

The issue is that it requires a data source, of which there are few that check all or most of these boxes:

  • are free or low cost
  • are available for more than just NFL
  • are available for more than 3 seasons
  • are kept up to date for the latest season
  • are consistent and do not change or disappear throughout their lifespan

I've had 3 different API sources flat out disappear from underneath me, which was one of my primary reasons for being hesitant to implement a highly valuable, but technically challenging (read: fun too) feature. I'd basically sink a month's worth of free time into something that would be broken in 6 months. Narp.

So, what now? Can we list possible API sources here that PHP Draft would be able to pull from?

  • Bonus points for more sports than just NFL
  • I am partial to ADP as the metric to gauge player worth as it seems more standardized than flat out ranks, though I realize that league size from 8 to 14 does skew those, so it may be too problematic
  • Free is obviously best, but I would not completely rule out paying for a service if it seems stable, trustworthy and here to stay.

Add Heroku installs

Heroku would be a nice platform to install PHPDraft on, since it has a free tier and would likely service the majority of independent installs.

If possible, tie this in to the Deployer deployment system.

Routing errors

I am getting routing errors on every POST. Below is an example of the errors I am getting in the debug logs

Issue fixed

Replace mcrypt with OpenSSL

In PHP 7.2 they are officially removing mcrypt from the PHP library (it was marked as deprecated in 7.1), so in order to keep the project compatible on the newest versions of PHP, the use of Mcrypt in the Salt Service will need to be migrated to use OpenSSL instead, and a suitable way to convert values generated by Mcrypt to values created by OpenSSL will be needed too.

Deployment setup issue. Exit Code: 2(Misuse of shell builtins) PHPDraft 2.2.0

Hi, I run PHP vendor/bin/dep setup production and go through all the steps.

It executes task PHPdraft:copy files but on the next one it fails with this error code.

✔ Ok
✔ Executing task phpdraft:copyfiles
➤ Executing task phpdraft:replacevalues

[Symfony\Component\Process\Exception\ProcessFailedException]
The command "sed -i '' 's|{phpdraft.dbHost}|localhost|g' appsettings.php ap
psettings.php" failed.
Exit Code: 2(Misuse of shell builtins)
Working directory: /home/ducky/Downloads/PHPDraft_2.2.0_Official
Output:

Error Output:

sed: can't read s|{phpdraft.dbHost}|localhost|g: No such file or directory

setup [-p|--parallel] [--no-hooks]


PHP version

PHP 7.4.3 (cli) (built: Oct 6 2020 15:47:56) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies

Composer version 2.0.8 2020-12-03 17:20:38

Any Help would be appreciated.

Issues following openshift install instructions.

OK, I have some feedback on the openshift install instructions.

At the end, I got stuck in a redirect loop instead of success.

This webpage has a redirect loop

ERR_TOO_MANY_REDIRECTS

Notes:

  • The initialize script worked fine in phpmyadmin
  • I ended up creating a mailgun account. We might want to include directions on how to verify email from an openshift app in mailgun.
  • in Linux, I think I needed to run sudo npm install
  • bower install didn't appear to have any output for me.
  • You should list gulp as one of the requirements for installation.
  • I didn't have a /js folder in my install. Did I miss something in the process of converting the files from coffeescript? I'm new to coffeescript.
  • I couldn't find js/config.js so I tried editing api/config/dev.json and api/config/dev.json since they appeared to contain similar information.
  • there was no fonts/ directory. I noticed that it was listed in the .gitignore file.
  • the only place I could find a css/ directory to copy was in app/css/.
  • Lacking /js and /fonts, I tried adding /gulp, /app, and /node_modules to the openshift ssh git project, instead. It didn't end well.

I'm going to delete my openshift instance and try again soon. Let me know if I've missed anything or done anything wrong.

New user verification may be broken?

Seems like when users click the link to verify their email address after they sign up is broken. This may have been hidden on phpdraft.com by the fact that the enabled flag wasn't working due to the BIT column type (should be TINYINT) -- but all indications are that the API successfully gets both email and verification code which should be enough to verify users, but the /verify method is returning a 500 error.

St Louis Rams -> Los Angeles Rams

This needs updated for the 2016-2017 season.

Should also figure out a nice way to support historical teams - all drafts from 2015 and prior should still have "STL" as a team, and "St. Louis Rams" show up as the team, but drafts from 2016 forward will have "Los Angeles Rams".

Invalid security certificate for hootdraft.com?

Hey. When I follow the link from github, I get a security certificate error.

hootdraft.com uses an invalid security certificate. The certificate is only valid for the following names: phpdraft.com, www.phpdraft.com Error code: SSL_ERROR_BAD_CERT_DOMAIN

When I type in hootdraft.com by myself, I don't get the error. I'm not sure why only one would have the exception.

Initialize.sql fails - table doesn't support fulltext indexes for MySQL 5.5 and below

script fails at this query:

CREATE TABLE IF NOT EXISTS `managers` (   `manager_id` int(11) NOT NULL auto_increment,   `draft_id` int(11) NOT NULL default '0',   `manager_name` text NOT NULL,   `draft_order` tinyint(3) unsigned NOT NULL default '0',   PRIMARY KEY  (`manager_id`),   INDEX `draft_idx` (`draft_id`),   FULLTEXT KEY `manager_idx` (`manager_name`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1

Response:
"Error Code: 1214. The used table type doesn't support FULLTEXT indexes"

Add Deployer Deployment Support

It would be a nice to have to add in Deployer ( https://deployer.org/ ) support to help automate the build & push of the app.

Where I'd like this to go is to require new installers to install Deployer and possibly a DB tool via Composer, and to use both of those to stand up the database and web servers respectively.

Password not working

I set up a password for my new draft on hootdraft.com. I opened up a new private tab and tried to access the draft board. It prompted me for the password, but would not accept the correct password.

Make installation instructions clearer

May be a good WIP start to moving documentation out of READMEs and into Github's wiki. See comments in Gitter chat, the installation instructions should be laid out a little more clearly.

Drafting the last player in a draft with depth charts has an error and gets stuck on "working".

I was able to reproduce this issue on both https://phpdraft.com/ and https://leagify.me/

Steps to reproduce:

  • Create a league with depth charts.
  • Start the draft
  • Select players. All but the last should work fine.
  • The last player will be correctly inserted into the database, but an error will happen on a SELECT statement which comes up on an Angular popup.
  • Refreshing the page makes the "Working" pop-up go away, and the draft seems to have all of the correct players on the correct teams.

More information available here:
zo0o0ot/phpdraft-leagify#2

command prompt error

Im trying to install the 2.3 version but I get the following error in command prompt after navigating to the dir with the index.html file and typing vendor/bin/dep setup

error
'vendor' is not recognized as an internal or external command

thanks for any help

Draft- Custom league - Players with no first names - "Enter Pick" disabled.

enterpick-disabled

I was able to create my own league and enter players. However, when trying to draft, the "enter pick" button is disabled by angular. Up to this point, I've only edited DraftDataRepository.php - I was able to follow the convention and add position colors, positions, teams, and add their references to the GetTeams and GetPositions methods.

Once I got the correct CSV format, I got all the way up to the point of drafting, but the "Enter Pick" button is disabled.

It looks like the method preventing me from picking is an angular or coffeescript method: ng-disabled="commishPickEditCtrl.formIsInvalid()"

I'll keep looking, but this validation fail surprised me. It looks like I'll have to take a look at that in order to accomplish what I want to do.

Deploy error message

hey matt, when trying to deploy i keep getting this:

In HostSelector.php line 59:
Hostname or Stage 'local' was not found

Ive tried both commands

vendor/bin/dep deploy local
and
./vendor/bin/dep deploy local

Any ideas? Thanks

Question: Can users be linked to teams/managers

I'm trying to understand the use case of a draft that isn't done in person. Should I be giving out the commish password to let everyone log in as me at the same time for draft picks, or can users be assigned to teams, and draft only on behalf of that team?

gmail/g suite blocking signup verification?

I'm using G Suite to manage my business email. When registering a new manager account the confirmation email never arrived. When using my yahoo email the confirmation did arrive. I've had problems like this with an eblast program I developed for clients and IIRC it was due to gmail DKIM issues.

phpdraft.com error

Is phpdraft.com still active and supported? Having an issue creating a new draft for 2017.. see the below screenshot for the error when creating a league. Thanks!

image

Chrome/Opera (any OS) creates SPDY protocol errors on depth chart

This is OS independent (I've seen it on both Windows and OSX) and is on the latest version of Chrome. I can confirm it is not an issue with any plugins I have installed either, because a clean copy of Chrome produces the same issue.

The browser won't send the XHR requests to update the depth chart when a player is dragged to a new depth chart position. The request has a status of (failed), and the console gets an error message: PUT https://www.phpdraft.com/api/draft/59/pick/5026/depth_chart/37 net::ERR_SPDY_PROTOCOL_ERROR

This issue has been observed to also occur with the latest version of Opera, but not Firefox or Safari.

Error when trying to access website after installation

After having followed the instructions outlined in Manual Installation & Upgrades, I am greeted with the following error message when opening the website in Firefox:

Error: [$injector:modulerr] Failed to instantiate module phpdraft due to:
[$injector:modulerr] Failed to instantiate module phpdraft.env due to:
[$injector:nomod] Module 'phpdraft.env' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.


https://errors.angularjs.org/1.7.5/$injector/modulerr?p0=php…AL%40http%3A%2F%2F192.3.162.10%2Fjs%2Fvendor.js%3A1%3A696%0A vendor.js:2:836

I would appreciate any help in solving this issue, as I'm not familiar with Angular.

User management is broken

Version 2.0.3 - user management is broken, no "enabled" flags are being returned and users can't be updated by an administrator with an "email already registered" app-level error being returned (on update).

Cleanup frontend build process

Along with getting Bamboo builds fully working to completion, the frontend toolchain is going to need an update.

Bower seems to be going by the wayside, and since this rewrite was undertaken, Yarn came out of nowhere and has seemingly won the frontend dependency wars in a tie with NPM. There are tools to migrate Bower packages over to using Yarn, so we should probably do that now, and also handle any outdated packages (Vinyl, for instance, is probably in there somewhere)

Long first names overlap pick numbers

On the draftboard. This should probably be cut off like how last names are currently.

Also, it would be nice if there was some sort of auto-scrolling overflow frontend library that would automatically, slowly scroll names back and forth if they're longer than their intended space.

We should also alt and title tag both first and last names as fallbacks.

Allow admin to invite new users

As an administrator, I'd like to invite new users to my app instance. Give me a way to simply type an email address, create a new user, and send that user an email with a link to set their password and log in.

Add database management tooling

Currently the database schema is managed by hand (though is migration-y). When working on 2.0 I originally intended to use the Propel or Doctrine ORMs, but their inclusion with Silex was tricky at best, so I decided to stick with hand SQL for the time being.

Now that I am moving closer to automating builds and testing with continuous integration, it's probably time that I move the project over to something like Phinx ( https://phinx.org/ ). Similar to Rails migrations, this will allow everyone to use a configurable tool to sanely manage databases and versioning for a number of environments.

With the Bamboo server setup, this will also allow me to have push button code deployments to the production instance.

I will provide a "final" hand migration SQL file that will allow folks to safely move existing instances over to Phinx (so that Phinx does not attempt to run the initialization migration and whack a bunch of stuff), as I'll need to do this in production.

Edit Pick doesn't work for last pick of round - undo last pick?

I attempted to edit a pick during a draft last night, but because it was the last pick of the round and the draft had started the next round, I couldn't figure out how to edit the pick. This was a serpentine draft, so the next person picking was the same person, but I still couldn't get it to revert back to the previous pick. Perhaps an "admin undo most recent pick" function is in order?

Ncaa Basketball player list

Just wondering if your scraper could make a player list for the NCAA Mens Basketball rosters? I do a draft every year for the March Madness Tournament. Thanks

initialize.sql script in "wrong" location

The initialize.sql script is located in /api/Domain/Migrations/initialize.sql, not /api/Domain/Migrations/2.0.0/initialize.sql. I assume that updating the install docs are the best way to fix that, but I haven't successfully installed phpdraft yet, so I'm not sure.

Phpdraft.com Issue - trouble turning off depth chart / saving edits

Hello, having an issue with the phpdraft.com site: when trying to turn off depth charts I'm getting this message:

Unable to edit draft
An exception occurred while executing 'UPDATE draft SET commish_id = ?, draft_name = ?, draft_sport = ?, draft_style = ?, draft_password = ?, draft_rounds = ?, using_depth_charts = ? WHERE draft_id = ?': SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'using_depth_charts' at row 1

Also having an issue with saving any edits to the draft. Perhaps you could look into it when you get a chance? Thanks for all of your support and for the great draft utility. :)

David

Upgrade Library versions

ATOW, Phinx was on the 0.8.x branch (is currently 0.10.x), and Deployer was on 4.x (currently 6.x). Make the necessary changes to the code to migrate to the newest versions.

Draft Start Time not converted to local timezone

When viewing draft info (on draft index page, for instance) the draft start time is still shown in UTC. The trick is that the string " UTC" must be appended to the end of the timestamp string in order to let MomentJS know it can translate the date to the local timezone (else it can't make a reasonable assumption as to which timezone it's working with to start with)

App Wrongly Says Pick is Duplicate When New Pick Entered

Saw this probably half a dozen times as I did an offline draft last night - but as the commish is entering one pick, some sort of race condition occurs where I'm entering an undrafted player for Pick n, and as it's spinning (suggesting its entering the nth pick) the modal dialog pops up for duplicate pick entry as if we tried to enter the same player for the next pick (pick #n+1).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.