Skip to main content

Frontend Development

The Identity Frontend is built with Vue 3, Vuetify, and TypeScript, providing a modern authentication UI.

Technology Stack

  • Framework: Vue 3 (Composition API)
  • UI Library: Vuetify 3
  • Language: TypeScript
  • Build Tool: Vite
  • State Management: Pinia
  • HTTP Client: Axios

Project Structure

src/
├── components/ # Reusable Vue components
│ ├── auth/ # Authentication forms
│ ├── admin/ # Admin panel components
│ └── common/ # Shared components
├── views/ # Page-level views
│ ├── auth/ # Login, Register, 2FA pages
│ ├── admin/ # Admin dashboard pages
│ └── profile/ # User profile pages
├── router/ # Vue Router configuration
├── stores/ # Pinia stores
├── services/ # API service modules
├── composables/ # Vue composables
└── types/ # TypeScript type definitions

Key Views

ViewPathDescription
Login/loginEmail/password login form
Register/registerUser registration
2FA Verify/2fa/verifyTwo-factor authentication
Dashboard/dashboardUser dashboard
Admin Users/admin/usersUser management (admin)
Admin Tenants/admin/tenantsTenant management (admin)

Running Locally

# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build

Docker Build

The frontend uses a multi-stage Docker build:

  1. Builder stage: node:20-alpine - installs deps and builds with Vite
  2. Production stage: nginx:alpine - serves the static build output
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build

FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html

API Integration

The frontend communicates with the Identity Backend at:

  • Production: https://identity.vecton.hu/api
  • Development: http://localhost:8000/api

All API calls use Axios with automatic token management via Pinia stores.