diff --git a/dashboard/README.md b/dashboard/README.md index b5b2950..3f8d21f 100644 --- a/dashboard/README.md +++ b/dashboard/README.md @@ -1,38 +1,17 @@ -# sv +# Carenage dashboard -Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli). +This is the front-end interface for Carenage. It is a [SvelteKit](https://svelte.dev) project, thought as a dashboard representing metadata and environmental impact metrics for a given project, a CI pipeline, a CI run for a job, etc. -## Creating a project +## Development -If you're seeing this, you've probably already done this step. Congrats! +### Setup -```bash -# create a new project in the current directory -npx sv create +With `npm` installed, you can do `make install` to setup needed dependencies for the project. Then, with `make run_dev`, this will launch the server for +the dashboard. -# create a new project in my-app -npx sv create my-app -``` +### Testing -## Developing +Unit and integration tests are executed with `make component_test`, end-to-end testing with `make e2e_test`. -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: - -```bash -npm run dev - -# or start the server and open the app in a new browser tab -npm run dev -- --open -``` - -## Building - -To create a production version of your app: - -```bash -npm run build -``` - -You can preview the production build with `npm run preview`. - -> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment. +For integration testing and mocking responses from external services like `Boagent`, [msw](https://mswjs.io/) is used. You can add handlers for specific +URLs in `src/mocks/handlers.ts`. In a development environment, those will be able to handle fetching valid URLs by the server code, and render data on the adequate pages. Handlers work either in the browser and in a Node environment.