# Filudi developer docs

How a game runs on filudi.com and on portals, the SDK and API references, and how a portal builds on the Filudi API.

Four sections. Read the one that matches what you build; the references serve both.

- [Games](/docs/games/): from the invitation to a version under review, and everything a game can do on filudi.com and on portals.
- [SDK](/docs/sdk/): `@filudi/game-sdk`, one page per module, with the rules the host applies.
- [Portals](/docs/portals/): the three ways to run a site on the catalog, approval, domains, server keys.
- [API reference](/docs/api/): every route of the API, generated from the file the API runs on.

## Reading a page

Code samples sit in the right column on a wide screen and under the text on a narrow one. The language tabs
switch every sample on the site at once; the choice is kept in your browser.

<CodePanel title="Initialise the SDK">
  <Fragment slot="javascript">
    ```js
    import { sdk } from '@filudi/game-sdk';

    const { player, locale } = await sdk.init({ gameId: 'gloop' });
    sdk.ready();
    ```

  </Fragment>
  <Fragment slot="typescript">
    ```ts
    import { sdk, type InitResult } from '@filudi/game-sdk';

    const result: InitResult = await sdk.init({ gameId: 'gloop' });
    sdk.ready();
    ```

  </Fragment>
</CodePanel>

Every page is also served as Markdown: add `index.md` to its address. [`/llms.txt`](/llms.txt) lists every page
and [`/llms-full.txt`](/llms-full.txt) holds them all, for an agent that reads the docs in one go.
