An elegant, robust, and highly secure multi-page Enterprise Dashboard SaaS application. Built with Vue 3 (Composition API), TypeScript, Vite, Tailwind CSS v4, Pinia, Radix Vue, and fully tested using Vitest on a robust virtual environment.
The application follows a clean, decoupled, full-stack ready architecture. The client-side is a high-performance Single Page Application (SPA) structured with reactive state management, validation layers, dynamic routing guards, and modular composables.
ββββββββββββββββββββββββββββββββββββββββββ
β Web Browser β
β (Iframe or Standalone Tab Viewport) β
ββββββββββββββββββββ¬ββββββββββββββββββββββ
β
[HTTPS / WS (HMR Disabled)]
β
βΌ
ββββββββββββββββββββββββββββββββββββββββββ
β Vite Server (Port 3000) β
β - Handles Asset Resolution β
β - Proxies '/api' -> Port 8000 β
ββββββββββββββββββββ¬ββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Vue 3 Client Engine β
β β
β βββββββββββββββββββββββββ βββββββββββββββββββββββββ βββββββββββββββββββ β
β β Vue Router β β Pinia Store β β Vee-Validate β β
β β - Navigation Guards β β - Global State β β - Form Schema β β
β β - Route Protection β β - Auth state ('auth')β β - Validation β β
β ββββββββββββ¬βββββββββββββ βββββββββββββ¬ββββββββββββ ββββββββββ¬βββββββββ β
β β β β β
β βΌ βΌ βΌ β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Pages & Views β β
β β - Auth: Login, Register, VerifyEmail β β
β β - Dashboard: Analytics (Data Tables & Charts), Home, Profile β β
β ββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββ β
β β β
β βΌ β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Custom UI System β β
β β - Radix Vue primitives (Tabs, Dropdowns) β β
β β - Tailwind CSS v4 styling system β β
β β - Modular animations via Motion One β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
src/
βββ __tests__/ # Multi-layer testing suite
β βββ unit/ # Store & helper logic validation
β βββ components/ # UI rendered template & interaction tests
β βββ e2e/ # Simulated client-side router navigation flows
βββ components/ # Highly decoupled custom components
β βββ ui/ # Radix Vue primitives + Tailwind-wrapped reusable components
βββ composables/ # Business logic encapsulated in reactive hook modules
βββ layouts/ # Global page wrapping structures (e.g. DashboardLayout.vue)
βββ lib/ # Clean core functions & standard helper integrations
βββ router/ # Vue Router instantiation & route-protection guards
βββ stores/ # Pinia state engines (Auth & user sessions)
βββ views/ # View layer matching specified routes (Auth & Dashboard)
- Decoupled Auth State: Backed by a Pinia store (
auth.ts) which manages login statuses, authenticated user attributes, and state persistence. - Secure Helper Modules: Utilizes custom browser helper scripts (
authHelpers.ts) to manage tokens, parse JWT properties, handle mock authorizations, and safely expire authentication tokens. - Form Validation: Forms (Login, Registration, etc.) are built with
vee-validateto enforce robust field criteria (email patterns, password lengths, standard entries) dynamically. - Dynamic Route Protection: Navigational Guards dynamically inspect credentials. Unauthenticated users seeking to view dashboard features (such as
/profileor/analytics) are gracefully redirected to/login, while already logged-in users are redirected away from login screens back to their active session dashboard.
- SVG-powered Charts: Modular SVG renderings that provide accurate visual telemetry of system resources, server usage, active sessions, and core SaaS indicators.
- Responsive Data Tables: Detailed grids listing user accounts, statuses, countries, and action items, optimized for desktop and mobile viewport ratios.
- Dynamic Data Filters: Filter through data elements to visualize changes in real-time, matching standard SaaS metrics tools.
- Decoupled Tab Layouts: Leverages custom Radix Vue structures (
Tabs,TabsList,TabsTrigger,TabsContent) to organize profile sections cleanly into:- General: Pre-populated profile edits including names, email addresses, and contact parameters.
- Security: Interactive password resets containing password strength checkers and reactive requirement checkmarks.
- Notifications: High-contrast toggles configuring newsletter updates, alerts, and system telemetry reporting.
- International Phone Inputs: Seamlessly integrated with
intl-tel-inputfeaturing fully searchable country dials, flag icons, and area-specific auto-formatting. - Password Strength Meter: A reactive checklist testing uppercase letters, lowercase letters, numbers, and special characters. It grades input strings into
EmptyβWeakβMediumβStrongclassifications with responsive background meter states.
- Tailwind CSS v4 Integration: Uses the newest
@tailwindcss/viteengine inside Vite config to manage styling dynamically. - High Contrast Layouts: Soft off-whites, neutral deep charcoal grays, crisp text, and clean negative space to present an eye-safe, professional atmosphere.
- Smooth Motion & Transitions: Utilizes
motionand Vue transit blocks to handle subtle fade-ins, sliding panels, and hover feedback.
- Unified Tracing, Metrics, and Logs: Integrates a complete, standard OpenTelemetry (v2.x) client-side instrument framework initialized on startup (
otel.ts). - Automatic HTTP/Fetch Instrumentation: Automatically intercepts and traces all outgoing AJAX/HTTP request dependencies (
fetchandXMLHttpRequest) via auto-instrumentation packages. - Real-time Observability Fallbacks: Features active console exporters for traces, metrics (periodic reports), and logs, ensuring live developer feedback during local testing.
- Production OTLP Collectors ready: Supports seamless forwarding of traces, metrics, and logs to any compliant OpenTelemetry collector endpoint simply by defining
VITE_OTEL_EXPORTER_OTLP_ENDPOINTin your environment. - Declarative Helpers: Exposes global telemetry API helpers:
trackSpan(name, fn, attributes): Wrap critical function runs in active telemetry spans.logInfo(),logWarn(),logError(): Emit severity-aware logging telemetry.incrementCounter(name, value, description, attributes): Record business & system metrics (e.g., auth success/failure rates).
| Technology | Purpose |
|---|---|
| Vue 3 | Frontend framework using standard Composition API (Script Setup) |
| TypeScript | Type-safety, automated code intelligence, interfaces |
| Vite | Hyper-fast module bundler with custom HMR settings |
| Tailwind CSS v4 | CSS utility system for high-performance visual crafting |
| Pinia | Client state container supporting persistent storage |
| Radix Vue | Unstyled, fully accessible primitives for UI components |
| Vee-Validate | Declarative form validations and active schema matching |
| Vitest | Native Vite-powered unit and integration testing engine |
| Happy DOM | High-performance, lightweight browser emulator for tests |
| Lucide Vue Next | Crisp, lightweight, uniform vector iconography |
Make sure you have Node.js (v18 or higher) and npm installed on your machine.
Clone the repository and install all dependencies:
npm installLaunch the development server on the dedicated workspace port (3000):
npm run devOpen http://localhost:3000 in your browser to view the application.
Creates a highly optimized production build output inside the dist/ folder:
npm run buildReview the local build outputs locally before deployment:
npm run previewValidate codebase syntax, verify typescript compilations, and catch fatal errors:
npm run lintThis repository contains a robust, comprehensive testing suite powered by Vitest and Vue Test Utils, validating state, view logic, and route navigation.
To run the complete test suite:
npm run test- Unit Tests (
src/__tests__/unit/)authHelpers.spec.ts: Validates cookie parsing, token storage, deletion, JWT parsing safety, and session expiration calculation.authStore.spec.ts: Validates Pinia global auth states, verifying proper log-in credentials processing and session clears.otel.spec.ts: Verifies complete OpenTelemetry core utilities initialization, traces span creation, logs record emission, and metrics logging indicators.
- Component Tests (
src/__tests__/components/)Login.spec.ts: Tests the Login view rendering, validating fields, throwing form errors viavee-validate, mocking backend axios failures, and asserting successful redirect triggers.Profile.spec.ts: Flattens Radix Vue Tab Content wrappers to test General fields, invalid form updates, and password criteria strength checklists dynamically.
- Simulated End-to-End Tests (
src/__tests__/e2e/)authFlow.spec.ts: Validates complete routing and navigation guard security loops under a clean happy-dom environment, including:- Redirection of unauthenticated guest users attempting to view secure routes.
- Access permissions of logged-in sessions and redirection away from auth screens.
- Logout operations and clean route resets.
To configure custom global rules, development instructions, or custom AI actions for this project:
- Add configuration profiles inside the
AGENTS.mdorGEMINI.mdfiles at the workspace root. - These rules are dynamically loaded on developer runs to keep code standards perfect.