Skip to content

Vempain/vempain-file-frontend

Repository files navigation

Dependabot Updates CodeQL CI GitHub Tag GitHub License

Vempain File Frontend

Vempain File Frontend is the user-facing web application for interacting with Vempain’s file service. It provides an authenticated interface to discover, inspect, and retrieve files exposed by the backend API. The UI supports multiple languages and can present geospatial context for files that include location metadata.

What the frontend does

  • Authentication and access control

    • Integrates with Vempain’s authentication flow to sign users in and gate file access.
  • File discovery and navigation

    • Lists the files made available by the backend.
    • Supports searching and browsing so users can quickly find relevant items.
  • File details and actions

    • Shows key metadata provided by the API (for example: name, size, timestamps, and similar attributes).
    • Initiates downloads via the backend.
    • Surfaces additional server-side actions when exposed by the API.
  • Map-based context (when available)

    • If files contain geospatial metadata, the app can display their locations on an interactive map to give visual context.
  • Internationalized user interface

    • The interface loads translations at runtime so users can switch language without rebuilding the app.

Typical user workflows

  • Sign in to the Vempain platform.
  • Browse or search the file list provided by the backend.
  • Open a file to view its metadata/details.
  • Download a file (and perform other API-supported actions).
  • Optionally switch language for the UI.
  • If available, view geotagged items on a map.

How it operates (high level)

  1. On load, the app reads its runtime configuration (e.g., API base URL) from environment variables and initializes internationalization.
  2. After sign-in, it requests file lists and metadata from the backend API.
  3. The UI renders results, allowing search/browse, showing details, and enabling downloads or other exposed actions.
  4. When applicable, items with coordinates can be displayed on a map for quick spatial context.
  5. Build information generated during the build process can be displayed in an “About” or diagnostics view.

Runtime configuration

The application reads its runtime configuration from environment variables (exposed to the client with a VITE_ prefix). Common examples include:

  • VITE_API_BASE_URL — Base URL of the backend file API.
  • i18n:
    • VITE_I18N_DEFAULT_LANG — Default language (e.g., en).
    • VITE_I18N_SUPPORTED_LANGS — Comma-separated list of languages (e.g., en,fi).
  • Map tiles (if applicable):
    • VITE_MAP_TILE_URL — Tile URL template for the map.
    • VITE_MAP_ATTRIBUTION — Attribution string for the tile provider.

Environment files:

  • Development: .env / .env.local
  • Production build: .env.prod

Notes for operators

  • Build metadata is generated by a pre-build script (generateBuildInfo.js) and can be surfaced in the UI to identify the running version.
  • A Dockerfile is provided to containerize the built static assets for deployment.

License

This project is licensed under the GPL-2.0 license. See the LICENSE file for details.

About

Vempain File Frontend component

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 3

  •  
  •  
  •