Skip to content

Commit

Permalink
Setup web client with root layout and nav bar
Browse files Browse the repository at this point in the history
  • Loading branch information
nandesh-dev committed Oct 12, 2024
1 parent 0219881 commit e848fab
Show file tree
Hide file tree
Showing 20 changed files with 3,111 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
generated/*
generated/
web/node_modules/
2 changes: 2 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ pkgs.mkShell {
protoc-gen-go-grpc
protoc-gen-go
graphviz
nodejs_22
pnpm
];
}
14 changes: 14 additions & 0 deletions web/assets/home.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export function HomeIcon({ className }: { className: string | undefined }) {
return (
<svg
width="20"
height="22"
viewBox="0 0 20 22"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className={className}
>
<path d="M2.5 19.4857H6.25V11.9429H13.75V19.4857H17.5V8.17143L10 2.51429L2.5 8.17143V19.4857ZM2.5 22C1.8125 22 1.22417 21.754 0.735 21.2621C0.245 20.7693 0 20.1771 0 19.4857V8.17143C0 7.77333 0.0887498 7.39619 0.26625 7.04C0.442916 6.68381 0.6875 6.39048 1 6.16L8.5 0.502857C8.72917 0.335238 8.96875 0.209524 9.21875 0.125714C9.46875 0.0419046 9.72917 0 10 0C10.2708 0 10.5312 0.0419046 10.7812 0.125714C11.0313 0.209524 11.2708 0.335238 11.5 0.502857L19 6.16C19.3125 6.39048 19.5575 6.68381 19.735 7.04C19.9117 7.39619 20 7.77333 20 8.17143V19.4857C20 20.1771 19.7554 20.7693 19.2663 21.2621C18.7763 21.754 18.1875 22 17.5 22H11.25V14.4571H8.75V22H2.5Z" />
</svg>
);
}
1 change: 1 addition & 0 deletions web/assets/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./home";
28 changes: 28 additions & 0 deletions web/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'

export default tseslint.config(
{ ignores: ['dist'] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
},
)
16 changes: 16 additions & 0 deletions web/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Sora:[email protected]&display=swap" rel="stylesheet">
<title>Subtle</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
34 changes: 34 additions & 0 deletions web/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "web",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"preview": "vite preview"
},
"dependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-responsive": "^10.0.0",
"react-router-dom": "^6.26.2"
},
"devDependencies": {
"@eslint/js": "^9.11.1",
"@types/react": "^18.3.10",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.2",
"autoprefixer": "^10.4.20",
"eslint": "^9.11.1",
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
"eslint-plugin-react-refresh": "^0.4.12",
"globals": "^15.9.0",
"postcss": "^8.4.47",
"tailwindcss": "^3.4.13",
"typescript": "^5.5.3",
"typescript-eslint": "^8.7.0",
"vite": "^5.4.8"
}
}
Loading

0 comments on commit e848fab

Please sign in to comment.