How sgxtract/pms works
This is an early Procurement Monitoring System web application scaffold: the layout describes tracking requests through completion, but the sampled runtime contains no procurement-request screens or workflow handlers. The visible product surface is the Next.js app shell, a design-system preview, and a database health endpoint; the migration tree signals user, lookup, request, history, and audit data. An operator can bootstrap the first admin account. Connections below are limited to relationships visible in excerpts or documented in the README; unsampled migration behavior is not inferred.
Main entry points: create-admin.ts Create first admin · db.ts Database client · page.tsx Design preview · button.tsx Button
Components 18
Web application
- Application shell
src/app/layout.tsx - Home page
src/app/page.tsx - Design preview
src/app/styleguide/page.tsx - Health endpoint
src/app/api/health/route.ts
Interface components
- Theme provider
src/components/providers/theme-provider.tsx - Button
src/components/ui/button.tsx - Badge
src/components/ui/badge.tsx - Theme toggle
src/components/ui/theme-toggle.tsx - Class utilities
src/lib/utils.ts
Server and data
- Database client
src/server/db.ts - Environment validation
src/server/env.ts - PostgreSQL
- Domain schema migrations
db/migrations
Admin bootstrap
- Create first admin
scripts/create-admin.ts - Password validation
src/lib/validation/password.ts - Password hashing
src/server/auth/password.ts
Other components
- Web visitor
- Admin operator
Connections 16
- Web visitor → Home page: opens app
README.md - Application shell → Theme provider: wraps pages
src/app/layout.tsx - Design preview → Button: renders
src/app/styleguide/page.tsx - Design preview → Badge: renders
src/app/styleguide/page.tsx - Design preview → Theme toggle: renders
src/app/styleguide/page.tsx - Theme toggle → Button: uses
src/components/ui/theme-toggle.tsx - Button → Class utilities: merges classes
src/components/ui/button.tsx - Badge → Class utilities: merges classes
src/components/ui/badge.tsx - Health endpoint → Database client: queries
src/app/api/health/route.ts - Database client → Environment validation: reads settings
src/server/db.ts - Database client → PostgreSQL: connects
src/server/db.ts - Admin operator → Create first admin: runs setup
README.md - Create first admin → Password validation: validates password
scripts/create-admin.ts - Create first admin → Password hashing: hashes password
scripts/create-admin.ts - Create first admin → Database client: creates account
scripts/create-admin.ts - Domain schema migrations → PostgreSQL: defines schema