Skip to content

Commit b8767d0

Browse files
georgeglarsonclaude
andcommitted
Move app shell from RestaurantReviews/ to project root
The dashboard (Express server, React client, Vite build, all config) now lives at the repository root where it belongs. RestaurantReviews/ retains a README with the exercise API spec, pointing to the root for source and tests. What moved: - src/, package.json, tsconfig, vite/vitest config, eslint, prettier - Makefile targets merged into root Makefile - CI workflow updated (no more working-directory override) Critical path fix: exercises/config.ts ROOT resolves 3 levels up instead of 4, matching the new depth from project root. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0d6958e commit b8767d0

67 files changed

Lines changed: 69 additions & 117 deletions

Some content is hidden

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

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Mark generated files so GitHub's language stats reflect actual code
2-
RestaurantReviews/package-lock.json linguist-generated=true
2+
package-lock.json linguist-generated=true

.github/workflows/ci.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,18 +74,15 @@ jobs:
7474
- run: make test
7575

7676
restaurant-reviews:
77-
name: RestaurantReviews (TypeScript/React)
77+
name: Dashboard + RestaurantReviews (TypeScript/React)
7878
runs-on: ubuntu-latest
79-
defaults:
80-
run:
81-
working-directory: RestaurantReviews
8279
steps:
8380
- uses: actions/checkout@v4
8481
- uses: actions/setup-node@v4
8582
with:
8683
node-version: "22"
8784
cache: npm
88-
cache-dependency-path: RestaurantReviews/package-lock.json
85+
cache-dependency-path: package-lock.json
8986
- run: npm ci
9087
- run: make typecheck
9188
- run: make test

Makefile

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,32 @@
1-
.PHONY: check-deps test-all
1+
.PHONY: check-deps test-all deps typecheck test run dev build clean
2+
3+
# ── Dashboard (TypeScript/React) ─────────────────────────────────────
4+
5+
deps:
6+
@command -v node >/dev/null 2>&1 || { echo "Node.js not found — install from https://nodejs.org/"; exit 1; }
7+
@[ -d node_modules ] || npm install
8+
9+
typecheck: deps
10+
npx tsc --noEmit
11+
12+
test: deps
13+
npx vitest run --reporter=verbose
14+
15+
# Production: build server + client, then serve from Express
16+
run: deps build
17+
node dist/server/index.js
18+
19+
# Development: Express API + Vite dev server (HMR on :5173, API proxy to :3000)
20+
dev: deps
21+
npx tsx src/server/index.ts & VITE_PID=$$!; npx vite --config vite.config.ts; kill $$VITE_PID 2>/dev/null || true
22+
23+
build: deps
24+
npm run build
25+
26+
clean:
27+
rm -rf dist
28+
29+
# ── Cross-project ────────────────────────────────────────────────────
230

331
check-deps:
432
@echo "Checking dependencies..."
@@ -18,4 +46,4 @@ test-all:
1846
@echo "=== MorseCode (Perl) ===" && $(MAKE) -C MorseCode test && echo ""
1947
@echo "=== OnScreenKeyboard (Python) ===" && $(MAKE) -C OnScreenKeyboard test && echo ""
2048
@echo "=== GildedRose (Go) ===" && $(MAKE) -C GildedRose test && echo ""
21-
@echo "=== RestaurantReviews (TypeScript/React) ===" && $(MAKE) -C RestaurantReviews test && echo ""
49+
@echo "=== Dashboard (TypeScript/React) ===" && $(MAKE) test && echo ""

README.md

Lines changed: 12 additions & 2 deletions

RestaurantReviews/.gitignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

RestaurantReviews/Makefile

Lines changed: 0 additions & 25 deletions
This file was deleted.

RestaurantReviews/README.md

Lines changed: 10 additions & 61 deletions

0 commit comments

Comments
 (0)