- TypeScript 50.4%
- Vue 48.2%
- Dockerfile 1.2%
- Shell 0.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
* chore: modernize to Nuxt 4 and DCC standard tooling (mise, varlock) - Nuxt 4 app/ layout, Nuxt UI 4, i18n locales as JSON - Use DCC nuxt-layers (backend communication, health check, logger, feedback control, app config); zod-validated server API routes - mise tools and tasks, varlock env schemas, bun with minimumReleaseAge - Biome 2, vue-tsc strict, Vitest unit tests - Dockerfile on dcc-docker-images/mise; docker/ compose stacks; CI workflows - Render /notes/** client-only (IndexedDB); fix map latitude typo - Remove startup plugin that logged runtime config (secrets) - Pin vite 8.3.5: 8.4.0 breaks the Nuxt 4.6.4 SSR build Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: guard common-ui cookie cleanup when Cookie Store API is missing @dcc-bs/common-ui.bs.js 2.2.5 calls cookieStore.getAll() unconditionally, which throws "ReferenceError: cookieStore is not defined" in insecure contexts (http on a LAN IP, e.g. testing on a phone) and in older Safari/Firefox. Patch it via bun patchedDependencies until fixed upstream, and copy patches/ into the Docker build before install. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Tobias Bollinger <tobias.bollinger@bs.ch> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
| .github/workflows | ||
| .mise-tasks | ||
| .vscode | ||
| _imgs | ||
| app | ||
| docker | ||
| i18n/locales | ||
| patches | ||
| public | ||
| server | ||
| shared/types | ||
| tests/unit | ||
| .dockerignore | ||
| .editorconfig | ||
| .env.buildtime.schema | ||
| .env.dev.schema | ||
| .env.runtime.schema | ||
| .env.schema | ||
| .gitignore | ||
| .npmrc | ||
| AGENTS.md | ||
| biome.json | ||
| bun.lock | ||
| bunfig.toml | ||
| codecov.yml | ||
| Dockerfile | ||
| LICENSE | ||
| mise.toml | ||
| nuxt.config.ts | ||
| package.json | ||
| publiccode.yml | ||
| README.md | ||
| renovate.json | ||
| tsconfig.json | ||
| vitest.config.ts | ||
Bericht Generator (Frontend)
Bericht Generator is a modern web application for creating comprehensive reports with multimedia content. Built with Nuxt 4 and TypeScript, it provides an intuitive interface for recording complaints, capturing evidence, and generating professional reports. This repository contains only the frontend code; the backend is available at DCC-BS/bericht-backend.
Features
- Audio Recording: Record complaints with automatic speech-to-text transcription
- Image Capture: Take photos and annotate them with drawing tools
- Text Composition: Create detailed text-based complaint entries
- Interactive Drawing: Annotate images with brush tools, colors, and eraser functionality
- Location & GPS Integration: Capture precise location data with interactive maps and automatic GPS positioning
- Report Management: Organize complaints into structured reports
- Document Export: Generate DOCX documents and email exports
- Drag & Drop Interface: Reorder complaint items within reports
- PWA Support: Progressive Web App capabilities for mobile usage
- Multilingual Support: Available in German and English
Technology Stack
- Framework: Nuxt 4 with TypeScript and the Composition API
- UI Framework: Nuxt UI 4 with Tailwind CSS 4
- Shared DCC layers: DCC-BS/nuxt-layers – backend communication, health check, logger, feedback control, app config
- Drawing Engine: Konva.js with Vue Konva
- Maps & Location: Leaflet with OpenStreetMap and Nominatim for geocoding
- Audio Processing: MediaRecorder API with FFmpeg for format conversion
- Storage: IndexedDB (reports stay on the device)
- Internationalization: Nuxt I18n (
i18n/locales/{de,en}.json) - Document Generation: Docx.js for Word document creation
- Toolchain: mise · Bun · varlock (env validation & secrets) · Biome · Vitest
Setup
Prerequisites
- mise
- Access to the
DCC-KIvault in Proton Pass for dev secrets (mise run pass-login)
Installation
mise trust && mise install
mise install installs the pinned toolchain (Bun, Node, varlock, pass-cli), installs the npm packages and generates the Nuxt types.
Environment Configuration
Environment variables are declared and validated with varlock:
| File | Purpose |
|---|---|
.env.schema |
APP_MODE (dev, ci, build, prod) and derived flags |
.env.buildtime.schema |
Build-time layer selection |
.env.runtime.schema |
Runtime variables (NUXT_API_URL, DUMMY, logger, feedback, …) |
.env.dev.schema |
Dev secrets from Proton Pass |
Defaults work for local development; to override a value, create a .env file (git-ignored).
Development
mise run dev # dev server on http://localhost:3000 (backend expected on http://localhost:8000)
mise run dummy # dev server with dummy backend responses, no backend needed
To run the backend services locally, either start the backend with mise run dev there, or start the containers (LLM, Whisper, backend) with:
mise run docker:up
Testing & Linting
| Task | Description |
|---|---|
mise run test |
Unit tests (Vitest) |
mise run test:coverage |
Unit tests with coverage report |
mise run tsc |
Type checking (vue-tsc) |
mise run check |
Lint and format with Biome (fix) |
mise run ci-check |
Biome in CI mode (no changes) |
Run mise tasks for the full list.
Docker Deployment
The Dockerfile builds on the shared dcc-docker-images/mise base image and ships a minimal runtime (Node + varlock) as a non-root user. varlock validates the environment on start-up (APP_MODE=prod).
docker build -t bericht-frontend .
docker run -p 3000:3000 \
-e NUXT_API_URL=http://bericht-backend:8000 \
-e NUXT_FEEDBACK_GITHUB_TOKEN=... \
bericht-frontend
The full stack (nginx, frontend, backend, LLM, Whisper) is defined in docker/ and can be started with mise run docker:prod. Images are published to GHCR via the Build and Publish Docker Image workflow.
Project Architecture
app/
├─ assets/ - CSS
├─ components/ - Vue components (complaints, drawing, map, navigation)
├─ composables/ - Composition functions (useXxx)
├─ models/ - Domain models
├─ pages/ - Routes
├─ plugins/ - Nuxt plugins (DI service registration, Konva)
├─ services/ - Service classes and IndexedDB queries
└─ utils/ - Framework-agnostic helpers (docx, email, client id)
server/
├─ api/ - API routes proxying the backend (stt, title, send)
└─ utils/ - Backend handler and dummy data
shared/types/ - Types shared between app and server
i18n/locales/ - Translations
tests/unit/ - Unit tests
docker/ - Docker Compose stack and nginx config
Key Features
Audio Recording
- Real-time audio visualization during recording
- Automatic conversion to MP3 format
- Background recording support for PWA
- Speech-to-text integration
Image Drawing
- Multi-touch gesture support (pinch to zoom, pan)
- Brush and eraser tools with customizable sizes
- Color picker with preset colors
- Touch-optimized interface for mobile devices
Location & GPS Features
- Automatic GPS positioning with animated loading states
- Interactive map with draggable markers for precise location adjustment
- Reverse geocoding to convert coordinates to readable addresses
- OpenStreetMap integration with tile layer support
- Debounced API calls to prevent rate limiting
- Cross-platform geolocation support with error handling
Report Generation
- Drag and drop reordering of complaint items
- Export to DOCX format with embedded images
- Email export functionality
- Structured complaint organization
- Location data included in reports
Browser Support
- Modern browsers with ES2020+ support
- MediaRecorder API for audio recording
- Canvas API for drawing functionality
- Touch events for mobile interaction
- HTML5 Geolocation API for GPS positioning
- WebGL support for map rendering
License
MIT © Data Competence Center Basel-Stadt
Datenwissenschaften und KI
Developed with ❤️ by DCC - Data Competence Center
