Files
quibot/quibot-web/README.md
2026-06-18 13:45:32 +02:00

68 lines
2.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Quibot Web
Interfície web per controlar el robit de la Quibot. Construida amb [Nuxt 3](https://nuxt.com/) i [Vue 3](https://vuejs.org/).
## Requisits previs
- [Node.js](https://nodejs.org/) (versió 20 o superior)
- npm, yarn o pnpm
## Instal·lació
```bash
npm install
```
## Execució en mode desenvolupament
```bash
npm run dev
```
L'aplicació estarà disponible a `http://localhost:3000`.
## Configuració
L'aplicació es configura mitjançant variables d'entorn:
| Variable | Descripció | Valor per defecte |
|-------------------|----------------------------------|------------------------|
| `QUIBOT_BASE_URL` | URL del backend del Quibot | `http://quibot:8000` |
| `QUIBOT_TOKEN` | Token d'autenticació del backend | `MY_SECRET_TOKEN` |
## Comandos disponibles
| Comando | Descripció |
|-----------------|--------------------------------------------|
| `npm run dev` | Inicia el servidor de desenvolupament |
| `npm run build` | Compila l'aplicació per a producció |
| `npm run generate` | Genera l'aplicació estàtica |
| `npm run preview` | Previsualitza la versió de producció |
## Funcionalitat
L'interfície permet enviar comandes al motor del Quibot:
- **Step Forward** Mou el motor cap endavant
- **Step Backwards** Mou el motor cap enrere
- **Stop** Atura el motor
## Estructura del projecte
```
quibot-web/
├── app/
│ └── app.vue # Pàgina principal amb els controls del motor
├── server/
│ └── api/motor/ # Rutes API del servidor
│ ├── stop.post.ts # Comanda d'aturada
│ └── step/[direction].post.ts # Comandes de moviment
├── public/
│ └── favicon.ico # Icona del navegador
├── nuxt.config.ts # Configuració del Nuxt
├── package.json
└── tsconfig.json # Configuració de TypeScript
```
## Llicència