|
| 1 | + |
| 2 | +"use client"; |
| 3 | + |
| 4 | +import React from 'react'; |
| 5 | +import { Terminal, Package, ShoppingCart, User, Database, Mail, BarChart3, Upload, Search, FileText, Bell, CreditCard, Box, LayoutPanelLeft, Wrench } from 'lucide-react'; |
| 6 | + |
| 7 | +const tools = [ |
| 8 | + { |
| 9 | + category: "Core", |
| 10 | + command: "npx create-postpipe-connector", |
| 11 | + description: "The Essential Tool. Scaffolds the self-hosted database connector.", |
| 12 | + icon: <Database className="w-5 h-5 text-blue-400" /> |
| 13 | + }, |
| 14 | + { |
| 15 | + category: "Auth", |
| 16 | + command: "npx create-postpipe-auth", |
| 17 | + description: "Master Tool. Scaffolds a complete Authentication system (Login, Signup, DB, Email).", |
| 18 | + icon: <User className="w-5 h-5 text-emerald-400" /> |
| 19 | + }, |
| 20 | + { |
| 21 | + category: "E-commerce", |
| 22 | + command: "npx create-postpipe-ecommerce", |
| 23 | + description: "Full-stack shop backend & frontend logic.", |
| 24 | + icon: <ShoppingCart className="w-5 h-5 text-purple-400" /> |
| 25 | + }, |
| 26 | + { |
| 27 | + category: "E-commerce", |
| 28 | + command: "npx create-postpipe-shop", |
| 29 | + description: "Scaffolds specific Shop features like Cart and Wishlist.", |
| 30 | + icon: <ShoppingCart className="w-5 h-5 text-purple-300" /> |
| 31 | + }, |
| 32 | + { |
| 33 | + category: "E-commerce", |
| 34 | + command: "npx create-postpipe-delivery", |
| 35 | + description: "Delivery tracking and management components.", |
| 36 | + icon: <Box className="w-5 h-5 text-amber-400" /> |
| 37 | + }, |
| 38 | + { |
| 39 | + category: "E-commerce", |
| 40 | + command: "npx create-postpipe-payment", |
| 41 | + description: "Components for payment processing integration.", |
| 42 | + icon: <CreditCard className="w-5 h-5 text-indigo-400" /> |
| 43 | + }, |
| 44 | + { |
| 45 | + category: "Features", |
| 46 | + command: "npx create-postpipe-appointment", |
| 47 | + description: "Appointment Booking System (Models, APIs).", |
| 48 | + icon: <Package className="w-5 h-5 text-orange-400" /> |
| 49 | + }, |
| 50 | + { |
| 51 | + category: "Features", |
| 52 | + command: "npx create-postpipe-form", |
| 53 | + description: "Interactive Form APIs (Contact, Feedback, Newsletter).", |
| 54 | + icon: <FileText className="w-5 h-5 text-pink-400" /> |
| 55 | + }, |
| 56 | + { |
| 57 | + category: "Features", |
| 58 | + command: "npx create-postpipe-profile", |
| 59 | + description: "User Profile management (Update Name, Change Password).", |
| 60 | + icon: <User className="w-5 h-5 text-cyan-400" /> |
| 61 | + }, |
| 62 | + { |
| 63 | + category: "Features", |
| 64 | + command: "npx create-postpipe-cms", |
| 65 | + description: "Scaffolds simple Content Management System capabilities.", |
| 66 | + icon: <LayoutPanelLeft className="w-5 h-5 text-rose-400" /> |
| 67 | + }, |
| 68 | + { |
| 69 | + category: "Features", |
| 70 | + command: "npx create-postpipe-search", |
| 71 | + description: "Scaffolds search functionality.", |
| 72 | + icon: <Search className="w-5 h-5 text-teal-400" /> |
| 73 | + }, |
| 74 | + { |
| 75 | + category: "Features", |
| 76 | + command: "npx create-postpipe-notify", |
| 77 | + description: "Notification system (Emails, Alerts).", |
| 78 | + icon: <Bell className="w-5 h-5 text-yellow-400" /> |
| 79 | + }, |
| 80 | + { |
| 81 | + category: "Features", |
| 82 | + command: "npx create-postpipe-analytics", |
| 83 | + description: "Analytics tracking components.", |
| 84 | + icon: <BarChart3 className="w-5 h-5 text-red-400" /> |
| 85 | + }, |
| 86 | + { |
| 87 | + category: "Features", |
| 88 | + command: "npx create-postpipe-upload", |
| 89 | + description: "File upload utilities.", |
| 90 | + icon: <Upload className="w-5 h-5 text-sky-400" /> |
| 91 | + }, |
| 92 | + { |
| 93 | + category: "Admin", |
| 94 | + command: "npx create-postpipe-admin", |
| 95 | + description: "Scaffolds an Admin Dashboard.", |
| 96 | + icon: <LayoutPanelLeft className="w-5 h-5 text-zinc-400" /> |
| 97 | + }, |
| 98 | + { |
| 99 | + category: "Utilities", |
| 100 | + command: "npx create-postpipe-crud", |
| 101 | + description: "Basic CRUD template.", |
| 102 | + icon: <Terminal className="w-5 h-5 text-gray-400" /> |
| 103 | + }, |
| 104 | + { |
| 105 | + category: "Utilities", |
| 106 | + command: "npx create-postpipe-email", |
| 107 | + description: "Sets up Resend email utility.", |
| 108 | + icon: <Mail className="w-5 h-5 text-lime-400" /> |
| 109 | + }, |
| 110 | +]; |
| 111 | + |
| 112 | +// Helper to get ID from category name |
| 113 | +const getCatId = (cat: string) => cat.toLowerCase().replace(" ", "-"); |
| 114 | + |
| 115 | +export default function DocsPage() { |
| 116 | + // Group tools per categories defined in Sidebar |
| 117 | + const categoriesOrder = ["Core", "Auth", "E-commerce", "Features", "Admin", "Utilities"]; |
| 118 | + |
| 119 | + return ( |
| 120 | + <div className="space-y-20 pb-20"> |
| 121 | + |
| 122 | + <div className="space-y-4"> |
| 123 | + <h1 className="text-4xl font-bold text-white tracking-tight">PostPipe Tools</h1> |
| 124 | + <p className="text-lg text-slate-400 max-w-2xl"> |
| 125 | + Browse the complete list of generative modules available in the PostPipe CLI. |
| 126 | + </p> |
| 127 | + </div> |
| 128 | + |
| 129 | + <div className="space-y-24"> |
| 130 | + {categoriesOrder.map((catName) => { |
| 131 | + const catTools = tools.filter(t => t.category === catName || (catName === "Utilities" && (t.category === "Dev" || t.category === "Utils"))); |
| 132 | + |
| 133 | + if (catTools.length === 0) return null; |
| 134 | + |
| 135 | + return ( |
| 136 | + <section key={catName} id={getCatId(catName)} className="scroll-mt-24"> |
| 137 | + <div className="flex items-center gap-4 mb-8 border-b border-white/10 pb-4"> |
| 138 | + <h2 className="text-2xl font-semibold text-white">{catName}</h2> |
| 139 | + <span className="text-xs font-mono text-slate-600 bg-white/5 px-2 py-1 rounded"> |
| 140 | + {catTools.length} Modules |
| 141 | + </span> |
| 142 | + </div> |
| 143 | + |
| 144 | + <div className="grid grid-cols-1 gap-4"> |
| 145 | + {catTools.map((tool, idx) => ( |
| 146 | + <div key={idx} className="group relative bg-zinc-900/50 hover:bg-zinc-900/80 border border-white/5 hover:border-white/10 rounded-xl p-6 transition-all duration-200"> |
| 147 | + <div className="flex flex-col md:flex-row md:items-center justify-between gap-6"> |
| 148 | + |
| 149 | + <div className="flex items-start gap-4"> |
| 150 | + <div className="p-3 bg-black rounded-lg border border-white/10 group-hover:border-blue-500/30 transition-colors"> |
| 151 | + {tool.icon} |
| 152 | + </div> |
| 153 | + <div> |
| 154 | + <div className="flex items-center gap-2 mb-1"> |
| 155 | + <code className="text-sm font-mono text-blue-400 px-1.5 py-0.5 rounded bg-blue-500/10"> |
| 156 | + {tool.command} |
| 157 | + </code> |
| 158 | + </div> |
| 159 | + <p className="text-slate-400 text-sm leading-relaxed"> |
| 160 | + {tool.description} |
| 161 | + </p> |
| 162 | + </div> |
| 163 | + </div> |
| 164 | + |
| 165 | + <button |
| 166 | + className="opacity-0 group-hover:opacity-100 transition-opacity px-4 py-2 bg-white text-black text-sm font-medium rounded-lg hover:bg-slate-200" |
| 167 | + onClick={() => navigator.clipboard.writeText(tool.command)} |
| 168 | + > |
| 169 | + Copy |
| 170 | + </button> |
| 171 | + </div> |
| 172 | + </div> |
| 173 | + ))} |
| 174 | + </div> |
| 175 | + </section> |
| 176 | + ) |
| 177 | + })} |
| 178 | + </div> |
| 179 | + |
| 180 | + </div> |
| 181 | + ); |
| 182 | +} |
0 commit comments