Next.js (App Router) portal for admin, executive, supplier, and demand roles using Tailwind, MongoDB, and Firebase email/password auth.
- Role-based dashboards: admin, executive, supplier, demand
- Executive entry form fields:
skillteamSizewageRateInRupeerating(1-5)remarks
- Supplier registration/profile fields:
agencyNamemobileNumberlandlineNumberteamSizeskilladdressstate
- Admin mock-data operations:
- seed from
mock-data/labour_portal_mock_data.json - delete all documents where
isMockData=true
- seed from
- Mock data artifact includes:
- 50 supplier accounts + supplier profiles
- 50 demand accounts + demand profiles
- 2 executive accounts + executive profiles
- 60 executive entries (30 per executive)
- Credentials file:
mock-data/mock_account_credentials.json
- Copy
.env.exampleto.env.localand fill Firebase + MongoDB credentials. - In Firebase Console:
- Enable
Googleprovider underAuthentication > Sign-in method. - Add your local/dev domain to
Authentication > Settings > Authorized domains(for examplelocalhost).
- Enable
- Install packages:
npm install- Run the app:
npm run dev- Use admin dashboard
Mock Datapage to seed/delete mock data. - Seeded data includes:
- 50 supplier users + supplier profiles
- 50 demand users + demand profiles
- 2 executive users + executive profiles
- 60 executive entries (30 per executive)
- Credentials artifact:
mock-data/mock_account_credentials.json- Default password:
WorkBridge@123 - Includes 1 mock admin account:
admin.mock@workbridge.dev
If you want these credentials to work with Firebase login, create/update Firebase Auth users:
node scripts/create-firebase-mock-users.jsNote: these scripts load variables from .env and .env.local.
Seed Mongo mock records directly (without dashboard login):
npm run mock:seed:dbDelete mock data in one go:
npm run mock:delete:allOr run cleanup separately:
npm run mock:delete:db
npm run mock:delete:firebase- Public:
/,/login,/register - Admin:
/admin/dashboard,/admin/users,/admin/entries,/admin/mock-data - Executive:
/executive/dashboard,/executive/entries/new,/executive/entries - Supplier:
/supplier/dashboard,/supplier/profile - Demand:
/demand/dashboard,/demand/profile
POST /api/users/bootstrapPOST /api/auth/session,DELETE /api/auth/sessionGET/POST/PATCH /api/entriesGET/POST/PATCH /api/users/manage(admin)GET /api/admin/kpis(admin)POST /api/admin/mock-data/seed(admin)POST /api/admin/mock-data/delete(admin)GET/PATCH /api/supplier/profileGET/PATCH /api/demand/profile