|
1 |
| -# churros-developers |
| 1 | +# INP Developers |
2 | 2 |
|
3 |
| -WIP |
| 3 | +Live at <https://developers.inpt.fr> |
| 4 | + |
| 5 | +Stack: |
| 6 | + |
| 7 | +- <a href="https://the-guild.dev/graphql/mesh">GraphQL Mesh</a>: to unify Churros' API and Authentik's API into a single GraphQL API |
| 8 | +- <a href="https://svelte.dev">Svelte</a>: for the UI |
| 9 | +- <a href="https://houdinigraphql.com">Houdini GraphQL</a>: to interact with the unified API |
| 10 | + |
| 11 | +## Development |
4 | 12 |
|
5 | 13 | ```
|
6 |
| -# cf https://docs.goauthentik.io/docs/installation/docker-compose#preparation |
7 |
| -echo "PG_PASS=$(openssl rand -base64 36 | tr -d '\n')" >> .env |
8 |
| -echo "AUTHENTIK_SECRET_KEY=$(openssl rand -base64 60 | tr -d '\n')" >> .env |
9 |
| -docker compose up -d |
10 |
| -# se faire un café |
| 14 | +cp .env.example .env |
| 15 | +# fill out .env |
11 | 16 | bun i
|
12 | 17 | bun dev
|
13 | 18 | ```
|
14 | 19 |
|
15 |
| -## Tester |
16 |
| - |
17 |
| -1. Aller sur <http://localhost:9001/if/flows/initial-setup> |
18 |
| -2. [Créer un token](http://localhost:9001/if/user/#/settings;%7B%22page%22%3A%22page-tokens%22%7D) |
19 |
| -3. Lancer `HURL_token=...le token ici... bun hurl tests/test.hurl` |
20 |
| - |
21 |
| -## Migration clients OAuth depuis Churros |
22 |
| - |
23 |
| -| Field | Type | migration | |
24 |
| -| ------------------- | ---------------------- | ------------------------------------------------------------------------------------- | |
25 |
| -| id | String | /providers/oauth2: `client_id` | |
26 |
| -| createdAt | DateTime | _perdu_ | |
27 |
| -| updatedAt | DateTime? | _perdu_ | |
28 |
| -| ownerId | String | /core/applications: `group` (uid, ou id??) | |
29 |
| -| owner | Group | (via API Churros) | |
30 |
| -| name | String | /core/applications: `name` | |
31 |
| -| description | String | /core/applications: `meta_description` | |
32 |
| -| allowedRedirectUris | String[] | /providers/oauth2: `redirect_uris` | |
33 |
| -| credentials | ThirdPartyCredential[] | _géré par Authentik, plus nécéssaire_ | |
34 |
| -| secret | String | /providers/oauth2: `client_secret` | |
35 |
| -| website | String | /core/applications: `meta_publisher` | |
36 |
| -| faviconUrl | String | /core/applications: `meta_icon` (et `POST /core/applications/{slug}/set_icon(_url)?`) | |
37 |
| -| active | Boolean | _perdu_ | |
38 |
| -| users | User[] | /core/applications/{slug}/user_by (peut-être) | |
| 20 | +## Updating superschema.graphql |
| 21 | + |
| 22 | +After making changes to Mesh's config (`mesh.config.ts`) |
| 23 | + |
| 24 | +The dev environment will reload itself |
| 25 | + |
| 26 | +```sh |
| 27 | +sh update-supergraph.sh |
| 28 | +``` |
0 commit comments