Skip to content

Fantasy Premier League mobile application for checking on your fpl teams, live premier league scores and player stats.

Notifications You must be signed in to change notification settings

CodeByTarun/FPLApp

Repository files navigation

Fantasy Premier League App

Live updated fantasy premier league viewer for your teams, fixtures, dream teams and viewing player stats.

budgetteam         fixture         dreamteam

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgements

About The Project

This project was made as a quicker way for someone to view their FPL (fantasy premier league) teams and see how players are doing for any fixture in any gameweek. The application uses data from the fantasy premier league API. It also features live updates for fixtures and player scores. This was a great project to learn about the React Native framework, Expo, Typescript, React-Spring, Redux, React Navigation, Jest and the React Testing Library. A detailed explanation of how to use this mobile application is in the Usage section below.

This project utilized functional components, react native hooks and the redux design pattern. The RTK Query data fetching and caching tool made using fetched data across the application easy. Redux was also used for storing the main state of the team whether it is the team of the week, a user’s team, or a team currently playing in a match. React Navigation was used for easy addition of modals and themes. Test driven development (TDD) was used for the creation of services and helper functions. Testing was done using Jest and the React Testing Library. I chose to use this testing library as it leads to creation of tests that exclude implementation details. Also, AsyncStorage was used to keep data offline in a key-value storage system. Animations were created using the React-Spring library.

Built With

Getting Started

To use this application you download the apk file provided for Android or it can be ran on an iphone simulator with the second file provided.

Android APK: https://drive.google.com/file/d/1_s7WHL32YHSzi8upEHIwWaTNZ5_7saGd/view?usp=sharing

IOS Simulator: https://drive.google.com/file/d/16BImX4u05_2SflIkaiPMuXHymcoC80yy/view?usp=sharing

Usage

Upon starting up the app, it fetches data from the FPL API. If there is an error fetching the data, it will tell you to close the app and open it later. Once the data has been fetched it will take you to the main screen. Here you can view fixtures for the current gameweek at the top and switch the gameweek as well to look at upcoming and previous fixtures. At the bottom is a tab bar where you can you can select 'My Teams' to add your budget or draft team. To add your team, you need your team ID which can be found embedded in the URL when viewing your team on a web browser.

Example:

When on the points tab on the browser, the URL will contain your team ID: https://fantasy.premierleague.com/entry/ 8423283 /event/36

Once your team has been added it will be set as your favourite team and will be displayed initially whenever the app is opened. If you click on your team’s name, the standings will open for draft leagues and a list of leagues will open for budget leagues. You can navigate to any league and click on any team to view how they are doing. Other teams you are viewing can be added to your team list by using the team ID which is displayed to the right of the team name.

budgetteam         leaguelist         standings

When viewing your team, there are two cards at the top that show if you are viewing the current gameweek. Press the left one to view additional info such as expected points, cost, form, selection percentage, and upcoming fixtures. The right one shows point totals, transaction totals, rank, and squad cost for budget teams.

teamcost         teampoints         teamfdr

Through the bottom navigation bar, you can view the dream team for the gameweek you are viewing, overview which will open a popup where you can see some info about the gameweek you are on as well as fixture difficulty ratings for every team sorted by average difficulty over the next 4 fixtures. The gameweek button expands the fixtures scrollview for easier viewing of all fixtures.

overview-gameweek         overview-tfdr         fixtures

The players button will open a player table where you can see various stats for players, filter players by price range, minutes played, team, and position. You can also check per 90 values for applicable stats and watchlist players. Selecting a player will open a detailed view of there stats for the year and the history of the player as well. You can filter there stats for different gameweek spans and see there per 90 numbers. If you press the button on the left side of the view toggle button it will open a player comparison popup where you can add up to five players to compare their stats. You can compare these players during certain game spans and there per 90 numbers as well.

playerstats         playerstatsfilter         detailedstats         history

playercomparison         playercomparisonstats         playercomparisonfdr         addplayer

The last button on the bottom bar opens a team modal for you to manage your teams. You can add, remove, edit, and choose a new default team on start up here.

teammodal         addteam

Finally, in the top right is a cog which opens settings where you can change the theme of the app and also has a credits tab, crediting the FPL api and icon sources.

Light         Dark

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Any contributions to this project are welcomed! To contribute:

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License.

Contact

Tarun Bola - bolatarun@gmail.com

Project Link: https://github.com/CodeByTarun/FPLApp

Acknowledgments

About

Fantasy Premier League mobile application for checking on your fpl teams, live premier league scores and player stats.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published