| import { useState, useEffect } from "react"; | |
| import { motion } from "framer-motion"; | |
| import { Link } from "react-router-dom"; | |
| import { | |
| Terminal, Copy, Check, Code, ShieldCheck, Cpu, ArrowRight, | |
| Download, HelpCircle, Server, RefreshCw, Key | |
| } from "lucide-react"; | |
| import { toast } from "react-toastify"; | |
| import { ProductSubNav } from "@/components/marketing/ProductSubNav"; | |
| export default function DeveloperCliIntroPage() { | |
| useEffect(() => { | |
| document.title = "Developer CLI | Scientific Command-Line Tools | IE Research"; | |
| }, []); | |
| const [copied, setCopied] = useState(false); | |
| const [activeLang, setActiveLang] = useState<"go" | "node">("go"); | |
| const [activeTab, setActiveTab] = useState<"install" | "auth" | "deploy">("install"); | |
| const installCommands = { | |
| go: "go install ir.ac.ut.ece.ie/cli/ie-cli@latest", | |
| node: "npm install -g ie-research-cli" | |
| }; | |
| const handleCopy = () => { | |
| navigator.clipboard.writeText(installCommands[activeLang]); | |
| setCopied(true); | |
| toast.success("Command copied to clipboard!"); | |
| setTimeout(() => setCopied(false), 2000); | |
| }; | |
| const subNavLinks = [ | |
| { label: "Overview", href: "#overview" }, | |
| { label: "Interactive Demo", href: "#demo" }, | |
| { label: "Features", href: "#features" }, | |
| { label: "Pricing", href: "#pricing" } | |
| ]; | |
| return ( | |
| <div className="pt-20 pb-16 min-h-screen bg-slate-50 dark:bg-slate-950 transition-colors duration-300 text-slate-900 dark:text-slate-100"> | |
| {/* Apple-style Product Sub-Navbar */} | |
| <ProductSubNav | |
| title="Developer CLI" | |
| links={subNavLinks} | |
| ctaLabel="Download CLI" | |
| ctaTo="/download" | |
| /> | |
| {/* 1. Hero Section */} | |
| <section id="overview" className="relative container mx-auto px-4 pt-16 pb-12 text-center overflow-hidden"> | |
| <div className="absolute top-1/3 left-1/4 -translate-x-1/2 -translate-y-1/2 -z-10 w-[600px] h-[600px] bg-teal-500/10 blur-[130px] rounded-full pointer-events-none" /> | |
| <motion.div | |
| initial={{ opacity: 0, y: 30 }} | |
| animate={{ opacity: 1, y: 0 }} | |
| transition={{ duration: 0.8, ease: "easeOut" }} | |
| className="max-w-4xl mx-auto space-y-6" | |
| > | |
| <div className="inline-flex items-center gap-2 px-3 py-1 rounded-full bg-teal-500/10 border border-teal-500/20 text-xs font-semibold text-teal-600 dark:text-teal-400 uppercase tracking-wider"> | |
| <Terminal className="w-3.5 h-3.5" /> Introducing ie-cli 1.0 | |
| </div> | |
| <h1 className="text-5xl md:text-7xl font-bold tracking-tight leading-[1.1]"> | |
| Build & Deploy Tools <br /> | |
| <span className="bg-gradient-to-r from-teal-500 via-emerald-500 to-cyan-500 bg-clip-text text-transparent"> | |
| Directly From Your Terminal | |
| </span> | |
| </h1> | |
| <p className="text-lg md:text-xl text-slate-600 dark:text-slate-400 max-w-2xl mx-auto font-normal leading-relaxed"> | |
| Write scientific sandboxed tools in Go or JS. Authenticate, validate metadata structure, test outputs, and release global platform plugins using one unified command-line utility. | |
| </p> | |
| <div className="flex flex-wrap items-center justify-center gap-4 pt-4"> | |
| <Link | |
| id="cli-start-writing-btn" | |
| to="/download" | |
| className="inline-flex items-center gap-2 px-6 py-3 rounded-full bg-teal-600 text-white font-semibold shadow-lg hover:shadow-xl hover:bg-teal-500 transition duration-300" | |
| > | |
| Get Developer Toolkit | |
| <ArrowRight className="w-4 h-4" /> | |
| </Link> | |
| <a | |
| id="cli-view-demo-btn" | |
| href="#demo" | |
| className="inline-flex items-center gap-2 px-6 py-3 rounded-full bg-white/70 dark:bg-white/5 border border-slate-200 dark:border-white/10 text-slate-700 dark:text-slate-300 font-semibold shadow-sm hover:border-slate-300 dark:hover:border-white/20 transition duration-300 backdrop-blur-sm" | |
| > | |
| Interactive Terminal | |
| </a> | |
| </div> | |
| </motion.div> | |
| </section> | |
| {/* 2. Interactive Terminal Simulator Section */} | |
| <section id="demo" className="container mx-auto px-4 py-16"> | |
| <motion.div | |
| initial={{ opacity: 0, y: 50 }} | |
| whileInView={{ opacity: 1, y: 0 }} | |
| viewport={{ once: true, margin: "-100px" }} | |
| transition={{ duration: 0.8, ease: "easeOut" }} | |
| className="relative max-w-5xl mx-auto rounded-3xl border border-slate-200/80 dark:border-white/10 bg-white/40 dark:bg-slate-900/40 shadow-2xl backdrop-blur-xl overflow-hidden" | |
| > | |
| {/* Mockup Header Toolbar */} | |
| <div className="p-4 border-b border-slate-200/80 dark:border-white/10 bg-slate-100/50 dark:bg-slate-950/40 flex flex-wrap items-center justify-between gap-4"> | |
| <div className="flex items-center gap-2"> | |
| <span className="w-3 h-3 rounded-full bg-red-500/80" /> | |
| <span className="w-3 h-3 rounded-full bg-yellow-500/80" /> | |
| <span className="w-3 h-3 rounded-full bg-green-500/80" /> | |
| <span className="ml-4 text-xs font-semibold text-slate-500 dark:text-slate-400 font-mono"> | |
| terminal://ie-cli-interactive-tour | |
| </span> | |
| </div> | |
| {/* Workflow selectors */} | |
| <div className="flex items-center bg-slate-200/60 dark:bg-slate-800/60 rounded-lg p-0.5 text-xs"> | |
| <button | |
| id="btn-term-install" | |
| onClick={() => setActiveTab("install")} | |
| className={`px-3 py-1.5 rounded-md font-medium transition ${ | |
| activeTab === "install" | |
| ? "bg-white dark:bg-slate-700 text-slate-950 dark:text-white shadow-sm" | |
| : "text-slate-600 dark:text-slate-400 hover:text-slate-950 dark:hover:text-white" | |
| }`} | |
| > | |
| 1. Install Command | |
| </button> | |
| <button | |
| id="btn-term-auth" | |
| onClick={() => setActiveTab("auth")} | |
| className={`px-3 py-1.5 rounded-md font-medium transition ${ | |
| activeTab === "auth" | |
| ? "bg-white dark:bg-slate-700 text-slate-950 dark:text-white shadow-sm" | |
| : "text-slate-600 dark:text-slate-400 hover:text-slate-950 dark:hover:text-white" | |
| }`} | |
| > | |
| 2. Authenticate | |
| </button> | |
| <button | |
| id="btn-term-deploy" | |
| onClick={() => setActiveTab("deploy")} | |
| className={`px-3 py-1.5 rounded-md font-medium transition ${ | |
| activeTab === "deploy" | |
| ? "bg-white dark:bg-slate-700 text-slate-950 dark:text-white shadow-sm" | |
| : "text-slate-600 dark:text-slate-400 hover:text-slate-950 dark:hover:text-white" | |
| }`} | |
| > | |
| 3. Push Deployment | |
| </button> | |
| </div> | |
| </div> | |
| {/* Workspace Layout */} | |
| <div className="grid grid-cols-1 md:grid-cols-12 min-h-[400px]"> | |
| {/* Left: Info Side */} | |
| <div className="md:col-span-5 p-6 bg-slate-50/50 dark:bg-slate-950/20 border-b md:border-b-0 md:border-r border-slate-200/80 dark:border-white/10 flex flex-col justify-between"> | |
| {activeTab === "install" && ( | |
| <div className="space-y-4 text-left"> | |
| <span className="text-[10px] font-bold text-teal-600 dark:text-teal-400 uppercase tracking-widest block">Step 01</span> | |
| <h3 className="text-xl font-bold text-slate-900 dark:text-white">Install Everywhere</h3> | |
| <p className="text-xs text-slate-600 dark:text-slate-400 leading-relaxed"> | |
| Available as a compiled cross-platform Go binary or Node package. Fetch, extract, and append to your PATH directly. | |
| </p> | |
| <div className="flex gap-2"> | |
| <button onClick={() => setActiveLang("go")} className={`px-2.5 py-1 rounded text-[10px] font-bold border transition ${activeLang === "go" ? "bg-teal-500/10 border-teal-500/30 text-teal-400" : "border-slate-200 text-slate-500 dark:border-white/5"}`}>Go Install</button> | |
| <button onClick={() => setActiveLang("node")} className={`px-2.5 py-1 rounded text-[10px] font-bold border transition ${activeLang === "node" ? "bg-sky-500/10 border-sky-500/30 text-sky-400" : "border-slate-200 text-slate-500 dark:border-white/5"}`}>NPM</button> | |
| </div> | |
| </div> | |
| )} | |
| {activeTab === "auth" && ( | |
| <div className="space-y-4 text-left"> | |
| <span className="text-[10px] font-bold text-teal-600 dark:text-teal-400 uppercase tracking-widest block">Step 02</span> | |
| <h3 className="text-xl font-bold text-slate-900 dark:text-white">Secure Authorization</h3> | |
| <p className="text-xs text-slate-600 dark:text-slate-400 leading-relaxed"> | |
| Log in securely with OAuth 2.0 authorization grants or personal developer tokens. Credentials are saved locally inside absolute paths encrypted by system keys. | |
| </p> | |
| </div> | |
| )} | |
| {activeTab === "deploy" && ( | |
| <div className="space-y-4 text-left"> | |
| <span className="text-[10px] font-bold text-teal-600 dark:text-teal-400 uppercase tracking-widest block">Step 03</span> | |
| <h3 className="text-xl font-bold text-slate-900 dark:text-white">Direct-to-Store Push</h3> | |
| <p className="text-xs text-slate-600 dark:text-slate-400 leading-relaxed"> | |
| Point directly to your compiled files or HTML package. The CLI validates your manifest structure and publishes your plugin dynamically to the App Store registry. | |
| </p> | |
| </div> | |
| )} | |
| <div className="text-[10px] text-slate-500 dark:text-slate-400 flex items-center gap-1.5 pt-6"> | |
| <ShieldCheck className="w-3.5 h-3.5 text-emerald-500 flex-shrink-0" /> | |
| <span>Digitally signed SHA256 checksum releases.</span> | |
| </div> | |
| </div> | |
| {/* Right: Terminal Console */} | |
| <div className="md:col-span-7 p-6 bg-slate-950 text-slate-300 font-mono text-xs overflow-auto flex flex-col justify-between"> | |
| <div className="space-y-4"> | |
| {activeTab === "install" && ( | |
| <div className="space-y-3"> | |
| <p className="text-gray-500"># Install globally on your environment</p> | |
| <div className="flex items-center justify-between bg-white/5 px-3 py-2.5 rounded-lg border border-white/5 gap-4"> | |
| <span className="text-teal-400 truncate select-all">{installCommands[activeLang]}</span> | |
| <button onClick={handleCopy} className="p-1 hover:bg-white/5 rounded text-gray-400 hover:text-white transition"> | |
| {copied ? <Check className="w-3.5 h-3.5 text-emerald-400" /> : <Copy className="w-3.5 h-3.5" />} | |
| </button> | |
| </div> | |
| </div> | |
| )} | |
| {activeTab === "auth" && ( | |
| <div className="space-y-2"> | |
| <p className="text-gray-500"># Authenticate developer session</p> | |
| <p className="text-white">$ ie-cli login --token dev_token_0987654321</p> | |
| <p className="text-gray-400">Verifying session credentials with api.ie-research.org...</p> | |
| <p className="text-emerald-400">✔ Successfully authorized as researcher: @tahamajs</p> | |
| </div> | |
| )} | |
| {activeTab === "deploy" && ( | |
| <div className="space-y-2"> | |
| <p className="text-gray-500"># Package and deploy to modular marketplace</p> | |
| <p className="text-white">$ ie-cli deploy --dir ./my-plugin --private=false</p> | |
| <p className="text-gray-400">Validating manifest.json configurations...</p> | |
| <p className="text-gray-400">Uploading bundled assets (34.2 KB)...</p> | |
| <p className="text-emerald-400">✔ Successfully published plugin: "Citation Visualizer" v1.2.0</p> | |
| <p className="text-teal-400 font-bold">👉 Access at: https://ie-research.org/tools/citation-vis-xyz</p> | |
| </div> | |
| )} | |
| </div> | |
| <div className="border-t border-white/5 pt-4 mt-6 text-slate-600 text-[10px] flex items-center justify-between"> | |
| <span>OS: macOS / Linux / Windows x64</span> | |
| <span>v1.0.0 Stable</span> | |
| </div> | |
| </div> | |
| </div> | |
| </motion.div> | |
| </section> | |
| {/* 3. Detailed CLI Product Benefits */} | |
| <section id="features" className="container mx-auto px-4 py-16 relative"> | |
| <div className="absolute top-1/2 right-1/4 -z-10 w-[400px] h-[400px] bg-teal-500/5 blur-[120px] rounded-full" /> | |
| <div className="max-w-6xl mx-auto space-y-12"> | |
| <div className="text-center space-y-4 max-w-3xl mx-auto"> | |
| <h2 className="text-3xl md:text-5xl font-bold tracking-tight text-slate-900 dark:text-white"> | |
| Built for Rapid Scientific Extension | |
| </h2> | |
| <p className="text-lg text-slate-600 dark:text-slate-400"> | |
| No bloated setup required. Streamlined pipelines make testing local files and pushing code loops simple. | |
| </p> | |
| </div> | |
| <div className="grid grid-cols-1 md:grid-cols-3 gap-8 pt-6"> | |
| {[ | |
| { | |
| icon: Cpu, | |
| title: "Optimized Compiled Performance", | |
| desc: "Written in Go, the binary is compiled natively with zero external dependencies. Launches instantly with negligible memory usage.", | |
| color: "from-blue-500 to-indigo-500" | |
| }, | |
| { | |
| icon: ShieldCheck, | |
| title: "Strict Sandboxing Audit", | |
| desc: "Integrated pre-upload checks search HTML structure and JS references to verify safety and lock dependencies into secure sandboxes.", | |
| color: "from-emerald-500 to-teal-500" | |
| }, | |
| { | |
| icon: RefreshCw, | |
| title: "Instant Live Updates", | |
| desc: "Re-pushing an updated workspace file refreshes occurrences across all active scientific editors globally in under 2 seconds.", | |
| color: "from-amber-500 to-orange-500" | |
| } | |
| ].map((benefit, index) => ( | |
| <motion.div | |
| key={benefit.title} | |
| initial={{ opacity: 0, y: 30 }} | |
| whileInView={{ opacity: 1, y: 0 }} | |
| viewport={{ once: true, margin: "-50px" }} | |
| transition={{ duration: 0.5, delay: index * 0.1 }} | |
| className="group relative p-6 rounded-2xl bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-850 shadow-md hover:shadow-xl transition-all duration-300" | |
| > | |
| <div className={`w-12 h-12 rounded-xl bg-gradient-to-r ${benefit.color} text-white flex items-center justify-center mb-5 group-hover:scale-110 transition duration-300 shadow-md`}> | |
| <benefit.icon className="w-5 h-5" /> | |
| </div> | |
| <h3 className="text-xl font-bold text-slate-900 dark:text-white mb-2"> | |
| {benefit.title} | |
| </h3> | |
| <p className="text-slate-600 dark:text-slate-400 text-sm leading-relaxed"> | |
| {benefit.desc} | |
| </p> | |
| </motion.div> | |
| ))} | |
| </div> | |
| </div> | |
| </section> | |
| {/* 4. Pricing Plans */} | |
| <section id="pricing" className="container mx-auto px-4 py-20"> | |
| <div className="max-w-6xl mx-auto space-y-12"> | |
| <div className="text-center space-y-4 max-w-2xl mx-auto"> | |
| <h2 className="text-3xl md:text-5xl font-bold tracking-tight text-slate-900 dark:text-white"> | |
| Developer Tier Options | |
| </h2> | |
| <p className="text-slate-600 dark:text-slate-400 text-lg"> | |
| The CLI is open-source and free for all researchers. Premium limits apply to publication catalogs. | |
| </p> | |
| </div> | |
| <div className="grid grid-cols-1 md:grid-cols-2 gap-8 max-w-3xl mx-auto pt-6"> | |
| {[ | |
| { | |
| name: "Community Open Source", | |
| price: "$0", | |
| period: "forever", | |
| desc: "Build widgets and publish openly for scientists globally.", | |
| features: [ | |
| "100% Free developer binary download", | |
| "Open-source Go/Node codebase access", | |
| "Publish unlimited public sandbox tools", | |
| "Standard Crossref metadata support", | |
| "Community forum assistance support" | |
| ], | |
| cta: "Download Open-Source CLI", | |
| popular: false | |
| }, | |
| { | |
| name: "Private Team / Lab", | |
| price: "$19", | |
| period: "per lab / mo", | |
| desc: "Ideal for research teams designing proprietary utilities.", | |
| features: [ | |
| "Everything in Open Source", | |
| "Publish private laboratory modules (unlimited)", | |
| "Custom local API servers integration", | |
| "Advanced usage & installation telemetry", | |
| "Priority code check review cycles" | |
| ], | |
| cta: "Buy Team License", | |
| popular: true | |
| } | |
| ].map((plan, index) => ( | |
| <motion.div | |
| key={plan.name} | |
| initial={{ opacity: 0, y: 30 }} | |
| whileInView={{ opacity: 1, y: 0 }} | |
| viewport={{ once: true, margin: "-50px" }} | |
| transition={{ duration: 0.5, delay: index * 0.15 }} | |
| className={`relative rounded-3xl p-8 bg-white dark:bg-slate-900 border flex flex-col justify-between ${ | |
| plan.popular | |
| ? "border-teal-600 shadow-xl ring-2 ring-teal-500/20 scale-105 z-10" | |
| : "border-slate-200 dark:border-slate-800 shadow-md" | |
| }`} | |
| > | |
| {plan.popular && ( | |
| <span className="absolute -top-3.5 left-1/2 -translate-x-1/2 bg-teal-600 text-white text-xs font-bold px-3 py-1 rounded-full uppercase tracking-wider"> | |
| Most Popular | |
| </span> | |
| )} | |
| <div> | |
| <h3 className="text-xl font-bold text-slate-900 dark:text-white mb-2">{plan.name}</h3> | |
| <p className="text-xs text-slate-500 dark:text-slate-400 mb-6">{plan.desc}</p> | |
| <div className="flex items-baseline gap-1 mb-6"> | |
| <span className="text-4xl md:text-5xl font-extrabold text-slate-900 dark:text-white">{plan.price}</span> | |
| <span className="text-xs text-slate-500 dark:text-slate-400 font-medium">/{plan.period}</span> | |
| </div> | |
| <div className="w-full h-px bg-slate-100 dark:bg-slate-800 my-6" /> | |
| <ul className="space-y-4 mb-8"> | |
| {plan.features.map((feat) => ( | |
| <li key={feat} className="flex items-start gap-3 text-xs text-slate-600 dark:text-slate-300"> | |
| <Check className="w-4 h-4 text-emerald-500 flex-shrink-0 mt-0.5" /> | |
| <span>{feat}</span> | |
| </li> | |
| ))} | |
| </ul> | |
| </div> | |
| <Link | |
| id={`btn-cli-pricing-${plan.name.toLowerCase().replace(" ", "-")}`} | |
| to="/pricing" | |
| className={`w-full py-3 rounded-full text-center text-xs font-bold transition duration-300 ${ | |
| plan.popular | |
| ? "bg-teal-600 text-white hover:bg-teal-500 shadow-md hover:shadow-lg" | |
| : "bg-slate-100 hover:bg-slate-200 dark:bg-white/5 dark:hover:bg-white/10 text-slate-800 dark:text-slate-200" | |
| }`} | |
| > | |
| {plan.cta} | |
| </Link> | |
| </motion.div> | |
| ))} | |
| </div> | |
| </div> | |
| </section> | |
| {/* 5. CTA Footer */} | |
| <section className="container mx-auto px-4 py-12 text-center"> | |
| <div className="max-w-4xl mx-auto rounded-3xl bg-gradient-to-r from-teal-900 to-emerald-800 p-10 md:p-14 text-white shadow-xl relative overflow-hidden"> | |
| <div className="absolute inset-0 bg-[radial-gradient(circle_at_bottom_right,rgba(255,255,255,0.1),transparent_40%)]" /> | |
| <div className="relative z-10 space-y-6"> | |
| <h2 className="text-3xl md:text-4xl font-bold tracking-tight">Deploy Your First Scientific Tool</h2> | |
| <p className="text-teal-100 max-w-xl mx-auto text-sm md:text-base leading-relaxed"> | |
| Read the developer guidelines, copy the installation snippet, and publish your custom widget inside the platform workspace in minutes. | |
| </p> | |
| <div className="pt-4"> | |
| <Link | |
| id="cli-cta-btn" | |
| to="/download" | |
| className="inline-flex items-center gap-2 px-8 py-3 rounded-full bg-white text-slate-900 font-bold hover:bg-slate-50 transition shadow-lg hover:shadow-xl active:scale-95" | |
| > | |
| Get CLI binary | |
| <ArrowRight className="w-4 h-4 text-teal-600" /> | |
| </Link> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| </div> | |
| ); | |
| } | |
Xet Storage Details
- Size:
- 22.2 kB
- Xet hash:
- 8dfddd88b40cc9e6e87af270eb3c3fa4b58ed84f654b409bf153c9fa92214070
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.