This is a technical documentation portal for SWMM5 (Storm Water Management Model) import functionality into ICM InfoWorks. The application serves as a comprehensive reference guide containing Ruby import scripts, INP file format specifications, ICM engine comparisons, and step-by-step import workflows.
The portal is designed following technical documentation patterns (inspired by GitHub Docs, Read the Docs) with a focus on readability, code clarity, and efficient information architecture. It provides both human-readable documentation and syntax-highlighted code viewing capabilities.
Preferred communication style: Simple, everyday language.
Framework & Build System:
- React 18 with TypeScript for type safety
- Vite as the build tool and development server
- Client-side routing using Wouter (lightweight alternative to React Router)
- Component library: Radix UI primitives with shadcn/ui styling system
State Management:
- TanStack Query (React Query) for server state management and API data fetching
- Local React state for UI interactions
- No global state management library - relies on React Query's caching and component state
Styling System:
- Tailwind CSS with custom design tokens
- CSS variables for theming (light/dark mode support)
- Custom Tailwind configuration with extended color system
- Typography: Inter for headings, system fonts for body, JetBrains Mono for code
- shadcn/ui "new-york" style variant
Key UI Components:
CodeViewer: Syntax-highlighted Ruby code display with copy functionalityInpFormatReference: Accordion-based section browser with category filteringIcmComparisonTable: Feature comparison table between ICM enginesImportWorkflow: Step-by-step workflow visualizationSearchDialog: Global search with keyboard shortcuts
Server Framework:
- Express.js with TypeScript
- ESM (ES Modules) throughout the codebase
- HTTP server created with Node's native
httpmodule
API Design:
- RESTful JSON API with four main endpoints:
GET /api/scripts- Returns Ruby import scriptsGET /api/inp-sections- Returns INP file format sectionsGET /api/icm-comparison- Returns engine comparison dataGET /api/import-steps- Returns workflow steps
Data Storage:
- In-memory storage implementation (
MemStorageclass) - Data initialized from attached Ruby script files during server startup
- No database required - all documentation content is statically loaded
- Schema validation using Zod for type safety
Development Features:
- Request logging middleware with response time tracking
- Vite middleware integration for HMR in development
- Static file serving in production
- Replit-specific plugins for development (cartographer, dev banner, runtime error overlay)
Type System:
- Zod schemas defined in
shared/schema.tsfor runtime validation - TypeScript types inferred from Zod schemas
- Shared types between frontend and backend
Core Data Models:
RubyScript: Code files with metadata (name, description, line count, source code)InpSection: INP file format sections with fields, examples, categoriesIcmComparison: Engine feature comparisonsImportStep: Workflow steps with sequential ordering
Categories:
- INP sections organized into 8 categories: Project, Hydrology, Hydraulics, Water Quality, Time Series, Controls, Reporting, Map Data
Development:
npm run dev- Runs TSX with Vite middleware for hot reload- Type checking with
tsc --noEmit - Path aliases configured for clean imports (
@/,@shared/,@assets/)
Production Build:
- Frontend: Vite builds to
dist/public - Backend: esbuild bundles server code to
dist/index.js - ESM output format for modern Node.js runtime
- External packages not bundled on backend
Configuration Files:
tsconfig.json: Shared TypeScript config with path mappingsvite.config.ts: Client build config with aliasestailwind.config.ts: Custom design system configurationcomponents.json: shadcn/ui configuration
- Radix UI: Unstyled, accessible component primitives (accordion, dialog, dropdown, tabs, etc.)
- shadcn/ui: Pre-styled Radix components following "new-york" design system
- class-variance-authority: Type-safe variant management for components
- cmdk: Command palette component for search functionality
- Drizzle ORM: TypeScript ORM configured for PostgreSQL
- @neondatabase/serverless: Neon serverless PostgreSQL driver
- drizzle-zod: Schema-to-Zod validation generator
- Database configuration in
drizzle.config.ts(not currently used but infrastructure present)
- Tailwind CSS: Utility-first CSS framework
- tailwind-merge & clsx: Utility for conditional class merging
- Custom CSS variables for comprehensive theming support
- TanStack Query: Server state management with caching, refetching, and optimistic updates
- React Hook Form: Form state management
- @hookform/resolvers: Form validation integration
- Zod: Runtime type validation and schema definition
- Vite: Lightning-fast build tool and dev server
- esbuild: JavaScript bundler for production builds
- tsx: TypeScript execution for development
- @replit/vite-plugin-*: Replit-specific development enhancers
- Google Fonts: Inter (400-700) for UI, JetBrains Mono (400-500) for code
- System font stack as fallback
- date-fns: Date manipulation and formatting
- nanoid: Unique ID generation
- wouter: Lightweight client-side routing
- lucide-react: Icon library
- embla-carousel-react: Carousel/slider component