diff --git a/app/demo/page.tsx b/app/demo/page.tsx new file mode 100644 index 0000000..cc3990a --- /dev/null +++ b/app/demo/page.tsx @@ -0,0 +1,381 @@ +"use client" + +import { motion } from 'framer-motion' +import { useState } from 'react' +import { + Rocket, + Heart, + Star, + Zap, + Database, + Shield, + Layers, + Play, + Pause, + Volume2, + BarChart3, + Calendar +} from 'lucide-react' +import { Button } from '@/components/ui/button' +import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' +import { Badge } from '@/components/ui/badge' +import { Progress } from '@/components/ui/progress' +import { Switch } from '@/components/ui/switch' +import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs' +import { Avatar, AvatarFallback } from '@/components/ui/avatar' +import { Separator } from '@/components/ui/separator' +import { Input } from '@/components/ui/input' +import { Label } from '@/components/ui/label' + +const containerVariants = { + hidden: { opacity: 0 }, + visible: { + opacity: 1, + transition: { + staggerChildren: 0.1 + } + } +} + +const itemVariants = { + hidden: { y: 20, opacity: 0 }, + visible: { + y: 0, + opacity: 1, + transition: { + type: 'spring', + stiffness: 100 + } + } +} + +const floatingVariants = { + animate: { + y: [-10, 10, -10], + transition: { + duration: 3, + repeat: Infinity, + ease: "easeInOut" + } + } +} + +const pulseVariants = { + animate: { + scale: [1, 1.05, 1], + transition: { + duration: 2, + repeat: Infinity, + ease: "easeInOut" + } + } +} + +export default function DemoPage() { + const [isPlaying, setIsPlaying] = useState(false) + const [progress, setProgress] = useState(65) + const [darkMode, setDarkMode] = useState(false) + + const features = [ + { icon: Rocket, title: "Lightning Fast", description: "Built with Next.js 14 for optimal performance" }, + { icon: Shield, title: "Secure by Default", description: "Clerk authentication with Row Level Security" }, + { icon: Database, title: "Real-time Data", description: "Supabase integration with live updates" }, + { icon: Layers, title: "Modern UI", description: "shadcn/ui components with Tailwind CSS" }, + ] + + const stats = [ + { label: "Projects", value: "24", change: "+12%" }, + { label: "Users", value: "1,337", change: "+23%" }, + { label: "Revenue", value: "$12,345", change: "+45%" }, + { label: "Growth", value: "89%", change: "+8%" }, + ] + + return ( +
+ {/* Hero Section */} + + + + + Demo Showcase + + + + Amazing + + + + Experience the power of modern web development with this interactive demo showcasing + cutting-edge components and smooth animations. + + + + {/* Floating Cards */} + + {features.map((feature, index) => ( + + + + + + + {feature.title} + + +

{feature.description}

+
+
+
+ ))} +
+ + {/* Interactive Dashboard */} + + + + + + Interactive Dashboard + + + + + + Overview + Analytics + Reports + Settings + + + +
+ {stats.map((stat, index) => ( + + + +
+
+

{stat.label}

+

{stat.value}

+
+ + {stat.change} + +
+
+
+
+ ))} +
+ +
+
+ + {progress}% +
+ + +
+ + +
+
+
+ + +
+
+

User Activity

+ Live +
+ +
+ {[1, 2, 3].map((_, index) => ( + + +
+ + U{index + 1} + +
+

User {index + 1}

+

Active now

+
+
+
+
+ ))} +
+
+
+ + +
+

Generate Reports

+
+ + +
+
+
+ + +
+

Preferences

+
+
+
+ +

Toggle dark mode theme

+
+ +
+ +
+
+ +

Receive push notifications

+
+ +
+
+
+
+
+
+
+
+ + {/* Media Player Demo */} + + + +
+ + + +
+

Now Playing

+

Awesome Demo Track

+
+
+ +
+ + +
+ +
+ 2:34 / 5:42 +
+
+
+
+ + {/* Contact Form */} + + + + Get in Touch + + +
+ + +
+
+ + +
+ +
+
+
+ + {/* Floating Action Button */} + + + + + +
+
+ ) +} \ No newline at end of file diff --git a/app/page.tsx b/app/page.tsx index c401399..855abca 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,7 +1,6 @@ "use client" import { Hero } from '@/components/ui/animated-hero' -import Image from 'next/image' export default function Home() { return diff --git a/components/ui/animated-hero.tsx b/components/ui/animated-hero.tsx index b47fa57..277ba85 100644 --- a/components/ui/animated-hero.tsx +++ b/components/ui/animated-hero.tsx @@ -1,6 +1,6 @@ import { useEffect, useMemo, useState } from 'react' import { motion } from 'framer-motion' -import { MoveRight, PhoneCall } from 'lucide-react' +import { MoveRight, Eye } from 'lucide-react' import { Button } from '@/components/ui/button' import Image from 'next/image' @@ -72,6 +72,12 @@ function Hero() { + diff --git a/documentation/CLAUDE.md b/documentation/CLAUDE.md new file mode 100644 index 0000000..1a791f9 --- /dev/null +++ b/documentation/CLAUDE.md @@ -0,0 +1,22 @@ +# Claude MCPs Quick Guide + +This project uses Model Context Protocols (MCPs) to enhance development. + +## BrowserMCP +- **Key**: browsermcp +- **Setup Command**: `claude mcp add browsermcp -- npx -y @browsermcp/mcp@latest` +- **Documentation**: https://docs.browsermcp.io + +## Context7 +- **Key**: context7 +- **Setup Command**: `claude mcp add --transport http context7 https://mcp.context7.com/mcp` +- **Documentation**: https://context7.com + +## Quick Setup +1. BrowserMCP: `claude mcp add browsermcp -- npx -y @browsermcp/mcp@latest` +2. Context7: `claude mcp add --transport http context7 https://mcp.context7.com/mcp` + +## Tips +- Make sure Claude Desktop is installed and configured +- Restart Claude Desktop after adding new MCP servers +- Check the documentation links for detailed usage instructions diff --git a/documentation/backend_structure_document.md b/documentation/backend_structure_document.md new file mode 100644 index 0000000..dd82ece --- /dev/null +++ b/documentation/backend_structure_document.md @@ -0,0 +1,164 @@ +# Backend Structure Document + +This document outlines the backend setup for the "CodeGuide Starter Lite" project. It covers the architecture, database, APIs, hosting, infrastructure, security, monitoring, and maintenance in everyday language. + +## 1. Backend Architecture + +### Overview +The backend is built on a serverless model using Next.js 14’s App Router. Instead of a traditional server, we rely on functions that run on demand, eliminating idle servers and enabling instant scaling. + +### Key Design Patterns and Frameworks +- **Next.js App Router**: Provides file-based routing with special `route.ts` files for API endpoints and server components for data fetching. +- **Service/Repository Pattern**: Business logic is separated into services (e.g., subscription service) and repositories (data access), making the code easy to maintain and test. +- **Server Components & Server Actions**: Keep data fetching and mutations on the server, improving performance and avoiding extra client-side bundles. + +### How It Supports Scalability, Maintainability, and Performance +- **Scalability**: Deployed on Vercel’s serverless platform. Each function scales independently under load without manual intervention. +- **Maintainability**: Clear folder structure (`app/api`, `lib/services`, `lib/db`, etc.) separates concerns and encourages reusable code. +- **Performance**: Data is fetched directly from the database in server components, keeping client bundles small. Caching strategies in Next.js (revalidation, incremental static regeneration) speed up common requests. + +## 2. Database Management + +### Database Technology +- **Type**: Relational (SQL) +- **System**: Supabase (hosted PostgreSQL) + +### Data Structure and Access +- **Tables**: Users, Products, Prices, Subscriptions. +- **Row-Level Security (RLS)**: Supabase policies restrict who can read or write each row based on the user’s ID and role. +- **Real-Time Updates**: Supabase Realtime pushes changes to the client in milliseconds when data is inserted, updated, or deleted. +- **Access**: We use the official Supabase JavaScript client in server code, initialized with admin credentials for secure operations. + +### Data Management Practices +- **Migrations**: Managed via Supabase CLI or dashboard—each schema change is versioned. +- **Backups**: Automated daily backups provided by Supabase. +- **Monitoring**: Supabase dashboard displays query performance and storage usage. + +## 3. Database Schema + +### Human-Readable Format +- **Users**: Store user profiles and link to Clerk user IDs. Includes email, name, and timestamps. +- **Products**: Definitions of items or plans the app offers, with name, description, and active flag. +- **Prices**: Tied to products. Includes amount, currency, billing interval (monthly/yearly). +- **Subscriptions**: Tracks which user is subscribed to which price, along with status (active, canceled), and billing periods. + +### SQL Schema (PostgreSQL) +```sql +-- Users table (linked to Clerk) +CREATE TABLE users ( + id UUID PRIMARY KEY, + email TEXT NOT NULL UNIQUE, + full_name TEXT, + created_at TIMESTAMP WITH TIME ZONE DEFAULT now() +); + +-- Products table +CREATE TABLE products ( + id UUID PRIMARY KEY, + name TEXT NOT NULL, + description TEXT, + active BOOLEAN DEFAULT true, + created_at TIMESTAMP WITH TIME ZONE DEFAULT now() +); + +-- Prices table (linked to products) +CREATE TABLE prices ( + id UUID PRIMARY KEY, + product_id UUID REFERENCES products(id) ON DELETE CASCADE, + unit_amount INTEGER NOT NULL, + currency TEXT NOT NULL, + interval TEXT CHECK (interval IN ('month','year')) NOT NULL, + created_at TIMESTAMP WITH TIME ZONE DEFAULT now() +); + +-- Subscriptions table +CREATE TABLE subscriptions ( + id UUID PRIMARY KEY, + user_id UUID REFERENCES users(id) ON DELETE CASCADE, + price_id UUID REFERENCES prices(id) ON DELETE RESTRICT, + status TEXT CHECK (status IN ('active','canceled','trialing')) NOT NULL, + current_period_start TIMESTAMP WITH TIME ZONE, + current_period_end TIMESTAMP WITH TIME ZONE, + created_at TIMESTAMP WITH TIME ZONE DEFAULT now() +); +``` + +## 4. API Design and Endpoints + +### Approach: RESTful +We use Next.js API Route Handlers (`app/api/.../route.ts`) to create RESTful endpoints. + +### Key Endpoints +- **Authentication** + - Handled by Clerk middleware—no custom routes needed. +- **GET /api/products** + - Returns a list of available products and their prices. +- **GET /api/products/:id** + - Returns details for a single product, including price options. +- **GET /api/subscriptions** + - Returns the current user’s subscriptions (requires authentication). +- **POST /api/subscriptions** + - Creates a new subscription for the user. +- **DELETE /api/subscriptions/:id** + - Cancels the specified subscription. +- **GET /api/users/me** + - Returns profile information for the logged-in user. + +### Communication Flow +1. Frontend calls an endpoint (e.g., `GET /api/products`). +2. Next.js route handler verifies the user’s session via Clerk if needed. +3. Handler calls a service that uses the Supabase client to query the database. +4. Data is returned to the frontend as JSON. + +## 5. Hosting Solutions + +- **Vercel**: The entire Next.js app, including API routes, is deployed to Vercel’s global serverless platform. +- **Supabase**: Hosted PostgreSQL database with real-time capabilities and built-in authentication support. +- **Clerk**: Hosted authentication and user management. + +### Benefits +- **Reliability**: Vercel and Supabase are managed services with SLAs. +- **Scalability**: Serverless functions auto-scale under load. +- **Cost-Effectiveness**: Pay-as-you-go pricing means low costs for small projects and automatic growth support. + +## 6. Infrastructure Components + +- **Global CDN**: Vercel’s edge network caches static assets and server responses close to users. +- **Load Balancing**: Automatic in Vercel’s serverless runtime. +- **Caching Mechanisms**: + - Next.js ISR (Incremental Static Regeneration) for pages that change infrequently. + - HTTP caching headers managed via route configurations. +- **Edge Functions**: Small pieces of middleware (e.g., authentication checks) run at the edge for low latency. + +## 7. Security Measures + +- **Authentication**: Handled by Clerk, providing secure login, session management, and multi-factor support out of the box. +- **Authorization**: Supabase Row-Level Security (RLS) ensures users can only access their own data. +- **Transport Security**: All traffic is HTTPS. +- **Data Encryption**: Supabase encrypts data at rest and in transit. +- **Environment Variables**: Sensitive keys (Supabase, Clerk) are stored securely in Vercel’s dashboard—not in source code. +- **Content Security Policy (CSP)**: Default Next.js headers with custom adjustments as needed to prevent cross-site scripting. + +## 8. Monitoring and Maintenance + +### Monitoring Tools +- **Vercel Analytics**: Tracks traffic, response times, and error rates. +- **Supabase Dashboard**: Monitors database performance, query durations, and resource usage. +- **Server Logs**: Accessible via Vercel for API route invocations and errors. + +### Maintenance Strategies +- **Dependency Updates**: Regularly update Next.js, Supabase client, and other dependencies using automated tools (e.g., Dependabot). +- **Database Migrations**: Versioned via Supabase CLI to apply schema changes safely. +- **Health Checks**: Automated smoke tests run after each deployment to verify key endpoints. +- **Backups & Rollbacks**: Daily database backups in Supabase; previous Vercel deployments kept for quick rollbacks. + +## 9. Conclusion and Overall Backend Summary + +The backend of "CodeGuide Starter Lite" combines a serverless Next.js 14 setup with managed services (Supabase for database and real-time features, Clerk for authentication) and is hosted on Vercel. This approach ensures: + +- **Fast Time-to-Market**: Minimal server management. +- **Scalability**: Automatic function and database scaling. +- **Security**: Robust authentication, authorization, and data encryption. +- **Maintainability**: Modular code structure and clear separation of concerns. + +Unique aspects include real-time updates via Supabase Realtime, fine-grained access control with RLS, and the modern developer experience of Next.js App Router. This backend foundation is production-ready, cost-effective, and easy to customize for future SaaS applications. diff --git a/documentation/feature/create-cool-dummy-page/CLAUDE.md b/documentation/feature/create-cool-dummy-page/CLAUDE.md new file mode 100644 index 0000000..1a791f9 --- /dev/null +++ b/documentation/feature/create-cool-dummy-page/CLAUDE.md @@ -0,0 +1,22 @@ +# Claude MCPs Quick Guide + +This project uses Model Context Protocols (MCPs) to enhance development. + +## BrowserMCP +- **Key**: browsermcp +- **Setup Command**: `claude mcp add browsermcp -- npx -y @browsermcp/mcp@latest` +- **Documentation**: https://docs.browsermcp.io + +## Context7 +- **Key**: context7 +- **Setup Command**: `claude mcp add --transport http context7 https://mcp.context7.com/mcp` +- **Documentation**: https://context7.com + +## Quick Setup +1. BrowserMCP: `claude mcp add browsermcp -- npx -y @browsermcp/mcp@latest` +2. Context7: `claude mcp add --transport http context7 https://mcp.context7.com/mcp` + +## Tips +- Make sure Claude Desktop is installed and configured +- Restart Claude Desktop after adding new MCP servers +- Check the documentation links for detailed usage instructions diff --git a/documentation/feature/create-cool-dummy-page/backend_structure_document.md b/documentation/feature/create-cool-dummy-page/backend_structure_document.md new file mode 100644 index 0000000..dd82ece --- /dev/null +++ b/documentation/feature/create-cool-dummy-page/backend_structure_document.md @@ -0,0 +1,164 @@ +# Backend Structure Document + +This document outlines the backend setup for the "CodeGuide Starter Lite" project. It covers the architecture, database, APIs, hosting, infrastructure, security, monitoring, and maintenance in everyday language. + +## 1. Backend Architecture + +### Overview +The backend is built on a serverless model using Next.js 14’s App Router. Instead of a traditional server, we rely on functions that run on demand, eliminating idle servers and enabling instant scaling. + +### Key Design Patterns and Frameworks +- **Next.js App Router**: Provides file-based routing with special `route.ts` files for API endpoints and server components for data fetching. +- **Service/Repository Pattern**: Business logic is separated into services (e.g., subscription service) and repositories (data access), making the code easy to maintain and test. +- **Server Components & Server Actions**: Keep data fetching and mutations on the server, improving performance and avoiding extra client-side bundles. + +### How It Supports Scalability, Maintainability, and Performance +- **Scalability**: Deployed on Vercel’s serverless platform. Each function scales independently under load without manual intervention. +- **Maintainability**: Clear folder structure (`app/api`, `lib/services`, `lib/db`, etc.) separates concerns and encourages reusable code. +- **Performance**: Data is fetched directly from the database in server components, keeping client bundles small. Caching strategies in Next.js (revalidation, incremental static regeneration) speed up common requests. + +## 2. Database Management + +### Database Technology +- **Type**: Relational (SQL) +- **System**: Supabase (hosted PostgreSQL) + +### Data Structure and Access +- **Tables**: Users, Products, Prices, Subscriptions. +- **Row-Level Security (RLS)**: Supabase policies restrict who can read or write each row based on the user’s ID and role. +- **Real-Time Updates**: Supabase Realtime pushes changes to the client in milliseconds when data is inserted, updated, or deleted. +- **Access**: We use the official Supabase JavaScript client in server code, initialized with admin credentials for secure operations. + +### Data Management Practices +- **Migrations**: Managed via Supabase CLI or dashboard—each schema change is versioned. +- **Backups**: Automated daily backups provided by Supabase. +- **Monitoring**: Supabase dashboard displays query performance and storage usage. + +## 3. Database Schema + +### Human-Readable Format +- **Users**: Store user profiles and link to Clerk user IDs. Includes email, name, and timestamps. +- **Products**: Definitions of items or plans the app offers, with name, description, and active flag. +- **Prices**: Tied to products. Includes amount, currency, billing interval (monthly/yearly). +- **Subscriptions**: Tracks which user is subscribed to which price, along with status (active, canceled), and billing periods. + +### SQL Schema (PostgreSQL) +```sql +-- Users table (linked to Clerk) +CREATE TABLE users ( + id UUID PRIMARY KEY, + email TEXT NOT NULL UNIQUE, + full_name TEXT, + created_at TIMESTAMP WITH TIME ZONE DEFAULT now() +); + +-- Products table +CREATE TABLE products ( + id UUID PRIMARY KEY, + name TEXT NOT NULL, + description TEXT, + active BOOLEAN DEFAULT true, + created_at TIMESTAMP WITH TIME ZONE DEFAULT now() +); + +-- Prices table (linked to products) +CREATE TABLE prices ( + id UUID PRIMARY KEY, + product_id UUID REFERENCES products(id) ON DELETE CASCADE, + unit_amount INTEGER NOT NULL, + currency TEXT NOT NULL, + interval TEXT CHECK (interval IN ('month','year')) NOT NULL, + created_at TIMESTAMP WITH TIME ZONE DEFAULT now() +); + +-- Subscriptions table +CREATE TABLE subscriptions ( + id UUID PRIMARY KEY, + user_id UUID REFERENCES users(id) ON DELETE CASCADE, + price_id UUID REFERENCES prices(id) ON DELETE RESTRICT, + status TEXT CHECK (status IN ('active','canceled','trialing')) NOT NULL, + current_period_start TIMESTAMP WITH TIME ZONE, + current_period_end TIMESTAMP WITH TIME ZONE, + created_at TIMESTAMP WITH TIME ZONE DEFAULT now() +); +``` + +## 4. API Design and Endpoints + +### Approach: RESTful +We use Next.js API Route Handlers (`app/api/.../route.ts`) to create RESTful endpoints. + +### Key Endpoints +- **Authentication** + - Handled by Clerk middleware—no custom routes needed. +- **GET /api/products** + - Returns a list of available products and their prices. +- **GET /api/products/:id** + - Returns details for a single product, including price options. +- **GET /api/subscriptions** + - Returns the current user’s subscriptions (requires authentication). +- **POST /api/subscriptions** + - Creates a new subscription for the user. +- **DELETE /api/subscriptions/:id** + - Cancels the specified subscription. +- **GET /api/users/me** + - Returns profile information for the logged-in user. + +### Communication Flow +1. Frontend calls an endpoint (e.g., `GET /api/products`). +2. Next.js route handler verifies the user’s session via Clerk if needed. +3. Handler calls a service that uses the Supabase client to query the database. +4. Data is returned to the frontend as JSON. + +## 5. Hosting Solutions + +- **Vercel**: The entire Next.js app, including API routes, is deployed to Vercel’s global serverless platform. +- **Supabase**: Hosted PostgreSQL database with real-time capabilities and built-in authentication support. +- **Clerk**: Hosted authentication and user management. + +### Benefits +- **Reliability**: Vercel and Supabase are managed services with SLAs. +- **Scalability**: Serverless functions auto-scale under load. +- **Cost-Effectiveness**: Pay-as-you-go pricing means low costs for small projects and automatic growth support. + +## 6. Infrastructure Components + +- **Global CDN**: Vercel’s edge network caches static assets and server responses close to users. +- **Load Balancing**: Automatic in Vercel’s serverless runtime. +- **Caching Mechanisms**: + - Next.js ISR (Incremental Static Regeneration) for pages that change infrequently. + - HTTP caching headers managed via route configurations. +- **Edge Functions**: Small pieces of middleware (e.g., authentication checks) run at the edge for low latency. + +## 7. Security Measures + +- **Authentication**: Handled by Clerk, providing secure login, session management, and multi-factor support out of the box. +- **Authorization**: Supabase Row-Level Security (RLS) ensures users can only access their own data. +- **Transport Security**: All traffic is HTTPS. +- **Data Encryption**: Supabase encrypts data at rest and in transit. +- **Environment Variables**: Sensitive keys (Supabase, Clerk) are stored securely in Vercel’s dashboard—not in source code. +- **Content Security Policy (CSP)**: Default Next.js headers with custom adjustments as needed to prevent cross-site scripting. + +## 8. Monitoring and Maintenance + +### Monitoring Tools +- **Vercel Analytics**: Tracks traffic, response times, and error rates. +- **Supabase Dashboard**: Monitors database performance, query durations, and resource usage. +- **Server Logs**: Accessible via Vercel for API route invocations and errors. + +### Maintenance Strategies +- **Dependency Updates**: Regularly update Next.js, Supabase client, and other dependencies using automated tools (e.g., Dependabot). +- **Database Migrations**: Versioned via Supabase CLI to apply schema changes safely. +- **Health Checks**: Automated smoke tests run after each deployment to verify key endpoints. +- **Backups & Rollbacks**: Daily database backups in Supabase; previous Vercel deployments kept for quick rollbacks. + +## 9. Conclusion and Overall Backend Summary + +The backend of "CodeGuide Starter Lite" combines a serverless Next.js 14 setup with managed services (Supabase for database and real-time features, Clerk for authentication) and is hosted on Vercel. This approach ensures: + +- **Fast Time-to-Market**: Minimal server management. +- **Scalability**: Automatic function and database scaling. +- **Security**: Robust authentication, authorization, and data encryption. +- **Maintainability**: Modular code structure and clear separation of concerns. + +Unique aspects include real-time updates via Supabase Realtime, fine-grained access control with RLS, and the modern developer experience of Next.js App Router. This backend foundation is production-ready, cost-effective, and easy to customize for future SaaS applications. diff --git a/documentation/feature/create-cool-dummy-page/frontend_guidelines_document.md b/documentation/feature/create-cool-dummy-page/frontend_guidelines_document.md new file mode 100644 index 0000000..c097cb8 --- /dev/null +++ b/documentation/feature/create-cool-dummy-page/frontend_guidelines_document.md @@ -0,0 +1,128 @@ +# Frontend Guideline Document + +This document outlines the frontend architecture, design principles, and technologies for the CodeGuide Starter Lite project. It’s written in plain language so anyone—technical or not—can understand how the frontend is set up and why. + +## Frontend Architecture + +### Frameworks and Libraries +- **Next.js 14 (App Router)**: Provides file-based routing, server and client component support, and built-in performance optimizations. +- **React**: The core UI library for building components and handling state. +- **Tailwind CSS**: Utility-first styling framework for rapid, consistent design. +- **shadcn/ui**: A set of pre-built, accessible React components styled with Tailwind. +- **Authentication & Backend Integration**: + - **Clerk**: Manages user sign-up, sign-in, session cookies, and role-based access control (RBAC). + - **Supabase**: Provides the database (PostgreSQL), real-time updates, and row-level security (RLS). +- **Animations**: + - **Framer Motion** for custom, high-performance animations. + - **tailwindcss-animate** for utility classes that trigger common animations. +- **Icons**: Lucide React +- **Utility Libraries**: + - **class-variance-authority (CVA)** and **clsx** for conditional CSS class logic. + - **tailwind-merge** to merge conflicting Tailwind classes gracefully. + - **sonner** and **react-hot-toast** for user notifications. + - **react-resizable-panels**, **vaul** (dialogs/drawers), **cmdk** (command palette), **react-day-picker**, **recharts** (charts). +- **Theme Management**: next-themes for light/dark mode support. + +### How It Supports Scalability, Maintainability, and Performance +- **Scalability**: File-based routing and layouts in Next.js keep code organized as the app grows. Server components reduce client bundle sizes. +- **Maintainability**: A clear folder structure (`app/`, `components/`, `hooks/`, `utils/`, `supabase/`, `types/`) and TypeScript types make it easy to find, update, and understand code. +- **Performance**: Next.js optimizes images, splits code by route, and prioritizes server rendering. Tailwind’s JIT compiler outputs only the CSS you use, keeping stylesheets small. + +## Design Principles + +1. **Usability**: Interfaces follow common patterns (e.g., form flows, navigation bars) so users feel at home. Clear labels, helpful error messages, and toast notifications guide users. +2. **Accessibility**: shadcn/ui components include ARIA attributes. Color contrasts meet WCAG standards. Keyboard navigation and focus outlines are supported. +3. **Responsiveness**: Mobile-first design with Tailwind breakpoints ensures layouts adapt fluidly from phones to large desktops. +4. **Consistency**: Design tokens (colors, spacing, typography) and a shared component library deliver a unified look and predictable behavior. + +### Application of Principles +- Buttons, inputs, and modals come from the same component set with shared props (size, color, disabled state). +- Forms show inline validation messages and use accessible labels. +- Navigation is sticky on desktop and collapsible on mobile. + +## Styling and Theming + +### Styling Approach +- **Utility-First with Tailwind CSS**: Write styles directly in class names, minimizing custom CSS files. +- **CVA & clsx**: Create reusable style variants for components (e.g., `button.primary`, `button.secondary`) while keeping class logic tidy. +- **Tailwind Merge**: Safely compose multiple Tailwind class lists. + +### Theming +- **Dark/Light Mode**: Managed by `next-themes`. CSS custom properties drive color changes at runtime with no full reload. + +### Visual Style +- **Overall Style**: Modern, minimal, and flat. Emphasis on whitespace and clear hierarchy. +- **Glassmorphism Accents**: Subtle translucent panels in modals or cards for depth. + +### Color Palette +- Primary: #3B82F6 (Blue 500) +- Secondary: #6366F1 (Indigo 500) +- Accent: #10B981 (Green 500) +- Neutral Light: #F3F4F6 (Gray 100) +- Neutral Dark: #1F2937 (Gray 800) +- Danger: #EF4444 (Red 500) +- Warning: #F59E0B (Amber 500) +- Info: #0EA5E9 (Sky 500) + +### Typography +- **Font Family**: Inter, with system-ui fallbacks. +- **Headings**: Bold, larger sizes (e.g., `text-2xl`, `text-3xl`). +- **Body**: `text-base` or `text-sm`, comfortable line height for reading. + +## Component Structure + +- **Atomic Components** (`Button`, `Input`, `Card`, `Modal`): Simple, single-purpose pieces. +- **Molecules & Organisms** (`FormLogin`, `NavBar`, `DataTable`): Compose atomic components into larger blocks. +- **Pages & Layouts** (`app/dashboard/page.tsx`, `app/(auth)/layout.tsx`): High-level structures that bring it all together. + +Why Component-Based Architecture Matters: +- **Reusability**: Build once, use everywhere. +- **Isolation**: Easier to test and debug small pieces. +- **Consistency**: Shared props and styles keep the UI cohesive. + +## State Management + +- **Local State**: React’s `useState` and `useReducer` for component-level data. +- **Shared State**: React Context API for things like theme, user session, or global notifications. +- Avoids heavy libraries—keeps bundle size small. +- Data-fetching state (loading, error, data) is often handled per component with React Server Components or client hooks. + +## Routing and Navigation + +- **Next.js App Router** handles routing via filesystem under `app/`: + - `page.tsx` files map to routes. + - `layout.tsx` files wrap multiple pages with common UI (headers, footers). + - Dynamic routes (`[id]`) for parameterized paths. +- **Nested Layouts** allow shared UI between related pages (e.g., a sidebar for all dashboard routes). +- **Link Component** (`next/link`) for client-side navigation with prefetching. + +## Performance Optimization + +- **Code Splitting**: Each route only loads the JavaScript and CSS it needs. +- **Lazy Loading**: React’s `lazy` and `Suspense` for rarely used components (e.g., large charts). +- **Image Optimization**: `next/image` automatically serves optimal sizes and formats. +- **Tailwind JIT**: Generates only the CSS classes used in your code. +- **Server Components**: Moves data fetching and rendering to the server, reducing client bundle size. + +## Testing and Quality Assurance + +- **Unit Tests**: Using Jest and React Testing Library for component logic. +- **Integration Tests**: Verifying that multiple components work together (forms, API calls). +- **End-to-End Tests**: Playwright or Cypress to simulate user flows (sign up, login, data updates). +- **Linting & Formatting**: + - ESLint with recommended rules for React, Next.js, and TypeScript. + - Prettier for consistent code style. +- **TypeScript**: Statically checks types, reducing runtime errors. + +## Conclusion and Overall Frontend Summary + +The CodeGuide Starter Lite frontend combines Next.js 14, Tailwind CSS, and a suite of best-in-class libraries to deliver a scalable, maintainable, and high-performance foundation. Accessibility, responsiveness, and developer experience are at the core of our design. By organizing components, leveraging utility classes, and using modern React patterns (Server Components, Context API), this template gets you up and running quickly while leaving room for customization and growth. + +Key Takeaways: +- A clear architecture with Next.js App Router and atomic components. +- Utility-first styling with a modern color palette and Inter font. +- Simple, built-in state management via React hooks and Context. +- Robust performance optimizations out of the box. +- A testing setup that ensures reliability as the project scales. + +With these guidelines in place, any developer—novice or expert—can jump in, understand the setup, and start building new features confidently. \ No newline at end of file diff --git a/documentation/feature/create-cool-dummy-page/project_requirements_document.md b/documentation/feature/create-cool-dummy-page/project_requirements_document.md new file mode 100644 index 0000000..11c613d --- /dev/null +++ b/documentation/feature/create-cool-dummy-page/project_requirements_document.md @@ -0,0 +1,176 @@ +# Project Requirements Document (PRD) + +## 1. Project Overview + +**CodeGuide Starter Lite** is a modern web‐application boilerplate built on Next.js 14’s App Router. It provides a fully configured, production-ready foundation—covering secure user authentication (via Clerk), real-time data handling (via Supabase), responsive UI components (with Tailwind CSS and shadcn/ui), and dynamic animations (with Framer Motion). Developers can fork this template and instantly start building SaaS products without spending days wiring up common features. + +We’re building this starter kit to save teams time, enforce best practices, and ensure a consistent developer experience. Success means a new project can spin up in under 10 minutes with: +- End-to-end authentication and role-based access control +- A connected, real-time database schema +- A polished, customizable UI with light/dark theming +- Clear code organization and tooling ready for production + +--- + +## 2. In-Scope vs. Out-of-Scope + +### In-Scope (v1.0) +- User registration, login, logout, and session management via Clerk +- Role-based access control (RBAC) enforced through Supabase Row Level Security +- Predefined Supabase schema (users, products, prices, subscriptions) with full CRUD +- Real-time updates using Supabase Realtime +- Frontend built with Next.js 14 App Router, React Hooks, and Context API +- Responsive design using Tailwind CSS + shadcn/ui component library +- Smooth animations (Framer Motion + tailwindcss-animate) +- Light/dark mode toggle (next-themes) +- Toast notifications and error boundaries (sonner + react-hot-toast) +- Basic charts (recharts) and date pickers (react-day-picker) +- Resizable panels (react-resizable-panels), command palette (cmdk), dialogs/drawers (vaul) +- Well-organized code structure for easy customization + +### Out-of-Scope (Phase 1) +- Payment gateway integration (Stripe, PayPal) +- Multi-tenant or white-label support +- Mobile apps (React Native/SwiftUI) +- Offline support or service workers +- End-to-end testing suites (Cypress, Playwright) +- CI/CD pipelines beyond basic Vercel deployment guide +- Advanced analytics dashboards +- Internationalization (i18n) + +--- + +## 3. User Flow + +When a new user lands on the homepage, they see a clean hero section with a “Sign Up / Log In” button. Clicking it opens Clerk’s modal for email/password or social login. After successful authentication, the user is redirected to a Dashboard layout. + +The Dashboard presents a left-hand navigation pane listing modules: Products, Prices, Subscriptions, Settings, etc. The main content area displays the selected module’s list view by default (e.g., a table of products). Users can create, edit, or delete items via modal forms. Real-time updates push changes instantly across open sessions. A theme toggle sits in the header, letting users switch between light and dark modes at any time. + +--- + +## 4. Core Features + +- **Authentication & Authorization** + • Clerk-powered signup/login/logout + • Session management and secure client-side tokens + • Role-based access enforced by Supabase RLS + +- **Database Integration** + • Supabase schema (users, products, prices, subscriptions) + • CRUD helper functions and TypeScript types + • Real-time listeners for instant updates + +- **Routing & Layout** + • Next.js 14 App Router (file-based nested routes, layouts) + • React Server Components for data fetching + • Client Components for interactive UI + +- **Responsive UI** + • Tailwind CSS utility classes + • shadcn/ui component library + • Lucide React icons + +- **Animations & Transitions** + • Framer Motion for complex interactions + • tailwindcss-animate for utility classes + +- **Theming** + • next-themes for light/dark mode + • CSS variables with Tailwind JIT + +- **Notifications & Error Handling** + • sonner for structured toast messages + • react-hot-toast for general alerts + • React error boundaries for recoverable errors + +- **Auxiliary Components** + • react-resizable-panels for adjustable layouts + • vaul for accessible dialogs and drawers + • cmdk for keyboard-driven command palette + • react-day-picker for date selections + • recharts for basic data visualization + +- **Code Quality** + • TypeScript throughout + • class-variance-authority, clsx, tailwind-merge for styling consistency + • Logical folder structure (app, components, lib, hooks, utils, types) + +--- + +## 5. Tech Stack & Tools + +- Frontend Framework: Next.js 14 (App Router) +- Styling: Tailwind CSS + shadcn/ui +- Authentication: Clerk +- Database & Realtime: Supabase (PostgreSQL, RLS, Realtime) +- Animations: Framer Motion, tailwindcss-animate +- Icons: Lucide React +- State Management: React Hooks & Context API +- Theming: next-themes +- Styling Utilities: class-variance-authority, clsx, tailwind-merge +- Notifications: sonner, react-hot-toast +- Panels & Layouts: react-resizable-panels +- Dialogs/Drawers: vaul +- Command Palette: cmdk +- Date Picker: react-day-picker +- Charts: recharts +- Deployment: Vercel +- IDE Plugins (optional): Cursor for AI pair programming, Windsurf for live previews + +_No AI models are directly embedded in v1.0._ + +--- + +## 6. Non-Functional Requirements + +- **Performance**: + • Time to First Byte (TTFB) ≤ 200 ms + • First Contentful Paint (FCP) ≤ 1 s on 3G emulation +- **Security & Compliance**: + • OWASP Top 10 mitigations (XSS, CSRF, injection) + • HTTPS enforcement in production + • Supabase RLS policies audited +- **Scalability**: + • Stateles serverless functions (Vercel) + • Database indexes for common queries +- **Usability & Accessibility**: + • WCAG 2.1 AA compliance for forms, color contrast, keyboard navigation + • Responsive across mobile, tablet, desktop +- **Reliability**: + • 99.9% uptime expected from Clerk and Supabase + • Graceful error states with user-friendly messages + +--- + +## 7. Constraints & Assumptions + +- Must use Next.js 14 and App Router (no legacy Pages Router) +- Supabase account with Realtime enabled and correct RLS policies +- Clerk account for authentication services +- Node.js v18+ environment +- Environment variables (.env.local) to store API keys +- Deployment target: Vercel (serverless functions) +- Developers are familiar with React, TypeScript, and Git + +--- + +## 8. Known Issues & Potential Pitfalls + +- **Supabase RLS Complexity**: Improper policies can block data access. + Mitigation: provide example policies and thorough docs. + +- **Clerk Rate Limits**: Hitting free-tier limits in early dev. + Mitigation: monitor usage, upgrade plan early if needed. + +- **Heavy Animations**: Framer Motion can bloat bundles. + Mitigation: lazy-load large components, tree-shake animations. + +- **App Router Learning Curve**: Beginners might mix server/client components. + Mitigation: include clear examples and comments in code. + +- **Styling Merge Conflicts**: Tailwind-merge and clsx misuse can override styles. + Mitigation: document recommended patterns for conditional classes. + +--- + +This PRD captures all foundational requirements for **CodeGuide Starter Lite**. It leaves no ambiguity: developers and AI agents alike can generate detailed technical docs (Tech Stack, Frontend Guidelines, Backend Structure, etc.) from this reference. \ No newline at end of file diff --git a/documentation/feature/create-cool-dummy-page/security_guideline_document.md b/documentation/feature/create-cool-dummy-page/security_guideline_document.md new file mode 100644 index 0000000..92f0579 --- /dev/null +++ b/documentation/feature/create-cool-dummy-page/security_guideline_document.md @@ -0,0 +1,129 @@ +# Security Guidelines for CodeGuide Starter Lite + +This document outlines security best practices and controls tailored for the CodeGuide Starter Lite Next.js 14 boilerplate. It covers secure design, implementation, and operations, ensuring a defense-in-depth posture for your SaaS applications. + +--- + +## 1. Core Security Principles + +- Security by Design: Integrate security from day one. Treat every feature with a security mindset. +- Least Privilege: Grant only the minimum permissions required (Clerk roles, Supabase RLS policies, environment scopes). +- Defense in Depth: Combine multiple controls (authentication, RLS, rate-limiting, CSP). +- Input Validation & Output Encoding: Assume all external data is untrusted. +- Fail Securely: On error, do not leak stack traces, secrets, or internal paths. +- Secure Defaults: Enable the strongest settings out of the box. + +--- + +## 2. Authentication & Access Control + +### 2.1 Clerk Integration + +- Enforce **strong password policies** via Clerk’s dashboard (minimum length, complexity). +- Require **MFA** for privileged roles (admin, billing managers). +- Validate Clerk JWTs on the server using the official SDK; reject tokens with missing or expired `exp` claims. +- Use Clerk’s role management to assign fine-grained roles (e.g., `user`, `admin`, `support`). + +### 2.2 Supabase Row Level Security (RLS) + +- Define RLS policies per table: + - `users` table: only `owner_id = auth.uid()` rows are accessible by the user. + - `products`/`prices`: allow read-only to public roles, full access to admin roles. +- Test RLS policies thoroughly against edge cases (e.g., mis-configured policies that grant unintended access). + +### 2.3 Session Management + +- Store Clerk session tokens in **Secure**, **HttpOnly**, **SameSite=Lax** cookies. +- Enforce session timeout (idle and absolute) via Clerk configuration. +- Provide a logout endpoint that revokes Clerk sessions server-side. + +--- + +## 3. Input Handling & Processing + +- Always validate and sanitize incoming data in API routes (`/app/api/**`) and server components. +- Use built-in Next.js data validation (e.g., Zod, Yup) for REST/parsing GraphQL inputs. +- Interact with Supabase via its official SDK—avoid constructing raw SQL. Use parameterized queries. +- Sanitize HTML content before rendering (if you allow rich text) using libraries like DOMPurify. +- Validate file upload types, sizes, and strip metadata before passing to Supabase Storage. Store files outside the public folder with randomized filenames. + +--- + +## 4. Data Protection & Privacy + +- Enforce **HTTPS/TLS 1.2+** for all client–server and server–Supabase communications. +- Ensure Supabase database connections use SSL; verify host certificates. +- **Never** store PII or API keys in source code. Use environment variables and Vercel Secrets or a secrets manager (Vault, AWS Secrets Manager). +- Hash any additional credentials or tokens with Argon2 or bcrypt before persisting. +- Enable Supabase’s built-in data encryption at rest. +- Mask or redact sensitive errors; do not expose raw database errors or stack traces to clients. + +--- + +## 5. API & Service Security + +- Enforce strict **CORS** policies in `next.config.js` to allow only your production and staging domains. +- Implement request **rate limiting** and throttling on API routes using a library like `express-rate-limit` or Vercel Edge Middleware. +- Use proper HTTP verbs: + - `GET` for reads, `POST` for creation, `PUT/PATCH` for updates, `DELETE` for removals. +- Version your APIs (`/api/v1/...`) to facilitate controlled changes. +- Return minimal data—avoid leaking internal IDs or environment-specific information. + +--- + +## 6. Web Application Security Hygiene + +- **Content Security Policy (CSP):** Define a restrictive CSP in response headers via `next.config.js` or custom `_middleware.js`: + - Only load scripts/styles from self and vetted CDNs. + - Disallow inline scripts/styles if possible; use nonces or hashes. +- **Security Headers:** + - `Strict-Transport-Security: max-age=63072000; includeSubDomains; preload` + - `X-Content-Type-Options: nosniff` + - `X-Frame-Options: DENY` + - `Referrer-Policy: same-origin` +- **CSRF Protection:** For any custom form POSTs outside Clerk, implement anti-CSRF tokens (e.g., using `csurf`). +- **Secure Cookies:** All cookies set by your app must have `Secure`, `HttpOnly`, and `SameSite=Lax` (or `Strict`). +- **Subresource Integrity (SRI):** Apply SRI hashes on third-party scripts/styles when loading from CDNs. + +--- + +## 7. Infrastructure & Configuration Management + +- **Environment Configurations:** Keep `.env.*` files out of source control. Use Vercel’s Environment Variables feature. +- **Disable Debugging in Production:** Ensure `NEXT_PUBLIC_ENABLE_DEBUG !== true` in production builds. +- **Port & Service Exposure:** Only expose Next.js ports; disable unnecessary services on your hosting environment. +- **Harden Your Node Environment:** Run with non-root user, limit process capabilities. +- **Regular Patching:** Schedule automated dependency and system updates. Monitor for critical CVEs. + +--- + +## 8. Dependency Management + +- Use package lockfiles (`package-lock.json` or `yarn.lock`) to ensure deterministic builds. +- Integrate SCA tools (e.g., Dependabot, Snyk) to alert on vulnerable libraries. +- Perform periodic audits (`npm audit`, `yarn audit`) and update outdated or insecure dependencies promptly. +- Minimize dependencies—review each new library for necessity, maintenance status, and security reputation. + +--- + +## 9. Monitoring, Logging, & Incident Response + +- Log authentication events (login successes/failures), critical API errors, and rate-limit triggers. +- Mask PII in logs; omit full tokens or passwords. +- Integrate with a centralized logging/monitoring system (e.g., Datadog, Sentry) with alerting for anomalies. +- Define an incident response plan: roles, escalation paths, communication channels. + +--- + +## 10. Continuous Security Validation + +- Incorporate security tests into CI/CD pipelines: + - Static Application Security Testing (SAST). + - Dependency scanning. + - Linter checks for unsafe patterns (e.g., use of `dangerouslySetInnerHTML`). +- Conduct periodic penetration tests and threat modeling sessions as the codebase evolves. +- Review and update this guideline whenever major features or dependencies change. + +--- + +By following this layered approach—anchored in strong authentication, rigorous input validation, data protection, secure CI/CD, and continuous monitoring—you'll ensure that CodeGuide Starter Lite remains a trustworthy, production-ready foundation for your next SaaS project. \ No newline at end of file diff --git a/documentation/feature/create-cool-dummy-page/setup.md b/documentation/feature/create-cool-dummy-page/setup.md new file mode 100644 index 0000000..9913980 --- /dev/null +++ b/documentation/feature/create-cool-dummy-page/setup.md @@ -0,0 +1,43 @@ +# Project Setup Instructions + +This project includes a tasks.json file that outlines the implementation tasks for this project. + +## Project Implementation + +1. Review the tasks.json file to understand the project requirements and implementation steps +2. Follow the tasks in sequence to implement the project features +3. Each task contains details about what needs to be implemented +4. Move the CLAUDE.md file to your project root for easy reference on using Claude MCPs +5. Set up MCP integrations to enhance your development experience (see below) + +## Next Steps + +- Refer to the tasks.json file for detailed implementation tasks +- Review the other documentation files to understand the project requirements +- Start implementing based on the provided specifications + +## MCP Integrations (Step 5) + +To enhance your development experience with additional capabilities, add these MCPs: + +### BrowserMCP Integration +```bash +claude mcp add browsermcp -- npx -y @browsermcp/mcp@latest +``` + +For detailed instructions, visit: https://docs.browsermcp.io + +### Context7 Integration +```bash +claude mcp add --transport http context7 https://mcp.context7.com/mcp +``` + +For detailed instructions, visit: https://context7.com + + +## Additional Setup Notes + +- Make sure Claude Desktop is installed and properly configured +- Restart Claude Desktop after adding new MCP servers +- Test each MCP integration to ensure it's working correctly +- Refer to the individual documentation links for advanced configuration options diff --git a/documentation/feature/create-cool-dummy-page/tech_stack_document.md b/documentation/feature/create-cool-dummy-page/tech_stack_document.md new file mode 100644 index 0000000..976ab3c --- /dev/null +++ b/documentation/feature/create-cool-dummy-page/tech_stack_document.md @@ -0,0 +1,110 @@ +# Tech Stack Document + +This document explains the technology choices for the **CodeGuide Starter Lite** project in everyday language. You don’t need a technical background to understand how each piece fits together and why it was chosen. + +## 1. Frontend Technologies +These are the tools and libraries that shape what you see and interact with in your browser. + +- **Next.js 14 (App Router)** + - A modern framework built on React that handles page routing, data loading, and server-side rendering behind the scenes. It makes pages load faster and keeps the code organized. +- **Tailwind CSS** + - A utility-first styling tool that provides ready-made classes (like `p-4` for padding) so developers can build responsive layouts quickly without writing custom CSS from scratch. +- **shadcn/ui** + - A set of pre-built, customizable components (buttons, forms, dialogs) that follow modern design patterns, helping us deliver a clean and consistent look right away. +- **Framer Motion & tailwindcss-animate** + - Animation libraries that let us add smooth transitions and micro-interactions (like fading in menus or sliding panels) to make the app feel lively. +- **Lucide React** + - A collection of simple, customizable icons used throughout the UI for clear visual cues (e.g., menus, buttons, status indicators). +- **next-themes** + - Handles dark/light mode toggling so users can switch themes and have their preference remembered. +- **React Context API & React Hooks** + - Built-in React features for managing state (the app’s data) and sharing it across components without extra libraries. +- **Styling Helpers** + - `class-variance-authority`, `clsx`, and `tailwind-merge` help combine and manage Tailwind classes in a clean, consistent way. +- **Notifications & Feedback** + - `sonner` and `react-hot-toast` display small, temporary messages (toasts) to guide users or show errors. +- **Interactive Components** + - `react-resizable-panels` (adjustable panels), `vaul` (dialogs and drawers), `cmdk` (keyboard command palette), `react-day-picker` (date selector), and `recharts` (charts and graphs) round out the user experience with specialized interfaces. + +**How these choices enhance the experience:** +- Rapid UI development with consistent styling +- Smooth, engaging animations +- Accessible, responsive design across devices +- Clear feedback and interactive elements + +## 2. Backend Technologies +These are the systems that run on the server, manage data, and power the app’s features behind the scenes. + +- **Supabase (PostgreSQL + Realtime)** + - A hosted database that stores all your data (users, products, subscriptions) in a structured way. It also pushes real-time updates to the frontend so users see changes instantly. +- **Clerk** + - Manages user sign-up, login, password reset, and session handling out of the box. It keeps authentication secure and simple to integrate. +- **Next.js API Routes / Route Handlers** + - Built-in server endpoints within Next.js that let us write backend logic (e.g., fetching or updating data) alongside the frontend code. +- **Supabase Row Level Security (RLS)** + - Fine-grained permissions on the database so each user only sees or modifies data they’re allowed to. + +**How these components work together:** +1. A user logs in via Clerk +2. Clerk issues a secure token +3. Next.js API Routes verify the token and fetch or update data in Supabase +4. Supabase pushes real-time changes back to the user’s browser if anyone edits shared data + +## 3. Infrastructure and Deployment +This section covers where the code lives, how it’s tested and deployed, and the tools that keep everything running smoothly. + +- **Version Control: Git & GitHub** + - Every change is tracked in Git and stored on GitHub. This allows multiple developers to collaborate safely and roll back changes if needed. +- **CI/CD Pipeline: GitHub Actions** + - Automated workflows that run tests, check code style, and build the project each time code is pushed. If everything passes, the app is automatically deployed. +- **Hosting Platform: Vercel** + - Optimized for Next.js apps, Vercel handles building, hosting, and global content delivery (CDN) with zero configuration. +- **Environment Variables** + - Sensitive keys (Clerk API keys, Supabase URL and secret) are stored securely in Vercel and never exposed in the code. + +**Benefits of these choices:** +- Fast, reliable deployments with rollbacks +- Team collaboration without conflict +- Automatic testing to catch errors early +- Scalable hosting with global reach + +## 4. Third-Party Integrations +External services that add specialized functionality without reinventing the wheel. + +- **Clerk** + - User authentication and session management service +- **Supabase** + - Managed Postgres database with real-time capabilities +- **Vercel** + - Deployment, hosting, and CDN for the application + +**Why we use them:** +- Reduce time spent on building and maintaining these critical features +- Leverage proven, secure platforms with 24/7 uptime +- Focus development effort on unique product features + +## 5. Security and Performance Considerations +How we keep data safe and the app running smoothly. + +Security Measures: +- **Authentication & Authorization:** Clerk for login flows; Supabase RLS for data permissions +- **Encrypted Communication:** HTTPS everywhere to protect data in transit +- **Environment Variables:** Secrets never in code; stored securely in Vercel +- **Input Validation & Sanitization:** Prevent malicious input on both client and server + +Performance Optimizations: +- **Server-Side Rendering (SSR) & Static Generation:** Next.js renders pages in advance, so users get fast load times +- **Code Splitting & Lazy Loading:** Only load the code needed for the current page or feature +- **Image & Asset Optimization:** Vercel’s built-in optimization for images and static files +- **Realtime Updates:** Supabase pushes only the changed data, avoiding full page refreshes + +## 6. Conclusion and Overall Tech Stack Summary +Every technology in this starter template was chosen to balance ease of development, performance, security, and user experience: + +- **Next.js 14** for a modern, high-performance React framework +- **Tailwind CSS & shadcn/ui** for rapid, consistent styling +- **Framer Motion** for engaging animations +- **Clerk & Supabase** for secure authentication and real-time data +- **GitHub Actions & Vercel** for reliable, zero-config deployments + +This combination gives developers a robust, production-ready foundation that’s easy to customize and scale, while ensuring end users enjoy a fast, secure, and polished experience. \ No newline at end of file diff --git a/documentation/frontend_guidelines_document.md b/documentation/frontend_guidelines_document.md new file mode 100644 index 0000000..c097cb8 --- /dev/null +++ b/documentation/frontend_guidelines_document.md @@ -0,0 +1,128 @@ +# Frontend Guideline Document + +This document outlines the frontend architecture, design principles, and technologies for the CodeGuide Starter Lite project. It’s written in plain language so anyone—technical or not—can understand how the frontend is set up and why. + +## Frontend Architecture + +### Frameworks and Libraries +- **Next.js 14 (App Router)**: Provides file-based routing, server and client component support, and built-in performance optimizations. +- **React**: The core UI library for building components and handling state. +- **Tailwind CSS**: Utility-first styling framework for rapid, consistent design. +- **shadcn/ui**: A set of pre-built, accessible React components styled with Tailwind. +- **Authentication & Backend Integration**: + - **Clerk**: Manages user sign-up, sign-in, session cookies, and role-based access control (RBAC). + - **Supabase**: Provides the database (PostgreSQL), real-time updates, and row-level security (RLS). +- **Animations**: + - **Framer Motion** for custom, high-performance animations. + - **tailwindcss-animate** for utility classes that trigger common animations. +- **Icons**: Lucide React +- **Utility Libraries**: + - **class-variance-authority (CVA)** and **clsx** for conditional CSS class logic. + - **tailwind-merge** to merge conflicting Tailwind classes gracefully. + - **sonner** and **react-hot-toast** for user notifications. + - **react-resizable-panels**, **vaul** (dialogs/drawers), **cmdk** (command palette), **react-day-picker**, **recharts** (charts). +- **Theme Management**: next-themes for light/dark mode support. + +### How It Supports Scalability, Maintainability, and Performance +- **Scalability**: File-based routing and layouts in Next.js keep code organized as the app grows. Server components reduce client bundle sizes. +- **Maintainability**: A clear folder structure (`app/`, `components/`, `hooks/`, `utils/`, `supabase/`, `types/`) and TypeScript types make it easy to find, update, and understand code. +- **Performance**: Next.js optimizes images, splits code by route, and prioritizes server rendering. Tailwind’s JIT compiler outputs only the CSS you use, keeping stylesheets small. + +## Design Principles + +1. **Usability**: Interfaces follow common patterns (e.g., form flows, navigation bars) so users feel at home. Clear labels, helpful error messages, and toast notifications guide users. +2. **Accessibility**: shadcn/ui components include ARIA attributes. Color contrasts meet WCAG standards. Keyboard navigation and focus outlines are supported. +3. **Responsiveness**: Mobile-first design with Tailwind breakpoints ensures layouts adapt fluidly from phones to large desktops. +4. **Consistency**: Design tokens (colors, spacing, typography) and a shared component library deliver a unified look and predictable behavior. + +### Application of Principles +- Buttons, inputs, and modals come from the same component set with shared props (size, color, disabled state). +- Forms show inline validation messages and use accessible labels. +- Navigation is sticky on desktop and collapsible on mobile. + +## Styling and Theming + +### Styling Approach +- **Utility-First with Tailwind CSS**: Write styles directly in class names, minimizing custom CSS files. +- **CVA & clsx**: Create reusable style variants for components (e.g., `button.primary`, `button.secondary`) while keeping class logic tidy. +- **Tailwind Merge**: Safely compose multiple Tailwind class lists. + +### Theming +- **Dark/Light Mode**: Managed by `next-themes`. CSS custom properties drive color changes at runtime with no full reload. + +### Visual Style +- **Overall Style**: Modern, minimal, and flat. Emphasis on whitespace and clear hierarchy. +- **Glassmorphism Accents**: Subtle translucent panels in modals or cards for depth. + +### Color Palette +- Primary: #3B82F6 (Blue 500) +- Secondary: #6366F1 (Indigo 500) +- Accent: #10B981 (Green 500) +- Neutral Light: #F3F4F6 (Gray 100) +- Neutral Dark: #1F2937 (Gray 800) +- Danger: #EF4444 (Red 500) +- Warning: #F59E0B (Amber 500) +- Info: #0EA5E9 (Sky 500) + +### Typography +- **Font Family**: Inter, with system-ui fallbacks. +- **Headings**: Bold, larger sizes (e.g., `text-2xl`, `text-3xl`). +- **Body**: `text-base` or `text-sm`, comfortable line height for reading. + +## Component Structure + +- **Atomic Components** (`Button`, `Input`, `Card`, `Modal`): Simple, single-purpose pieces. +- **Molecules & Organisms** (`FormLogin`, `NavBar`, `DataTable`): Compose atomic components into larger blocks. +- **Pages & Layouts** (`app/dashboard/page.tsx`, `app/(auth)/layout.tsx`): High-level structures that bring it all together. + +Why Component-Based Architecture Matters: +- **Reusability**: Build once, use everywhere. +- **Isolation**: Easier to test and debug small pieces. +- **Consistency**: Shared props and styles keep the UI cohesive. + +## State Management + +- **Local State**: React’s `useState` and `useReducer` for component-level data. +- **Shared State**: React Context API for things like theme, user session, or global notifications. +- Avoids heavy libraries—keeps bundle size small. +- Data-fetching state (loading, error, data) is often handled per component with React Server Components or client hooks. + +## Routing and Navigation + +- **Next.js App Router** handles routing via filesystem under `app/`: + - `page.tsx` files map to routes. + - `layout.tsx` files wrap multiple pages with common UI (headers, footers). + - Dynamic routes (`[id]`) for parameterized paths. +- **Nested Layouts** allow shared UI between related pages (e.g., a sidebar for all dashboard routes). +- **Link Component** (`next/link`) for client-side navigation with prefetching. + +## Performance Optimization + +- **Code Splitting**: Each route only loads the JavaScript and CSS it needs. +- **Lazy Loading**: React’s `lazy` and `Suspense` for rarely used components (e.g., large charts). +- **Image Optimization**: `next/image` automatically serves optimal sizes and formats. +- **Tailwind JIT**: Generates only the CSS classes used in your code. +- **Server Components**: Moves data fetching and rendering to the server, reducing client bundle size. + +## Testing and Quality Assurance + +- **Unit Tests**: Using Jest and React Testing Library for component logic. +- **Integration Tests**: Verifying that multiple components work together (forms, API calls). +- **End-to-End Tests**: Playwright or Cypress to simulate user flows (sign up, login, data updates). +- **Linting & Formatting**: + - ESLint with recommended rules for React, Next.js, and TypeScript. + - Prettier for consistent code style. +- **TypeScript**: Statically checks types, reducing runtime errors. + +## Conclusion and Overall Frontend Summary + +The CodeGuide Starter Lite frontend combines Next.js 14, Tailwind CSS, and a suite of best-in-class libraries to deliver a scalable, maintainable, and high-performance foundation. Accessibility, responsiveness, and developer experience are at the core of our design. By organizing components, leveraging utility classes, and using modern React patterns (Server Components, Context API), this template gets you up and running quickly while leaving room for customization and growth. + +Key Takeaways: +- A clear architecture with Next.js App Router and atomic components. +- Utility-first styling with a modern color palette and Inter font. +- Simple, built-in state management via React hooks and Context. +- Robust performance optimizations out of the box. +- A testing setup that ensures reliability as the project scales. + +With these guidelines in place, any developer—novice or expert—can jump in, understand the setup, and start building new features confidently. \ No newline at end of file diff --git a/documentation/project_requirements_document.md b/documentation/project_requirements_document.md new file mode 100644 index 0000000..11c613d --- /dev/null +++ b/documentation/project_requirements_document.md @@ -0,0 +1,176 @@ +# Project Requirements Document (PRD) + +## 1. Project Overview + +**CodeGuide Starter Lite** is a modern web‐application boilerplate built on Next.js 14’s App Router. It provides a fully configured, production-ready foundation—covering secure user authentication (via Clerk), real-time data handling (via Supabase), responsive UI components (with Tailwind CSS and shadcn/ui), and dynamic animations (with Framer Motion). Developers can fork this template and instantly start building SaaS products without spending days wiring up common features. + +We’re building this starter kit to save teams time, enforce best practices, and ensure a consistent developer experience. Success means a new project can spin up in under 10 minutes with: +- End-to-end authentication and role-based access control +- A connected, real-time database schema +- A polished, customizable UI with light/dark theming +- Clear code organization and tooling ready for production + +--- + +## 2. In-Scope vs. Out-of-Scope + +### In-Scope (v1.0) +- User registration, login, logout, and session management via Clerk +- Role-based access control (RBAC) enforced through Supabase Row Level Security +- Predefined Supabase schema (users, products, prices, subscriptions) with full CRUD +- Real-time updates using Supabase Realtime +- Frontend built with Next.js 14 App Router, React Hooks, and Context API +- Responsive design using Tailwind CSS + shadcn/ui component library +- Smooth animations (Framer Motion + tailwindcss-animate) +- Light/dark mode toggle (next-themes) +- Toast notifications and error boundaries (sonner + react-hot-toast) +- Basic charts (recharts) and date pickers (react-day-picker) +- Resizable panels (react-resizable-panels), command palette (cmdk), dialogs/drawers (vaul) +- Well-organized code structure for easy customization + +### Out-of-Scope (Phase 1) +- Payment gateway integration (Stripe, PayPal) +- Multi-tenant or white-label support +- Mobile apps (React Native/SwiftUI) +- Offline support or service workers +- End-to-end testing suites (Cypress, Playwright) +- CI/CD pipelines beyond basic Vercel deployment guide +- Advanced analytics dashboards +- Internationalization (i18n) + +--- + +## 3. User Flow + +When a new user lands on the homepage, they see a clean hero section with a “Sign Up / Log In” button. Clicking it opens Clerk’s modal for email/password or social login. After successful authentication, the user is redirected to a Dashboard layout. + +The Dashboard presents a left-hand navigation pane listing modules: Products, Prices, Subscriptions, Settings, etc. The main content area displays the selected module’s list view by default (e.g., a table of products). Users can create, edit, or delete items via modal forms. Real-time updates push changes instantly across open sessions. A theme toggle sits in the header, letting users switch between light and dark modes at any time. + +--- + +## 4. Core Features + +- **Authentication & Authorization** + • Clerk-powered signup/login/logout + • Session management and secure client-side tokens + • Role-based access enforced by Supabase RLS + +- **Database Integration** + • Supabase schema (users, products, prices, subscriptions) + • CRUD helper functions and TypeScript types + • Real-time listeners for instant updates + +- **Routing & Layout** + • Next.js 14 App Router (file-based nested routes, layouts) + • React Server Components for data fetching + • Client Components for interactive UI + +- **Responsive UI** + • Tailwind CSS utility classes + • shadcn/ui component library + • Lucide React icons + +- **Animations & Transitions** + • Framer Motion for complex interactions + • tailwindcss-animate for utility classes + +- **Theming** + • next-themes for light/dark mode + • CSS variables with Tailwind JIT + +- **Notifications & Error Handling** + • sonner for structured toast messages + • react-hot-toast for general alerts + • React error boundaries for recoverable errors + +- **Auxiliary Components** + • react-resizable-panels for adjustable layouts + • vaul for accessible dialogs and drawers + • cmdk for keyboard-driven command palette + • react-day-picker for date selections + • recharts for basic data visualization + +- **Code Quality** + • TypeScript throughout + • class-variance-authority, clsx, tailwind-merge for styling consistency + • Logical folder structure (app, components, lib, hooks, utils, types) + +--- + +## 5. Tech Stack & Tools + +- Frontend Framework: Next.js 14 (App Router) +- Styling: Tailwind CSS + shadcn/ui +- Authentication: Clerk +- Database & Realtime: Supabase (PostgreSQL, RLS, Realtime) +- Animations: Framer Motion, tailwindcss-animate +- Icons: Lucide React +- State Management: React Hooks & Context API +- Theming: next-themes +- Styling Utilities: class-variance-authority, clsx, tailwind-merge +- Notifications: sonner, react-hot-toast +- Panels & Layouts: react-resizable-panels +- Dialogs/Drawers: vaul +- Command Palette: cmdk +- Date Picker: react-day-picker +- Charts: recharts +- Deployment: Vercel +- IDE Plugins (optional): Cursor for AI pair programming, Windsurf for live previews + +_No AI models are directly embedded in v1.0._ + +--- + +## 6. Non-Functional Requirements + +- **Performance**: + • Time to First Byte (TTFB) ≤ 200 ms + • First Contentful Paint (FCP) ≤ 1 s on 3G emulation +- **Security & Compliance**: + • OWASP Top 10 mitigations (XSS, CSRF, injection) + • HTTPS enforcement in production + • Supabase RLS policies audited +- **Scalability**: + • Stateles serverless functions (Vercel) + • Database indexes for common queries +- **Usability & Accessibility**: + • WCAG 2.1 AA compliance for forms, color contrast, keyboard navigation + • Responsive across mobile, tablet, desktop +- **Reliability**: + • 99.9% uptime expected from Clerk and Supabase + • Graceful error states with user-friendly messages + +--- + +## 7. Constraints & Assumptions + +- Must use Next.js 14 and App Router (no legacy Pages Router) +- Supabase account with Realtime enabled and correct RLS policies +- Clerk account for authentication services +- Node.js v18+ environment +- Environment variables (.env.local) to store API keys +- Deployment target: Vercel (serverless functions) +- Developers are familiar with React, TypeScript, and Git + +--- + +## 8. Known Issues & Potential Pitfalls + +- **Supabase RLS Complexity**: Improper policies can block data access. + Mitigation: provide example policies and thorough docs. + +- **Clerk Rate Limits**: Hitting free-tier limits in early dev. + Mitigation: monitor usage, upgrade plan early if needed. + +- **Heavy Animations**: Framer Motion can bloat bundles. + Mitigation: lazy-load large components, tree-shake animations. + +- **App Router Learning Curve**: Beginners might mix server/client components. + Mitigation: include clear examples and comments in code. + +- **Styling Merge Conflicts**: Tailwind-merge and clsx misuse can override styles. + Mitigation: document recommended patterns for conditional classes. + +--- + +This PRD captures all foundational requirements for **CodeGuide Starter Lite**. It leaves no ambiguity: developers and AI agents alike can generate detailed technical docs (Tech Stack, Frontend Guidelines, Backend Structure, etc.) from this reference. \ No newline at end of file diff --git a/documentation/security_guideline_document.md b/documentation/security_guideline_document.md new file mode 100644 index 0000000..92f0579 --- /dev/null +++ b/documentation/security_guideline_document.md @@ -0,0 +1,129 @@ +# Security Guidelines for CodeGuide Starter Lite + +This document outlines security best practices and controls tailored for the CodeGuide Starter Lite Next.js 14 boilerplate. It covers secure design, implementation, and operations, ensuring a defense-in-depth posture for your SaaS applications. + +--- + +## 1. Core Security Principles + +- Security by Design: Integrate security from day one. Treat every feature with a security mindset. +- Least Privilege: Grant only the minimum permissions required (Clerk roles, Supabase RLS policies, environment scopes). +- Defense in Depth: Combine multiple controls (authentication, RLS, rate-limiting, CSP). +- Input Validation & Output Encoding: Assume all external data is untrusted. +- Fail Securely: On error, do not leak stack traces, secrets, or internal paths. +- Secure Defaults: Enable the strongest settings out of the box. + +--- + +## 2. Authentication & Access Control + +### 2.1 Clerk Integration + +- Enforce **strong password policies** via Clerk’s dashboard (minimum length, complexity). +- Require **MFA** for privileged roles (admin, billing managers). +- Validate Clerk JWTs on the server using the official SDK; reject tokens with missing or expired `exp` claims. +- Use Clerk’s role management to assign fine-grained roles (e.g., `user`, `admin`, `support`). + +### 2.2 Supabase Row Level Security (RLS) + +- Define RLS policies per table: + - `users` table: only `owner_id = auth.uid()` rows are accessible by the user. + - `products`/`prices`: allow read-only to public roles, full access to admin roles. +- Test RLS policies thoroughly against edge cases (e.g., mis-configured policies that grant unintended access). + +### 2.3 Session Management + +- Store Clerk session tokens in **Secure**, **HttpOnly**, **SameSite=Lax** cookies. +- Enforce session timeout (idle and absolute) via Clerk configuration. +- Provide a logout endpoint that revokes Clerk sessions server-side. + +--- + +## 3. Input Handling & Processing + +- Always validate and sanitize incoming data in API routes (`/app/api/**`) and server components. +- Use built-in Next.js data validation (e.g., Zod, Yup) for REST/parsing GraphQL inputs. +- Interact with Supabase via its official SDK—avoid constructing raw SQL. Use parameterized queries. +- Sanitize HTML content before rendering (if you allow rich text) using libraries like DOMPurify. +- Validate file upload types, sizes, and strip metadata before passing to Supabase Storage. Store files outside the public folder with randomized filenames. + +--- + +## 4. Data Protection & Privacy + +- Enforce **HTTPS/TLS 1.2+** for all client–server and server–Supabase communications. +- Ensure Supabase database connections use SSL; verify host certificates. +- **Never** store PII or API keys in source code. Use environment variables and Vercel Secrets or a secrets manager (Vault, AWS Secrets Manager). +- Hash any additional credentials or tokens with Argon2 or bcrypt before persisting. +- Enable Supabase’s built-in data encryption at rest. +- Mask or redact sensitive errors; do not expose raw database errors or stack traces to clients. + +--- + +## 5. API & Service Security + +- Enforce strict **CORS** policies in `next.config.js` to allow only your production and staging domains. +- Implement request **rate limiting** and throttling on API routes using a library like `express-rate-limit` or Vercel Edge Middleware. +- Use proper HTTP verbs: + - `GET` for reads, `POST` for creation, `PUT/PATCH` for updates, `DELETE` for removals. +- Version your APIs (`/api/v1/...`) to facilitate controlled changes. +- Return minimal data—avoid leaking internal IDs or environment-specific information. + +--- + +## 6. Web Application Security Hygiene + +- **Content Security Policy (CSP):** Define a restrictive CSP in response headers via `next.config.js` or custom `_middleware.js`: + - Only load scripts/styles from self and vetted CDNs. + - Disallow inline scripts/styles if possible; use nonces or hashes. +- **Security Headers:** + - `Strict-Transport-Security: max-age=63072000; includeSubDomains; preload` + - `X-Content-Type-Options: nosniff` + - `X-Frame-Options: DENY` + - `Referrer-Policy: same-origin` +- **CSRF Protection:** For any custom form POSTs outside Clerk, implement anti-CSRF tokens (e.g., using `csurf`). +- **Secure Cookies:** All cookies set by your app must have `Secure`, `HttpOnly`, and `SameSite=Lax` (or `Strict`). +- **Subresource Integrity (SRI):** Apply SRI hashes on third-party scripts/styles when loading from CDNs. + +--- + +## 7. Infrastructure & Configuration Management + +- **Environment Configurations:** Keep `.env.*` files out of source control. Use Vercel’s Environment Variables feature. +- **Disable Debugging in Production:** Ensure `NEXT_PUBLIC_ENABLE_DEBUG !== true` in production builds. +- **Port & Service Exposure:** Only expose Next.js ports; disable unnecessary services on your hosting environment. +- **Harden Your Node Environment:** Run with non-root user, limit process capabilities. +- **Regular Patching:** Schedule automated dependency and system updates. Monitor for critical CVEs. + +--- + +## 8. Dependency Management + +- Use package lockfiles (`package-lock.json` or `yarn.lock`) to ensure deterministic builds. +- Integrate SCA tools (e.g., Dependabot, Snyk) to alert on vulnerable libraries. +- Perform periodic audits (`npm audit`, `yarn audit`) and update outdated or insecure dependencies promptly. +- Minimize dependencies—review each new library for necessity, maintenance status, and security reputation. + +--- + +## 9. Monitoring, Logging, & Incident Response + +- Log authentication events (login successes/failures), critical API errors, and rate-limit triggers. +- Mask PII in logs; omit full tokens or passwords. +- Integrate with a centralized logging/monitoring system (e.g., Datadog, Sentry) with alerting for anomalies. +- Define an incident response plan: roles, escalation paths, communication channels. + +--- + +## 10. Continuous Security Validation + +- Incorporate security tests into CI/CD pipelines: + - Static Application Security Testing (SAST). + - Dependency scanning. + - Linter checks for unsafe patterns (e.g., use of `dangerouslySetInnerHTML`). +- Conduct periodic penetration tests and threat modeling sessions as the codebase evolves. +- Review and update this guideline whenever major features or dependencies change. + +--- + +By following this layered approach—anchored in strong authentication, rigorous input validation, data protection, secure CI/CD, and continuous monitoring—you'll ensure that CodeGuide Starter Lite remains a trustworthy, production-ready foundation for your next SaaS project. \ No newline at end of file diff --git a/documentation/setup.md b/documentation/setup.md new file mode 100644 index 0000000..9913980 --- /dev/null +++ b/documentation/setup.md @@ -0,0 +1,43 @@ +# Project Setup Instructions + +This project includes a tasks.json file that outlines the implementation tasks for this project. + +## Project Implementation + +1. Review the tasks.json file to understand the project requirements and implementation steps +2. Follow the tasks in sequence to implement the project features +3. Each task contains details about what needs to be implemented +4. Move the CLAUDE.md file to your project root for easy reference on using Claude MCPs +5. Set up MCP integrations to enhance your development experience (see below) + +## Next Steps + +- Refer to the tasks.json file for detailed implementation tasks +- Review the other documentation files to understand the project requirements +- Start implementing based on the provided specifications + +## MCP Integrations (Step 5) + +To enhance your development experience with additional capabilities, add these MCPs: + +### BrowserMCP Integration +```bash +claude mcp add browsermcp -- npx -y @browsermcp/mcp@latest +``` + +For detailed instructions, visit: https://docs.browsermcp.io + +### Context7 Integration +```bash +claude mcp add --transport http context7 https://mcp.context7.com/mcp +``` + +For detailed instructions, visit: https://context7.com + + +## Additional Setup Notes + +- Make sure Claude Desktop is installed and properly configured +- Restart Claude Desktop after adding new MCP servers +- Test each MCP integration to ensure it's working correctly +- Refer to the individual documentation links for advanced configuration options diff --git a/documentation/tech_stack_document.md b/documentation/tech_stack_document.md new file mode 100644 index 0000000..976ab3c --- /dev/null +++ b/documentation/tech_stack_document.md @@ -0,0 +1,110 @@ +# Tech Stack Document + +This document explains the technology choices for the **CodeGuide Starter Lite** project in everyday language. You don’t need a technical background to understand how each piece fits together and why it was chosen. + +## 1. Frontend Technologies +These are the tools and libraries that shape what you see and interact with in your browser. + +- **Next.js 14 (App Router)** + - A modern framework built on React that handles page routing, data loading, and server-side rendering behind the scenes. It makes pages load faster and keeps the code organized. +- **Tailwind CSS** + - A utility-first styling tool that provides ready-made classes (like `p-4` for padding) so developers can build responsive layouts quickly without writing custom CSS from scratch. +- **shadcn/ui** + - A set of pre-built, customizable components (buttons, forms, dialogs) that follow modern design patterns, helping us deliver a clean and consistent look right away. +- **Framer Motion & tailwindcss-animate** + - Animation libraries that let us add smooth transitions and micro-interactions (like fading in menus or sliding panels) to make the app feel lively. +- **Lucide React** + - A collection of simple, customizable icons used throughout the UI for clear visual cues (e.g., menus, buttons, status indicators). +- **next-themes** + - Handles dark/light mode toggling so users can switch themes and have their preference remembered. +- **React Context API & React Hooks** + - Built-in React features for managing state (the app’s data) and sharing it across components without extra libraries. +- **Styling Helpers** + - `class-variance-authority`, `clsx`, and `tailwind-merge` help combine and manage Tailwind classes in a clean, consistent way. +- **Notifications & Feedback** + - `sonner` and `react-hot-toast` display small, temporary messages (toasts) to guide users or show errors. +- **Interactive Components** + - `react-resizable-panels` (adjustable panels), `vaul` (dialogs and drawers), `cmdk` (keyboard command palette), `react-day-picker` (date selector), and `recharts` (charts and graphs) round out the user experience with specialized interfaces. + +**How these choices enhance the experience:** +- Rapid UI development with consistent styling +- Smooth, engaging animations +- Accessible, responsive design across devices +- Clear feedback and interactive elements + +## 2. Backend Technologies +These are the systems that run on the server, manage data, and power the app’s features behind the scenes. + +- **Supabase (PostgreSQL + Realtime)** + - A hosted database that stores all your data (users, products, subscriptions) in a structured way. It also pushes real-time updates to the frontend so users see changes instantly. +- **Clerk** + - Manages user sign-up, login, password reset, and session handling out of the box. It keeps authentication secure and simple to integrate. +- **Next.js API Routes / Route Handlers** + - Built-in server endpoints within Next.js that let us write backend logic (e.g., fetching or updating data) alongside the frontend code. +- **Supabase Row Level Security (RLS)** + - Fine-grained permissions on the database so each user only sees or modifies data they’re allowed to. + +**How these components work together:** +1. A user logs in via Clerk +2. Clerk issues a secure token +3. Next.js API Routes verify the token and fetch or update data in Supabase +4. Supabase pushes real-time changes back to the user’s browser if anyone edits shared data + +## 3. Infrastructure and Deployment +This section covers where the code lives, how it’s tested and deployed, and the tools that keep everything running smoothly. + +- **Version Control: Git & GitHub** + - Every change is tracked in Git and stored on GitHub. This allows multiple developers to collaborate safely and roll back changes if needed. +- **CI/CD Pipeline: GitHub Actions** + - Automated workflows that run tests, check code style, and build the project each time code is pushed. If everything passes, the app is automatically deployed. +- **Hosting Platform: Vercel** + - Optimized for Next.js apps, Vercel handles building, hosting, and global content delivery (CDN) with zero configuration. +- **Environment Variables** + - Sensitive keys (Clerk API keys, Supabase URL and secret) are stored securely in Vercel and never exposed in the code. + +**Benefits of these choices:** +- Fast, reliable deployments with rollbacks +- Team collaboration without conflict +- Automatic testing to catch errors early +- Scalable hosting with global reach + +## 4. Third-Party Integrations +External services that add specialized functionality without reinventing the wheel. + +- **Clerk** + - User authentication and session management service +- **Supabase** + - Managed Postgres database with real-time capabilities +- **Vercel** + - Deployment, hosting, and CDN for the application + +**Why we use them:** +- Reduce time spent on building and maintaining these critical features +- Leverage proven, secure platforms with 24/7 uptime +- Focus development effort on unique product features + +## 5. Security and Performance Considerations +How we keep data safe and the app running smoothly. + +Security Measures: +- **Authentication & Authorization:** Clerk for login flows; Supabase RLS for data permissions +- **Encrypted Communication:** HTTPS everywhere to protect data in transit +- **Environment Variables:** Secrets never in code; stored securely in Vercel +- **Input Validation & Sanitization:** Prevent malicious input on both client and server + +Performance Optimizations: +- **Server-Side Rendering (SSR) & Static Generation:** Next.js renders pages in advance, so users get fast load times +- **Code Splitting & Lazy Loading:** Only load the code needed for the current page or feature +- **Image & Asset Optimization:** Vercel’s built-in optimization for images and static files +- **Realtime Updates:** Supabase pushes only the changed data, avoiding full page refreshes + +## 6. Conclusion and Overall Tech Stack Summary +Every technology in this starter template was chosen to balance ease of development, performance, security, and user experience: + +- **Next.js 14** for a modern, high-performance React framework +- **Tailwind CSS & shadcn/ui** for rapid, consistent styling +- **Framer Motion** for engaging animations +- **Clerk & Supabase** for secure authentication and real-time data +- **GitHub Actions & Vercel** for reliable, zero-config deployments + +This combination gives developers a robust, production-ready foundation that’s easy to customize and scale, while ensuring end users enjoy a fast, secure, and polished experience. \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index fd6ea0a..a7d5abc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -71,7 +71,7 @@ "prettier": "^3.4.2", "prettier-plugin-tailwindcss": "^0.6.11", "tailwindcss": "^3.4.1", - "typescript": "^5" + "typescript": "5.8.3" } }, "node_modules/@alloc/quick-lru": { @@ -228,10 +228,11 @@ "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==" }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", - "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", + "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", "dev": true, + "license": "MIT", "dependencies": { "eslint-visitor-keys": "^3.4.3" }, @@ -2109,20 +2110,21 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.21.0.tgz", - "integrity": "sha512-eTH+UOR4I7WbdQnG4Z48ebIA6Bgi7WO8HvFEneeYBxG8qCOYgTOFPSg6ek9ITIDvGjDQzWHcoWHCDO2biByNzA==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.38.0.tgz", + "integrity": "sha512-CPoznzpuAnIOl4nhj4tRr4gIPj5AfKgkiJmGQDaq+fQnRJTYlcBjbX3wbciGmpoPf8DREufuPRe1tNMZnGdanA==", "dev": true, + "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.21.0", - "@typescript-eslint/type-utils": "8.21.0", - "@typescript-eslint/utils": "8.21.0", - "@typescript-eslint/visitor-keys": "8.21.0", + "@typescript-eslint/scope-manager": "8.38.0", + "@typescript-eslint/type-utils": "8.38.0", + "@typescript-eslint/utils": "8.38.0", + "@typescript-eslint/visitor-keys": "8.38.0", "graphemer": "^1.4.0", - "ignore": "^5.3.1", + "ignore": "^7.0.0", "natural-compare": "^1.4.0", - "ts-api-utils": "^2.0.0" + "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2132,21 +2134,32 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "@typescript-eslint/parser": "^8.38.0", "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" } }, "node_modules/@typescript-eslint/parser": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.21.0.tgz", - "integrity": "sha512-Wy+/sdEH9kI3w9civgACwabHbKl+qIOu0uFZ9IMKzX3Jpv9og0ZBJrZExGrPpFAY7rWsXuxs5e7CPPP17A4eYA==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.38.0.tgz", + "integrity": "sha512-Zhy8HCvBUEfBECzIl1PKqF4p11+d0aUJS1GeUiuqK9WmOug8YCmC4h4bjyBvMyAMI9sbRczmrYL5lKg/YMbrcQ==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.21.0", - "@typescript-eslint/types": "8.21.0", - "@typescript-eslint/typescript-estree": "8.21.0", - "@typescript-eslint/visitor-keys": "8.21.0", + "@typescript-eslint/scope-manager": "8.38.0", + "@typescript-eslint/types": "8.38.0", + "@typescript-eslint/typescript-estree": "8.38.0", + "@typescript-eslint/visitor-keys": "8.38.0", "debug": "^4.3.4" }, "engines": { @@ -2158,17 +2171,40 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.38.0.tgz", + "integrity": "sha512-dbK7Jvqcb8c9QfH01YB6pORpqX1mn5gDZc9n63Ak/+jD67oWXn3Gs0M6vddAN+eDXBCS5EmNWzbSxsn9SzFWWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.38.0", + "@typescript-eslint/types": "^8.38.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.21.0.tgz", - "integrity": "sha512-G3IBKz0/0IPfdeGRMbp+4rbjfSSdnGkXsM/pFZA8zM9t9klXDnB/YnKOBQ0GoPmoROa4bCq2NeHgJa5ydsQ4mA==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.38.0.tgz", + "integrity": "sha512-WJw3AVlFFcdT9Ri1xs/lg8LwDqgekWXWhH3iAF+1ZM+QPd7oxQ6jvtW/JPwzAScxitILUIFs0/AnQ/UWHzbATQ==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.21.0", - "@typescript-eslint/visitor-keys": "8.21.0" + "@typescript-eslint/types": "8.38.0", + "@typescript-eslint/visitor-keys": "8.38.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2178,16 +2214,35 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.38.0.tgz", + "integrity": "sha512-Lum9RtSE3EroKk/bYns+sPOodqb2Fv50XOl/gMviMKNvanETUuUcC9ObRbzrJ4VSd2JalPqgSAavwrPiPvnAiQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <5.9.0" + } + }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.21.0.tgz", - "integrity": "sha512-95OsL6J2BtzoBxHicoXHxgk3z+9P3BEcQTpBKriqiYzLKnM2DeSqs+sndMKdamU8FosiadQFT3D+BSL9EKnAJQ==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.38.0.tgz", + "integrity": "sha512-c7jAvGEZVf0ao2z+nnz8BUaHZD09Agbh+DY7qvBQqLiz8uJzRgVPj5YvOh8I8uEiH8oIUGIfHzMwUcGVco/SJg==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.21.0", - "@typescript-eslint/utils": "8.21.0", + "@typescript-eslint/types": "8.38.0", + "@typescript-eslint/typescript-estree": "8.38.0", + "@typescript-eslint/utils": "8.38.0", "debug": "^4.3.4", - "ts-api-utils": "^2.0.0" + "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2198,14 +2253,15 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/types": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.21.0.tgz", - "integrity": "sha512-PAL6LUuQwotLW2a8VsySDBwYMm129vFm4tMVlylzdoTybTHaAi0oBp7Ac6LhSrHHOdLM3efH+nAR6hAWoMF89A==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.38.0.tgz", + "integrity": "sha512-wzkUfX3plUqij4YwWaJyqhiPE5UCRVlFpKn1oCRn2O1bJ592XxWJj8ROQ3JD5MYXLORW84063z3tZTb/cs4Tyw==", "dev": true, + "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -2215,19 +2271,22 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.21.0.tgz", - "integrity": "sha512-x+aeKh/AjAArSauz0GiQZsjT8ciadNMHdkUSwBB9Z6PrKc/4knM4g3UfHml6oDJmKC88a6//cdxnO/+P2LkMcg==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.38.0.tgz", + "integrity": "sha512-fooELKcAKzxux6fA6pxOflpNS0jc+nOQEEOipXFNjSlBS6fqrJOVY/whSn70SScHrcJ2LDsxWrneFoWYSVfqhQ==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.21.0", - "@typescript-eslint/visitor-keys": "8.21.0", + "@typescript-eslint/project-service": "8.38.0", + "@typescript-eslint/tsconfig-utils": "8.38.0", + "@typescript-eslint/types": "8.38.0", + "@typescript-eslint/visitor-keys": "8.38.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", - "ts-api-utils": "^2.0.0" + "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2237,14 +2296,15 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } @@ -2254,6 +2314,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -2265,15 +2326,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.21.0.tgz", - "integrity": "sha512-xcXBfcq0Kaxgj7dwejMbFyq7IOHgpNMtVuDveK7w3ZGwG9owKzhALVwKpTF2yrZmEwl9SWdetf3fxNzJQaVuxw==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.38.0.tgz", + "integrity": "sha512-hHcMA86Hgt+ijJlrD8fX0j1j8w4C92zue/8LOPAFioIno+W0+L7KqE8QZKCcPGc/92Vs9x36w/4MPTJhqXdyvg==", "dev": true, + "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.21.0", - "@typescript-eslint/types": "8.21.0", - "@typescript-eslint/typescript-estree": "8.21.0" + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.38.0", + "@typescript-eslint/types": "8.38.0", + "@typescript-eslint/typescript-estree": "8.38.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2284,17 +2346,18 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.21.0.tgz", - "integrity": "sha512-BkLMNpdV6prozk8LlyK/SOoWLmUFi+ZD+pcqti9ILCbVvHGk1ui1g4jJOc2WDLaeExz2qWwojxlPce5PljcT3w==", + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.38.0.tgz", + "integrity": "sha512-pWrTcoFNWuwHlA9CvlfSsGWs14JxfN1TH25zM5L7o0pRLhsoZkDnTsXfQRJBEWJoV5DL0jf+Z+sxiud+K0mq1g==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.21.0", - "eslint-visitor-keys": "^4.2.0" + "@typescript-eslint/types": "8.38.0", + "eslint-visitor-keys": "^4.2.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2305,10 +2368,11 @@ } }, "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", - "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", "dev": true, + "license": "Apache-2.0", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -7332,10 +7396,11 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/ts-api-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.0.0.tgz", - "integrity": "sha512-xCt/TOAc+EOHS1XPnijD3/yzpH6qg2xppZO1YDqGoVsNXfQfzHpOdNuXwrwOU8u4ITXJyDCTyt8w5g1sZv9ynQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", + "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=18.12" }, @@ -7464,10 +7529,11 @@ } }, "node_modules/typescript": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", - "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/package.json b/package.json index f72ddbc..0321338 100644 --- a/package.json +++ b/package.json @@ -72,6 +72,6 @@ "prettier": "^3.4.2", "prettier-plugin-tailwindcss": "^0.6.11", "tailwindcss": "^3.4.1", - "typescript": "^5" + "typescript": "5.8.3" } }