A production-ready full-stack React application with integrated Express server, featuring React Router 6 SPA, TypeScript, Vitest, and modern tooling.
- 📖 How to Deploy - Get your site live online
- 🚀 Development Guide - Local setup
- 📚 Full Documentation - Everything else
- Node.js 20.x or 22.x
- pnpm 10.14.0
# Install dependencies
pnpm install
# Start development server
pnpm devVisit: http://localhost:8080
pnpm dev # Start dev server (with hot reload)
pnpm build # Build for production
pnpm start # Run production build
pnpm test # Run tests
pnpm typecheck # Check TypeScript
pnpm format.fix # Format code- Frontend: React 18 + React Router 6 + TypeScript + Vite + TailwindCSS
- Backend: Express.js + Node.js
- Testing: Vitest
- UI: Radix UI + Lucide Icons
- Styling: TailwindCSS 3
- Package Manager: pnpm
client/
├── pages/ # Route pages
├── components/ # React components
│ └── ui/ # Pre-built UI library
├── hooks/ # Custom React hooks
├── lib/ # Utilities
└── App.tsx # Routing setup
server/
├── index.ts # Express server setup
├── node-build.ts # Production entry
└── routes/ # API endpoints
shared/
└── api.ts # Shared types
public/ # Static files
See DEPLOY.md for complete deployment instructions.
Quick summary:
1. Go to netlify.com
2. Click "New site from Git"
3. Select your GitHub repo
4. Done! Site is live
1. Go to railway.app
2. Click "New Project"
3. Select your repo
4. Done! Site is live
1. Go to render.com
2. Create new Web Service
3. Select your repo
4. Done! Site is live
✅ React 18 with TypeScript
✅ Full-stack with Express backend
✅ Hot reload in development
✅ TailwindCSS 3 styling
✅ Radix UI components
✅ API routing
✅ Testing with Vitest
✅ Production build script
✅ Environment config
Pages are in client/pages/:
// client/App.tsx
import { BrowserRouter, Routes, Route } from "react-router-dom";
<Routes>
<Route path="/" element={<Index />} />
<Route path="*" element={<NotFound />} />
</Routes>Use TailwindCSS utility classes:
<div className="flex items-center justify-center min-h-screen bg-background">
<h1 className="text-4xl font-bold text-foreground">Hello World</h1>
</div>Create endpoints in server/routes/:
// server/routes/example.ts
import { RequestHandler } from "express";
export const handleExample: RequestHandler = (req, res) => {
res.json({ message: "Hello from API" });
};Register in server/index.ts:
import { handleExample } from "./routes/example";
app.get("/api/example", handleExample);Use in React:
const response = await fetch("/api/example");
const data = await response.json();Copy .env.example to .env.local:
cp .env.example .env.localFor production, set variables in your deployment platform.
pnpm testTests are in files named *.spec.ts
pnpm build
pnpm startStarts on port 3000 (configurable via PORT env var)
- Vite Documentation
- React Documentation
- Express Documentation
- TypeScript Documentation
- TailwindCSS Documentation
- Radix UI Documentation
- DEPLOY.md - Complete deployment guide
If you encounter issues:
- Check the documentation
- Review DEPLOY.md for deployment help
- Open a GitHub issue
- Check error logs in browser console (F12)
MIT