Skip to content

Commit c301ec3

Browse files
committed
refactor: restructure into npm workspaces monorepo
Move from a single-app layout to a monorepo with npm workspaces: - apps/legacy: existing app, moved from src/ - apps/smartem: new app scaffold (hello world) - packages/api: extracted from src/api/ with barrel export (@smartem/api) - packages/ui: empty shell for shared components (@smartem/ui) All legacy app imports updated from relative ../api/ paths to @smartem/api. Root config (tsconfig, biome, lefthook, gitignore) updated for monorepo. Shared compiler options extracted to tsconfig.base.json. Also fix pre-existing useExhaustiveDependencies lint error in latentRep.tsx (loaderData.squares.map → loaderData.squares in dependency array).
1 parent b1985df commit c301ec3

441 files changed

Lines changed: 4920 additions & 5048 deletions

File tree

Some content is hidden

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

.biomeignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
build/**
22
dist/**
3-
app/api/generated/**
3+
packages/api/src/generated/**

.gitignore

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.DS_Store
2-
/node_modules/
2+
node_modules/
33

44
# Build output
5-
/dist/
5+
**/dist/
66
/build/
77
.idea/
88
.env
@@ -13,4 +13,7 @@
1313
.claude/skills/*/test-results/
1414

1515
# TanStack Router temp files
16-
.tanstack/
16+
**/.tanstack/
17+
18+
# Generated API client
19+
packages/api/src/generated/

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ dist/
1212
node_modules/
1313

1414
# Ignore generated files
15-
app/api/generated/
15+
packages/api/src/generated/
File renamed without changes.

apps/legacy/package.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"name": "@smartem/legacy",
3+
"private": true,
4+
"type": "module",
5+
"scripts": {
6+
"dev": "vite",
7+
"dev:mock": "VITE_ENABLE_MOCKS=true vite",
8+
"build": "vite build",
9+
"preview": "vite preview",
10+
"typecheck": "tsc",
11+
"router:generate": "tsr generate",
12+
"router:check": "tsr generate && git diff --exit-code src/routeTree.gen.ts"
13+
},
14+
"dependencies": {
15+
"@smartem/api": "*",
16+
"@emotion/react": "^11.14.0",
17+
"@emotion/styled": "^11.14.0",
18+
"@mui/icons-material": "^7.3.7",
19+
"@mui/material": "^7.0.2",
20+
"@mui/x-charts": "^8.27.0",
21+
"@tanstack/react-query": "^5.90.20",
22+
"@tanstack/react-router": "^1.159.5",
23+
"@tanstack/router-devtools": "^1.159.5",
24+
"boring-avatars": "^2.0.4",
25+
"d3-array": "^3.2.4",
26+
"react": "^19.2.4",
27+
"react-dom": "^19.2.4"
28+
},
29+
"devDependencies": {
30+
"@tailwindcss/vite": "^4.1.18",
31+
"@tanstack/router-cli": "^1.159.4",
32+
"@tanstack/router-vite-plugin": "^1.159.5",
33+
"@types/d3-array": "^3.2.1",
34+
"@types/node": "^25",
35+
"@types/react": "^19.2.13",
36+
"@types/react-dom": "^19.2.3",
37+
"@vitejs/plugin-react": "^5.1.4",
38+
"msw": "^2.12.10",
39+
"tailwindcss": "^4.0.0",
40+
"vite": "^7.3.1",
41+
"vite-tsconfig-paths": "^6.1.0"
42+
},
43+
"msw": {
44+
"workerDirectory": [
45+
"public"
46+
]
47+
}
48+
}
File renamed without changes.
File renamed without changes.

src/components/ApiVersionCheck.tsx renamed to apps/legacy/src/components/ApiVersionCheck.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Alert, Button, Snackbar } from '@mui/material'
2+
import { checkApiVersion, logApiVersion } from '@smartem/api'
23
import { useEffect, useState } from 'react'
3-
import { checkApiVersion, logApiVersion } from '../api/version-check'
44

55
export function ApiVersionCheck() {
66
const [versionMismatch, setVersionMismatch] = useState(false)

0 commit comments

Comments
 (0)