Public
Marketplace for Indian local businesses and freelancers
freelancemarketplacereactsaassqlite
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.

SkillBridge

Local businesses. Real skills. Paid opportunities.

A working marketplace MVP that connects small businesses in India with freelancers and students who want to earn using their skills. Prices are in ₹, the workflow is database-backed, and every screen that claims something is backed by a real record.

Open the app · View source


What actually works

Everything below was exercised against the deployed val, not just written:

FlowStatus
Registration as client or freelancer (roles, profiles, business profile)✅ working
Login / logout with PBKDF2-hashed passwords and server-side sessions✅ working
Searchable marketplace: search, category, city, budget, experience, sort✅ working
Freelancer profiles + service listings + service detail pages✅ working
Client posts a project; freelancer sends a proposal✅ working
Client reviews applications, accepts one (others auto-rejected)✅ working
Checklist generated on acceptance; delivery, revisions, approvals✅ working
Project discussion thread (participants only)✅ working
Project status lifecycle: open → reviewing → in progress → submitted → completed✅ working
Reviews open only after completion, one per participant, ratings recalculated✅ working
Reports + admin moderation queue✅ working
In-app notifications for every state change✅ working
Fee breakdown before payment; payment records; refund requests✅ working (test mode)
Admin dashboard: users, projects, listings, reviews, reports, categories, settings✅ working
AI assistants (project / matching / proposal / listing)✅ working, demo mode until a key is set

Deliberately not claimed

  • No escrow. SkillBridge does not hold funds. Payouts are not automated.
  • No real payments while in test mode. No money moves, and every test row is stored with mode = test and labelled.
  • No email notifications. Only in-app notifications are written and confirmed. Nothing claims an email was sent.
  • No identity verification. Profile trust signals come from completed projects and verified reviews only.
  • Legal pages are drafts and say so at the top of each one.

Architecture

Rendering mermaid diagram...

Stack: Val Town (Deno) · Hono for routing · SQLite (std/sqlite/main.ts) for storage · client-side React 18 via esm.sh with Twind for Tailwind-style utility classes · no bundler, no build step — Val Town transpiles the .tsx files on request.

index.ts                    HTTP entrypoint: schema+seed init, /api mount, SPA shell
api.ts                      every JSON route + validation + role-based access control
db.ts                       schema (17 tables), migrations, realistic demo seed
crypto.ts                   PBKDF2 password hashing, session tokens
ai.ts                       AI helpers: live provider when keyed, templates otherwise
frontend/
  root.tsx                  HTML shell (stamps immutable asset URLs)
  index.tsx                 React entrypoint: nav, footer, client-side router, session
  lib.ts                    design tokens, ₹ formatting, API client, tiny router, markdown
  ui.tsx                    design system: buttons, cards, fields, badges, toasts, modals
  pages/
    landing.tsx             landing, how it works, legal drafts, help, about, 404
    auth.tsx                login, register, demo-account shortcut
    marketplace.tsx         freelancer search, profile, service detail, find work, proposals
    work.tsx                dashboards, post project, my projects, profile, listings, notifications
    workspace.tsx           project workspace: applications, delivery, messages, payments, reviews
    admin.tsx               protected admin dashboard

Design system

Navy #0B1437 · electric purple #7C3AED · white · light grey #F5F6FA. Rounded cards, subtle shadows, one set of primitives in frontend/ui.tsx, responsive from 320px up. Logo is a bridge with two connected nodes (inline SVG, also the favicon).


Database

All 17 tables live in the val's project-scoped SQLite database and are created idempotently on first request, then seeded once:

users · sessions · businesses · freelancer_profiles · categories · services · projects · proposals · messages · deliverables · reviews · payments · notifications · reports · settings · activity

Demo data is flagged with is_demo = 1 and rendered with a visible Demo content badge, so seeded rows are never confused with genuine user content. The seed includes 8 freelancers, 3 client businesses, 10 service listings, 6 projects (one fully completed with two reviews and a payment row) and open proposals so dashboards are not empty.


Roles and access control

  • Client — posts projects, reviews applications, accepts a proposal, confirms payment, marks complete, reviews.
  • Freelancer — lists services, applies to open projects, submits work, requests revisions, reviews the client.
  • Admin — moderation only. Never created by public registration.

Admin setup is a two-step, server-side process:

  1. Set the env var ADMIN_SETUP_TOKEN to a long random string.
  2. Log in with the account you want to promote, open /admin, and submit that token.

Enforcement lives entirely on the server in api.ts. Every mutating route re-checks who is asking: a non-owner accepting a proposal gets 403 Only the project owner can accept proposals; only the freelancer can mark work submitted; only the client can mark a project complete. Sessions are HttpOnly, SameSite=Lax, 30 days, and are deleted on logout and immediately on suspension.


Environment variables

KeyRequired?What it enables
ADMIN_SETUP_TOKENYes, for adminThe only way to promote an account to administrator. Without it, admin setup returns 503.
OPENAI_API_KEYOptionalLive AI for all four assistants.
ANTHROPIC_API_KEYOptionalLive AI (alternative provider, tried second).
OPENROUTER_API_KEYOptionalLive AI (alternative provider, tried third).
RAZORPAY_KEY_ID + RAZORPAY_KEY_SECRETOptionalLive Razorpay orders + signature verification. Without them the platform runs in labelled test mode.

👉 Add ADMIN_SETUP_TOKEN here: https://www.val.town/x/Dhanuuuuuu/skillbridge/environment-variables?key=ADMIN_SETUP_TOKEN

👉 Add OPENAI_API_KEY here: https://www.val.town/x/Dhanuuuuuu/skillbridge/environment-variables?key=OPENAI_API_KEY

👉 Add RAZORPAY_KEY_ID here: https://www.val.town/x/Dhanuuuuuu/skillbridge/environment-variables?key=RAZORPAY_KEY_ID

👉 Add RAZORPAY_KEY_SECRET here: https://www.val.town/x/Dhanuuuuuu/skillbridge/environment-variables?key=RAZORPAY_KEY_SECRET

Secrets are read with Deno.env.get() on the server only and are never sent to the browser. Keys are never accepted from the client.


AI features

Four assistants are implemented in ai.ts:

  • Project Assistant — rewrites a rough brief, suggests a category and deliverables, and returns a budget estimate explicitly labelled as an estimate, never as a market price.
  • Freelancer Matching — ranks real freelancer records by matching skills, stated price against the budget, availability, completed projects, verified reviews and city, and explains each reason.
  • Proposal Assistant — rewrites a freelancer's rough proposal, keeps it editable, and never invents experience.
  • Listing Assistant — turns a rough service idea into a clear listing with deliverables.

Every response carries a mode of live or demo. With no provider key set, the assistants return SkillBridge's built-in templates and the UI shows Demo mode — no AI provider key configured. They are never presented as model output when they are not. Matching reasons may only cite facts from our own database, and matching never changes a freelancer's recorded qualifications.


Pricing and payments

Transparent, single-fee model:

  • Freelancer joining fee: ₹0
  • Platform commission: 10%, configurable by the admin in Platform settings
  • Teaser: the commission is added to the client's total — it is never deducted from the freelancer's agreed price

Worked example shown in-product: a ₹1,000 project → client pays ₹1,100 → freelancer receives ₹1,000.

The order summary is displayed before any payment is confirmed on the service page, in the accept flow and in the workspace.

Payment layer: POST /api/projects/:id/payment/order creates a payment record. With Razorpay keys configured it creates a real order via the Razorpay Orders API and returns the key + order id for Checkout. POST /api/payments/:id/confirm verifies the payment server-side using the sha256(order_id|payment_id) HMAC before recording it as paid. Duplicate orders are blocked, failed and cancelled outcomes are stored, refunds are recorded as refund_requested for manual handling, and a full audit trail (provider reference, mode, timestamps) is kept. Card numbers, CVVs and UPI PINs are never stored — Razorpay handles them.

To go live: add RAZORPAY_KEY_ID and RAZORPAY_KEY_SECRET, complete Razorpay merchant approval, and add Checkout to PaymentPanel in frontend/pages/workspace.tsx (the server side is already done). Escrow and split payouts are not implemented and are not described as available anywhere in the product.


Testing the MVP

Fastest path — the seeded demo accounts (password demo1234, labelled as demo throughout):

  1. Client: log in as meera.demo@skillbridge.in → dashboard, projects, applications, reviews.
  2. Freelancer: log in as aarav.demo@skillbridge.in → profile completeness, open work, proposals.
  3. Buyer side: post a project at /post-project, then accept an application and walk the workspace through to a review.

Or run the full loop yourself: register a client → post a project → register a freelancer → apply → accept as the client → mark submitted → mark completed → leave a review. Every step writes to the database and appears in both dashboards.

Delete the demo accounts before onboarding real users — they are clearly marked Demo account in the UI and is_demo = 1 in the database.

Verified during this build

  • Registration → user, business profile, welcome notification, session row with 30-day expiry
  • Authenticated project creation → project id returned, activity row written
  • Freelancer proposal → project auto-advanced open → reviewing, client notified
  • RBAC negative test: a non-owner accepting that proposal was refused with 403
  • Owner acceptance → freelancer assigned, agreed price stored, 3 checklist items generated, other proposals auto-rejected
  • Completion → completed_at set, freelancer's completed_projects incremented
  • Review → stored, rating totals recalculated, review_received notification delivered

Deployment

  1. The val is live at https://skillbridge.val.run. Every push publishes automatically.
  2. Ensure ADMIN_SETUP_TOKEN is set (above), then promote your account from /admin.
  3. Optionally add AI and Razorpay keys to leave test/demo mode.
  4. Review the legal drafts with a lawyer (below) before taking real money.

Before launching in India

  • Legal review: all four legal pages are drafts. Have them reviewed for the Consumer Protection Act, the IT Act and IT Rules, GST and TDS, the DPDP Act, and Razorpay merchant terms.
  • Payments: Razorpay merchant approval, and Checkout wired into the workspace UI.
  • Trust: decided whether to add identity verification; today trust rests on completed projects and verified reviews.
  • Operations: delete demo data, set the support email, and agree who answers the moderation queue.
  • Later phases: escrow/split payouts (only once provider-approved), email notifications, richer AI automation, mobile apps.

Built on Val Town. View source