A full-stack shipping management application with React frontend and Node.js/Express backend with SQLite database.
- Locations Management: Add, edit, delete shipping locations
- Zones Management: Organize locations into shipping zones
- Shipping Rates: Configure flat or weight-based shipping rates
- Pickup Rates: Set pickup rates by zone
- Shipment Management: Create and track shipments with weight calculations
- CSV Import/Export: Import and export data via CSV files
- React 18 with TypeScript
- Vite for build tooling
- Tailwind CSS for styling
- Lucide React for icons
- Node.js with Express
- SQLite database
- CORS enabled for cross-origin requests
- Node.js 18+ and npm
- Git
-
Clone the repository
git clone <repository-url> cd shipping-management
-
Install frontend dependencies
npm install
-
Install backend dependencies
cd backend npm install cd ..
-
Start the backend server
cd backend npm startThe backend will run on http://localhost:3001
-
Start the frontend (in a new terminal)
npm run dev
The frontend will run on http://localhost:5173 (or next available port)
GET /api/locations- Get all locationsPOST /api/locations- Create locationPUT /api/locations/:id- Update locationDELETE /api/locations/:id- Delete location
GET /api/zones- Get all zonesPOST /api/zones- Create zonePUT /api/zones/:id- Update zoneDELETE /api/zones/:id- Delete zone
GET /api/shipping-rates- Get all shipping ratesPOST /api/shipping-rates- Create shipping ratePUT /api/shipping-rates/:id- Update shipping rateDELETE /api/shipping-rates/:id- Delete shipping rate
GET /api/pickup-rates- Get all pickup ratesPOST /api/pickup-rates- Create pickup ratePUT /api/pickup-rates/:id- Update pickup rateDELETE /api/pickup-rates/:id- Delete pickup rate
GET /api/shipments?status=processing- Get shipments (optional status filter)POST /api/shipments- Create shipmentPUT /api/shipments/:id- Update shipmentDELETE /api/shipments/:id- Delete shipment
The application uses SQLite with the following tables:
locations- Shipping locationszones- Shipping zones grouping locationsshipping_rates- Shipping rate configurationspickup_rates- Pickup rate configurationsshipments- Shipment recordsusers- User accounts (for future use)
The backend can be deployed to any Node.js hosting service:
-
Build for production
cd backend npm install --production -
Environment variables Set
PORTenvironment variable for the port (defaults to 3001) -
Database The SQLite database file (
database.db) will be created automatically on first run
The frontend can be deployed to any static hosting service:
-
Build for production
npm run build
-
Deploy the
distfolder Upload the contents of thedistfolder to your hosting service -
Configure API URL Update the
API_BASE_URLinsrc/utils/api.tsto point to your deployed backend
Frontend:
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint
Backend:
npm start- Start production servernpm run dev- Start development server (same as start for now)
/
├── src/
│ ├── components/
│ │ ├── rates/
│ │ │ ├── LocationsManagement.tsx
│ │ │ ├── ZonesManagement.tsx
│ │ │ ├── ShippingRatesManagement.tsx
│ │ │ └── PickupRatesManagement.tsx
│ │ ├── shipments/
│ │ │ ├── ShipmentManagement.tsx
│ │ │ └── AddressAutocomplete.tsx
│ │ └── ui/
│ ├── pages/
│ ├── utils/
│ │ ├── api.ts
│ │ ├── storage.ts
│ │ ├── csv.ts
│ │ └── weight.ts
│ └── ...
├── backend/
│ ├── server.js
│ ├── package.json
│ └── database.db (created automatically)
├── package.json
├── vite.config.ts
└── README.md
The system supports volumetric weight calculations for accurate shipping costs. Use the built-in calculator in the Shipping Rates section.
All management sections support CSV import/export for bulk operations.
The application is fully responsive and works on desktop and mobile devices.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the ISC License.