import { useState } from "react"; import { useParams, Link } from "react-router-dom"; import Layout from "@/components/Layout"; import SEO from "@/components/SEO"; import { CodeBlock } from "@/components/dev-platform/ui/CodeBlock"; import { CodeTabs } from "@/components/dev-platform/CodeTabs"; import { Callout } from "@/components/dev-platform/ui/Callout"; import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; import { Card } from "@/components/ui/card"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { Download, GitFork, Star, ExternalLink, Copy, CheckCircle2, Package, Zap, Shield, } from "lucide-react"; // Mock data - in production, fetch from API const templateData: Record = { "discord-activity-starter": { name: "Discord Activity Starter", description: "Full-featured Discord Activity with user authentication and real-time features", longDescription: "A production-ready starter template for building Discord Activities. Includes OAuth2 authentication, real-time communication with Discord SDK, responsive UI components, and TypeScript support throughout.", category: "Discord Bots", language: "TypeScript", stars: 245, downloads: 1840, author: "AeThex Labs", difficulty: "intermediate", tags: ["discord", "activities", "oauth", "react"], githubUrl: "https://github.com/aethex/discord-activity-starter", demoUrl: "https://discord.com/application-directory/123", version: "2.1.0", lastUpdated: "2026-01-05", license: "MIT", features: [ "Discord OAuth2 authentication flow", "Real-time communication with Discord SDK", "Responsive UI with Tailwind CSS", "TypeScript for type safety", "Express backend with session management", "Database integration with Supabase", "Hot reload for development", "Production build optimization", ], prerequisites: [ "Node.js 18 or higher", "Discord Developer Account", "Basic understanding of React", "Familiarity with REST APIs", ], }, "fullstack-template": { name: "AeThex Full Stack Template", description: "Complete app with React frontend, Express backend, and Supabase integration", longDescription: "A comprehensive full-stack starter template that includes everything you need to build production-ready applications. Features modern React with TypeScript, Express server, Supabase database, and complete authentication system.", category: "Full Stack", language: "TypeScript", stars: 421, downloads: 2156, author: "AeThex Labs", difficulty: "intermediate", tags: ["react", "express", "supabase", "tailwind"], githubUrl: "https://github.com/aethex/fullstack-template", demoUrl: "https://template.aethex.dev", version: "3.0.2", lastUpdated: "2026-01-06", license: "MIT", features: [ "React 18 with TypeScript", "Express server with TypeScript", "Supabase authentication and database", "Tailwind CSS with custom theme", "shadcn/ui component library", "Vite for fast development", "API key management system", "Production deployment configs", ], prerequisites: [ "Node.js 18 or higher", "Supabase account", "Git installed", "Understanding of React and Node.js", ], }, }; export default function TemplateDetail() { const { id } = useParams<{ id: string }>(); const [copied, setCopied] = useState(false); const template = templateData[id || ""] || templateData["fullstack-template"]; const handleCopy = (text: string) => { navigator.clipboard.writeText(text); setCopied(true); setTimeout(() => setCopied(false), 2000); }; const cloneCommand = `git clone ${template.githubUrl}`; const installCommand = "npm install"; const runCommand = "npm run dev"; return (
{/* Header */}
{template.category} {template.language} {template.difficulty}

{template.longDescription}

{template.stars} stars {template.downloads} downloads v{template.version} Updated {template.lastUpdated}
{template.demoUrl && ( )}
{/* Quick Start */}

Quick Start

1. Clone the repository:

{cloneCommand}

2. Install dependencies:

{installCommand}

3. Start development server:

{runCommand}
{/* Content Tabs */} Overview Setup Guide Code Examples FAQ

Features

    {template.features.map((feature: string, index: number) => (
  • {feature}
  • ))}

Prerequisites

    {template.prerequisites.map((prereq: string, index: number) => (
  • {prereq}
  • ))}

License: {template.license}

Maintained by: {template.author}

{template.tags.map((tag: string) => ( {tag} ))}

Before you begin

Make sure you have all prerequisites installed and configured.

1. Clone and Install

2. Configure Environment

Copy the example environment file and add your credentials:

3. Run Development Server

✅ You're ready!

Visit http://localhost:8080 to see your app running.

Authentication Example

API Request Example

How do I deploy this template?

The template includes configuration for deployment to Vercel, Netlify, and Railway. See the README.md file for detailed deployment instructions.

Can I customize the UI theme?

Yes! The template uses Tailwind CSS with custom theme tokens. Edit client/global.css to customize colors, fonts, and design tokens.

Is this production-ready?

Yes, this template includes production optimizations, error handling, security best practices, and monitoring setup. However, always review and test before deploying to production.

How do I get support?

Join our Discord community for help, open an issue on GitHub, or check the documentation site.

{/* Back Link */}
); }