Initial commit: Phase 1 scaffolding complete
- Root package.json with concurrently for dev server - Client: Vite + React 18 with design tokens and proxy config - Server: Express with CORS, multer (20MB), Sharp resize - Upload endpoint with preview generation - Dockerfile (multi-stage) and docker-compose.yml - Canvas deferred to Phase 8 (export functionality) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
31
client/src/main.jsx
Normal file
31
client/src/main.jsx
Normal file
@@ -0,0 +1,31 @@
|
||||
import { StrictMode, useEffect, useState } from 'react'
|
||||
import { createRoot } from 'react-dom/client'
|
||||
import './index.css'
|
||||
|
||||
function AppWithHealth() {
|
||||
const [serverStatus, setServerStatus] = useState('Checking...');
|
||||
|
||||
useEffect(() => {
|
||||
fetch('/api/health')
|
||||
.then(res => res.ok ? setServerStatus('Connected ✓') : setServerStatus('Error'))
|
||||
.catch(() => setServerStatus('Offline'));
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div style={{ padding: '2rem', textAlign: 'center' }}>
|
||||
<h1>Apparel Designer</h1>
|
||||
<p style={{ color: 'var(--text-secondary)' }}>
|
||||
T-shirt customization editor
|
||||
</p>
|
||||
<div style={{ marginTop: '2rem', padding: '1rem', background: 'var(--bg-secondary)', borderRadius: 'var(--radius-md)' }}>
|
||||
<p>Server Status: <code id="server-status">{serverStatus}</code></p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
createRoot(document.getElementById('root')).render(
|
||||
<StrictMode>
|
||||
<AppWithHealth />
|
||||
</StrictMode>,
|
||||
)
|
||||
Reference in New Issue
Block a user