Entain Native Apps Documentation
Welcome to the main code repository for Entain Australia's mobile native cross-platform applications. This is meant to be a collaborative place where team members can share guides, insights on latest tech, best practices, decisions and anything else that might add value to anyone jumping in the project.
⚠️ It's important to note this is a living document, and every developer is responsible for its evolution. If you come across an error, some missing information, or anything that you think could be improved, feel free to make the change and open an MR to discuss it with the broader team.
Hit up the #chapter-native-apps channel with any questions these docs don't answer.
The Frontend also has their own amazing set of docs located here.
First time here?
You can use the Sidebar to navigate through the different sections of our documentation.
Project Overview
Native
As of July 2023 our approach has moved from the existing React Native architecture (shown below) to a Native Android and iOS codebase. This will be done in an interative way by migrating existing React Native screens to Native. Remaining React Native screens will be embedded in the Native apps which allows us to continue development and release the Native apps to customers prior to all screens being migrated.
Please see the iOS and Android repositories for more information.
React Native
This project uses React Native to leverage the ability to write most of the application code in one language, JavaScript or TypeScript, using the same basic principles of React for web. This allows us to take advantage of existing web development skills and technologies, whilst being able to compile, bundle and deploy the application onto multiple different native platforms (i.e. iOS and Android).
Our codebase is written primarily in TypeScript, while there are some particular files that are still written in JavaScript, for very simple files or scripts. Native specific code is written in Objective-C and Swift for iOS and Java for Android, with a tiny bit of Ruby as well.
Contributing to the documentation
- Know of some domain knowledge that isn't found here yet?
- Have proposed or made a decision with the chapter that needs to be documented and kept for posterity?
- Heard about important changes to our underlying tech that might affect the project?
- Implemented some new features or made changes to existing ones that need to be explained or could benefit from having a guide?
- Found an issue or something we can improve with our onboarding process?
Make sure to document all of that in here.
Here's some material to help you when writing new documentation pages:
- GitLab markdown docs: https://git.neds.sh/help/user/markdown
- GitLab Wiki docs: https://docs.gitlab.com/ee/user/project/wiki/
Contributing to the development of the project
Read our Code Contributing Guide. If you're going to be writing any code on this project, you must read it.
Project Communication and Collaboration
We use Slack to communicate, and you can find our project's main channel here.
There are other channels that are related to the project which are purpose specific, and include:
- General
- #chapter-native-apps Testing related channels
- #android-native-app-testing
- #ios-native-app-testing
- Automated notifications
You should be automatically added by your team to any additional relevant channels.
There are many other channels related to this project, such as ones dedicated to a particular product or feature, or a separate project that is used here as a dependency.
Be sure to speak to your team to find out of any other Slack channels relevant to your work.
Agile Software Development
We use JIRA for planning sprints, issue tracking, feature requests, etc.
You can find our project-wide JIRA board here.
This JIRA board is used for work that doesn't pertain to any particular product or feature that is being handled by a specific team, and generally contains previously discovered bugs that have been backlogged.
Additionally, your team will have its own JIRA board, which you should be made aware of when being onboarded, if not, ask your team's colleagues for guidance.
Code Repo and CI/CD
We use Gitlab for managing projects, code repositories, versioning, and CI/CD pipelines
You can find the project here, on our self-hosted instance of Gitlab.
First Time Setup
Whether you're looking to start developing the app, or just want to run it locally for testing, you'll need to follow this guide to get set up first.
How to Install and Run the app
If you've already run through the first time set up above, visit the dedicated wiki page on how to install and run the app.
Internal Dependencies
Below is a list of all internal projects, libraries and packages that the Native Apps project imports and uses a internal dependencies.
You should at least familiarise yourself with the documentation overview for each project, to get a better idea of why these are imported into the project, and how they are used.
frontend
The React Native project has a direct dependency on our frontend
repository. Store actions, mutations and getters, as well as Vue plugins all come from there.
The frontend
project is linked to react-native
through a link such as git+https://git.neds.sh/technology/code/ui/frontend.git#commithash
in our package.json
, where #commithash
at the end of the link indicates which commit hash from frontend
project is used.
Specific commit hashes are used to ensure we're not including untested changes that could potentially break the React Native project.
Only the /library/**
directory is used and contains all the vuex & plugins stuff which is currently still consumed by the App. Eventually we will remove this dependency once everything has been migrated to use redux
and graphql
exclusively.
@technology/ui-core
ui-core
exposes modules, types and plugins that are of common interest to all our client applications. More information can be found in the project's README.
@technology/ui-graphql
ui-graphql
is our main repository for GraphQL schemas, operations and utilities for consuming applications.
Unlike most projects or resources found on the internet, we don't write inline GQL operations in our client applications. Instead, they're all written in ui-graphql
, interpreted & converted to TypeScript + React + Apollo code by the the GraphQL code generator and published in our private package registry.
@technology/betslip
The betslip
project is a micro frontend purposefully built for the frontend
project. It also exposes a betslip
store slice (Redux Toolkit) that we combine into our Redux store. More information can be found in the project's README.