Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/playfab/winter-starfall
PlayFab demo game showcasing Economy v2, Azure Functions, and more
https://github.com/playfab/winter-starfall
game playfab playfab-apis react typescript
Last synced: 17 days ago
JSON representation
PlayFab demo game showcasing Economy v2, Azure Functions, and more
- Host: GitHub
- URL: https://github.com/playfab/winter-starfall
- Owner: PlayFab
- License: mit
- Created: 2024-10-02T17:25:09.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-10-21T01:03:48.000Z (2 months ago)
- Last Synced: 2024-10-21T04:29:35.051Z (2 months ago)
- Topics: game, playfab, playfab-apis, react, typescript
- Language: TypeScript
- Homepage: https://winterstarfall.azureedge.net/
- Size: 22.8 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Winter Starfall
This is an [Azure PlayFab](https://www.playfab.com) demo game showcasing Economy v2, Azure Functions, and more.
Play this game at [winterstarfall.com](https://www.winterstarfall.com/).
If you have a free PlayFab developer account, you can [view this title in Game Manager](https://developer.playfab.com/en-us/F8941/dashboard).
# Website
## Prerequisites
- [Node JS](https://nodejs.org) (v20 or higher)
- [Visual Studio Code](https://code.visualstudio.com) (optional)## Setup
1. Clone this repository
```bash
git clone https://github.com/PlayFab/winter-starfall.git
```
1. In VS Code, select **File > Open Folder**
1. Select the `/website` folder
1. Choose to install all recommended extensions
1. Select **Terminal > New Terminal**
1. Run `npm install` to install all dependencies## Running the site
1. In the `/website` folder, run `npm run dev` to start the site
1. Click on the link it offers (should be `localhost:5173`) to view the site## Building the site
1. In the `/website` folder, run `npm run build` to build the site
1. The output will be in the `/website/dist` folder# Azure functions
Azure Functions in C# are available in the `/azure-functions` folder. You can run these locally or [deploy the project to Azure](https://learn.microsoft.com/en-us/azure/azure-functions/functions-develop-vs-code).
## Credentials
This project builds and deploys itself to an Azure Blob Storage account via GitHub Actions in `.github/workflows/main.yml`. If you'd like to do the same:
1. In the [Azure Portal](https://portal.azure.com/), click the Cloud Shell button near the top right
1. Modify the command below with your subscription ID and resource name
```bash
az ad sp create-for-rbac --name "winter-starfall-github" --role contributor --scopes /subscriptions/YOUR_SUBSCRIPTION_ID/resourceGroups/YOUR_RESOURCE_GROUP_NAME --json-auth
```
1. Paste that command in the terminal and press `Enter`
1. It will return a JSON object for use in step 8
1. In GitHub, go to Settings > Secrets and variables > Actions
1. Create a Repository secret
1. Name: `AZURE_CREDENTIALS`
1. Secret: (paste the JSON from step 4)
1. Click **Add secret**# Social logins
This game allows players to sign in using Microsoft, Google, and Facebook accounts.
To enable these logins, you will need to create apps with each provider and set up the appropriate credentials in [PlayFab Game Manager](https://developer.playfab.com).
Then modify `website\src\main.tsx` with the appropriate client IDs.
- **Microsoft:** [Single-page application: App registration](https://learn.microsoft.com/en-us/entra/identity-platform/scenario-spa-app-registration)
- **Google:** [Integrating Google Sign-In into your web app](https://developers.google.com/identity/sign-in/web/sign-in)
- **Facebook:** [Facebook Login for the Web with the JavaScript SDK](https://developers.facebook.com/docs/facebook-login/web)# Contact
- **Email:** Jordan Roher
- **Discord:** [PlayFab Community](https://discord.com/invite/msftgamedev)