Quper Web Application
The Quper web application is a modern, enterprise-grade observability dashboard built with Next.js 16 and React 19. It provides a comprehensive suite of tools for monitoring and optimizing Amazon Redshift clusters, managing costs, controlling access, and leveraging AI-powered insights.
Project Name
Application Architecture
The application follows Next.js App Router conventions with a clear separation between public authentication routes and protected dashboard routes. The root layout wraps the entire application with Auth0 authentication and Sonner toast notifications.
/ → Redirects to /auth/sign-in
/auth/sign-in → Email/password login
/auth/sign-up → Account creation
/auth/create-tenant → Tenant onboarding
/auth/send-otp → OTP-based password reset
/auth/sso-callback → Auth0 OAuth callback
/(dashboard)/ → Protected routes (requires auth)
/cost-and-usage → FinOps analytics module
/redshift-health → Cluster health module
/identity-and-access-management → IAM module
/monitoring → Alerting module
/vidura → AI chat moduleTech Stack
Design System
The application uses a sophisticated OKLCH-based color system with full dark mode support via next-themes. Colors are defined as CSS variables and toggled using Tailwind's dark: class prefix.
Color Tokens
| Token | Light Mode | Dark Mode |
|---|---|---|
| background | oklch(1 0 0) — pure white | oklch(0.145 0 0) — very dark navy |
| foreground | oklch(0.145 0 0) — near black | oklch(0.985 0 0) — near white |
| primary | oklch(0.205 0 0) — dark navy | oklch(0.922 0 0) — light gray |
| card | oklch(1 0 0) — white | oklch(0.205 0 0) — dark card |
| border | oklch(0.922 0 0) — light gray | oklch(1 0 0 / 10%) — subtle white |
| destructive | oklch(0.577 0.245 27.3) — red | oklch(0.704 0.191 22.2) — lighter red |
| sidebar | oklch(0.985 0 0) | dark navy |
Typography
The application uses Geist Sans (by Vercel) as the primary typeface and Geist Mono for code blocks, both loaded via Next.js font optimization.
Gradient Sidebar Pills
Active sidebar navigation items feature an animated gradient pill indicator using linear-gradient(90deg, #6366f1, #06b6d4, #10b981) — indigo → cyan → emerald — with a 3-second CSS animation cycle.
Modules
Cost & Usage Analytics
Financial intelligence dashboards with unit cost analysis, trend visualization, and optimization recommendations.
Redshift Health
Cluster health monitoring, query performance analysis, table statistics, and live query tracking.
Identity & Access Management
Multi-tenant RBAC with user, group, role, environment, and permission management.
Monitoring & Alerting
Real-time alert rules, multi-stage escalation policies, and notification channel integrations.
Vidura AI
AI-powered chat interface for analytics insights with persistent session management.
Authentication Flow
The application supports three authentication methods:
- Email/Password — Direct credential authentication with JWT tokens stored in cookies
- SSO via Auth0 — OAuth2 flow with Auth0 as the identity provider, supporting enterprise SSO
- OTP Password Reset — Time-based OTP sent via email for password recovery
Upon successful authentication, the middleware validates the JWT token and routes the user to the appropriate tenant workspace. The SchemaContext stores the selected Redshift schema globally so all dashboard modules use the same database context.
Data Fetching Pattern
// Standard API response structure
type ApiResponse<T> = {
success: boolean;
data?: T;
error?: string;
};
// Server action example (cost-and-usage)
async function fetchCostTrends(
params: CostFilterParams
): Promise<ApiResponse<CostTrend[]>> {
try {
const response = await axios.get('/api/finops/trends', { params });
return { success: true, data: response.data };
} catch (error) {
return { success: false, error: 'Failed to fetch cost trends' };
}
}