labor-workforce-platform
v1.0.4
Published
Platform for labor workforce registration and profile management
Maintainers
Readme
Labor Workforce Platform
A full-stack web application where multiple users can register as labor workforce and create personal profiles with their skills, hourly rates, and work portfolio (photos/videos).
Features
- User Registration & Authentication: Secure user registration and login system
- Profile Management: Create and edit personal profiles with:
- Name and address
- Places of operation (cities/provinces you serve)
- Skills with individual hourly rates (₱ per skill)
- Dedicated profile picture + work portfolio (photos and videos)
- Browse Workers: View all registered workers and their profiles
- File Upload: Upload photos and videos as proof of work
- Booking System: Book services with skill selection, date picker, and email notifications
- Modern UI: Beautiful, responsive design with gradient backgrounds
Tech Stack
Backend
- Node.js with Express
- SQLite database
- JWT authentication
- Multer for file uploads
- bcryptjs for password hashing
- Nodemailer for email notifications
Frontend
- React
- Axios for API calls
- Modern CSS with gradients and animations
Installation
Install backend dependencies:
npm installInstall frontend dependencies:
cd client npm install cd ..Or install all at once:
npm run install-all
Running the Application
Development Mode
Start the backend server:
npm run devThe server will run on
http://localhost:5000Start the frontend (in a new terminal):
npm run clientThe frontend will run on
http://localhost:3000
Production Mode
Build the frontend:
npm run buildStart the server:
npm start
API Endpoints
Authentication
POST /api/auth/register- Register a new userPOST /api/auth/login- Login user
Profile
GET /api/profile/me- Get current user's profile (requires auth)POST /api/profile/create- Create or update profile (requires auth)DELETE /api/profile/me- Delete current user's profile including media (requires auth)GET /api/profile/all- Get all profilesGET /api/profile/:id- Get profile by ID
Upload
POST /api/upload/media- Upload photo/video (requires auth)DELETE /api/upload/media/:id- Delete media file (requires auth)POST /api/upload/profile-picture- Upload or update profile photo (requires auth)
Booking
POST /api/booking/create- Create a new booking requestGET /api/booking/profile/:profileId- Get all bookings for a profile
Environment Variables
Create a .env file in the root directory:
PORT=5000
JWT_SECRET=your-secret-key-change-in-production
[email protected]
EMAIL_PASSWORD=your-app-passwordNote: For email notifications to work, you need to configure EMAIL_USER and EMAIL_PASSWORD.
- For Gmail, you'll need to use an App Password instead of your regular password.
- If email credentials are not configured, bookings will still be saved but email notifications will not be sent.
Database
The application uses SQLite database which is automatically created in server/database/database.sqlite on first run.
File Storage
Uploaded files are stored in server/uploads/ directory. Make sure this directory has write permissions.
Usage
- Register a new account
- Login with your credentials
- Create your profile with name, address, places of operation, and skill-specific hourly rates (₱)
- Upload a profile photo to personalize your card (optional but recommended)
- Upload photos or videos as proof of your work
- Browse other workers' profiles
- Book services by clicking "Book Service" on any worker's profile, selecting a skill, choosing a date, and providing your contact information
Notes
- Passwords are hashed using bcryptjs
- JWT tokens expire after 7 days
- File upload limit is 50MB
- Supported file types: jpeg, jpg, png, gif, mp4, mov, avi, webm
