Full-stack B2B textile platform with:
- React + Vite frontend
- Express API backend
- MongoDB persistence
- Role-based auth (
admin,employee,buyer)
- Install dependencies:
npm install- Create your environment file:
copy .env.example .env- Make sure MongoDB is running and
MONGODB_URIin.envis correct.
Run frontend + backend together:
npm run dev:fullOr run separately:
npm run dev
npm run dev:serverFrontend: http://localhost:8080
Backend API: http://localhost:5000/api
- Admin default account is seeded in MongoDB only if no admin exists.
- Employee accounts can be created only by admin from the admin panel.
- Buyer accounts can log in only after successful signup.
npm run dev-> frontend dev servernpm run dev:server-> backend dev servernpm run dev:full-> run both frontend + backendnpm run build-> frontend production build