The Vue.js PWA client for EV Monitor β charging log management, vehicle tracking, WLTP data crowdsourcing, and statistics.
When working in this directory, adhere to these constraints:
- Framework: Vue 3 with Composition API β use
<script setup lang="ts">syntax - Build Tool: Vite (with
vite-plugin-pwafor PWA support) - TypeScript: Strict typing throughout
- Styling: Tailwind CSS v4
- Uses
@import "tailwindcss";insrc/index.css(NOT legacy@tailwinddirectives) - Config lives in
postcss.config.jsvia@tailwindcss/postcss - Do not use Tailwind v3
@applysyntax
- Uses
- State Management: Pinia
- HTTP Client: Axios with JWT interceptor (auto-attaches
Authorization: Bearerheader) - Routing: Vue Router with
requiresAuth/guestOnlyguards
- Node.js 20+
- npm
npm install
npm run devThe dev server starts at http://localhost:5173.
For API calls to work, the backend must be running on http://localhost:8080 (or use ./dev.sh from the root to start everything at once).
npm run buildOutput goes to dist/ β served by Nginx in production. Runs vue-tsc for type checking before bundling.
- Location Search: OpenStreetMap Nominatim API, debounced (300ms). Users can search or use GPS. Coordinates are sent to the backend which converts them to a geohash β exact GPS is never stored.
- WLTP Flow: When a user selects a car model, the frontend auto-lookups WLTP data. If none exists, an overlay prompts the user to contribute data and earn coins.
- Email Verification:
/verify-emailroute has no auth guard β must be accessible without a token. - OAuth2:
OAuth2RedirectHandler.vuehandles the callback and parses the JWT from the URL fragment.