How pronoy656/hircon-website works
1. This repository is a single Next.js application built with the App Router and TypeScript. The architecture is almost entirely frontend/UI-driven: src/app defines routes and layouts, while src/components holds reusable presentation and feature components.
2. The top-level route structure is split into three broad areas:
- public/authentication flows under src/app/auth/*
- the main authenticated dashboard under src/app/dashboard/*
- a few standalone pages such as /jobs, /network, and /support
This makes the route tree itself the primary architectural map.
3. The dashboard is the core shell of the app. src/app/dashboard/layout.tsx wraps the authenticated experience, and shared navigation elements live in src/components/layout (Navbar, NavbarWrapper, Topbar). This suggests a persistent shell with nested feature pages rendered inside it.
4. Feature domains are organized by business capability rather than technical layer. The biggest ones are:
- shipping: export domestic, import, pallet, quick ship, ship manager, spot rate, saved shipments
- tracking: tracking history, watch shipment, spot-rate history
- quoting: quick quote, saved quotation
- management: contacts, CSV mapping, preferences, dashboard preferences, printing/profile/roles/users tabs
- products: product and packaging editing
- printing/invoicing/integration: separate dashboard sections
Each route page is thin and delegates most UI/workflow logic to a feature component.
5. The src/components/features tree is the main application layer. It contains composite modules such as QuickShipForm, ExportDomesticForm, ShipManager, TrackingHistoryList, ContactTable, and QuickQuoteForm. These components likely own form state, modal workflows, tables, and multi-step interactions for each business area.
6. Shared UI primitives live in src/components/ui. These are generic controls used across features: inputs, selects, text areas, tables, tabs, pagination, confirmation/delete/success modals, and buttons. This layer acts as the design-system boundary between business-specific features and low-level UI.
7. There is a clear modal-and-table interaction pattern across the app. Many workflows are centered on list management plus dialogs: contacts, shipment details, address books, product editing, commercial invoices, sold-to addresses, schedule collection, and success/confirmation states. That indicates the app is designed around CRUD-like operations and guided user flows rather than freeform pages.
8. Shared data and helper logic is minimal and centralized in src/lib. Notable files are countries.ts, savedQuotes.ts, and utils.ts. This implies some app data is local/static or client-managed, with reusable utility functions rather than a large server-side domain layer in this repo.
9. Styling is global plus component-scoped. src/app/globals.css provides the base app styling, while src/styles/custom-shapes.css adds extra visual primitives. The presence of components.json and small UI primitives suggests a component-driven styling system, likely with a strong focus on consistent reusable controls.
10. There is little evidence of a backend service boundary in this repository. No API layer, database client, or server module tree is visible, so the architectural diagram should treat this as a client-heavy Next.js frontend that assembles route pages from reusable feature modules and shared UI, with any persistence/integration likely abstracted away or mocked in local state/data files.
Main entry points: dashboard Dashboard shell · app App · ui UI primitives · ship Shipping routes
Components 28
Next app
Route tree and application shells
- App · Single App Router frontend
src/app - Root layout · Global HTML/body wrapper for the app
src/app/layout.tsx - Landing · Top-level entry page
src/app/page.tsx - Auth area · Login, register, verification, and password recovery
src/app/auth - Dashboard shell · Authenticated workspace with nested business pages
src/app/dashboard - Shipping routes · Export, import, pallet, quick ship, manager, spot rate, saved shipments
src/app/dashboard/ship - Tracking routes · Tracking history, watch shipment, spot-rate history
src/app/dashboard/track - Quote routes · Quick quote and saved quotations
src/app/dashboard/quote - Manage routes · Contacts, CSV mapping, preferences, dashboard preferences
src/app/dashboard/manage - Products routes · Edit products and packaging
src/app/dashboard/products - Print routes · Bulk print and manifest printing
src/app/dashboard/print - Invoicing · Dashboard invoice page
src/app/dashboard/invoice/page.tsx - Integration · Dashboard integration page
src/app/dashboard/integration/page.tsx - Jobs · Independent page outside the dashboard
src/app/jobs/page.tsx - Network · Independent page outside the dashboard
src/app/network/page.tsx - Support · Independent page outside the dashboard
src/app/support/page.tsx - Dashboard layout · Wraps authenticated dashboard pages
src/app/dashboard/layout.tsx
Feature modules
Business-capability components used by routes
- Nav chrome · Persistent navbar, wrapper, and topbar
src/components/layout - Shipment forms · Core shipping forms and shipment detail subpanels
src/components/features/shipment - Ship manager · Shipment listing and related edit/invoice modals
src/components/features/shipment/ship-manager - Tracking history · Filters, cards, detail modal, and history list
src/components/features/tracking/tracking-history - Quick quote · Quote form and results view
src/components/features/quote/quick-quote - Contacts · Contact table, toolbar, and add-contact modal
src/components/features/manage/contact - Preference tabs · Address, printing, profile, roles, and users tabs
src/components/features/manage/preference-tabs - Product table · Product and packaging editing surface
src/components/features/products/ProductTable.tsx
Shared UI
Reusable presentation primitives
- UI primitives · Buttons, inputs, selects, tables, tabs, modals, pagination
src/components/ui
Shared logic
Small local data and utility helpers
- Local data · Countries, saved quotes, and utility helpers
src/lib
Styles
Global and supplemental styling
- Global styles · Base app styling and custom shapes
src/app/globals.css
Connections 35
- App → Root layout: wraps · Root app uses the global layout shell
- App → Landing: serves · Top-level entry page
- App → Auth area: routes · Authentication flow area
- App → Dashboard shell: routes · Authenticated application area
- App → Jobs: serves · Standalone page
- App → Network: serves · Standalone page
- App → Support: serves · Standalone page
- Dashboard shell → Dashboard layout: wraps · Dashboard shell around nested pages
- Dashboard layout → Nav chrome: contains · Persistent navigation chrome in dashboard
- Dashboard shell → Shipping routes: contains · Shipping section routes
- Dashboard shell → Tracking routes: contains · Tracking section routes
- Dashboard shell → Quote routes: contains · Quote section routes
- Dashboard shell → Manage routes: contains · Management section routes
- Dashboard shell → Products routes: contains · Product management routes
- Dashboard shell → Print routes: contains · Printing routes
- Dashboard shell → Invoicing: contains · Invoice page
- Dashboard shell → Integration: contains · Integration page
- Shipping routes → Shipment forms: delegates to · Route pages mostly render feature forms
- Shipping routes → Ship manager: delegates to · Ship manager page uses management workflow
- Tracking routes → Tracking history: delegates to · Tracking pages use history/watch components
- Quote routes → Quick quote: delegates to · Quote routes render quote workflow components
- Manage routes → Contacts: delegates to · Contacts page uses table/modal workflow
- Manage routes → Preference tabs: delegates to · Preference pages use tabbed modules
- Products routes → Product table: delegates to · Product routes center on editable tables
- Shipment forms → UI primitives: uses · Forms rely on shared controls and dialogs
- Ship manager → UI primitives: uses · Uses tables, modals, and base controls
- Tracking history → UI primitives: uses · Uses filter bars, cards, modals, and tables
- Quick quote → UI primitives: uses · Uses form fields and result presentation
- Contacts → UI primitives: uses · Uses table and modal primitives
- Preference tabs → UI primitives: uses · Uses tabs and form controls
- Product table → UI primitives: uses · Uses shared CRUD UI primitives
- Root layout → Global styles: loads · Global styling applied at the app root
- Shipment forms → Local data: reads · Uses local data and helpers where needed
- Quick quote → Local data: reads · Likely uses saved quotes and utility helpers
- Tracking history → Local data: reads · May use small shared helpers/data