# Roshan Traders

## Overview

Roshan Traders is a B2B brick trading platform connecting manufacturers, agents, and transporters in India's construction supply chain. The application is a full-stack web app with a React frontend and Express backend, featuring a contact/inquiry system for potential business partners to register interest.

## User Preferences

Preferred communication style: Simple, everyday language.

## System Architecture

### Frontend Architecture
- **Framework**: React 18 with TypeScript
- **Routing**: Wouter (lightweight React router)
- **State Management**: TanStack React Query for server state
- **UI Components**: shadcn/ui component library built on Radix UI primitives
- **Styling**: Tailwind CSS with custom brick red/concrete gray theme
- **Animations**: Framer Motion for page transitions and scroll effects
- **Build Tool**: Vite with hot module replacement

### Backend Architecture
- **Runtime**: Node.js with Express 5
- **Language**: TypeScript compiled with tsx
- **API Design**: REST endpoints defined in shared routes file with Zod validation
- **Database ORM**: Drizzle ORM with PostgreSQL dialect

### Data Storage
- **Database**: PostgreSQL (connection via DATABASE_URL environment variable)
- **Schema Location**: `shared/schema.ts` using Drizzle table definitions
- **Migrations**: Drizzle Kit with output to `./migrations` directory

### Project Structure
```
├── client/          # React frontend
│   └── src/
│       ├── components/  # UI components including shadcn/ui
│       ├── hooks/       # Custom React hooks
│       ├── lib/         # Utilities and query client
│       └── pages/       # Route page components
├── server/          # Express backend
│   ├── db.ts        # Database connection
│   ├── routes.ts    # API route handlers
│   └── storage.ts   # Data access layer
└── shared/          # Shared code between client/server
    ├── schema.ts    # Drizzle database schema
    └── routes.ts    # API route definitions with Zod schemas
```

### Key Design Patterns
- **Shared Schema**: Database schema and validation schemas defined once in `shared/` and used by both frontend and backend
- **Type-Safe API**: Route definitions include input validation and response schemas using Zod
- **Storage Abstraction**: Database operations wrapped in `IStorage` interface for testability
- **Component Library**: shadcn/ui components in `client/src/components/ui/` following new-york style

## External Dependencies

### Database
- PostgreSQL database required via `DATABASE_URL` environment variable
- Drizzle ORM for database operations and migrations
- `connect-pg-simple` for session storage capability

### Frontend Libraries
- Radix UI primitives for accessible components
- Embla Carousel for product image carousels
- Lucide React for icons
- React Hook Form with Zod resolver for form handling

### Build & Development
- Vite for frontend bundling with React plugin
- esbuild for server bundling in production
- Replit-specific plugins for development (cartographer, dev-banner, error overlay)