Watch
1
0
Fork
You've already forked bericht-frontend
0
mirror of https://github.com/DCC-BS/bericht-frontend.git synced 2026-08-17 12:55:15 +00:00
  • TypeScript 53.4%
  • Vue 46.3%
  • Dockerfile 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-06-11 14:21:49 +02:00
.github chore(deps): update actions/checkout action to v6 (#86) 2026-02-26 09:21:17 +01:00
.vscode chore: update dependencies in package.json 2025-05-19 15:16:36 +02:00
_imgs refactor: clean up code formatting and improve readability across components 2025-06-03 16:15:36 +02:00
assets/css Squash merge imgDraw into main 2025-06-03 10:52:40 +02:00
components feat: update @iconify-json/lucide to version 1.2.48 and remove unused leaflet client plugin 2025-06-13 09:38:31 +02:00
composables feat: enhance image export functionality to crop based on image dimensions and improve drawing boundary checks 2025-06-12 16:50:41 +02:00
i18n feat: enhance README with location features and update MapView for improved geolocation handling 2025-06-12 10:20:41 +02:00
models feat: enhance image export functionality to crop based on image dimensions and improve drawing boundary checks 2025-06-12 16:50:41 +02:00
pages feat: add location display in report export and comment out unused button in MapView 2025-06-12 10:38:39 +02:00
plugins feat: update @iconify-json/lucide to version 1.2.48 and remove unused leaflet client plugin 2025-06-13 09:38:31 +02:00
public code cleanup with biome 2025-05-22 14:45:46 +02:00
server feat: add filename sanitization for email attachments and update sendEmail function to use sanitized names 2025-06-04 11:22:00 +02:00
services feat: implement map functionality with geolocation support and address formatting 2025-06-11 17:11:13 +02:00
static code cleanup with biome 2025-05-22 14:45:46 +02:00
utils feat: implement map functionality with geolocation support and address formatting 2025-06-11 17:11:13 +02:00
.dockerignore inital commit 2025-03-18 10:38:38 +01:00
.editorconfig inital commit 2025-03-18 10:38:38 +01:00
.env.example Squash merge imgDraw into main 2025-06-03 10:52:40 +02:00
.gitignore inital commit 2025-03-18 10:38:38 +01:00
.pre-commit-config.yaml inital commit 2025-03-18 10:38:38 +01:00
app.vue feat: Implement complaint and report management services 2025-05-20 17:46:01 +02:00
biome.json Update biome.json 2025-07-31 10:19:07 +02:00
bun.lock chore(deps): update dependency @types/bun to v1.3.9 (#87) 2026-02-26 09:21:27 +01:00
codecov.yml inital commit 2025-03-18 10:38:38 +01:00
docker-compose.yml Add Docker Compose configuration and update environment variables 2025-03-19 17:48:09 +01:00
Dockerfile chore(deps): update dependency node to v24 (#72) 2026-02-26 09:16:08 +01:00
LICENSE inital commit 2025-03-18 10:38:38 +01:00
nuxt.config.ts feat: enhance README with location features and update MapView for improved geolocation handling 2025-06-12 10:20:41 +02:00
package.json chore(deps): update dependency @types/bun to v1.3.9 (#87) 2026-02-26 09:21:27 +01:00
publiccode.yml Add organisation URI to publiccode.yml 2026-06-11 14:21:49 +02:00
README.md Update README.md 2025-08-06 16:37:42 +02:00
renovate.json Update renovate.json 2025-11-27 08:25:04 +01:00
tsconfig.json refactor: reorganize service structure and improve dependency injection 2025-05-23 12:23:09 +02:00

Bericht Generator (Frontend)

Home Screenshot Report Screenshot Complaint Screenshot Draw Screenshot

Bericht Generator is a modern web application for creating comprehensive reports with multimedia content. Built with Nuxt.js 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 separately.

GitHub Actions Workflow Status Checked with Biome

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

  • Frontend: Nuxt.js with TypeScript and Composition API
  • UI Framework: Nuxt UI
  • 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
  • Package Manager: Bun
  • Internationalization: Nuxt I18n
  • Document Generation: Docx.js for Word document creation
  • State Management: Pinia
  • Gesture Support: VueUse for touch interactions

Setup

Environment Configuration

Create a .env file in the project root with the required environment variables:

API_URL=http://localhost:8000

Install Dependencies

Make sure to install dependencies using Bun:

bun install

Development

Start the development server on http://localhost:3000:

bun run dev

For production builds:

bun run build
bun run start

Generate static site:

bun run generate

Backend Setup

This frontend requires a compatible backend API for full functionality. See the Bericht Backend repository for the backend implementation. Ensure the backend is running and accessible at the URL specified in your .env file.

Testing & Linting

Run tests with Vitest:

# Run tests
bun test

# Run tests in watch mode
bun test:watch

# Generate coverage report
bun test:coverage

Format code with Biome:

bun run lint

Check and fix code issues:

bun run check

Docker Deployment

The application includes a multi-stage Dockerfile for production deployment:

# Build the Docker image
docker build -t bericht-frontend .

# Run the container
docker run -p 3000:3000 bericht-frontend

Project Architecture

  • components/: Vue components organized by feature (complaints, drawing, navigation)
  • composables/: Reusable composition functions for business logic
  • pages/: Application routes and page components
  • models/: TypeScript interfaces and data models
  • services/: API service classes for data operations
  • utils/: Utility functions for document generation and helpers
  • assets/: CSS styles and static assets
  • i18n/: Internationalization configuration and translations
  • server/: Server-side API endpoints and middleware

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

DCC Logo

Datenwissenschaften und KI
Developed with ❤️ by DCC - Data Competence Center