refactor: convert to monorepo

Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
2025-09-16 23:01:40 +00:00
parent 59e14a9c9a
commit 223a594479
46 changed files with 68 additions and 66 deletions

View File

@@ -3,6 +3,14 @@
"workspaces": {
"": {
"name": "bun-react-template",
"devDependencies": {
"@biomejs/biome": "2.2.4",
"@types/bun": "latest",
},
},
"packages/web": {
"name": "@fileone/web",
"version": "0.1.0",
"dependencies": {
"@convex-dev/workos": "^0.0.1",
"@radix-ui/react-checkbox": "^1.3.3",
@@ -33,9 +41,7 @@
"tw-animate-css": "^1.3.8",
},
"devDependencies": {
"@biomejs/biome": "2.2.4",
"@tanstack/router-cli": "^1.131.41",
"@types/bun": "latest",
"@types/react": "^19",
"@types/react-dom": "^19",
},
@@ -174,6 +180,8 @@
"@esbuild/win32-x64": ["@esbuild/win32-x64@0.25.4", "", { "os": "win32", "cpu": "x64" }, "sha512-nOT2vZNw6hJ+z43oP1SPea/G/6AbN6X+bGNhNuq8NtRHy4wsMhw765IKLNmnjek7GvjWBYQ8Q5VBoYTFg9y1UQ=="],
"@fileone/web": ["@fileone/web@workspace:packages/web"],
"@floating-ui/core": ["@floating-ui/core@1.7.3", "", { "dependencies": { "@floating-ui/utils": "^0.2.10" } }, "sha512-sGnvb5dmrJaKEZ+LDIpguvdX3bDlEllmv4/ClQ9awcmCZrlx5jQyyMWFM5kBI+EyNOCDDiKk8il0zeuX3Zlg/w=="],
"@floating-ui/dom": ["@floating-ui/dom@1.7.4", "", { "dependencies": { "@floating-ui/core": "^1.7.3", "@floating-ui/utils": "^0.2.10" } }, "sha512-OOchDgh4F2CchOX94cRVqhvy7b3AFb+/rQXyswmzmGakRfkMgoWVjfnLWkRirfLEfuD4ysVW16eXzwt3jHIzKA=="],

View File

@@ -1,47 +1,18 @@
{
"name": "bun-react-template",
"name": "fileone",
"version": "0.1.0",
"private": true,
"type": "module",
"workspaces": [
"packages/*"
],
"scripts": {
"dev": "bun --hot src/index.tsx",
"build": "bun build ./src/index.html --outdir=dist --sourcemap --target=browser --minify --define:process.env.NODE_ENV='\"production\"' --env='BUN_PUBLIC_*'",
"start": "NODE_ENV=production bun src/index.tsx"
},
"dependencies": {
"@convex-dev/workos": "^0.0.1",
"@radix-ui/react-checkbox": "^1.3.3",
"@radix-ui/react-context-menu": "^2.2.16",
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-dropdown-menu": "^2.1.16",
"@radix-ui/react-separator": "^1.1.7",
"@radix-ui/react-slot": "^1.2.3",
"@radix-ui/react-tooltip": "^1.2.8",
"@tanstack/react-query": "^5.87.4",
"@tanstack/react-router": "^1.131.41",
"@tanstack/react-table": "^8.21.3",
"@tanstack/router-devtools": "^1.131.42",
"@workos-inc/authkit-react": "^0.12.0",
"bun-plugin-tailwind": "latest",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"convex": "^1.27.0",
"convex-helpers": "^0.1.104",
"jotai": "^2.14.0",
"lucide-react": "^0.544.0",
"next-themes": "^0.4.6",
"react": "^19",
"react-dom": "^19",
"sonner": "^2.0.7",
"tailwind-merge": "^3.3.1",
"tailwindcss": "^4",
"tw-animate-css": "^1.3.8"
"dev": "bun run --filter=@fileone/web dev",
"build": "bun run --filter=@fileone/web build",
"start": "bun run --filter=@fileone/web start"
},
"devDependencies": {
"@biomejs/biome": "2.2.4",
"@tanstack/router-cli": "^1.131.41",
"@types/bun": "latest",
"@types/react": "^19",
"@types/react-dom": "^19"
"@types/bun": "latest"
}
}

45
packages/web/package.json Normal file
View File

@@ -0,0 +1,45 @@
{
"name": "@fileone/web",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"dev": "bun --hot src/server.tsx",
"build": "bun build ./src/index.html --outdir=dist --sourcemap --target=browser --minify --define:process.env.NODE_ENV='\"production\"' --env='BUN_PUBLIC_*'",
"start": "NODE_ENV=production bun src/index.tsx"
},
"dependencies": {
"@convex-dev/workos": "^0.0.1",
"@radix-ui/react-checkbox": "^1.3.3",
"@radix-ui/react-context-menu": "^2.2.16",
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-dropdown-menu": "^2.1.16",
"@radix-ui/react-separator": "^1.1.7",
"@radix-ui/react-slot": "^1.2.3",
"@radix-ui/react-tooltip": "^1.2.8",
"@tanstack/react-query": "^5.87.4",
"@tanstack/react-router": "^1.131.41",
"@tanstack/react-table": "^8.21.3",
"@tanstack/router-devtools": "^1.131.42",
"@workos-inc/authkit-react": "^0.12.0",
"bun-plugin-tailwind": "latest",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"convex": "^1.27.0",
"convex-helpers": "^0.1.104",
"jotai": "^2.14.0",
"lucide-react": "^0.544.0",
"next-themes": "^0.4.6",
"react": "^19",
"react-dom": "^19",
"sonner": "^2.0.7",
"tailwind-merge": "^3.3.1",
"tailwindcss": "^4",
"tw-animate-css": "^1.3.8"
},
"devDependencies": {
"@tanstack/router-cli": "^1.131.41",
"@types/react": "^19",
"@types/react-dom": "^19"
}
}

View File

@@ -1,9 +1,9 @@
import { atom } from "jotai"
import type { Id } from "../../convex/_generated/dataModel"
import type { Id } from "@convex/_generated/dataModel"
import type {
DirectoryItem,
DirectoryItemKind,
} from "../../convex/model/directories"
} from "@convex/model/directories"
export const contextMenuTargeItemAtom = atom<DirectoryItem | null>(null)
export const optimisticDeletedItemsAtom = atom(

View File

@@ -1,5 +1,5 @@
import { toast } from "sonner"
import { Code as ErrorCode, isApplicationError } from "../../convex/model/error"
import { Code as ErrorCode, isApplicationError } from "@convex/model/error"
const ERROR_MESSAGE = {
[ErrorCode.DirectoryExists]: "Directory already exists",

View File

@@ -6,28 +6,6 @@ const server = serve({
routes: {
// Serve index.html for all unmatched routes.
"/*": index,
"/api/hello": {
async GET(req) {
return Response.json({
message: "Hello, world!",
method: "GET",
})
},
async PUT(req) {
return Response.json({
message: "Hello, world!",
method: "PUT",
})
},
},
"/api/hello/:name": async (req) => {
const name = req.params.name
return Response.json({
message: `Hello, ${name}!`,
})
},
},
development: process.env.NODE_ENV !== "production" && {

View File

@@ -24,7 +24,7 @@
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"@convex/*": ["./convex/*"]
"@convex/*": ["../../convex/*"]
},
// Some stricter flags (disabled by default)