AI Review Center
Commit Review Workspace ?
Select a commit on the left to inspect quality, security, business value, findings, and suggested code changes.
Project AI Score
?
72%
Quality Avg
?
77%
Security Avg
?
64%
Reviews
?
91
Review Result ?
solutionbowl/super-admin · a2550d8f
The initial commit provides extensive documentation for the Banner Module API with clear structure and examples, enhancing business value and maintainability. However, there is some room to improve documentation completeness and security guidance, especially around validation and error handling. No actual code accompanies this commit, limiting direct code quality or bug risk evaluation.
Quality
?
70%
Security
?
50%
Business Value
?
80%
Maintainability
?
75%
Issues & Suggested Fixes
?
1AI detects the issue
2Shows file, line, or evidence
3Suggests the fix to apply
Missing Validation
Where
BANNER_MODULE_COMPLETE_DOCUMENTATION.md:175-180
Issue / Evidence
missing validation requirements for each request field
Suggested Fix
add detailed validation rules to enhance quality and reduce bug risks
Isactive Field Described As String 'True'...
Where
BANNER_MODULE_COMPLETE_DOCUMENTATION.md:178
Issue / Evidence
isActive field described as string 'true' or 'false'
Suggested Fix
clarify if boolean is acceptable or validate input strictly to prevent bugs
Security Issue
Where
BANNER_MODULE_COMPLETE_DOCUMENTATION.md:25-33
Issue / Evidence
Authentication details are minimal
Suggested Fix
expand documentation to include token expiry handling and security best practices to improve security score
Non Descriptive Commit Message
Where
commit message
Issue / Evidence
non-descriptive commit message
Suggested Fix
use a more descriptive commit message to improve clarity and team collaboration
Code Change Preview · .nvmrc
?
Removed / Before Commit
- diff --git a/.nvmrc b/.nvmrc - new file mode 100644 - index 0000000..209e3ef
Added / After Commit
+ diff --git a/.nvmrc b/.nvmrc + new file mode 100644 + index 0000000..209e3ef + 20
Removed / Before Commit
- diff --git a/.prettierignore b/.prettierignore - new file mode 100644 - index 0000000..be49b26
Added / After Commit
+ diff --git a/.prettierignore b/.prettierignore + new file mode 100644 + index 0000000..be49b26 + node_modules + dist + .output + .vinxi + pnpm-lock.yaml + package-lock.json + bun.lock + routeTree.gen.ts
Removed / Before Commit
- diff --git a/.prettierrc b/.prettierrc - new file mode 100644 - index 0000000..90abee2
Added / After Commit
+ diff --git a/.prettierrc b/.prettierrc + new file mode 100644 + index 0000000..90abee2 + { + "printWidth": 100, + "semi": true, + "singleQuote": false, + "trailingComma": "all" + }
Removed / Before Commit
- diff --git a/BANNER_MODULE_COMPLETE_DOCUMENTATION.md b/BANNER_MODULE_COMPLETE_DOCUMENTATION.md - new file mode 100644 - index 0000000..661cacc - Production Ready
Added / After Commit
+ diff --git a/BANNER_MODULE_COMPLETE_DOCUMENTATION.md b/BANNER_MODULE_COMPLETE_DOCUMENTATION.md + new file mode 100644 + index 0000000..661cacc + # Banner Module - Complete Documentation + + ## 📋 Overview + + The Banner Module is a content management system for creating, editing, and managing promotional banners across different sections of the platform (Home, Casino, Sports, Racing). This module provides full CRUD operations with image upload capabilities. + + --- + + ## 🌠API Base Configuration + + | Configuration | Value | + |---------------|-------| + | **API Base URL** | `https://api.digitalbowls.com/tenant/api` | + | **Service Name** | `bannerService` | + | **Base Path** | `/banner` |
Removed / Before Commit
- diff --git a/bunfig.toml b/bunfig.toml - new file mode 100644 - index 0000000..a85c158
Added / After Commit
+ diff --git a/bunfig.toml b/bunfig.toml + new file mode 100644 + index 0000000..a85c158 + [install] + # 24h supply-chain guard: skip package versions published less than a day ago. + minimumReleaseAge = 86400 + # Each entry bypasses the 24h guard for one package — confirm with the user + # before adding any. + minimumReleaseAgeExcludes = ["@lovable.dev/vite-tanstack-config"]
Removed / Before Commit
- diff --git a/components.json b/components.json - new file mode 100644 - index 0000000..f0817a8
Added / After Commit
+ diff --git a/components.json b/components.json + new file mode 100644 + index 0000000..f0817a8 + { + "$schema": "https://ui.shadcn.com/schema.json", + "style": "new-york", + "rsc": false, + "tsx": true, + "tailwind": { + "css": "src/styles.css", + "baseColor": "slate", + "cssVariables": true, + "prefix": "" + }, + "iconLibrary": "lucide", + "rtl": false, + "aliases": { + "components": "@/components",
Removed / Before Commit
- diff --git a/eslint.config.js b/eslint.config.js - new file mode 100644 - index 0000000..be4075b
Added / After Commit
+ diff --git a/eslint.config.js b/eslint.config.js + new file mode 100644 + index 0000000..be4075b + import js from "@eslint/js"; + import eslintPluginPrettier from "eslint-plugin-prettier/recommended"; + import globals from "globals"; + import reactHooks from "eslint-plugin-react-hooks"; + import reactRefresh from "eslint-plugin-react-refresh"; + import tseslint from "typescript-eslint"; + + export default tseslint.config( + { ignores: ["dist", ".output", ".vinxi"] }, + { + extends: [js.configs.recommended, ...tseslint.configs.recommended], + files: ["**/*.{ts,tsx}"], + languageOptions: { + ecmaVersion: 2020, + globals: globals.browser,
Removed / Before Commit
- diff --git a/index.html b/index.html - new file mode 100644 - index 0000000..1c7e248
Added / After Commit
+ diff --git a/index.html b/index.html + new file mode 100644 + index 0000000..1c7e248 + <!doctype html> + <html lang="en"> + <head> + <meta charset="UTF-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <meta + name="description" + content="Premium Excel sheet automation and ledger management dashboard." + /> + <title>B2B-B2C Panel</title> + </head> + <body> + <div id="root"></div> + <script type="module" src="/src/main.tsx"></script> + </body>
Removed / Before Commit
- diff --git a/OWNER_LOGIN_API_DOCUMENTATION.md b/OWNER_LOGIN_API_DOCUMENTATION.md - new file mode 100644 - index 0000000..4c693c0 - Production Ready
Added / After Commit
+ diff --git a/OWNER_LOGIN_API_DOCUMENTATION.md b/OWNER_LOGIN_API_DOCUMENTATION.md + new file mode 100644 + index 0000000..4c693c0 + # Owner Login API Documentation + + ## 📋 Overview + + This document provides comprehensive documentation for the authentication APIs used in the B2B Panel, specifically focusing on the **Owner Login System** and **Platform Admin Login System**. This documentation is intended for developers integrating these APIs into new panels or applications. + + --- + + ## 🔠Authentication System Architecture + + The B2B Panel uses a **dual authentication system**: + + 1. **Firebase Authentication** (Legacy/Demo Mode) + - Used for development and testing + - Email/Password based authentication
Removed / Before Commit
- diff --git a/package-lock.json b/package-lock.json - new file mode 100644 - index 0000000..3184a71 - [Patch truncated before storage to avoid oversized database packets.]
Added / After Commit
+ diff --git a/package-lock.json b/package-lock.json + new file mode 100644 + index 0000000..3184a71 + { + "name": "b2b-b2c-panel", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "b2b-b2c-panel", + "dependencies": { + "@hookform/resolvers": "^5.2.2", + "@radix-ui/react-accordion": "^1.2.12", + "@radix-ui/react-alert-dialog": "^1.1.15", + "@radix-ui/react-aspect-ratio": "^1.1.8", + "@radix-ui/react-avatar": "^1.1.11", + "@radix-ui/react-checkbox": "^1.3.3", + "@radix-ui/react-collapsible": "^1.1.12",
Removed / Before Commit
- diff --git a/package.json b/package.json - new file mode 100644 - index 0000000..4aa3e60
Added / After Commit
+ diff --git a/package.json b/package.json + new file mode 100644 + index 0000000..4aa3e60 + { + "name": "b2b-b2c-panel", + "private": true, + "sideEffects": false, + "type": "module", + "engines": { + "node": ">=20.19.0" + }, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "build:dev": "vite build --mode development", + "preview": "vite preview", + "lint": "eslint .", + "format": "prettier --write ."
Removed / Before Commit
- diff --git a/src/components/app-sidebar.tsx b/src/components/app-sidebar.tsx - new file mode 100644 - index 0000000..8b68095
Added / After Commit
+ diff --git a/src/components/app-sidebar.tsx b/src/components/app-sidebar.tsx + new file mode 100644 + index 0000000..8b68095 + import { useState } from "react"; + import { Link, useRouterState } from "@tanstack/react-router"; + import { + LayoutDashboard, + ArrowLeftRight, + ListChecks, + ShieldAlert, + BarChart3, + Wallet, + Megaphone, + Ban, + ChevronDown, + Sparkles, + FileSpreadsheet, + Ticket,
Removed / Before Commit
- diff --git a/src/components/marquee-banner.tsx b/src/components/marquee-banner.tsx - new file mode 100644 - index 0000000..e989844
Added / After Commit
+ diff --git a/src/components/marquee-banner.tsx b/src/components/marquee-banner.tsx + new file mode 100644 + index 0000000..e989844 + import { cn } from "@/lib/utils"; + + interface MarqueeBannerProps { + text?: string; + className?: string; + } + + export function MarqueeBanner({ + text = "Welcome to the team", + className, + }: MarqueeBannerProps) { + return ( + <div + className={cn( + "overflow-hidden bg-gradient-to-r from-blue-900/15 to-sky-500/15 py-2",
Removed / Before Commit
- diff --git a/src/components/page-placeholder.tsx b/src/components/page-placeholder.tsx - new file mode 100644 - index 0000000..3600ac8
Added / After Commit
+ diff --git a/src/components/page-placeholder.tsx b/src/components/page-placeholder.tsx + new file mode 100644 + index 0000000..3600ac8 + import { Card } from "@/components/ui/card"; + import { Construction } from "lucide-react"; + + export function PagePlaceholder({ title, description }: { title: string; description: string }) { + return ( + <div className="space-y-6"> + <div> + <h1 className="text-2xl font-semibold tracking-tight md:text-3xl">{title}</h1> + <p className="mt-1 text-sm text-muted-foreground">{description}</p> + </div> + <Card className="flex flex-col items-center justify-center gap-3 rounded-2xl border-dashed border-border/70 bg-card/60 p-16 text-center shadow-elegant"> + <div className="flex h-14 w-14 items-center justify-center rounded-2xl bg-primary-soft text-primary"> + <Construction className="h-6 w-6" /> + </div> + <h3 className="text-lg font-semibold">Coming soon</h3>
Removed / Before Commit
- diff --git a/src/components/recent-files-table.tsx b/src/components/recent-files-table.tsx - new file mode 100644 - index 0000000..55e3720
Added / After Commit
+ diff --git a/src/components/recent-files-table.tsx b/src/components/recent-files-table.tsx + new file mode 100644 + index 0000000..55e3720 + import { useMemo, useState } from "react"; + import { + ChevronLeft, + ChevronRight, + Download, + Filter, + MoreHorizontal, + Search, + FileSpreadsheet, + } from "lucide-react"; + import { Card } from "@/components/ui/card"; + import { Input } from "@/components/ui/input"; + import { Button } from "@/components/ui/button"; + import { Badge } from "@/components/ui/badge"; + import {
Removed / Before Commit
- diff --git a/src/components/theme-provider.tsx b/src/components/theme-provider.tsx - new file mode 100644 - index 0000000..59e6398
Added / After Commit
+ diff --git a/src/components/theme-provider.tsx b/src/components/theme-provider.tsx + new file mode 100644 + index 0000000..59e6398 + import { createContext, useContext, useEffect, useState } from "react"; + + type Theme = "light" | "dark"; + + interface ThemeContextValue { + theme: Theme; + toggleTheme: () => void; + setTheme: (t: Theme) => void; + } + + const ThemeContext = createContext<ThemeContextValue | undefined>(undefined); + + export function ThemeProvider({ children }: { children: React.ReactNode }) { + const [theme, setThemeState] = useState<Theme>("light"); +
Removed / Before Commit
- diff --git a/src/components/top-navbar.tsx b/src/components/top-navbar.tsx - new file mode 100644 - index 0000000..e8e1453
Added / After Commit
+ diff --git a/src/components/top-navbar.tsx b/src/components/top-navbar.tsx + new file mode 100644 + index 0000000..e8e1453 + import { useEffect, useState } from "react"; + import { ChevronDown, LogOut, User, Settings as SettingsIcon, Clock, Globe } from "lucide-react"; + import { Button } from "@/components/ui/button"; + import { SidebarTrigger } from "@/components/ui/sidebar"; + import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuLabel, + DropdownMenuSeparator, + DropdownMenuTrigger, + } from "@/components/ui/dropdown-menu"; + import { Avatar, AvatarFallback } from "@/components/ui/avatar"; + import { useAuth } from "@/hooks/useAuth"; +
Removed / Before Commit
- diff --git a/src/components/ui/accordion.tsx b/src/components/ui/accordion.tsx - new file mode 100644 - index 0000000..16ee900
Added / After Commit
+ diff --git a/src/components/ui/accordion.tsx b/src/components/ui/accordion.tsx + new file mode 100644 + index 0000000..16ee900 + import * as React from "react"; + import * as AccordionPrimitive from "@radix-ui/react-accordion"; + import { ChevronDown } from "lucide-react"; + + import { cn } from "@/lib/utils"; + + const Accordion = AccordionPrimitive.Root; + + const AccordionItem = React.forwardRef< + React.ElementRef<typeof AccordionPrimitive.Item>, + React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item> + >(({ className, ...props }, ref) => ( + <AccordionPrimitive.Item ref={ref} className={cn("border-b", className)} {...props} /> + )); + AccordionItem.displayName = "AccordionItem";
Removed / Before Commit
- diff --git a/src/components/ui/alert-dialog.tsx b/src/components/ui/alert-dialog.tsx - new file mode 100644 - index 0000000..072a665
Added / After Commit
+ diff --git a/src/components/ui/alert-dialog.tsx b/src/components/ui/alert-dialog.tsx + new file mode 100644 + index 0000000..072a665 + import * as React from "react"; + import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"; + + import { cn } from "@/lib/utils"; + import { buttonVariants } from "@/components/ui/button"; + + const AlertDialog = AlertDialogPrimitive.Root; + + const AlertDialogTrigger = AlertDialogPrimitive.Trigger; + + const AlertDialogPortal = AlertDialogPrimitive.Portal; + + const AlertDialogOverlay = React.forwardRef< + React.ElementRef<typeof AlertDialogPrimitive.Overlay>, + React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>
Removed / Before Commit
- diff --git a/src/components/ui/alert.tsx b/src/components/ui/alert.tsx - new file mode 100644 - index 0000000..cd0a062
Added / After Commit
+ diff --git a/src/components/ui/alert.tsx b/src/components/ui/alert.tsx + new file mode 100644 + index 0000000..cd0a062 + import * as React from "react"; + import { cva, type VariantProps } from "class-variance-authority"; + + import { cn } from "@/lib/utils"; + + const alertVariants = cva( + "relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7", + { + variants: { + variant: { + default: "bg-background text-foreground", + destructive: + "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive", + }, + },
Removed / Before Commit
- diff --git a/src/components/ui/aspect-ratio.tsx b/src/components/ui/aspect-ratio.tsx - new file mode 100644 - index 0000000..c9e6f4b
Added / After Commit
+ diff --git a/src/components/ui/aspect-ratio.tsx b/src/components/ui/aspect-ratio.tsx + new file mode 100644 + index 0000000..c9e6f4b + import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio"; + + const AspectRatio = AspectRatioPrimitive.Root; + + export { AspectRatio };
Removed / Before Commit
- diff --git a/src/components/ui/avatar.tsx b/src/components/ui/avatar.tsx - new file mode 100644 - index 0000000..7904926
Added / After Commit
+ diff --git a/src/components/ui/avatar.tsx b/src/components/ui/avatar.tsx + new file mode 100644 + index 0000000..7904926 + "use client"; + + import * as React from "react"; + import * as AvatarPrimitive from "@radix-ui/react-avatar"; + + import { cn } from "@/lib/utils"; + + const Avatar = React.forwardRef< + React.ElementRef<typeof AvatarPrimitive.Root>, + React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root> + >(({ className, ...props }, ref) => ( + <AvatarPrimitive.Root + ref={ref} + className={cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className)} + {...props}
Removed / Before Commit
- diff --git a/src/components/ui/badge.tsx b/src/components/ui/badge.tsx - new file mode 100644 - index 0000000..3aabd17
Added / After Commit
+ diff --git a/src/components/ui/badge.tsx b/src/components/ui/badge.tsx + new file mode 100644 + index 0000000..3aabd17 + import * as React from "react"; + import { cva, type VariantProps } from "class-variance-authority"; + + import { cn } from "@/lib/utils"; + + const badgeVariants = cva( + "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", + { + variants: { + variant: { + default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80", + secondary: + "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80", + destructive: + "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
Removed / Before Commit
- diff --git a/src/components/ui/breadcrumb.tsx b/src/components/ui/breadcrumb.tsx - new file mode 100644 - index 0000000..94eb629
Added / After Commit
+ diff --git a/src/components/ui/breadcrumb.tsx b/src/components/ui/breadcrumb.tsx + new file mode 100644 + index 0000000..94eb629 + import * as React from "react"; + import { Slot } from "@radix-ui/react-slot"; + import { ChevronRight, MoreHorizontal } from "lucide-react"; + + import { cn } from "@/lib/utils"; + + const Breadcrumb = React.forwardRef< + HTMLElement, + React.ComponentPropsWithoutRef<"nav"> & { + separator?: React.ReactNode; + } + >(({ ...props }, ref) => <nav ref={ref} aria-label="breadcrumb" {...props} />); + Breadcrumb.displayName = "Breadcrumb"; + + const BreadcrumbList = React.forwardRef<HTMLOListElement, React.ComponentPropsWithoutRef<"ol">>(
Removed / Before Commit
- diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx - new file mode 100644 - index 0000000..bc3bc9f
Added / After Commit
+ diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx + new file mode 100644 + index 0000000..bc3bc9f + import * as React from "react"; + import { Slot } from "@radix-ui/react-slot"; + import { cva, type VariantProps } from "class-variance-authority"; + + import { cn } from "@/lib/utils"; + + const buttonVariants = cva( + "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", + { + variants: { + variant: { + default: "bg-primary text-primary-foreground shadow hover:bg-primary/90", + destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90", + outline: + "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
Removed / Before Commit
- diff --git a/src/components/ui/calendar.tsx b/src/components/ui/calendar.tsx - new file mode 100644 - index 0000000..781f885
Added / After Commit
+ diff --git a/src/components/ui/calendar.tsx b/src/components/ui/calendar.tsx + new file mode 100644 + index 0000000..781f885 + "use client"; + + import * as React from "react"; + import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from "lucide-react"; + import { DayButton, DayPicker, getDefaultClassNames } from "react-day-picker"; + + import { cn } from "@/lib/utils"; + import { Button, buttonVariants } from "@/components/ui/button"; + + function Calendar({ + className, + classNames, + showOutsideDays = true, + captionLayout = "label", + buttonVariant = "ghost",
Removed / Before Commit
- diff --git a/src/components/ui/card.tsx b/src/components/ui/card.tsx - new file mode 100644 - index 0000000..d886b02
Added / After Commit
+ diff --git a/src/components/ui/card.tsx b/src/components/ui/card.tsx + new file mode 100644 + index 0000000..d886b02 + import * as React from "react"; + + import { cn } from "@/lib/utils"; + + const Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>( + ({ className, ...props }, ref) => ( + <div + ref={ref} + className={cn("rounded-xl border bg-card text-card-foreground shadow", className)} + {...props} + /> + ), + ); + Card.displayName = "Card"; +
Removed / Before Commit
- diff --git a/src/components/ui/carousel.tsx b/src/components/ui/carousel.tsx - new file mode 100644 - index 0000000..5dd7455
Added / After Commit
+ diff --git a/src/components/ui/carousel.tsx b/src/components/ui/carousel.tsx + new file mode 100644 + index 0000000..5dd7455 + import * as React from "react"; + import useEmblaCarousel, { type UseEmblaCarouselType } from "embla-carousel-react"; + import { ArrowLeft, ArrowRight } from "lucide-react"; + + import { cn } from "@/lib/utils"; + import { Button } from "@/components/ui/button"; + + type CarouselApi = UseEmblaCarouselType[1]; + type UseCarouselParameters = Parameters<typeof useEmblaCarousel>; + type CarouselOptions = UseCarouselParameters[0]; + type CarouselPlugin = UseCarouselParameters[1]; + + type CarouselProps = { + opts?: CarouselOptions; + plugins?: CarouselPlugin;
Removed / Before Commit
- diff --git a/src/components/ui/chart.tsx b/src/components/ui/chart.tsx - new file mode 100644 - index 0000000..f27e7ca
Added / After Commit
+ diff --git a/src/components/ui/chart.tsx b/src/components/ui/chart.tsx + new file mode 100644 + index 0000000..f27e7ca + import * as React from "react"; + import * as RechartsPrimitive from "recharts"; + + import { cn } from "@/lib/utils"; + + // Format: { THEME_NAME: CSS_SELECTOR } + const THEMES = { light: "", dark: ".dark" } as const; + + export type ChartConfig = { + [k in string]: { + label?: React.ReactNode; + icon?: React.ComponentType; + } & ( + | { color?: string; theme?: never } + | { color?: never; theme: Record<keyof typeof THEMES, string> }
Removed / Before Commit
- diff --git a/src/components/ui/checkbox.tsx b/src/components/ui/checkbox.tsx - new file mode 100644 - index 0000000..f01d47c
Added / After Commit
+ diff --git a/src/components/ui/checkbox.tsx b/src/components/ui/checkbox.tsx + new file mode 100644 + index 0000000..f01d47c + import * as React from "react"; + import * as CheckboxPrimitive from "@radix-ui/react-checkbox"; + import { Check } from "lucide-react"; + + import { cn } from "@/lib/utils"; + + const Checkbox = React.forwardRef< + React.ElementRef<typeof CheckboxPrimitive.Root>, + React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root> + >(({ className, ...props }, ref) => ( + <CheckboxPrimitive.Root + ref={ref} + className={cn( + "grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow cursor-pointer focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", + className,
Removed / Before Commit
- diff --git a/src/components/ui/collapsible.tsx b/src/components/ui/collapsible.tsx - new file mode 100644 - index 0000000..cb003d1
Added / After Commit
+ diff --git a/src/components/ui/collapsible.tsx b/src/components/ui/collapsible.tsx + new file mode 100644 + index 0000000..cb003d1 + "use client"; + + import * as CollapsiblePrimitive from "@radix-ui/react-collapsible"; + + const Collapsible = CollapsiblePrimitive.Root; + + const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger; + + const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent; + + export { Collapsible, CollapsibleTrigger, CollapsibleContent };
Removed / Before Commit
- diff --git a/src/components/ui/command.tsx b/src/components/ui/command.tsx - new file mode 100644 - index 0000000..dc859d7
Added / After Commit
+ diff --git a/src/components/ui/command.tsx b/src/components/ui/command.tsx + new file mode 100644 + index 0000000..dc859d7 + "use client"; + + import * as React from "react"; + import { type DialogProps } from "@radix-ui/react-dialog"; + import { Command as CommandPrimitive } from "cmdk"; + import { Search } from "lucide-react"; + + import { cn } from "@/lib/utils"; + import { Dialog, DialogContent } from "@/components/ui/dialog"; + + const Command = React.forwardRef< + React.ElementRef<typeof CommandPrimitive>, + React.ComponentPropsWithoutRef<typeof CommandPrimitive> + >(({ className, ...props }, ref) => ( + <CommandPrimitive
Removed / Before Commit
- diff --git a/src/components/ui/context-menu.tsx b/src/components/ui/context-menu.tsx - new file mode 100644 - index 0000000..bad5ece
Added / After Commit
+ diff --git a/src/components/ui/context-menu.tsx b/src/components/ui/context-menu.tsx + new file mode 100644 + index 0000000..bad5ece + import * as React from "react"; + import * as ContextMenuPrimitive from "@radix-ui/react-context-menu"; + import { Check, ChevronRight, Circle } from "lucide-react"; + + import { cn } from "@/lib/utils"; + + const ContextMenu = ContextMenuPrimitive.Root; + + const ContextMenuTrigger = ContextMenuPrimitive.Trigger; + + const ContextMenuGroup = ContextMenuPrimitive.Group; + + const ContextMenuPortal = ContextMenuPrimitive.Portal; + + const ContextMenuSub = ContextMenuPrimitive.Sub;
Removed / Before Commit
- diff --git a/src/components/ui/dialog.tsx b/src/components/ui/dialog.tsx - new file mode 100644 - index 0000000..8ed559e
Added / After Commit
+ diff --git a/src/components/ui/dialog.tsx b/src/components/ui/dialog.tsx + new file mode 100644 + index 0000000..8ed559e + "use client"; + + import * as React from "react"; + import * as DialogPrimitive from "@radix-ui/react-dialog"; + import { X } from "lucide-react"; + + import { cn } from "@/lib/utils"; + + const Dialog = DialogPrimitive.Root; + + const DialogTrigger = DialogPrimitive.Trigger; + + const DialogPortal = DialogPrimitive.Portal; + + const DialogClose = DialogPrimitive.Close;
Removed / Before Commit
- diff --git a/src/components/ui/drawer.tsx b/src/components/ui/drawer.tsx - new file mode 100644 - index 0000000..33533cc
Added / After Commit
+ diff --git a/src/components/ui/drawer.tsx b/src/components/ui/drawer.tsx + new file mode 100644 + index 0000000..33533cc + import * as React from "react"; + import { Drawer as DrawerPrimitive } from "vaul"; + + import { cn } from "@/lib/utils"; + + const Drawer = ({ + shouldScaleBackground = true, + ...props + }: React.ComponentProps<typeof DrawerPrimitive.Root>) => ( + <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} /> + ); + Drawer.displayName = "Drawer"; + + const DrawerTrigger = DrawerPrimitive.Trigger; +
Removed / Before Commit
- diff --git a/src/components/ui/dropdown-menu.tsx b/src/components/ui/dropdown-menu.tsx - new file mode 100644 - index 0000000..f11da93
Added / After Commit
+ diff --git a/src/components/ui/dropdown-menu.tsx b/src/components/ui/dropdown-menu.tsx + new file mode 100644 + index 0000000..f11da93 + "use client"; + + import * as React from "react"; + import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"; + import { Check, ChevronRight, Circle } from "lucide-react"; + + import { cn } from "@/lib/utils"; + + const DropdownMenu = DropdownMenuPrimitive.Root; + + const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger; + + const DropdownMenuGroup = DropdownMenuPrimitive.Group; + + const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
Removed / Before Commit
- diff --git a/src/components/ui/form.tsx b/src/components/ui/form.tsx - new file mode 100644 - index 0000000..4d15828
Added / After Commit
+ diff --git a/src/components/ui/form.tsx b/src/components/ui/form.tsx + new file mode 100644 + index 0000000..4d15828 + import * as React from "react"; + import * as LabelPrimitive from "@radix-ui/react-label"; + import { Slot } from "@radix-ui/react-slot"; + import { + Controller, + FormProvider, + useFormContext, + type ControllerProps, + type FieldPath, + type FieldValues, + } from "react-hook-form"; + + import { cn } from "@/lib/utils"; + import { Label } from "@/components/ui/label"; +
Removed / Before Commit
- diff --git a/src/components/ui/hover-card.tsx b/src/components/ui/hover-card.tsx - new file mode 100644 - index 0000000..36f3b79
Added / After Commit
+ diff --git a/src/components/ui/hover-card.tsx b/src/components/ui/hover-card.tsx + new file mode 100644 + index 0000000..36f3b79 + import * as React from "react"; + import * as HoverCardPrimitive from "@radix-ui/react-hover-card"; + + import { cn } from "@/lib/utils"; + + const HoverCard = HoverCardPrimitive.Root; + + const HoverCardTrigger = HoverCardPrimitive.Trigger; + + const HoverCardContent = React.forwardRef< + React.ElementRef<typeof HoverCardPrimitive.Content>, + React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content> + >(({ className, align = "center", sideOffset = 4, ...props }, ref) => ( + <HoverCardPrimitive.Content + ref={ref}
Removed / Before Commit
- diff --git a/src/components/ui/input-otp.tsx b/src/components/ui/input-otp.tsx - new file mode 100644 - index 0000000..95d1f4c
Added / After Commit
+ diff --git a/src/components/ui/input-otp.tsx b/src/components/ui/input-otp.tsx + new file mode 100644 + index 0000000..95d1f4c + import * as React from "react"; + import { OTPInput, OTPInputContext } from "input-otp"; + import { Minus } from "lucide-react"; + + import { cn } from "@/lib/utils"; + + const InputOTP = React.forwardRef< + React.ElementRef<typeof OTPInput>, + React.ComponentPropsWithoutRef<typeof OTPInput> + >(({ className, containerClassName, ...props }, ref) => ( + <OTPInput + ref={ref} + containerClassName={cn( + "flex items-center gap-2 has-[:disabled]:opacity-50", + containerClassName,
Removed / Before Commit
- diff --git a/src/components/ui/input.tsx b/src/components/ui/input.tsx - new file mode 100644 - index 0000000..7db5241
Added / After Commit
+ diff --git a/src/components/ui/input.tsx b/src/components/ui/input.tsx + new file mode 100644 + index 0000000..7db5241 + import * as React from "react"; + + import { cn } from "@/lib/utils"; + + const Input = React.forwardRef<HTMLInputElement, React.ComponentProps<"input">>( + ({ className, type, ...props }, ref) => { + return ( + <input + type={type} + className={cn( + "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", + className, + )} + ref={ref} + {...props}
Removed / Before Commit
- diff --git a/src/components/ui/label.tsx b/src/components/ui/label.tsx - new file mode 100644 - index 0000000..392197c
Added / After Commit
+ diff --git a/src/components/ui/label.tsx b/src/components/ui/label.tsx + new file mode 100644 + index 0000000..392197c + "use client"; + + import * as React from "react"; + import * as LabelPrimitive from "@radix-ui/react-label"; + import { cva, type VariantProps } from "class-variance-authority"; + + import { cn } from "@/lib/utils"; + + const labelVariants = cva( + "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", + ); + + const Label = React.forwardRef< + React.ElementRef<typeof LabelPrimitive.Root>, + React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> & VariantProps<typeof labelVariants>
Removed / Before Commit
- diff --git a/src/components/ui/menubar.tsx b/src/components/ui/menubar.tsx - new file mode 100644 - index 0000000..5c9eb98
Added / After Commit
+ diff --git a/src/components/ui/menubar.tsx b/src/components/ui/menubar.tsx + new file mode 100644 + index 0000000..5c9eb98 + import * as React from "react"; + import * as MenubarPrimitive from "@radix-ui/react-menubar"; + import { Check, ChevronRight, Circle } from "lucide-react"; + + import { cn } from "@/lib/utils"; + + function MenubarMenu({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Menu>) { + return <MenubarPrimitive.Menu {...props} />; + } + + function MenubarGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Group>) { + return <MenubarPrimitive.Group {...props} />; + } + + function MenubarPortal({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Portal>) {
Removed / Before Commit
- diff --git a/src/components/ui/navigation-menu.tsx b/src/components/ui/navigation-menu.tsx - new file mode 100644 - index 0000000..94b2ecc
Added / After Commit
+ diff --git a/src/components/ui/navigation-menu.tsx b/src/components/ui/navigation-menu.tsx + new file mode 100644 + index 0000000..94b2ecc + import * as React from "react"; + import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu"; + import { cva } from "class-variance-authority"; + import { ChevronDown } from "lucide-react"; + + import { cn } from "@/lib/utils"; + + const NavigationMenu = React.forwardRef< + React.ElementRef<typeof NavigationMenuPrimitive.Root>, + React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root> + >(({ className, children, ...props }, ref) => ( + <NavigationMenuPrimitive.Root + ref={ref} + className={cn("relative z-10 flex max-w-max flex-1 items-center justify-center", className)} + {...props}
Removed / Before Commit
- diff --git a/src/components/ui/pagination.tsx b/src/components/ui/pagination.tsx - new file mode 100644 - index 0000000..f8cd41f
Added / After Commit
+ diff --git a/src/components/ui/pagination.tsx b/src/components/ui/pagination.tsx + new file mode 100644 + index 0000000..f8cd41f + import * as React from "react"; + import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react"; + + import { cn } from "@/lib/utils"; + import { ButtonProps, buttonVariants } from "@/components/ui/button"; + + const Pagination = ({ className, ...props }: React.ComponentProps<"nav">) => ( + <nav + role="navigation" + aria-label="pagination" + className={cn("mx-auto flex w-full justify-center", className)} + {...props} + /> + ); + Pagination.displayName = "Pagination";
Removed / Before Commit
- diff --git a/src/components/ui/popover.tsx b/src/components/ui/popover.tsx - new file mode 100644 - index 0000000..dc78a20
Added / After Commit
+ diff --git a/src/components/ui/popover.tsx b/src/components/ui/popover.tsx + new file mode 100644 + index 0000000..dc78a20 + import * as React from "react"; + import * as PopoverPrimitive from "@radix-ui/react-popover"; + + import { cn } from "@/lib/utils"; + + const Popover = PopoverPrimitive.Root; + + const PopoverTrigger = PopoverPrimitive.Trigger; + + const PopoverAnchor = PopoverPrimitive.Anchor; + + const PopoverContent = React.forwardRef< + React.ElementRef<typeof PopoverPrimitive.Content>, + React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> + >(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
Removed / Before Commit
- diff --git a/src/components/ui/progress.tsx b/src/components/ui/progress.tsx - new file mode 100644 - index 0000000..1741cd2
Added / After Commit
+ diff --git a/src/components/ui/progress.tsx b/src/components/ui/progress.tsx + new file mode 100644 + index 0000000..1741cd2 + "use client"; + + import * as React from "react"; + import * as ProgressPrimitive from "@radix-ui/react-progress"; + + import { cn } from "@/lib/utils"; + + const Progress = React.forwardRef< + React.ElementRef<typeof ProgressPrimitive.Root>, + React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root> + >(({ className, value, ...props }, ref) => ( + <ProgressPrimitive.Root + ref={ref} + className={cn("relative h-2 w-full overflow-hidden rounded-full bg-primary/20", className)} + {...props}
Removed / Before Commit
- diff --git a/src/components/ui/radio-group.tsx b/src/components/ui/radio-group.tsx - new file mode 100644 - index 0000000..38a1a66
Added / After Commit
+ diff --git a/src/components/ui/radio-group.tsx b/src/components/ui/radio-group.tsx + new file mode 100644 + index 0000000..38a1a66 + import * as React from "react"; + import * as RadioGroupPrimitive from "@radix-ui/react-radio-group"; + import { Circle } from "lucide-react"; + + import { cn } from "@/lib/utils"; + + const RadioGroup = React.forwardRef< + React.ElementRef<typeof RadioGroupPrimitive.Root>, + React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root> + >(({ className, ...props }, ref) => { + return <RadioGroupPrimitive.Root className={cn("grid gap-2", className)} {...props} ref={ref} />; + }); + RadioGroup.displayName = RadioGroupPrimitive.Root.displayName; + + const RadioGroupItem = React.forwardRef<
Removed / Before Commit
- diff --git a/src/components/ui/resizable.tsx b/src/components/ui/resizable.tsx - new file mode 100644 - index 0000000..02e9460
Added / After Commit
+ diff --git a/src/components/ui/resizable.tsx b/src/components/ui/resizable.tsx + new file mode 100644 + index 0000000..02e9460 + import { GripVertical } from "lucide-react"; + import { Group, Panel, Separator } from "react-resizable-panels"; + + import { cn } from "@/lib/utils"; + + const ResizablePanelGroup = ({ className, ...props }: React.ComponentProps<typeof Group>) => ( + <Group + className={cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", className)} + {...props} + /> + ); + + const ResizablePanel = Panel; + + const ResizableHandle = ({
Removed / Before Commit
- diff --git a/src/components/ui/scroll-area.tsx b/src/components/ui/scroll-area.tsx - new file mode 100644 - index 0000000..69febe5
Added / After Commit
+ diff --git a/src/components/ui/scroll-area.tsx b/src/components/ui/scroll-area.tsx + new file mode 100644 + index 0000000..69febe5 + import * as React from "react"; + import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area"; + + import { cn } from "@/lib/utils"; + + const ScrollArea = React.forwardRef< + React.ElementRef<typeof ScrollAreaPrimitive.Root>, + React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> + >(({ className, children, ...props }, ref) => ( + <ScrollAreaPrimitive.Root + ref={ref} + className={cn("relative overflow-hidden", className)} + {...props} + > + <ScrollAreaPrimitive.Viewport className="h-full w-full rounded-[inherit]">
Removed / Before Commit
- diff --git a/src/components/ui/select.tsx b/src/components/ui/select.tsx - new file mode 100644 - index 0000000..3fdfc92
Added / After Commit
+ diff --git a/src/components/ui/select.tsx b/src/components/ui/select.tsx + new file mode 100644 + index 0000000..3fdfc92 + "use client"; + + import * as React from "react"; + import * as SelectPrimitive from "@radix-ui/react-select"; + import { Check, ChevronDown, ChevronUp } from "lucide-react"; + + import { cn } from "@/lib/utils"; + + const Select = SelectPrimitive.Root; + + const SelectGroup = SelectPrimitive.Group; + + const SelectValue = SelectPrimitive.Value; + + const SelectTrigger = React.forwardRef<
Removed / Before Commit
- diff --git a/src/components/ui/separator.tsx b/src/components/ui/separator.tsx - new file mode 100644 - index 0000000..5f5966c
Added / After Commit
+ diff --git a/src/components/ui/separator.tsx b/src/components/ui/separator.tsx + new file mode 100644 + index 0000000..5f5966c + import * as React from "react"; + import * as SeparatorPrimitive from "@radix-ui/react-separator"; + + import { cn } from "@/lib/utils"; + + const Separator = React.forwardRef< + React.ElementRef<typeof SeparatorPrimitive.Root>, + React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root> + >(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => ( + <SeparatorPrimitive.Root + ref={ref} + decorative={decorative} + orientation={orientation} + className={cn( + "shrink-0 bg-border",
Removed / Before Commit
- diff --git a/src/components/ui/sheet.tsx b/src/components/ui/sheet.tsx - new file mode 100644 - index 0000000..0aedeb7
Added / After Commit
+ diff --git a/src/components/ui/sheet.tsx b/src/components/ui/sheet.tsx + new file mode 100644 + index 0000000..0aedeb7 + "use client"; + + import * as React from "react"; + import * as SheetPrimitive from "@radix-ui/react-dialog"; + import { cva, type VariantProps } from "class-variance-authority"; + import { X } from "lucide-react"; + + import { cn } from "@/lib/utils"; + + const Sheet = SheetPrimitive.Root; + + const SheetTrigger = SheetPrimitive.Trigger; + + const SheetClose = SheetPrimitive.Close; +
Removed / Before Commit
- diff --git a/src/components/ui/sidebar.tsx b/src/components/ui/sidebar.tsx - new file mode 100644 - index 0000000..3922680
Added / After Commit
+ diff --git a/src/components/ui/sidebar.tsx b/src/components/ui/sidebar.tsx + new file mode 100644 + index 0000000..3922680 + import * as React from "react"; + import { Slot } from "@radix-ui/react-slot"; + import { cva, type VariantProps } from "class-variance-authority"; + import { PanelLeft } from "lucide-react"; + + import { useIsMobile } from "@/hooks/use-mobile"; + import { cn } from "@/lib/utils"; + import { Button } from "@/components/ui/button"; + import { Input } from "@/components/ui/input"; + import { Separator } from "@/components/ui/separator"; + import { + Sheet, + SheetContent, + SheetDescription, + SheetHeader,
Removed / Before Commit
- diff --git a/src/components/ui/skeleton.tsx b/src/components/ui/skeleton.tsx - new file mode 100644 - index 0000000..6d9a616
Added / After Commit
+ diff --git a/src/components/ui/skeleton.tsx b/src/components/ui/skeleton.tsx + new file mode 100644 + index 0000000..6d9a616 + import { cn } from "@/lib/utils"; + + function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) { + return <div className={cn("animate-pulse rounded-md bg-primary/10", className)} {...props} />; + } + + export { Skeleton };
Removed / Before Commit
- diff --git a/src/components/ui/slider.tsx b/src/components/ui/slider.tsx - new file mode 100644 - index 0000000..e56622a
Added / After Commit
+ diff --git a/src/components/ui/slider.tsx b/src/components/ui/slider.tsx + new file mode 100644 + index 0000000..e56622a + import * as React from "react"; + import * as SliderPrimitive from "@radix-ui/react-slider"; + + import { cn } from "@/lib/utils"; + + const Slider = React.forwardRef< + React.ElementRef<typeof SliderPrimitive.Root>, + React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root> + >(({ className, ...props }, ref) => ( + <SliderPrimitive.Root + ref={ref} + className={cn("relative flex w-full touch-none select-none items-center", className)} + {...props} + > + <SliderPrimitive.Track className="relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20">
Removed / Before Commit
- diff --git a/src/components/ui/sonner.tsx b/src/components/ui/sonner.tsx - new file mode 100644 - index 0000000..7a21469
Added / After Commit
+ diff --git a/src/components/ui/sonner.tsx b/src/components/ui/sonner.tsx + new file mode 100644 + index 0000000..7a21469 + import { Toaster as Sonner } from "sonner"; + + type ToasterProps = React.ComponentProps<typeof Sonner>; + + const Toaster = ({ ...props }: ToasterProps) => { + return ( + <Sonner + className="toaster group" + toastOptions={{ + classNames: { + toast: + "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg", + description: "group-[.toast]:text-muted-foreground", + actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground", + cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
Removed / Before Commit
- diff --git a/src/components/ui/switch.tsx b/src/components/ui/switch.tsx - new file mode 100644 - index 0000000..6338184
Added / After Commit
+ diff --git a/src/components/ui/switch.tsx b/src/components/ui/switch.tsx + new file mode 100644 + index 0000000..6338184 + import * as React from "react"; + import * as SwitchPrimitives from "@radix-ui/react-switch"; + + import { cn } from "@/lib/utils"; + + const Switch = React.forwardRef< + React.ElementRef<typeof SwitchPrimitives.Root>, + React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root> + >(({ className, ...props }, ref) => ( + <SwitchPrimitives.Root + className={cn( + "peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input", + className, + )} + {...props}
Removed / Before Commit
- diff --git a/src/components/ui/table.tsx b/src/components/ui/table.tsx - new file mode 100644 - index 0000000..49d2d5c
Added / After Commit
+ diff --git a/src/components/ui/table.tsx b/src/components/ui/table.tsx + new file mode 100644 + index 0000000..49d2d5c + import * as React from "react"; + + import { cn } from "@/lib/utils"; + + const Table = React.forwardRef<HTMLTableElement, React.HTMLAttributes<HTMLTableElement>>( + ({ className, ...props }, ref) => ( + <div className="relative w-full overflow-auto"> + <table ref={ref} className={cn("w-full caption-bottom text-sm", className)} {...props} /> + </div> + ), + ); + Table.displayName = "Table"; + + const TableHeader = React.forwardRef< + HTMLTableSectionElement,
Removed / Before Commit
- diff --git a/src/components/ui/tabs.tsx b/src/components/ui/tabs.tsx - new file mode 100644 - index 0000000..6047b50
Added / After Commit
+ diff --git a/src/components/ui/tabs.tsx b/src/components/ui/tabs.tsx + new file mode 100644 + index 0000000..6047b50 + import * as React from "react"; + import * as TabsPrimitive from "@radix-ui/react-tabs"; + + import { cn } from "@/lib/utils"; + + const Tabs = TabsPrimitive.Root; + + const TabsList = React.forwardRef< + React.ElementRef<typeof TabsPrimitive.List>, + React.ComponentPropsWithoutRef<typeof TabsPrimitive.List> + >(({ className, ...props }, ref) => ( + <TabsPrimitive.List + ref={ref} + className={cn( + "inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
Removed / Before Commit
- diff --git a/src/components/ui/textarea.tsx b/src/components/ui/textarea.tsx - new file mode 100644 - index 0000000..29330b6
Added / After Commit
+ diff --git a/src/components/ui/textarea.tsx b/src/components/ui/textarea.tsx + new file mode 100644 + index 0000000..29330b6 + import * as React from "react"; + + import { cn } from "@/lib/utils"; + + const Textarea = React.forwardRef<HTMLTextAreaElement, React.ComponentProps<"textarea">>( + ({ className, ...props }, ref) => { + return ( + <textarea + className={cn( + "flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", + className, + )} + ref={ref} + {...props} + />
Removed / Before Commit
- diff --git a/src/components/ui/toggle-group.tsx b/src/components/ui/toggle-group.tsx - new file mode 100644 - index 0000000..d2c9f8e
Added / After Commit
+ diff --git a/src/components/ui/toggle-group.tsx b/src/components/ui/toggle-group.tsx + new file mode 100644 + index 0000000..d2c9f8e + "use client"; + + import * as React from "react"; + import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group"; + import { type VariantProps } from "class-variance-authority"; + + import { cn } from "@/lib/utils"; + import { toggleVariants } from "@/components/ui/toggle"; + + const ToggleGroupContext = React.createContext<VariantProps<typeof toggleVariants>>({ + size: "default", + variant: "default", + }); + + const ToggleGroup = React.forwardRef<
Removed / Before Commit
- diff --git a/src/components/ui/toggle.tsx b/src/components/ui/toggle.tsx - new file mode 100644 - index 0000000..9d146b6
Added / After Commit
+ diff --git a/src/components/ui/toggle.tsx b/src/components/ui/toggle.tsx + new file mode 100644 + index 0000000..9d146b6 + import * as React from "react"; + import * as TogglePrimitive from "@radix-ui/react-toggle"; + import { cva, type VariantProps } from "class-variance-authority"; + + import { cn } from "@/lib/utils"; + + const toggleVariants = cva( + "inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium cursor-pointer transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", + { + variants: { + variant: { + default: "bg-transparent", + outline: + "border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground", + },
Removed / Before Commit
- diff --git a/src/components/ui/tooltip.tsx b/src/components/ui/tooltip.tsx - new file mode 100644 - index 0000000..07e55fa
Added / After Commit
+ diff --git a/src/components/ui/tooltip.tsx b/src/components/ui/tooltip.tsx + new file mode 100644 + index 0000000..07e55fa + "use client"; + + import * as React from "react"; + import * as TooltipPrimitive from "@radix-ui/react-tooltip"; + + import { cn } from "@/lib/utils"; + + const TooltipProvider = TooltipPrimitive.Provider; + + const Tooltip = TooltipPrimitive.Root; + + const TooltipTrigger = TooltipPrimitive.Trigger; + + const TooltipContent = React.forwardRef< + React.ElementRef<typeof TooltipPrimitive.Content>,
Removed / Before Commit
- diff --git a/src/config/auth.config.ts b/src/config/auth.config.ts - new file mode 100644 - index 0000000..93abaf4
Added / After Commit
+ diff --git a/src/config/auth.config.ts b/src/config/auth.config.ts + new file mode 100644 + index 0000000..93abaf4 + export const authConfig = { + authApiUrl: import.meta.env.VITE_AUTH_API_URL ?? "https://api.digitalbowls.com/auth/api", + panelAuthApiUrl: import.meta.env.VITE_PANEL_AUTH_API_URL ?? "https://api.digitalbowls.com/auth", + tenantApiUrl: import.meta.env.VITE_TENANT_API_URL ?? "https://api.digitalbowls.com/tenant/api", + tokenStorageKey: "authToken", + userStorageKey: "userData", + permissionRefreshInterval: 30_000, + enablePermissionRefresh: true, + panelAuthEndpoints: { + createUser: "/api/auth/create-user", + downlineUsers: "/credit/downline", + allocateCredit: "/credit/allocate", + revokeCredit: "/credit/revoke", + transferList: "/credit/transfer", + balance: "/credit/summary",
Removed / Before Commit
- diff --git a/src/config/panel-policy.ts b/src/config/panel-policy.ts - new file mode 100644 - index 0000000..71d375f
Added / After Commit
+ diff --git a/src/config/panel-policy.ts b/src/config/panel-policy.ts + new file mode 100644 + index 0000000..71d375f + import type { AuthUser } from "@/services/api/types"; + + export type PanelRole = "owner" | "super_admin" | "master" | "user" | "unknown"; + export type CreatableRole = "super_admin" | "master" | "user"; + + export const roleLabels: Record<CreatableRole, string> = { + super_admin: "Super Admin", + master: "Master", + user: "User", + }; + + export const assignablePermissions = [ + { value: "dashboard", label: "Dashboard" }, + { value: "user.view", label: "View User" }, + { value: "user.create", label: "Create User" },
Removed / Before Commit
- diff --git a/src/hooks/use-mobile.tsx b/src/hooks/use-mobile.tsx - new file mode 100644 - index 0000000..502fd32
Added / After Commit
+ diff --git a/src/hooks/use-mobile.tsx b/src/hooks/use-mobile.tsx + new file mode 100644 + index 0000000..502fd32 + import * as React from "react"; + + const MOBILE_BREAKPOINT = 768; + + export function useIsMobile() { + const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined); + + React.useEffect(() => { + const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`); + const onChange = () => { + setIsMobile(window.innerWidth < MOBILE_BREAKPOINT); + }; + mql.addEventListener("change", onChange); + setIsMobile(window.innerWidth < MOBILE_BREAKPOINT); + return () => mql.removeEventListener("change", onChange);
Removed / Before Commit
- diff --git a/src/hooks/useAuth.tsx b/src/hooks/useAuth.tsx - new file mode 100644 - index 0000000..2b24460
Added / After Commit
+ diff --git a/src/hooks/useAuth.tsx b/src/hooks/useAuth.tsx + new file mode 100644 + index 0000000..2b24460 + import { createContext, useCallback, useContext, useEffect, useMemo, useState } from "react"; + import { useQueryClient } from "@tanstack/react-query"; + import type { ReactNode } from "react"; + import { authConfig } from "@/config/auth.config"; + import { getEffectivePermissions, hasPanelPermission } from "@/config/panel-policy"; + import { authService } from "@/services/api/authService"; + import type { AuthUser, LoginRequest } from "@/services/api/types"; + + interface AuthContextValue { + user: AuthUser | null; + userRole: string | null; + permissions: string[]; + loading: boolean; + isAuthenticated: boolean; + login: (credentials: LoginRequest) => Promise<AuthUser>;
Removed / Before Commit
- diff --git a/src/hooks/useInternalApi.ts b/src/hooks/useInternalApi.ts - new file mode 100644 - index 0000000..92a631c
Added / After Commit
+ diff --git a/src/hooks/useInternalApi.ts b/src/hooks/useInternalApi.ts + new file mode 100644 + index 0000000..92a631c + import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; + import type { ListParams, ResourceService } from "@/services/api/resourceService"; + + export function useResourceList<TRecord>( + key: string, + service: Pick<ResourceService<TRecord>, "list">, + params?: ListParams, + ) { + return useQuery({ + queryKey: [key, params], + queryFn: () => service.list(params), + }); + } + + export function useResourceCreate<TRecord, TCreate>(
Removed / Before Commit
- diff --git a/src/lib/error-capture.ts b/src/lib/error-capture.ts - new file mode 100644 - index 0000000..171c9b5
Added / After Commit
+ diff --git a/src/lib/error-capture.ts b/src/lib/error-capture.ts + new file mode 100644 + index 0000000..171c9b5 + // Captures the original Error out-of-band so server.ts can recover the stack + // when h3 has already swallowed the throw into a generic 500 Response. + + let lastCapturedError: { error: unknown; at: number } | undefined; + const TTL_MS = 5_000; + + function record(error: unknown) { + lastCapturedError = { error, at: Date.now() }; + } + + if (typeof globalThis.addEventListener === "function") { + globalThis.addEventListener("error", (event) => record((event as ErrorEvent).error ?? event)); + globalThis.addEventListener("unhandledrejection", (event) => + record((event as PromiseRejectionEvent).reason), + );
Removed / Before Commit
- diff --git a/src/lib/error-page.ts b/src/lib/error-page.ts - new file mode 100644 - index 0000000..725235c
Added / After Commit
+ diff --git a/src/lib/error-page.ts b/src/lib/error-page.ts + new file mode 100644 + index 0000000..725235c + export function renderErrorPage(): string { + return `<!doctype html> + <html lang="en"> + <head> + <meta charset="utf-8" /> + <title>This page didn't load</title> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <style> + body { font: 15px/1.5 system-ui, -apple-system, sans-serif; background: #fafafa; color: #111; display: grid; place-items: center; min-height: 100vh; margin: 0; padding: 1.5rem; } + .card { max-width: 28rem; width: 100%; text-align: center; padding: 2rem; } + h1 { font-size: 1.25rem; margin: 0 0 0.5rem; } + p { color: #4b5563; margin: 0 0 1.5rem; } + .actions { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; } + a, button { padding: 0.5rem 1rem; border-radius: 0.375rem; font: inherit; cursor: pointer; text-decoration: none; border: 1px solid transparent; } + .primary { background: #111; color: #fff; }
Removed / Before Commit
- diff --git a/src/lib/utils.ts b/src/lib/utils.ts - new file mode 100644 - index 0000000..a5ef193
Added / After Commit
+ diff --git a/src/lib/utils.ts b/src/lib/utils.ts + new file mode 100644 + index 0000000..a5ef193 + import { clsx, type ClassValue } from "clsx"; + import { twMerge } from "tailwind-merge"; + + export function cn(...inputs: ClassValue[]) { + return twMerge(clsx(inputs)); + }
Removed / Before Commit
- diff --git a/src/main.tsx b/src/main.tsx - new file mode 100644 - index 0000000..73cbbf3
Added / After Commit
+ diff --git a/src/main.tsx b/src/main.tsx + new file mode 100644 + index 0000000..73cbbf3 + import { StrictMode } from "react"; + import { createRoot } from "react-dom/client"; + import { RouterProvider } from "@tanstack/react-router"; + + import { router } from "./router"; + import "./styles.css"; + + const rootElement = document.getElementById("root"); + + if (!rootElement) { + throw new Error("Root element not found"); + } + + createRoot(rootElement).render( + <StrictMode>
Removed / Before Commit
- diff --git a/src/router.tsx b/src/router.tsx - new file mode 100644 - index 0000000..7a1bbc2
Added / After Commit
+ diff --git a/src/router.tsx b/src/router.tsx + new file mode 100644 + index 0000000..7a1bbc2 + import { QueryClient } from "@tanstack/react-query"; + import { createRouter } from "@tanstack/react-router"; + import { routeTree } from "./routeTree.gen"; + + const queryClient = new QueryClient({ + defaultOptions: { + queries: { + staleTime: 1000 * 60 * 5, + refetchOnWindowFocus: false, + }, + }, + }); + + export const router = createRouter({ + routeTree,
Removed / Before Commit
- diff --git a/src/routes/__root.tsx b/src/routes/__root.tsx - new file mode 100644 - index 0000000..0467c3f
Added / After Commit
+ diff --git a/src/routes/__root.tsx b/src/routes/__root.tsx + new file mode 100644 + index 0000000..0467c3f + import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; + import { useEffect } from "react"; + import { + Outlet, + createRootRouteWithContext, + useRouter, + Link, + useRouterState, + } from "@tanstack/react-router"; + + import { ThemeProvider } from "@/components/theme-provider"; + import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar"; + import { AppSidebar } from "@/components/app-sidebar"; + import { TopNavbar } from "@/components/top-navbar"; + import { TooltipProvider } from "@/components/ui/tooltip";
Removed / Before Commit
- diff --git a/src/routes/accounts.tsx b/src/routes/accounts.tsx - new file mode 100644 - index 0000000..7c9c6b1
Added / After Commit
+ diff --git a/src/routes/accounts.tsx b/src/routes/accounts.tsx + new file mode 100644 + index 0000000..7c9c6b1 + import { createFileRoute } from "@tanstack/react-router"; + import { PagePlaceholder } from "@/components/page-placeholder"; + + export const Route = createFileRoute("/accounts")({ + component: () => ( + <PagePlaceholder + title="Accounts" + description="Manage Accounts from a single, modern workspace." + /> + ), + head: () => ({ meta: [{ title: "Accounts — ExcelFlow AI" }] }), + });
Removed / Before Commit
- diff --git a/src/routes/agency-management.user-details.$userId.tsx b/src/routes/agency-management.user-details.$userId.tsx - new file mode 100644 - index 0000000..643ee14
Added / After Commit
+ diff --git a/src/routes/agency-management.user-details.$userId.tsx b/src/routes/agency-management.user-details.$userId.tsx + new file mode 100644 + index 0000000..643ee14 + import { createFileRoute, Link } from "@tanstack/react-router"; + import { useQuery } from "@tanstack/react-query"; + import { useMemo, useState } from "react"; + import { motion } from "motion/react"; + import { + ArrowLeft, + Calendar, + Download, + RefreshCw, + Search, + ShieldCheck, + UserRound, + } from "lucide-react"; + import { Card } from "@/components/ui/card"; + import { Button } from "@/components/ui/button";
Removed / Before Commit
- diff --git a/src/routes/balance.tsx b/src/routes/balance.tsx - new file mode 100644 - index 0000000..b8483bd
Added / After Commit
+ diff --git a/src/routes/balance.tsx b/src/routes/balance.tsx + new file mode 100644 + index 0000000..b8483bd + import { createFileRoute } from "@tanstack/react-router"; + import { useQuery } from "@tanstack/react-query"; + import { motion } from "motion/react"; + import { + Activity, + ArrowDownRight, + ArrowUpRight, + RefreshCw, + Search, + UserRound, + Wallet, + } from "lucide-react"; + import { toast } from "sonner"; + import { useState } from "react"; + import type { ComponentType } from "react";
Removed / Before Commit
- diff --git a/src/routes/bet-list.tsx b/src/routes/bet-list.tsx - new file mode 100644 - index 0000000..7be6b73
Added / After Commit
+ diff --git a/src/routes/bet-list.tsx b/src/routes/bet-list.tsx + new file mode 100644 + index 0000000..7be6b73 + import { createFileRoute } from "@tanstack/react-router"; + import { useQuery } from "@tanstack/react-query"; + import { format } from "date-fns"; + import { Calendar as CalendarIcon, Download, Eye } from "lucide-react"; + import { useMemo, useState } from "react"; + import type { DateRange } from "react-day-picker"; + import { Button } from "@/components/ui/button"; + import { Input } from "@/components/ui/input"; + import { Calendar } from "@/components/ui/calendar"; + import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; + import { + Select, + SelectContent, + SelectItem, + SelectTrigger,
Removed / Before Commit
- diff --git a/src/routes/bet-ticket.tsx b/src/routes/bet-ticket.tsx - new file mode 100644 - index 0000000..be84d5e
Added / After Commit
+ diff --git a/src/routes/bet-ticket.tsx b/src/routes/bet-ticket.tsx + new file mode 100644 + index 0000000..be84d5e + import { createFileRoute } from "@tanstack/react-router"; + import { useState } from "react"; + import { motion } from "motion/react"; + import { Card } from "@/components/ui/card"; + import { Button } from "@/components/ui/button"; + import { Input } from "@/components/ui/input"; + import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, + } from "@/components/ui/select"; + import { + Table,
Removed / Before Commit
- diff --git a/src/routes/blocked-ips.tsx b/src/routes/blocked-ips.tsx - new file mode 100644 - index 0000000..edfef87
Added / After Commit
+ diff --git a/src/routes/blocked-ips.tsx b/src/routes/blocked-ips.tsx + new file mode 100644 + index 0000000..edfef87 + import { createFileRoute } from "@tanstack/react-router"; + import { useState } from "react"; + import { motion } from "motion/react"; + import { Card } from "@/components/ui/card"; + import { Button } from "@/components/ui/button"; + import { Input } from "@/components/ui/input"; + import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, + } from "@/components/ui/select"; + import { + Table,
Removed / Before Commit
- diff --git a/src/routes/credit-transactions.tsx b/src/routes/credit-transactions.tsx - new file mode 100644 - index 0000000..e0d97ca
Added / After Commit
+ diff --git a/src/routes/credit-transactions.tsx b/src/routes/credit-transactions.tsx + new file mode 100644 + index 0000000..e0d97ca + import { createFileRoute } from "@tanstack/react-router"; + import { useQuery } from "@tanstack/react-query"; + import { useMemo, useState } from "react"; + import { motion } from "motion/react"; + import { + ArrowRight, + RefreshCw, + Search, + } from "lucide-react"; + import { Card } from "@/components/ui/card"; + import { Badge } from "@/components/ui/badge"; + import { Button } from "@/components/ui/button"; + import { Input } from "@/components/ui/input"; + import { + Table,
Removed / Before Commit
- diff --git a/src/routes/downline-users.$userId.tsx b/src/routes/downline-users.$userId.tsx - new file mode 100644 - index 0000000..0c1350b
Added / After Commit
+ diff --git a/src/routes/downline-users.$userId.tsx b/src/routes/downline-users.$userId.tsx + new file mode 100644 + index 0000000..0c1350b + import { createFileRoute, Link } from "@tanstack/react-router"; + import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; + import { useState } from "react"; + import { motion } from "motion/react"; + import { toast } from "sonner"; + import { Card } from "@/components/ui/card"; + import { Button } from "@/components/ui/button"; + import { Badge } from "@/components/ui/badge"; + import { + Table, + TableBody, + TableCell, + TableHead, + TableHeader, + TableRow,
Removed / Before Commit
- diff --git a/src/routes/excel-sheets.tsx b/src/routes/excel-sheets.tsx - new file mode 100644 - index 0000000..3fb9bc6
Added / After Commit
+ diff --git a/src/routes/excel-sheets.tsx b/src/routes/excel-sheets.tsx + new file mode 100644 + index 0000000..3fb9bc6 + import { createFileRoute } from "@tanstack/react-router"; + import { useMemo, useState } from "react"; + import { + FileSpreadsheet, + Plus, + Search, + Filter, + Grid3x3, + List as ListIcon, + Star, + MoreHorizontal, + Users, + Clock, + TrendingUp, + } from "lucide-react";
Removed / Before Commit
- diff --git a/src/routes/formula-center.tsx b/src/routes/formula-center.tsx - new file mode 100644 - index 0000000..be38a1e
Added / After Commit
+ diff --git a/src/routes/formula-center.tsx b/src/routes/formula-center.tsx + new file mode 100644 + index 0000000..be38a1e + import { createFileRoute } from "@tanstack/react-router"; + import { PagePlaceholder } from "@/components/page-placeholder"; + + export const Route = createFileRoute("/formula-center")({ + component: () => ( + <PagePlaceholder + title="Formula Center" + description="Manage Formula Center from a single, modern workspace." + /> + ), + head: () => ({ meta: [{ title: "Formula Center — ExcelFlow AI" }] }), + });
Removed / Before Commit
- diff --git a/src/routes/index.tsx b/src/routes/index.tsx - new file mode 100644 - index 0000000..3dfed4b
Added / After Commit
+ diff --git a/src/routes/index.tsx b/src/routes/index.tsx + new file mode 100644 + index 0000000..3dfed4b + import { createFileRoute } from "@tanstack/react-router"; + + export const Route = createFileRoute("/")({ + component: DashboardPage, + head: () => ({ meta: [{ title: "Dashboard - B2B-B2C Panel" }] }), + }); + + function DashboardPage() { + return ( + <div className="flex min-h-[50vh] items-center justify-center"> + <h1 className="text-3xl font-bold tracking-tight text-foreground">Welcome</h1> + </div> + ); + }
Removed / Before Commit
- diff --git a/src/routes/login.tsx b/src/routes/login.tsx - new file mode 100644 - index 0000000..ef07e24
Added / After Commit
+ diff --git a/src/routes/login.tsx b/src/routes/login.tsx + new file mode 100644 + index 0000000..ef07e24 + import { createFileRoute, useRouter } from "@tanstack/react-router"; + import { motion } from "motion/react"; + import { Button } from "@/components/ui/button"; + import { Input } from "@/components/ui/input"; + import { Label } from "@/components/ui/label"; + import { Checkbox } from "@/components/ui/checkbox"; + import { Eye, EyeOff, ArrowRight, Shield, TrendingUp, Users, Sparkles } from "lucide-react"; + import { useState } from "react"; + import { useAuth } from "@/hooks/useAuth"; + import { getDefaultPanelPath } from "@/config/panel-policy"; + + export const Route = createFileRoute("/login")({ + component: LoginPage, + head: () => ({ meta: [{ title: "Login - B2B-B2C Panel" }] }), + });
Removed / Before Commit
- diff --git a/src/routes/marketing.tsx b/src/routes/marketing.tsx - new file mode 100644 - index 0000000..d6b9943
Added / After Commit
+ diff --git a/src/routes/marketing.tsx b/src/routes/marketing.tsx + new file mode 100644 + index 0000000..d6b9943 + import { createFileRoute } from "@tanstack/react-router"; + import { useMutation, useQuery } from "@tanstack/react-query"; + import { useEffect, useState } from "react"; + import { motion } from "motion/react"; + import { Card } from "@/components/ui/card"; + import { Button } from "@/components/ui/button"; + import { Input } from "@/components/ui/input"; + import { Label } from "@/components/ui/label"; + import { Switch } from "@/components/ui/switch"; + import { + AlertDialog, + AlertDialogAction, + AlertDialogCancel, + AlertDialogContent, + AlertDialogDescription,
Removed / Before Commit
- diff --git a/src/routes/net-exposure.tsx b/src/routes/net-exposure.tsx - new file mode 100644 - index 0000000..f8bab6e
Added / After Commit
+ diff --git a/src/routes/net-exposure.tsx b/src/routes/net-exposure.tsx + new file mode 100644 + index 0000000..f8bab6e + import { createFileRoute } from "@tanstack/react-router"; + import { useState } from "react"; + import { motion } from "motion/react"; + import { Card } from "@/components/ui/card"; + import { Button } from "@/components/ui/button"; + import { cn } from "@/lib/utils"; + + export const Route = createFileRoute("/net-exposure")({ + component: NetExposurePage, + head: () => ({ meta: [{ title: "Net Exposure - B2B-B2C Panel" }] }), + }); + + type SportType = "My P/L" | "Total Block" | "Filter by Sport" | "All" | "Cricket" | "Football" | "Tennis" | "Horse Racing" | "Greyhound Racing"; + + function NetExposurePage() {
Removed / Before Commit
- diff --git a/src/routes/pl-by-agent.tsx b/src/routes/pl-by-agent.tsx - new file mode 100644 - index 0000000..c22ad80
Added / After Commit
+ diff --git a/src/routes/pl-by-agent.tsx b/src/routes/pl-by-agent.tsx + new file mode 100644 + index 0000000..c22ad80 + import { createFileRoute } from "@tanstack/react-router"; + import { useQuery } from "@tanstack/react-query"; + import { useMemo, useState } from "react"; + import { motion } from "motion/react"; + import { Calendar as CalendarIcon, Download } from "lucide-react"; + import { toast } from "sonner"; + import { Card } from "@/components/ui/card"; + import { Button } from "@/components/ui/button"; + import { Calendar } from "@/components/ui/calendar"; + import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; + import { + Table, + TableBody, + TableCell, + TableHead,
Removed / Before Commit
- diff --git a/src/routes/pl-by-market.tsx b/src/routes/pl-by-market.tsx - new file mode 100644 - index 0000000..1e78c2c
Added / After Commit
+ diff --git a/src/routes/pl-by-market.tsx b/src/routes/pl-by-market.tsx + new file mode 100644 + index 0000000..1e78c2c + import { createFileRoute } from "@tanstack/react-router"; + import { useQuery } from "@tanstack/react-query"; + import { useMemo, useState } from "react"; + import { motion } from "motion/react"; + import { Calendar as CalendarIcon, Download } from "lucide-react"; + import { toast } from "sonner"; + import { Card } from "@/components/ui/card"; + import { Button } from "@/components/ui/button"; + import { Calendar } from "@/components/ui/calendar"; + import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; + import { + Table, + TableBody, + TableCell, + TableHead,
Removed / Before Commit
- diff --git a/src/routes/position-taking-listing.tsx b/src/routes/position-taking-listing.tsx - new file mode 100644 - index 0000000..8021a6c
Added / After Commit
+ diff --git a/src/routes/position-taking-listing.tsx b/src/routes/position-taking-listing.tsx + new file mode 100644 + index 0000000..8021a6c + import { createFileRoute } from "@tanstack/react-router"; + import { useState } from "react"; + import { motion } from "motion/react"; + import { Card } from "@/components/ui/card"; + import { Input } from "@/components/ui/input"; + import { Button } from "@/components/ui/button"; + import { + Table, + TableBody, + TableCell, + TableHead, + TableHeader, + TableRow, + } from "@/components/ui/table"; + import { cn } from "@/lib/utils";
Removed / Before Commit
- diff --git a/src/routes/reports.tsx b/src/routes/reports.tsx - new file mode 100644 - index 0000000..9369d35
Added / After Commit
+ diff --git a/src/routes/reports.tsx b/src/routes/reports.tsx + new file mode 100644 + index 0000000..9369d35 + import { createFileRoute } from "@tanstack/react-router"; + import { PagePlaceholder } from "@/components/page-placeholder"; + + export const Route = createFileRoute("/reports")({ + component: () => ( + <PagePlaceholder + title="Reports" + description="Manage Reports from a single, modern workspace." + /> + ), + head: () => ({ meta: [{ title: "Reports — ExcelFlow AI" }] }), + });
Removed / Before Commit
- diff --git a/src/routes/settings.tsx b/src/routes/settings.tsx - new file mode 100644 - index 0000000..81a62c3
Added / After Commit
+ diff --git a/src/routes/settings.tsx b/src/routes/settings.tsx + new file mode 100644 + index 0000000..81a62c3 + import { createFileRoute } from "@tanstack/react-router"; + import { PagePlaceholder } from "@/components/page-placeholder"; + + export const Route = createFileRoute("/settings")({ + component: () => ( + <PagePlaceholder + title="Settings" + description="Manage Settings from a single, modern workspace." + /> + ), + head: () => ({ meta: [{ title: "Settings — ExcelFlow AI" }] }), + });
Removed / Before Commit
- diff --git a/src/routes/statement.tsx b/src/routes/statement.tsx - new file mode 100644 - index 0000000..30fbdb3
Added / After Commit
+ diff --git a/src/routes/statement.tsx b/src/routes/statement.tsx + new file mode 100644 + index 0000000..30fbdb3 + import { createFileRoute } from "@tanstack/react-router"; + import { useQuery } from "@tanstack/react-query"; + import { useMemo, useState } from "react"; + import { motion } from "motion/react"; + import { RefreshCw, Search } from "lucide-react"; + import { Card } from "@/components/ui/card"; + import { Button } from "@/components/ui/button"; + import { Input } from "@/components/ui/input"; + import { + Table, + TableBody, + TableCell, + TableHead, + TableHeader, + TableRow,
Removed / Before Commit
- diff --git a/src/routes/transfer-statement.tsx b/src/routes/transfer-statement.tsx - new file mode 100644 - index 0000000..664e282
Added / After Commit
+ diff --git a/src/routes/transfer-statement.tsx b/src/routes/transfer-statement.tsx + new file mode 100644 + index 0000000..664e282 + import { createFileRoute } from "@tanstack/react-router"; + import { useState } from "react"; + import { motion } from "motion/react"; + import { Card } from "@/components/ui/card"; + import { Button } from "@/components/ui/button"; + import { Input } from "@/components/ui/input"; + import { Calendar, Download } from "lucide-react"; + import { + Table, + TableBody, + TableCell, + TableHead, + TableHeader, + TableRow, + } from "@/components/ui/table";
Removed / Before Commit
- diff --git a/src/routes/transfer.tsx b/src/routes/transfer.tsx - new file mode 100644 - index 0000000..3fc87ad
Added / After Commit
+ diff --git a/src/routes/transfer.tsx b/src/routes/transfer.tsx + new file mode 100644 + index 0000000..3fc87ad + import { createFileRoute } from "@tanstack/react-router"; + import { useEffect, useMemo, useState } from "react"; + import { useMutation, useQuery } from "@tanstack/react-query"; + import { motion } from "motion/react"; + import { toast } from "sonner"; + import { Card } from "@/components/ui/card"; + import { Input } from "@/components/ui/input"; + import { Button } from "@/components/ui/button"; + import { Switch } from "@/components/ui/switch"; + import { Checkbox } from "@/components/ui/checkbox"; + import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@/components/ui/dialog"; + import { Label } from "@/components/ui/label"; + import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs"; + import { + Table,
Removed / Before Commit
- diff --git a/src/routes/upload-files.tsx b/src/routes/upload-files.tsx - new file mode 100644 - index 0000000..6632d15
Added / After Commit
+ diff --git a/src/routes/upload-files.tsx b/src/routes/upload-files.tsx + new file mode 100644 + index 0000000..6632d15 + import { createFileRoute } from "@tanstack/react-router"; + import { PagePlaceholder } from "@/components/page-placeholder"; + + export const Route = createFileRoute("/upload-files")({ + component: () => ( + <PagePlaceholder + title="Upload Files" + description="Manage Upload Files from a single, modern workspace." + /> + ), + head: () => ({ meta: [{ title: "Upload Files — ExcelFlow AI" }] }), + });
Removed / Before Commit
- diff --git a/src/routes/user-listing.tsx b/src/routes/user-listing.tsx - new file mode 100644 - index 0000000..4dd4478
Added / After Commit
+ diff --git a/src/routes/user-listing.tsx b/src/routes/user-listing.tsx + new file mode 100644 + index 0000000..4dd4478 + import { createFileRoute, Link } from "@tanstack/react-router"; + import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; + import { type ReactNode, useEffect, useMemo, useState } from "react"; + import { motion } from "motion/react"; + import { toast } from "sonner"; + import { Card } from "@/components/ui/card"; + import { Button } from "@/components/ui/button"; + import { Input } from "@/components/ui/input"; + import { Label } from "@/components/ui/label"; + import { Checkbox } from "@/components/ui/checkbox"; + import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group"; + import { Switch } from "@/components/ui/switch"; + import { Textarea } from "@/components/ui/textarea"; + import { Calendar } from "@/components/ui/calendar"; + import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
Removed / Before Commit
- diff --git a/src/routes/users.tsx b/src/routes/users.tsx - new file mode 100644 - index 0000000..c7d46d7
Added / After Commit
+ diff --git a/src/routes/users.tsx b/src/routes/users.tsx + new file mode 100644 + index 0000000..c7d46d7 + import { createFileRoute } from "@tanstack/react-router"; + import { useMemo, useState } from "react"; + import { motion } from "motion/react"; + import { + Calendar as CalendarIcon, + Download, + Plus, + Eye, + Lock, + Unlock, + Pencil, + ChevronLeft, + ChevronRight, + } from "lucide-react"; + import { Card } from "@/components/ui/card";
Removed / Before Commit
- diff --git a/src/routes/virtual-report.tsx b/src/routes/virtual-report.tsx - new file mode 100644 - index 0000000..3ca7578
Added / After Commit
+ diff --git a/src/routes/virtual-report.tsx b/src/routes/virtual-report.tsx + new file mode 100644 + index 0000000..3ca7578 + import { createFileRoute } from "@tanstack/react-router"; + import { useState } from "react"; + import { motion } from "motion/react"; + import { Card } from "@/components/ui/card"; + import { Button } from "@/components/ui/button"; + import { Input } from "@/components/ui/input"; + import { Calendar, Download } from "lucide-react"; + import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, + } from "@/components/ui/select"; + import {
Removed / Before Commit
- diff --git a/src/routeTree.gen.ts b/src/routeTree.gen.ts - new file mode 100644 - index 0000000..bca8707
Added / After Commit
+ diff --git a/src/routeTree.gen.ts b/src/routeTree.gen.ts + new file mode 100644 + index 0000000..bca8707 + /* eslint-disable */ + + // @ts-nocheck + + // noinspection JSUnusedGlobalSymbols + + // This file was automatically generated by TanStack Router. + // You should NOT make any changes in this file as it will be overwritten. + // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified. + + import { Route as rootRouteImport } from './routes/__root' + import { Route as VirtualReportRouteImport } from './routes/virtual-report' + import { Route as UsersRouteImport } from './routes/users' + import { Route as UserListingRouteImport } from './routes/user-listing' + import { Route as UploadFilesRouteImport } from './routes/upload-files'
Removed / Before Commit
- diff --git a/src/server.ts b/src/server.ts - new file mode 100644 - index 0000000..2451322
Added / After Commit
+ diff --git a/src/server.ts b/src/server.ts + new file mode 100644 + index 0000000..2451322 + import "./lib/error-capture"; + + import { consumeLastCapturedError } from "./lib/error-capture"; + import { renderErrorPage } from "./lib/error-page"; + + type ServerEntry = { + fetch: (request: Request, env: unknown, ctx: unknown) => Promise<Response> | Response; + }; + + let serverEntryPromise: Promise<ServerEntry> | undefined; + + async function getServerEntry(): Promise<ServerEntry> { + if (!serverEntryPromise) { + serverEntryPromise = import("@tanstack/react-start/server-entry").then( + (m) => ((m as { default?: ServerEntry }).default ?? (m as unknown as ServerEntry)),
Removed / Before Commit
- diff --git a/src/services/api/apiClient.ts b/src/services/api/apiClient.ts - new file mode 100644 - index 0000000..61241fa
Added / After Commit
+ diff --git a/src/services/api/apiClient.ts b/src/services/api/apiClient.ts + new file mode 100644 + index 0000000..61241fa + import { authConfig } from "@/config/auth.config"; + + type RequestOptions = Omit<RequestInit, "body"> & { + body?: unknown; + auth?: boolean; + }; + + export class ApiClientError extends Error { + status: number; + payload: unknown; + + constructor(message: string, status: number, payload: unknown) { + super(message); + this.name = "ApiClientError"; + this.status = status;
Removed / Before Commit
- diff --git a/src/services/api/authService.ts b/src/services/api/authService.ts - new file mode 100644 - index 0000000..03bb8a8
Added / After Commit
+ diff --git a/src/services/api/authService.ts b/src/services/api/authService.ts + new file mode 100644 + index 0000000..03bb8a8 + import { authConfig } from "@/config/auth.config"; + import { ApiClientError, authApiClient } from "@/services/api/apiClient"; + import type { AuthUser, LoginRequest, LoginResult } from "@/services/api/types"; + + type UnknownRecord = Record<string, unknown>; + + function isBrowser() { + return typeof window !== "undefined"; + } + + function asRecord(value: unknown): UnknownRecord { + return value && typeof value === "object" ? (value as UnknownRecord) : {}; + } + + function normalizePermissions(permissions: unknown): string[] {
Removed / Before Commit
- diff --git a/src/services/api/betTypes.ts b/src/services/api/betTypes.ts - new file mode 100644 - index 0000000..81cd64b
Added / After Commit
+ diff --git a/src/services/api/betTypes.ts b/src/services/api/betTypes.ts + new file mode 100644 + index 0000000..81cd64b + export interface RacingDetails { + event_id?: string; + market_name?: string; + market_id?: string; + runner_id?: string; + selection_name?: string; + odds_matched?: number; + } + + export interface MultiBetLeg { + _id?: string; + id?: string; + bet_id?: string; + leg_number?: number; + event_id?: string;
Removed / Before Commit
- diff --git a/src/services/api/downlineTypes.ts b/src/services/api/downlineTypes.ts - new file mode 100644 - index 0000000..5c1bd32
Added / After Commit
+ diff --git a/src/services/api/downlineTypes.ts b/src/services/api/downlineTypes.ts + new file mode 100644 + index 0000000..5c1bd32 + export interface DownlineUserItem { + _id?: string; + id?: string; + username?: string; + name?: string; + email?: string; + role?: string; + status?: string; + creditLimit?: number; + distributedToDownline?: number; + availableCredit?: number; + balanceDown?: number; + balanceUp?: number; + take?: number; + give?: number;
Removed / Before Commit
- diff --git a/src/services/api/internalServices.ts b/src/services/api/internalServices.ts - new file mode 100644 - index 0000000..4841d02
Added / After Commit
+ diff --git a/src/services/api/internalServices.ts b/src/services/api/internalServices.ts + new file mode 100644 + index 0000000..4841d02 + import { authConfig } from "@/config/auth.config"; + import { authApiClient, panelAuthApiClient, tenantApiClient } from "@/services/api/apiClient"; + import { createResourceService } from "@/services/api/resourceService"; + import { unwrapData } from "@/services/api/response"; + import type { + Banner, + BannerFormValues, + CasinoItem, + CreditBalanceSummary, + CreditTransaction, + CreatePanelUserRequest, + CreditTransferRequest, + CreditTransferResult, + TransferSubmitRequest, + TransferListResponse,
Removed / Before Commit
- diff --git a/src/services/api/internalTypes.ts b/src/services/api/internalTypes.ts - new file mode 100644 - index 0000000..e60f098
Added / After Commit
+ diff --git a/src/services/api/internalTypes.ts b/src/services/api/internalTypes.ts + new file mode 100644 + index 0000000..e60f098 + export interface PanelRecord { + id?: string; + _id?: string; + name?: string; + title?: string; + status?: string; + createdAt?: string; + updatedAt?: string; + [key: string]: unknown; + } + + export interface Platform extends PanelRecord { + tenantId?: string; + tenantCode?: string; + brandName?: string;
Removed / Before Commit
- diff --git a/src/services/api/resourceService.ts b/src/services/api/resourceService.ts - new file mode 100644 - index 0000000..95582fc
Added / After Commit
+ diff --git a/src/services/api/resourceService.ts b/src/services/api/resourceService.ts + new file mode 100644 + index 0000000..95582fc + import { tenantApiClient } from "@/services/api/apiClient"; + import { unwrapItem, unwrapList, type PaginatedResult } from "@/services/api/response"; + + export interface ListParams { + page?: number; + limit?: number; + search?: string; + status?: string; + [key: string]: string | number | boolean | undefined; + } + + export interface ResourceService<TRecord, TCreate = Partial<TRecord>, TUpdate = Partial<TRecord>> { + list: (params?: ListParams) => Promise<PaginatedResult<TRecord>>; + get: (id: string) => Promise<TRecord>; + create: (payload: TCreate) => Promise<TRecord>;
Removed / Before Commit
- diff --git a/src/services/api/response.ts b/src/services/api/response.ts - new file mode 100644 - index 0000000..2ab6f0d
Added / After Commit
+ diff --git a/src/services/api/response.ts b/src/services/api/response.ts + new file mode 100644 + index 0000000..2ab6f0d + export interface PaginatedResult<T> { + items: T[]; + total: number; + page: number; + limit: number; + } + + type UnknownRecord = Record<string, unknown>; + + function asRecord(value: unknown): UnknownRecord { + return value && typeof value === "object" ? (value as UnknownRecord) : {}; + } + + function asArray<T>(value: unknown): T[] { + return Array.isArray(value) ? (value as T[]) : [];
Removed / Before Commit
- diff --git a/src/services/api/types.ts b/src/services/api/types.ts - new file mode 100644 - index 0000000..5afe96c
Added / After Commit
+ diff --git a/src/services/api/types.ts b/src/services/api/types.ts + new file mode 100644 + index 0000000..5afe96c + export interface LoginRequest { + username: string; + password: string; + } + + export interface AuthUser { + id?: string; + username?: string; + name?: string; + email?: string; + role?: string; + userRole?: string; + user_role?: string; + permissions: string[]; + tenantId?: string;
Removed / Before Commit
- diff --git a/src/styles.css b/src/styles.css - new file mode 100644 - index 0000000..c0ebd8f
Added / After Commit
+ diff --git a/src/styles.css b/src/styles.css + new file mode 100644 + index 0000000..c0ebd8f + @import url("https://fonts.googleapis.com/css2?family=Quicksand:wght@300..700&display=swap"); + @import "tailwindcss" source(none); + @source "../src"; + @import "tw-animate-css"; + + @custom-variant dark (&:is(.dark *)); + + @theme inline { + --radius-sm: calc(var(--radius) - 4px); + --radius-md: calc(var(--radius) - 2px); + --radius-lg: var(--radius); + --radius-xl: calc(var(--radius) + 4px); + --radius-2xl: calc(var(--radius) + 8px); + --color-background: var(--background); + --color-foreground: var(--foreground);
Removed / Before Commit
- diff --git a/tsconfig.json b/tsconfig.json - new file mode 100644 - index 0000000..533d401
Added / After Commit
+ diff --git a/tsconfig.json b/tsconfig.json + new file mode 100644 + index 0000000..533d401 + { + "include": ["src/**/*.ts", "src/**/*.tsx", "vite.config.ts", "eslint.config.js"], + "compilerOptions": { + "target": "ES2022", + "jsx": "react-jsx", + "module": "ESNext", + "lib": ["ES2022", "DOM", "DOM.Iterable"], + "types": ["vite/client"], + + /* Bundler mode */ + "moduleResolution": "Bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": false, + "noEmit": true, +
Removed / Before Commit
- diff --git a/vite.config.ts b/vite.config.ts - new file mode 100644 - index 0000000..24656bf
Added / After Commit
+ diff --git a/vite.config.ts b/vite.config.ts + new file mode 100644 + index 0000000..24656bf + import tailwindcss from "@tailwindcss/vite"; + import { tanstackRouter } from "@tanstack/router-plugin/vite"; + import react from "@vitejs/plugin-react"; + import { defineConfig } from "vite"; + import tsconfigPaths from "vite-tsconfig-paths"; + + export default defineConfig({ + plugins: [ + tanstackRouter({ target: "react" }), + react(), + tailwindcss(), + tsconfigPaths(), + ], + build: { + outDir: "dist",
Removed / Before Commit
- diff --git a/wrangler.jsonc b/wrangler.jsonc - new file mode 100644 - index 0000000..ebb5721
Added / After Commit
+ diff --git a/wrangler.jsonc b/wrangler.jsonc + new file mode 100644 + index 0000000..ebb5721 + { + "$schema": "node_modules/wrangler/config-schema.json", + "name": "tanstack-start-app", + "compatibility_date": "2025-09-24", + "compatibility_flags": ["nodejs_compat"], + "main": "src/server.ts", + }