5573ece848
Migrate the satellite admin UI web app from the Svelte template used to generate a Svelte App scaffolding to SvelteKit. There aren't any functional changes in the application, however, the commit has a lot because: 1. SvelteKit uses a different directory layout and constraints to it, so the files have been moved. 2. The files have changed its formatting due to the new default linter configurations that SvelteKit uses. 3. The linter detected some issues with using `object` and `any` types in Typescript, so they have been replaced by better general types (e.g. Record). The migration allows to use the new tooling rather than Rollup directly, besides that will empower the future of it when it needs more features (e.g. different routes, etc.). Change-Id: Ifa6736c13585708337f6c5a59388077b784eaddd
42 lines
1.2 KiB
Markdown
42 lines
1.2 KiB
Markdown
# Admin UI
|
|
|
|
## Implementation details
|
|
|
|
This is a project based on the [Sveltekit](https://kit.svelte.dev).
|
|
|
|
The project is set up with Typescript.
|
|
|
|
The Web App is currently straightforward as we specified that v1 would be.
|
|
|
|
The v1 is just a simple web page that exposes the Admin API through some forms and allow to a call the API without needing to use some HTTP REST clients (e.g. Postman, cURL, etc.).
|
|
It doesn't offer any user authentication; the user has to know the API authorization token for using it.
|
|
|
|
The UI has a set of Svelte components that collaborate together to render an HTML form with input elements from the Admin API client.
|
|
The Svelte components expect some values of a certain Typescript interfaces, types, and classes, for being able to dynamically render the HTML form and elements.
|
|
|
|
Each source has a brief doc comment about its functionality.
|
|
|
|
## Development
|
|
|
|
Install the dependencies...
|
|
|
|
```bash
|
|
npm install
|
|
```
|
|
|
|
...then run the development server with autoreload on changes
|
|
|
|
```bash
|
|
npm run dev
|
|
```
|
|
|
|
Navigate to [localhost:3000](http://localhost:3000). You should see your app running.
|
|
|
|
## Building for production mode
|
|
|
|
To create an optimized version of the app:
|
|
|
|
```bash
|
|
npm run build
|
|
```
|