chore: initial Vector 2.0 monorepo
CI / Lint · Typecheck · Test · Build (push) Failing after 5m41s
CI / Playwright (smoke) (push) Has been skipped

Ground-up TypeScript rewrite of the Vector hardware parts inventory
system. Ships the full roadmap (Phases 0-8) in one initial commit:

- pnpm + Turbo monorepo: apps/{api,web,e2e}, packages/{db,shared,ui,config}
- Express 5 + Prisma 5 + zod validation + JWT w/ refresh-token rotation
- React 19 + Vite + shadcn/ui + TanStack Query/Table + nuqs URL state
- Repair/RMA, tags, bulk ops, saved views, CSV audit export
- Analytics dashboard on Recharts + EOL tracking
- Signed webhook subscriptions (HMAC-SHA256) with in-process emitter
- Vitest unit tests (shared schemas, api services/helpers) + Playwright skeleton
- Gitea Actions CI (lint, typecheck, test+coverage, build) + Renovate

Deferred follow-ups: Postgres cutover (data-migration script ready),
BullMQ worker for webhook delivery, @react-pdf PDF export, CSV import wizard.
This commit is contained in:
2026-04-16 20:52:32 -04:00
commit 7c0d422228
216 changed files with 19393 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
import { parseAsString, useQueryState } from 'nuqs';
import { PageHeader } from '../components/layout/PageHeader.js';
import { SiteList } from '../components/locations/SiteList.js';
import { RoomDrawer } from '../components/locations/RoomDrawer.js';
import { BinGrid } from '../components/locations/BinGrid.js';
import { useAuth } from '../contexts/AuthContext.js';
export default function Locations() {
const { user } = useAuth();
const canEdit = user?.role === 'ADMIN';
const [siteId, setSiteId] = useQueryState('site', parseAsString);
const [roomId, setRoomId] = useQueryState('room', parseAsString);
const handleSite = (id: string) => {
void setSiteId(id || null);
void setRoomId(null);
};
const handleRoom = (id: string) => {
void setRoomId(id || null);
};
return (
<div className="flex h-[calc(100vh-var(--spacing-topbar,3.25rem)-3rem)] flex-col gap-4">
<PageHeader
title="Locations"
description="Sites → Rooms → Bins. Select a site to drill in."
/>
<div className="grid min-h-0 flex-1 grid-cols-[16rem_16rem_1fr] overflow-hidden rounded-lg border border-border bg-card">
<div className="border-r border-border">
<SiteList selectedId={siteId} onSelect={handleSite} canEdit={canEdit} />
</div>
<div className="border-r border-border">
<RoomDrawer siteId={siteId} selectedId={roomId} onSelect={handleRoom} canEdit={canEdit} />
</div>
<div>
<BinGrid roomId={roomId} canEdit={canEdit} />
</div>
</div>
</div>
);
}