Technology Stack
The Syngenta Warehouse Management System is built with modern web technologies:Next.js 16.1.6
React framework with App Router
TypeScript 5.9.3
Type-safe JavaScript with strict mode
Tailwind CSS v4
Utility-first CSS framework
shadcn/ui
High-quality UI components
Core Dependencies
package.json
Development Dependencies
- @tailwindcss/postcss:
^4.1.18 - TypeScript:
^5.9.3 - ESLint:
^9.39.2 - Prettier:
^3.8.1
Project Structure
The application follows Next.js App Router conventions with a clean, organized structure:App Router Architecture
The application uses Next.js 15+ App Router, which provides:Server Components by Default
Components are React Server Components (RSC) by default, offering:- Zero JavaScript sent to the client for static content
- Direct database access without API routes
- Improved performance through server-side rendering
app/page.tsx
Client Components When Needed
Use the"use client" directive for interactive components:
components/theme-provider.tsx
Root Layout
The root layout (app/layout.tsx) wraps all pages and provides:
- Theme management via ThemeProvider
- Font configuration with Inter and Geist Mono
- Global metadata and HTML structure
app/layout.tsx
TypeScript Configuration
The project uses strict TypeScript configuration:tsconfig.json
Path Aliases
The@/ alias maps to the root directory, simplifying imports:
Component Architecture
Component Organization
Components are organized by purpose:components/ui/- shadcn/ui components (Button, Card, Dialog, etc.)components/features/- Feature-specific componentscomponents/shared/- Shared/common componentscomponents/theme-provider.tsx- Theme management
Component Pattern
All components follow a consistent pattern:Styling Architecture
The application uses Tailwind CSS v4 with CSS variables for theming:CSS Variables
Colors and design tokens are defined as CSS variables inglobals.css:
Dark Mode Support
The.dark class overrides variables for dark mode:
Build & Production
Build Process
Next.js builds the application into optimized production bundles:- Type checks all TypeScript files
- Compiles and optimizes React components
- Generates static pages where possible
- Creates optimized JavaScript bundles
- Processes and optimizes CSS
Production Server
Start the production server after building:Performance Optimizations
The architecture includes several performance optimizations:React Server Components
React Server Components
Server Components reduce client-side JavaScript by rendering on the server, sending only HTML to the client.
Turbopack Development
Turbopack Development
The development server uses Turbopack (
--turbopack flag) for faster hot module replacement and builds.Font Optimization
Font Optimization
Next.js automatically optimizes Google Fonts (Inter, Geist Mono) with zero layout shift.
Image Optimization
Image Optimization
Next.js Image component provides automatic image optimization with lazy loading and responsive sizes.
Next.js Configuration
Thenext.config.mjs file configures Next.js behavior:
next.config.mjs
Next Steps
UI Components
Learn about the component library
Styling Guide
Understand the styling approach
