initial projet

This commit is contained in:
corenthin 2025-10-06 15:53:52 +02:00
commit a95fa7c2af
8 changed files with 2000 additions and 0 deletions

13
index.html Normal file
View File

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

1858
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

24
package.json Normal file
View File

@ -0,0 +1,24 @@
{
"name": "frontendprojetsolyti",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "nodemon --watch ./src --exec \"vite\"",
"build": "tsc -b && vite build",
"preview": "vite preview",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"nodemon": "^3.1.10",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@types/react": "^18.3.8",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.4",
"typescript": "^5.4.0",
"vite": "^5.4.20"
}
}

18
src/App.tsx Normal file
View File

@ -0,0 +1,18 @@
import { useState } from 'react'
function App() {
const [count, setCount] = useState(0)
return (
<div className="app">
<h1>Bienvenue sur le frontend Solyti</h1>
<p>React + TypeScript + Vite</p>
<button onClick={() => setCount((c) => c + 1)}>
Compteur: {count}
</button>
</div>
)
}
export default App

11
src/main.tsx Normal file
View File

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

34
src/styles.css Normal file
View File

@ -0,0 +1,34 @@
:root {
--bg: #0b1020;
--fg: #e8eefc;
--accent: #5b8cff;
}
* { box-sizing: border-box; }
html, body, #root { height: 100%; }
body {
margin: 0;
background: var(--bg);
color: var(--fg);
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.app {
max-width: 720px;
margin: 0 auto;
padding: 4rem 1.5rem;
}
button {
background: var(--accent);
border: none;
color: #fff;
padding: 0.6rem 1rem;
border-radius: 8px;
cursor: pointer;
}
button:hover { filter: brightness(1.1); }

23
tsconfig.json Normal file
View File

@ -0,0 +1,23 @@
{
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
}
},
"include": ["src"]
}

19
vite.config.ts Normal file
View File

@ -0,0 +1,19 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [react()],
server: {
port: 5173,
host: true
},
preview: {
port: 5173
},
resolve: {
alias: {
'@': '/src'
}
}
});