Skip to content

M7 — Hardware Management

M7 is the company’s internal hardware asset management system. It gives your team a single place to register all equipment, assign devices to employees, monitor warranty status, and maintain a full audit trail of every asset movement.

Live application: m7.inspiringlivingsolutions.com

M7 Dashboard view 1

M7 Dashboard view 2

M7 Employees

M7 Activity Log


CapabilityDescription
Asset RegistryCentral database of all 79+ company hardware items
Employee Directory44 staff members across 10 departments
Asset AssignmentLink any device to an employee or leave it in the pool
Warranty TrackingMonitor active, expiring, and expired warranties
Asset PoolUnassigned equipment available for new hires
Activity LogFull audit trail of every create, update, and assign event
ReportsHardware spend and status reporting

The top navigation bar provides access to all sections:

SectionPurpose
DashboardOverview metrics, charts, recent purchases, warranty alerts
EmployeesStaff directory — view and add team members
AssetsFull asset registry with search and filters
Asset PoolAvailable (unassigned) equipment
Add AssetQuick-access shortcut to register new hardware
ReportsHardware reports and spend summaries
DepartmentsDepartment management
ActivitySystem-wide audit log

As of the latest data:

  • 79 total assets — 73 assigned, 6 in the asset pool
  • 44 employees across 10 departments
  • Asset categories: Laptop (20), Monitor (20), Peripheral (19), Phone (11), Docking Station (6), Storage (3)
  • Top brands: Samsung (9), Logitech (8), Apple (4), Dell (4), HP (3), ASUS VIVOBook (2)
  • Warranty status: 1 active, 4 expired, 0 expiring within 30 days


graph TD
A[Staff Member] -->|Login via Auth Service| B[M7 Hardware Dash]
B --> C[Dashboard]
B --> D[Employees]
B --> E[Assets]
B --> F[Asset Pool]
B --> G[Reports]
B --> H[Activity Log]
E -->|Assign| D
E -->|Unassigned| F
F -->|Assign to employee| D
H -->|Records all changes| I[(Database)]
D --> I
E --> I

This section covers the technical architecture, stack, and onboarding steps for developers working on M7.

LayerTechnologyVersion
FrameworkTanStack Start (React 19 + SSR)1.132.0
LanguageTypeScript (strict mode)5.7.2
RuntimeNode.js20+
Build ToolVite7.1.7
DatabasePostgreSQL17 (Docker) / 12+ (prod)
ORMPrisma + @prisma/adapter-pg7.2.0
RoutingTanStack Router (file-based)1.132.0
Server StateTanStack Query (React Query)5.66.5
UI PrimitivesRadix UI + Shadcn UI1.4.3
StylingTailwind CSS4.1.18
ValidationZod4.1.11
Env Validation@t3-oss/env-core0.13.8
Linting/FormatBiome2.2.4
TestingVitest + Testing Library3.0.5
graph TB
subgraph Client ["Browser (React 19 + SSR)"]
UI["TanStack Router Pages"]
RQ["TanStack Query Cache"]
end
subgraph Server ["Node.js SSR Server (TanStack Start)"]
SF["Server Functions (RPC)"]
ZOD["Zod Validation"]
PRISMA["Prisma ORM"]
end
subgraph DB ["PostgreSQL 17"]
DEPT["departments"]
EMP["employees"]
ASSET["assets"]
TH["transfer_history"]
CF["checkout_forms"]
AL["activity_logs"]
end
UI -->|"useQuery / useMutation"| RQ
RQ -->|"createServerFn() RPC call"| SF
SF --> ZOD
ZOD --> PRISMA
PRISMA --> DB

Note: M7 does not currently connect to any other ILS microservices and has no shared auth service integration. Authentication is not yet implemented.

hardware-dash/
├── src/
│ ├── routes/ # File-based pages (TanStack Router)
│ │ ├── __root.tsx # Root layout + QueryClient context
│ │ ├── index.tsx # Dashboard
│ │ ├── assets.index.tsx # Asset inventory list
│ │ ├── assets.$assetId.tsx # Asset detail view
│ │ ├── assets.new.tsx # Create asset form
│ │ ├── employees.index.tsx # Employee directory
│ │ ├── employees.$employeeId.tsx # Employee profile
│ │ ├── employees.new.tsx # Create employee form
│ │ ├── pool.tsx # Unassigned asset pool
│ │ ├── reports.tsx # Analytics & reports
│ │ ├── departments.tsx # Department management
│ │ └── activity.tsx # Audit log
│ ├── server/
│ │ └── functions.ts # All server-side RPC functions (~1,600 lines)
│ ├── components/
│ │ ├── Header.tsx / Footer.tsx / StatusBadge.tsx / ThemeToggle.tsx
│ │ └── ui/ # 16 Shadcn UI primitives
│ ├── lib/
│ │ ├── site.ts # Constants, formatters, enum label maps
│ │ └── utils.ts # Utility functions
│ ├── db.ts # Prisma client singleton
│ ├── env.ts # Environment variable validation (Zod)
│ └── styles.css # Global styles + Tailwind directives
├── prisma/
│ ├── schema.prisma # Database schema (source of truth)
│ └── seed.ts # CSV import seed script
├── docker-compose.yml # Local PostgreSQL 17 setup
└── .env.example # Environment variable template
VariableRequiredDescription
DATABASE_URLYesPostgreSQL connection string: postgresql://USER:PASS@HOST:PORT/DB
SERVER_URLNoBase URL for server functions in SSR context
VITE_APP_TITLENoCustom app title shown in the browser tab
Terminal window
# 1. Install dependencies
npm install
# 2. Configure environment
cp .env.example .env.local
# 3. Start local PostgreSQL (Docker)
docker compose up -d
# 4. Sync schema and generate Prisma client
npm run db:generate
npm run db:push
# 5. Seed initial data from CSV
npm run db:seed
# 6. Start dev server (SSR, port 3000)
npm run dev
CommandPurpose
npm run devDev server with SSR hot reload (port 3000)
npm run buildProduction build → .output/
npm run db:generateRe-generate Prisma client after schema changes
npm run db:pushPush schema to DB without a migration file
npm run db:migrateCreate and apply a migration file
npm run db:studioPrisma Studio web GUI
npm run db:seedImport CSV data
npm run testRun Vitest
npm run checkBiome lint + format check

Server Functions (RPC) — All data operations use createServerFn() from TanStack Start. These are typed RPC calls, not REST endpoints. Input is validated with Zod before the handler runs.

Data Fetching — Every route uses useQuery for reads and useMutation for writes. Mutations invalidate relevant query keys to trigger background refetches.

Activity Logging — Every write operation records an entry in the ActivityLog table, providing a full audit trail without database triggers.

AreaStatus
AuthenticationNot implemented — all routes are publicly accessible
AuthorizationNo RBAC
File UploadsphotoUrl field exists but storage provider not connected
QR CodesqrCode field exists but generation/scanning not built
NotificationsNo email/SMS for checkout events or warranty alerts
Background JobsNo scheduler for recurring tasks
Bulk OperationsNo bulk edit/delete UI; CSV seeding only via CLI