feat(create-turbo): create kitchen-sink

This commit is contained in:
Turbobot 2025-06-19 02:40:01 +08:00 committed by afiqzudinhadi
commit 4625c93980
80 changed files with 11572 additions and 0 deletions

View file

@ -0,0 +1,4 @@
/** @type {import("eslint").Linter.Config} */
import { config } from "@repo/eslint-config";
export default config;

12
apps/admin/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>Admin | Kitchen Sink</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>

27
apps/admin/package.json Normal file
View file

@ -0,0 +1,27 @@
{
"name": "admin",
"version": "0.0.0",
"type": "module",
"private": true,
"scripts": {
"build": "vite build",
"dev": "vite --host 0.0.0.0 --port 3001 --clearScreen false",
"check-types": "tsc --noEmit",
"lint": "eslint src/ --max-warnings 0"
},
"dependencies": {
"@repo/ui": "workspace:*",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@repo/eslint-config": "workspace:*",
"@repo/typescript-config": "workspace:*",
"@types/react": "^18.3.18",
"@types/react-dom": "^18.3.5",
"@vitejs/plugin-react": "^4.5.1",
"eslint": "^9.29.0",
"typescript": "5.8.2",
"vite": "^5.4.14"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 KiB

View file

@ -0,0 +1,27 @@
import "./styles.css";
import { CounterButton } from "@repo/ui/counter-button";
import { Link } from "@repo/ui/link";
function App() {
return (
<div className="container">
<h1 className="title">
Admin <br />
<span>Kitchen Sink</span>
</h1>
<CounterButton />
<p className="description">
Built With{" "}
<Link href="https://turborepo.com" newTab>
Turborepo
</Link>
{" & "}
<Link href="https://vitejs.dev/" newTab>
Vite
</Link>
</p>
</div>
);
}
export default App;

View file

@ -0,0 +1,40 @@
.container {
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 1.5rem;
max-width: 100%;
margin: 0 auto;
padding: 0 16px;
text-align: center;
}
.title {
font-size: 3rem;
font-weight: 700;
margin: 0;
}
.title span {
display: inline-block;
background-image: linear-gradient(to right, #3b82f6, #ef4444);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.description {
color: #9ca3af;
font-weight: 500;
}
.description a {
color: #3b82f6;
text-decoration: none;
}
.description a:hover {
text-decoration: underline;
}

14
apps/admin/src/index.css Normal file
View file

@ -0,0 +1,14 @@
html {
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif;
-webkit-text-size-adjust: 100%;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-tap-highlight-color: transparent;
line-height: 1.5;
tab-size: 4;
}
body {
margin: 0;
}

16
apps/admin/src/main.tsx Normal file
View file

@ -0,0 +1,16 @@
import React from "react";
import { createRoot } from "react-dom/client";
import App from "./app";
import "./index.css";
const el = document.getElementById("root");
if (el) {
const root = createRoot(el);
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);
} else {
throw new Error("Could not find root element");
}

25
apps/admin/tsconfig.json Normal file
View file

@ -0,0 +1,25 @@
{
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
},
"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"]
}

12
apps/admin/turbo.json Normal file
View file

@ -0,0 +1,12 @@
{
"extends": [
"//"
],
"tasks": {
"build": {
"outputs": [
"dist/**"
]
}
}
}

View file

@ -0,0 +1,6 @@
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [react()],
});