Skip to main content
Version: 2.2.0

Introduction

The purpose section is not to be a tutorial on Svelte and Svelte Kit, you should visit their official documentation to learn more about them.

Also, the development documentation here is oriented at projects utilizing the Web Base to develop applications that need not adhere to the AGIL Ops Hub module development format (which allows installation and publishing of web modlets), for information on contributing new modlets, visit the respective docs here.

Instead, it will only include information that is specific to AGIL Ops Hub. Here are some useful links you might be looking for:

How To Create A Page

Follow the link above to Svelte Kit's official documentation on creating pages.

How To Create A Component

Follow the link above to Svelte's official documentatin on creating Svelte components.

How To Add Styles

Follow the link above to Tailwind CSS's official documentation on styling with utility classes.

We recommend that you DO NOT style your components using the <style> tags - this defeats the purposes of using Tailwind. You should read more about Tailwind CSS' core concepts to understand why we want to keep to using utility classes. Tailwid CSS also adds a lot of very powerful tooling that makes styling easy. Only break out when absolutely necessary, that's usually only the case when certain third-party libraries impose restrictions that require you to use CSS directly.

How To Manage State

Follow the link above to Svelte Kit's official documentation on advanced reactivity. With Svelte 5, you likely can use the $state instead for many cases.

How To Write Unit Tests

Follow the link above to Vitest's official documentation on writing tests.

How To Write Component Tests

Follow the link above to Storybook's official documentation on writing stories for Svelte Kit.

Storybook is a framework to generate "stories" that can serve to both document and test stories or features that your system needs to provide. We recommend you use Storybook to do component-level tests.

note

The Web Base already has Storybook installed but you will probably want to perform additional configuration for your project's purposes (if you do decide to use Storybook).


info

We have plans to provide full-fleged guidelines and tutorials that we recommend all projects follow. Stay tuned.