Documentation
Setup instructions and developer guide
Clone the repository and install dependencies:
npm installCreate a .env file in the project root:
MONGODB_GLOBAL_DATA_URI=mongodb://localhost:27017/sah_global_dataRequired environment variables:
MONGODB_GLOBAL_DATA_URI- MongoDB connection string
1. MongoDB Connection
Ensure MongoDB is running locally or update the connection string in your .env file to point to your MongoDB instance.
2. Seed the Database
Populate the database with 7 template Object Types (Truck, Trailer, Lane, Driver, Rate, Commodity, Tank Wash):
npm run seedThe seed script will create the initial Object Types and their first versions. If objects already exist, they will be skipped.
Development Mode
Start the Next.js development server on port 3001:
npm run devThe application will be available at http://localhost:3001
Production Mode
Build and start the production server:
npm run buildnpm run startBuild the Next.js application for production:
npm run buildThis creates an optimized production build in the .next directory.
npm run devStart development server (port 3001)npm run buildBuild for productionnpm run startStart production server (port 3001)npm run lintRun ESLintnpm run seedSeed database with template Object Types