initial config

This commit is contained in:
blaisadmin
2025-10-12 20:42:56 -04:00
parent a05ce5c33d
commit 33804043c6
19 changed files with 598 additions and 0 deletions

13
frontend/Dockerfile.dev Normal file
View File

@@ -0,0 +1,13 @@
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install --legacy-peer-deps
COPY . .
EXPOSE 3000
CMD ["npm", "run", "dev", "--", "--host"]

12
frontend/index.html Normal file
View File

@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Archery Scoring</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>

29
frontend/package.json Normal file
View File

@@ -0,0 +1,29 @@
{
"name": "archery-scoring-frontend",
"version": "0.1.0",
"private": true,
"type": "module",
"dependencies": {
"react": "18.2.0",
"react-dom": "18.2.0",
"react-router-dom": "6.20.1",
"axios": "1.6.2",
"tailwindcss": "3.4.1",
"lucide-react": "0.263.1",
"zod": "3.22.4"
},
"devDependencies": {
"@types/react": "18.2.37",
"@types/react-dom": "18.2.15",
"@vitejs/plugin-react": "4.2.1",
"vite": "5.0.8",
"typescript": "5.3.3",
"postcss": "8.4.32",
"autoprefixer": "10.4.16"
},
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview"
}
}

View File

@@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}

31
frontend/src/App.tsx Normal file
View File

@@ -0,0 +1,31 @@
import { BrowserRouter as Router, Routes, Route, Link } from 'react-router-dom'
import { ArcheryTarget } from 'lucide-react'
import Home from './pages/Home'
function App() {
return (
<Router>
<div className="min-h-screen bg-gradient-to-br from-slate-900 to-slate-800">
<nav className="bg-slate-900 border-b border-slate-700">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div className="flex justify-between items-center h-16">
<Link to="/" className="flex items-center space-x-2">
<ArcheryTarget className="text-amber-400" size={32} />
<span className="text-white font-bold text-xl">Archery Scoring</span>
</Link>
<div className="space-x-4">
<Link to="/" className="text-gray-300 hover:text-white">Home</Link>
</div>
</div>
</div>
</nav>
<Routes>
<Route path="/" element={<Home />} />
</Routes>
</div>
</Router>
)
}
export default App

22
frontend/src/index.css Normal file
View File

@@ -0,0 +1,22 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}

10
frontend/src/main.tsx Normal file
View File

@@ -0,0 +1,10 @@
import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App'
import './index.css'
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<App />
</React.StrictMode>,
)

View File

@@ -0,0 +1,22 @@
export default function Home() {
return (
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-20">
<div className="text-center">
<h1 className="text-5xl font-bold text-white mb-6">
Welcome to Archery Scoring
</h1>
<p className="text-xl text-gray-300 mb-8">
Track tournament scores with precision and ease
</p>
<div className="space-x-4">
<button className="bg-amber-500 hover:bg-amber-600 text-white px-8 py-3 rounded-lg font-semibold">
Create Tournament
</button>
<button className="bg-slate-700 hover:bg-slate-600 text-white px-8 py-3 rounded-lg font-semibold">
Join Tournament
</button>
</div>
</div>
</div>
)
}

View File

@@ -0,0 +1,11 @@
/** @type {import('tailwindcss').Config} */
export default {
content: [
"./index.html",
"./src/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {},
},
plugins: [],
}

18
frontend/tsconfig.json Normal file
View File

@@ -0,0 +1,18 @@
{
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,
"esModuleInterop": true,
"strict": true,
"resolveJsonModule": true,
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"noEmit": true,
"jsx": "react-jsx"
},
"include": ["src"],
"references": [{ "path": "./tsconfig.node.json" }]
}

View File

@@ -0,0 +1,10 @@
{
"compilerOptions": {
"composite": true,
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true
},
"include": ["vite.config.ts"]
}

10
frontend/vite.config.ts Normal file
View File

@@ -0,0 +1,10 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react()],
server: {
port: 3000,
host: true,
},
})