Welcome to Workless, Seller!
Manage your offline skills and bookings on Workless.
Your Workless Bookings
No bookings yet. Offer your skills on Workless now!
[28-03-2025 01:39] Devrat Naskar:
Welcome to Workless, Buyer!
Find and book offline services on Workless.
Your Workless Orders
No orders yet. Explore services on Workless!
[28-03-2025 01:39] Devrat Naskar: body {
font-family: Arial, sans-serif;
margin: 0;
background-color: #f0f0f0;
}
.container {
text-align: center;
padding: 50px;
background: white;
margin: 50px auto;
width: 400px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
button {
padding: 15px 30px;
margin: 10px;
background-color: #007BFF;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
.sidebar {
width: 200px;
background: #333;
color: white;
height: 100vh;
position: fixed;
padding: 20px;
}
.sidebar a {
color: white;
text-decoration: none;
display: block;
margin: 15px 0;
}
.content {
margin-left: 220px;
padding: 20px;
}
h1, h2, h3 {
color: #333;
}
[28-03-2025 01:39] Devrat Naskar: const express = require('express');
const mongoose = require('mongoose');
const path = require('path');
const app = express();
// Middleware
app.use(express.json());
app.use(express.static(path.join(__dirname, 'public')));
// MongoDB Connection for Workless
mongoose.connect('mongodb://localhost/workless', {
useNewUrlParser: true,
useUnifiedTopology: true
}).then(() => console.log('Workless MongoDB Connected'))
.catch(err => console.log(err));
// Workless User Schema
const UserSchema = new mongoose.Schema({
name: String,
phone: String,
email: String,
role: String, // 'seller' or 'buyer'
aadhar: String,
pan: String, // Seller only
bank: String, // Seller only
});
const User = mongoose.model('WorklessUser', UserSchema);
// Workless Signup API
app.post('/api/signup', async (req, res) => {
const { name, phone, email, role, aadhar, pan, bank } = req.body;
const user = new User({ name, phone, email, role, aadhar, pan, bank });
await user.save();
res.json({ message: 'Workless Signup successful', user });
});
// Start Workless Server
const PORT = 3000;
app.listen(PORT, () => {
console.log(Workless Server running on port ${PORT});
});
[28-03-2025 01:39] Devrat Naskar: {
"name": "workless",
"version": "1.0.0",
"main": "server.js",
"scripts": {
"start": "node server.js"
},
"dependencies": {
"express": "^4.17.1",
"mongoose": "^6.0.0"
},
"description": "Workless - A platform for offline skills and services"
}