Home - gameserverapp/Community-Website GitHub Wiki
With a self-hosted Community website you can modify all aspects to your likings. This guide assume you forked the Community Website and have it up and running on your own webserver.
Basic information
The Community website is build upon the Laravel Framework 5.4. Please consult the Laravel documentation for more information about Laravel.
MVC
Laravel is build using a MVC (model view controller) structure. The models in the Community website represent API models and are automatically converted into models for you.
Community website basics
The Community Website retrieves all information from GSA using the GSA API. This includes the page setup. You can use the page builder to build up a page or build a custom page. All features and data is available to both page builder pages and custom pages. To create new page builder blocks, GSA has to add these to the page builder.
You can find the page builder blocks in resources/views/pages/v1/page/blocks
.
Get data via API
With the special Helpers and Wrappers, you can easily retrieve data from the API. In the HomeController you can find a good example of how data can be retrieved. It uses GameserverApp\Api\Client
(a GSA API Wrapper) to get information like Top Characters, all servers and community statistics. The Client
wrapper handles authentication stuff for you automatically.
Custom API requests
You can create your own API requests, using the OAuth API Wrapper (app/GameserverApp/Api/OAuthApi.php
). This can be used to retrieve user data, make a guest request or an auth (authenticated) request. A public request retrieves data available for everyone. Information that is specific to a user or group can only be retrieved using an auth (authenticated) request.
Steam authentication
The authentication flow ensures player data can only be accessed by the rightful owner (the player). This also means that no community admin is able to read private messages from a player. Every steam account can authenticate with a Community website. If the player has never played on your servers, some actions might be restricted.
The steam auth flow happens on the GSA system, the flow happens like this:
- Community website redirects user to a special GSA dashboard link
- GSA Dashboard redirects user to Steam, for authentication
- User logs in on steam
- User is redirected back to a special link on GSA dashboard
- User is redirected back to Community website
- Community website requests access_token based on GSA Auth code
- GSA sends back access token to Community website
- Community website sets cookie with user, which is used on all API calls