Tasko uses a shared architecture:
- One backend application (
backend) on port5000 - One Firebase project (Authentication + Firestore)
- One backend environment file (
backend/.env) - Three frontend applications that share the same backend and database:
user-appon3000worker-appon3001admin-panelon3002
All three frontends connect to the same backend API and same Firebase project. Only UI/routing entry points are different by app.
tasko/
├── user-app/
├── worker-app/
├── admin-panel/
└── backend/
- Node.js + Express + TypeScript
- Firebase Admin SDK connection to Firestore
- CORS enabled for:
http://localhost:3000http://localhost:3001http://localhost:3002
- REST APIs for:
- authentication validation (
/api/auth/validate) - booking creation (
/api/bookings) - worker approval (
/api/workers/:workerId/approval) - job assignment (
/api/jobs/assign) - analytics (
/api/admin/analytics)
- authentication validation (
- Role-based data uses
rolefield in Firestore (users/workers)
Only configure environment variables in:
backend/.env(copy frombackend/.env.example)
This one file contains:
- Firebase Admin credentials
- Firebase Web config values returned to all frontends from
/api/config/client
- Install dependencies from the project root (
d:\Tasko):
cd d:\Tasko
npm install
npm run install:all- Create backend env file:
cd d:\Tasko\backend
copy .env.example .env- Fill Firebase values in
backend/.env:
- Admin SDK keys:
FIREBASE_PROJECT_IDFIREBASE_CLIENT_EMAILFIREBASE_PRIVATE_KEY
- Web SDK keys (same Firebase project):
FIREBASE_WEB_API_KEYFIREBASE_WEB_AUTH_DOMAINFIREBASE_WEB_PROJECT_IDFIREBASE_WEB_STORAGE_BUCKETFIREBASE_WEB_MESSAGING_SENDER_IDFIREBASE_WEB_APP_ID
Start all 4 apps with one command:
cd d:\Tasko
npm run devYou can also run one app at a time from root:
npm run dev:backend
npm run dev:user
npm run dev:worker
npm run dev:adminOpen 4 terminals:
cd d:\Tasko\backend; npm run dev
cd d:\Tasko\user-app; npm run dev
cd d:\Tasko\worker-app; npm run dev
cd d:\Tasko\admin-panel; npm run devRun unit tests with Vitest from the project root:
npm run test:unitRun the browser smoke suite with Playwright:
npm run test:e2e:install
npm run test:e2eAvailable test commands from the project root:
npm run testnpm run test:unitnpm run test:unit:watchnpm run test:e2enpm run test:e2e:headednpm run test:all
usersworkersbookingsservicespackages