Replace vanilla HTML with React + shadcn/ui + TailwindCSS scaffold

- Frontend: React 19 + Vite + TypeScript + TailwindCSS v4 + shadcn/ui
- Pre-installed shadcn/ui components: Button, Card, Input, Separator
- Multi-stage Dockerfile: build React client → serve with Express
- Server.js updated to serve built React SPA with API routes
- Sample landing page with shadcn/ui components demonstrating usage
- Path aliases (@/) configured in tsconfig + vite config
- components.json for easy `shadcn add <component>` usage

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-18 15:50:02 +01:00
parent 3eeda1f347
commit 0e21d26c05
25 changed files with 3936 additions and 758 deletions

85
client/src/pages/Home.tsx Normal file
View File

@@ -0,0 +1,85 @@
import { Button } from '@/components/ui/button'
import { Card, CardHeader, CardTitle, CardDescription, CardContent } from '@/components/ui/card'
import { Separator } from '@/components/ui/separator'
export default function HomePage() {
return (
<div className="min-h-screen bg-background">
{/* Header */}
<header className="border-b">
<div className="container mx-auto flex h-16 items-center justify-between px-4">
<h1 className="text-xl font-bold">Company Name</h1>
<nav className="flex items-center gap-4">
<Button variant="ghost">About</Button>
<Button variant="ghost">Contact</Button>
<Button>Get Started</Button>
</nav>
</div>
</header>
{/* Hero */}
<section className="container mx-auto px-4 py-24 text-center">
<h2 className="text-4xl font-bold tracking-tight sm:text-5xl">
Welcome to Your Company
</h2>
<p className="mx-auto mt-6 max-w-2xl text-lg text-muted-foreground">
This is your company website scaffold built with React, shadcn/ui, and TailwindCSS.
Start building your product here.
</p>
<div className="mt-10 flex justify-center gap-4">
<Button size="lg">Get Started</Button>
<Button size="lg" variant="outline">Learn More</Button>
</div>
</section>
<Separator />
{/* Features */}
<section className="container mx-auto px-4 py-16">
<h3 className="mb-8 text-center text-2xl font-bold">Features</h3>
<div className="grid gap-6 sm:grid-cols-2 lg:grid-cols-3">
<Card>
<CardHeader>
<CardTitle>Feature One</CardTitle>
<CardDescription>Description of the first feature.</CardDescription>
</CardHeader>
<CardContent>
<p className="text-sm text-muted-foreground">
Add details about this feature here.
</p>
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle>Feature Two</CardTitle>
<CardDescription>Description of the second feature.</CardDescription>
</CardHeader>
<CardContent>
<p className="text-sm text-muted-foreground">
Add details about this feature here.
</p>
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle>Feature Three</CardTitle>
<CardDescription>Description of the third feature.</CardDescription>
</CardHeader>
<CardContent>
<p className="text-sm text-muted-foreground">
Add details about this feature here.
</p>
</CardContent>
</Card>
</div>
</section>
{/* Footer */}
<footer className="border-t py-8">
<div className="container mx-auto px-4 text-center text-sm text-muted-foreground">
&copy; {new Date().getFullYear()} Company Name. All rights reserved.
</div>
</footer>
</div>
)
}