Skip to content

Latest commit

 

History

History
 
 

README.md

web-admin

This folder contains the control plane frontend for a hosted, multi-user Rill (not launched yet). It's implemented with TypeScript and SvelteKit.

Running in development

  1. Run the Go backend in admin (see its README for instructions)
  2. Run npm install -w web-admin
  3. Run npm run dev -w web-admin

There's currently no UI to create orgs or projects. You can add some directly using curl:

# Add an organization
curl -X POST http://localhost:8080/v1/organizations -H 'Content-Type: application/json' -d '{"name":"foo", "description":"org foo"}'

# Add a project
curl -X POST http://localhost:8080/v1/organizations/foo/projects -H 'Content-Type: application/json' -d '{"name":"bar", "description":"project bar"}'

Generating the client

We use Orval to generate a client for interacting with the backend server (in admin). The client is generated in web-admin/src/client/gen/ and based on the OpenAPI schema in admin/api/openapi.yaml. Orval is configured to generate a client that uses @sveltestack/svelte-query.

You have to manually re-generate the client when the OpenAPI spec changes. We could automate this step, but for now, we're going to avoid cross-language magic.

To re-generate the client, run:

npm run generate:client -w web-admin