Skip to content

Commit bd99960

Browse files
committed
initial commit
0 parents  commit bd99960

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+16838
-0
lines changed

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?
25+
.vercel

README.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# React + TypeScript + Vite
2+
3+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4+
5+
Currently, two official plugins are available:
6+
7+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh
8+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9+
10+
## React Compiler
11+
12+
The React Compiler is enabled on this template. See [this documentation](https://react.dev/learn/react-compiler) for more information.
13+
14+
Note: This will impact Vite dev & build performances.
15+
16+
## Expanding the ESLint configuration
17+
18+
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
19+
20+
```js
21+
export default defineConfig([
22+
globalIgnores(['dist']),
23+
{
24+
files: ['**/*.{ts,tsx}'],
25+
extends: [
26+
// Other configs...
27+
28+
// Remove tseslint.configs.recommended and replace with this
29+
tseslint.configs.recommendedTypeChecked,
30+
// Alternatively, use this for stricter rules
31+
tseslint.configs.strictTypeChecked,
32+
// Optionally, add this for stylistic rules
33+
tseslint.configs.stylisticTypeChecked,
34+
35+
// Other configs...
36+
],
37+
languageOptions: {
38+
parserOptions: {
39+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
40+
tsconfigRootDir: import.meta.dirname,
41+
},
42+
// other options...
43+
},
44+
},
45+
])
46+
```
47+
48+
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
49+
50+
```js
51+
// eslint.config.js
52+
import reactX from 'eslint-plugin-react-x'
53+
import reactDom from 'eslint-plugin-react-dom'
54+
55+
export default defineConfig([
56+
globalIgnores(['dist']),
57+
{
58+
files: ['**/*.{ts,tsx}'],
59+
extends: [
60+
// Other configs...
61+
// Enable lint rules for React
62+
reactX.configs['recommended-typescript'],
63+
// Enable lint rules for React DOM
64+
reactDom.configs.recommended,
65+
],
66+
languageOptions: {
67+
parserOptions: {
68+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
69+
tsconfigRootDir: import.meta.dirname,
70+
},
71+
// other options...
72+
},
73+
},
74+
])
75+
```

components.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "new-york",
4+
"rsc": false,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "",
8+
"css": "src/index.css",
9+
"baseColor": "neutral",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"iconLibrary": "lucide",
14+
"aliases": {
15+
"components": "@/components",
16+
"utils": "@/lib/utils",
17+
"ui": "@/components/ui",
18+
"lib": "@/lib",
19+
"hooks": "@/hooks"
20+
},
21+
"registries": {}
22+
}

electron/main.cjs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
const { app, BrowserWindow } = require('electron');
2+
const path = require('path');
3+
4+
const isDev = !app.isPackaged;
5+
6+
function createWindow() {
7+
const win = new BrowserWindow({
8+
width: 1200,
9+
height: 800,
10+
webPreferences: {
11+
preload: path.join(__dirname, 'preload.cjs'),
12+
},
13+
titleBarStyle: "hiddenInset"
14+
});
15+
16+
if (isDev) {
17+
win.loadURL('http://localhost:5173');
18+
} else {
19+
win.loadFile(path.join(__dirname, '../dist/index.html'));
20+
}
21+
}
22+
23+
app.whenReady().then(() => {
24+
createWindow();
25+
26+
app.on('activate', () => {
27+
if (BrowserWindow.getAllWindows().length === 0) createWindow();
28+
});
29+
});
30+
31+
app.on('window-all-closed', () => {
32+
if (process.platform !== 'darwin') app.quit();
33+
});

electron/preload.cjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const { contextBridge } = require('electron');
2+
3+
contextBridge.exposeInMainWorld('electron', {
4+
ping: () => 'pong',
5+
});

eslint.config.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
import reactHooks from 'eslint-plugin-react-hooks'
4+
import reactRefresh from 'eslint-plugin-react-refresh'
5+
import tseslint from 'typescript-eslint'
6+
import { defineConfig, globalIgnores } from 'eslint/config'
7+
8+
export default defineConfig([
9+
globalIgnores(['dist']),
10+
{
11+
files: ['**/*.{ts,tsx}'],
12+
extends: [
13+
js.configs.recommended,
14+
tseslint.configs.recommended,
15+
reactHooks.configs['recommended-latest'],
16+
reactRefresh.configs.vite,
17+
],
18+
languageOptions: {
19+
ecmaVersion: 2020,
20+
globals: globals.browser,
21+
},
22+
},
23+
])

forge.config.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
module.exports = {
2+
packagerConfig: {
3+
icon: '/public/images/icon' // no file extension required
4+
},
5+
makers: [
6+
{
7+
name: '@electron-forge/maker-squirrel',
8+
config: {
9+
setupIcon: '/public/images/icon.ico'
10+
}
11+
},
12+
{
13+
name: '@electron-forge/maker-deb',
14+
config: {
15+
options: {
16+
icon: '/public/images/icon.png'
17+
}
18+
}
19+
},
20+
{
21+
name: '@electron-forge/maker-dmg',
22+
config: {
23+
icon: '/public/images/icon.icns'
24+
}
25+
},
26+
{
27+
name: '@electron-forge/maker-wix',
28+
config: {
29+
icon: '/public/images/icon.ico'
30+
}
31+
}
32+
]
33+
};

index.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!doctype html>
2+
<html lang="en" class="w-full h-full">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Hive Laboratory</title>
8+
9+
<link href="/src/index.css" rel="stylesheet">
10+
<script src="https://cdn.jsdelivr.net/npm/react-scan/dist/auto.global.js"></script>
11+
12+
</head>
13+
<body class="dark w-full h-full">
14+
<div id="root" class="w-full h-full"></div>
15+
<script type="module" src="/src/main.tsx"></script>
16+
</body>
17+
</html>

package.json

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
{
2+
"name": "hive-laboratory",
3+
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"main": "electron/main.cjs",
7+
"build": {
8+
"appId": "com.guild.hive.laboratory",
9+
"productName": "Hive Laboratory",
10+
"artifactName": "HiveLab-${version}-Do_Not_Open_(Seriously_It's_Pre-Release)-${os}-${arch}.${ext}",
11+
"files": [
12+
"dist/**/*",
13+
"electron/**/*"
14+
],
15+
"directories": {
16+
"buildResources": "assets"
17+
}
18+
},
19+
"scripts": {
20+
"dev": "vite",
21+
"dev:electron": "VITE_TARGET=electron concurrently \"vite\" \"wait-on http://localhost:5173 && electron .\"",
22+
"build": "tsc -b && vite build",
23+
"dist:electron": "VITE_TARGET=electron vite build && electron-builder",
24+
"lint": "eslint .",
25+
"preview": "vite preview"
26+
},
27+
"dependencies": {
28+
"@dnd-kit/core": "^6.3.1",
29+
"@dnd-kit/modifiers": "^9.0.0",
30+
"@dnd-kit/sortable": "^10.0.0",
31+
"@dnd-kit/utilities": "^3.2.2",
32+
"@monaco-editor/react": "4.8.0-rc.2",
33+
"@radix-ui/react-alert-dialog": "^1.1.15",
34+
"@radix-ui/react-checkbox": "^1.3.3",
35+
"@radix-ui/react-collapsible": "^1.1.12",
36+
"@radix-ui/react-context-menu": "^2.2.16",
37+
"@radix-ui/react-dialog": "^1.1.15",
38+
"@radix-ui/react-dropdown-menu": "^2.1.16",
39+
"@radix-ui/react-label": "^2.1.8",
40+
"@radix-ui/react-scroll-area": "^1.2.10",
41+
"@radix-ui/react-select": "^2.2.6",
42+
"@radix-ui/react-separator": "^1.1.7",
43+
"@radix-ui/react-slot": "^1.2.3",
44+
"@radix-ui/react-tabs": "^1.1.13",
45+
"@radix-ui/react-toggle": "^1.1.10",
46+
"@radix-ui/react-tooltip": "^1.2.8",
47+
"@tailwindcss/vite": "^4.1.16",
48+
"@tanstack/react-form": "^1.23.8",
49+
"@tanstack/react-router": "^1.135.0",
50+
"@tanstack/react-router-devtools": "^1.135.0",
51+
"class-variance-authority": "^0.7.1",
52+
"clsx": "^2.1.1",
53+
"cmdk": "^1.1.1",
54+
"date-fns": "^4.1.0",
55+
"esbuild": "^0.25.11",
56+
"graphql": "^16.11.0",
57+
"graphql-ws": "^6.0.6",
58+
"lodash": "^4.17.21",
59+
"lucide-react": "^0.548.0",
60+
"lz-string": "^1.5.0",
61+
"monaco-editor": "^0.54.0",
62+
"monaco-graphql": "^1.7.2",
63+
"next-themes": "^0.4.6",
64+
"react": "^19.1.1",
65+
"react-dom": "^19.1.1",
66+
"react-resizable-panels": "^3.0.6",
67+
"sonner": "^2.0.7",
68+
"tailwind-merge": "^3.3.1",
69+
"tailwindcss": "^4.1.16",
70+
"vite-plugin-monaco-editor": "^1.1.0",
71+
"zod": "^4.1.12"
72+
},
73+
"devDependencies": {
74+
"@eslint/js": "^9.36.0",
75+
"@tanstack/router-plugin": "^1.135.0",
76+
"@types/lodash": "^4.17.20",
77+
"@types/node": "^24.6.0",
78+
"@types/react": "^19.1.16",
79+
"@types/react-dom": "^19.1.9",
80+
"@vitejs/plugin-react": "^5.0.4",
81+
"babel-plugin-react-compiler": "^19.1.0-rc.3",
82+
"concurrently": "^9.2.1",
83+
"electron": "^39.1.1",
84+
"electron-builder": "^26.0.12",
85+
"eslint": "^9.36.0",
86+
"eslint-plugin-react-hooks": "^5.2.0",
87+
"eslint-plugin-react-refresh": "^0.4.22",
88+
"globals": "^16.4.0",
89+
"tw-animate-css": "^1.4.0",
90+
"typescript": "~5.9.3",
91+
"typescript-eslint": "^8.45.0",
92+
"vite": "npm:[email protected]",
93+
"wait-on": "^9.0.3"
94+
},
95+
"pnpm": {
96+
"overrides": {
97+
"vite": "npm:[email protected]"
98+
}
99+
}
100+
}

0 commit comments

Comments
 (0)