Commit graph

71 commits

Author SHA1 Message Date
Ashwin Kumar Sivakumar
83b5072011 Fix forgot-password flow: UI never let users enter the emailed code
All checks were successful
build-and-release / build (push) Successful in 2m14s
The backend emails a plain 6-digit reset code (crates/email/templates/
password-reset.html just renders {{reset_code}}, no link) and expects
POST /api/auth/reset-password with {code, new_password}. This page was
built for a different, unused link-based flow instead: it only read a
`token` from the URL query string and posted it as `token`, a field
name the backend's ResetPasswordPayload doesn't even have. Users had
no way to type the code in at all, so submitting a request just left
them stuck back on the request screen.

Now: requesting a reset code moves straight to a "set new password"
step with a 6-digit code input, and the code is submitted under the
correct `code` field name.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-23 22:25:31 +05:30
Ashwin Kumar Sivakumar
7a0799f1d1 Fix security audit finding: replace fake client-side captcha
All checks were successful
build-and-release / build (push) Successful in 2m5s
The captcha on login and all four signup forms was generated and
checked entirely in the browser (answer readable via window global),
so it provided no real bot/brute-force protection. Wire up the new
server-side captcha endpoint instead: fetch a challenge on mount,
submit captcha_id + captcha_answer with login/register, and refresh
the challenge on CAPTCHA_FAILED.

Also bump patchable dependency vulnerabilities via npm audit fix
(all criticals resolved; remainder needs an upstream SolidStart/vinxi
bump not yet available).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-23 17:32:43 +05:30
Ashwin Kumar Sivakumar
18a9161e4f chore: remove orphaned legacy dashboard routes; fix NotificationBell's broken API calls
All checks were successful
build-and-release / build (push) Successful in 1m28s
An entire route/component cluster was built on a legacy sibling of
DashboardShell (DashboardLayout.tsx) and called APIs via the bare
api.get/post/patch/delete helper, which never prefixes /api/ — so
every call 404s against the real ingress (which only routes /api/*
to the backend). Confirmed orphaned: nothing in the live dashboard
shell (DashboardShell.tsx / dashboard.tsx) links to any of it; the
only cross-references are within the cluster itself. Some of it also
targeted the apps/leads backend service removed in the companion
backend commit.

Removed:
- src/routes/dashboard/wallet/ (buy.tsx, payu-return.tsx, invoices/*)
- src/routes/dashboard/requests.tsx
- src/routes/dashboard/leads/accepted/*
- src/routes/dashboard/marketplace/*
- src/components/dashboard/AcceptedLeadsView.tsx
- src/components/DashboardLayout.tsx (only consumer was the above)
- the unused `api` object in src/lib/api.ts (the unprefixed-path
  footgun itself — `request()`, which it wrapped, stays; it's used
  correctly elsewhere with explicit /api/ paths)

Fixed rather than deleted: src/components/NotificationBell.tsx uses
the same broken convention but IS live (rendered on every dashboard
page via DashboardShell). Switched it to apiFetch with correct
/api/me/notifications/* paths, matching the routes that actually exist
in apps/users/src/handlers/notifications.rs.

`tsc --noEmit` shows no errors under src/ after these changes (pre-
existing node_modules/type-declaration noise unrelated to this change
remains, as it did before).
2026-07-21 04:25:36 +05:30
Tracewebstudio Dev
49b979eb16 fix: eliminate API prefix double-encoding across all dashboard components
All checks were successful
build-and-release / build (push) Successful in 1m40s
All dashboard pages and widgets had one of three bugs:
- const API = "/api" combined with paths already starting /api → double prefix
- const API = '/api/gateway' → nonexistent gateway path prefix
- cleanPath stripping /api off paths when API was set to ""

Fix: set const API = "" uniformly and remove cleanPath rewrite in all 30+
affected files (CompanyJobsPage, CompanyApplicationsPage, CreditsPage,
JobSeekerJobsPage, CustomerRequirementsPage, all widgets, etc.).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-18 11:40:20 +02:00
Tracewebstudio Dev
4efe848f3a fix: local dev proxy, TypeScript errors, and test quality
All checks were successful
build-and-release / build (push) Successful in 2m15s
- middleware.ts: default GATEWAY_URL to localhost:9100 (was K8s hostname);
  proxy all /api/* to gateway instead of falling through to SolidStart renderer
- signup/index.tsx: fix kebab-case style property (align-items)
- dashboard/CreditsPage.tsx: fix IIFE closing in Show children
- AskAsh/index.ts: use ~ alias to fix bundler module resolution
- vite.config.ts: add string type to rewrite callback
- global.d.ts: add Window.__captchaCode and __testMode declarations
- help-center/article/[slug].tsx: add missing ContentBlock import
- test/setup.ts: add vitest/globals reference, fix IntersectionObserver mock
- tests/e2e: fix implicit any, string|null/undefined type errors in e2e specs
- tests/tsconfig.json: add tests-specific tsconfig with node types

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-17 00:47:32 +02:00
Ashwin Kumar Sivakumar
3ec5e60d15 fix(signup): remove duplicate role_key field from professional registration
All checks were successful
build-and-release / build (push) Successful in 1m29s
The register() request body sent both profession and role_key with the
same value. The backend's registration DTO aliases role_key onto the same
field as profession, so serde_json rejected the payload outright with a
"duplicate field" deserialization error — professional signup was
returning 422 for every role in production.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 22:14:10 +05:30
Ashwin Kumar Sivakumar
474fa637c3 fix: dead sidebar/wallet/leads/marketplace navigation links
Some checks failed
build-and-release / build (push) Failing after 1m11s
- DashboardLayout sidebar: Leads/Credits/Settings/Logout pointed to
  routes with no matching file (404). Leads now routes to the real
  accepted-leads page; Credits/Settings/Logout reuse the working
  /dashboard?nav= deep-link into the main dashboard's tab switcher
  (fixes Logout leaving users authenticated on a 404).
- wallet/buy.tsx, wallet/payu-return.tsx: post-purchase, cancel, and
  payment-verification redirects targeted non-existent /dashboard/wallet;
  now redirect to the existing credits/wallet tab.
- leads/accepted.tsx already contained a detail view gated on
  useParams().id, but was only registered as a flat route with no :id
  segment, so the detail view was dead code. Split into
  leads/accepted/index.tsx + leads/accepted/[id].tsx backed by a shared
  AcceptedLeadsView component.
- Added marketplace/[id].tsx: "View Requirement" buttons navigated to
  a route that never existed.
2026-07-12 17:58:37 +05:30
Ashwin Kumar Sivakumar
f55a2dad77 feat: AI Credits Admin Panel
Some checks failed
build-and-release / build (push) Failing after 1m6s
- Add AiCreditsAdmin component for managing AI credits
- View user balance with detailed credit breakdown
- Transaction history (ledger) viewer with pagination
- Manual credit adjustment (ADD/DEDUCT) with audit reasons
- Reconcile tab for generating reports
- Integrate with backend /admin/ai-credits endpoints
2026-07-06 01:58:29 +05:30
Ashwin Kumar Sivakumar
38c7b4022d fix(signup): auto-login after OTP verification
Some checks failed
build-and-release / build (push) Failing after 1m17s
2026-07-05 17:04:10 +05:30
Ashwin Kumar Sivakumar
3ee5e908cf fix(signup): add role_key to registration requests
Some checks failed
build-and-release / build (push) Failing after 1m12s
2026-07-05 16:51:30 +05:30
Ashwin Kumar Sivakumar
d7810ace96 fix(auth): change all /api/gateway/auth endpoints to /api/auth for forgot-password, login, and dashboard
Some checks failed
build-and-release / build (push) Failing after 1m6s
2026-07-05 16:25:32 +05:30
Ashwin Kumar Sivakumar
1bf3191c49 fix(signup): change all auth API endpoints from /api/gateway to /api
Some checks failed
build-and-release / build (push) Failing after 1m17s
2026-07-05 16:21:17 +05:30
Ashwin Kumar Sivakumar
07aa835da5 fix(signup): change API endpoint from /api/gateway/auth/register to /api/auth/register
Some checks failed
build-and-release / build (push) Failing after 1m16s
2026-07-05 14:56:11 +05:30
Ashwin Kumar Sivakumar
0cf975f227 fix(signup): fix /signup routing so job-seeker and role-specific URLs work
Some checks failed
build-and-release / build (push) Failing after 1m17s
Three related bugs made signup pages appear blank/'Not found':

1. /signup/index.tsx redirected to /signup/job-seeker (hyphen) but the
   actual file was signup/jobseeker.tsx (no hyphen). Result: every
   /signup visit (no intent) 404'd.

2. signup/company.tsx had the same broken link in the 'Register as
   Job Seeker instead' link.

3. Landing page CTAs link to /signup?intent=professional&role=DEVELOPER
   which the index correctly redirects to /signup/professional - but
   /signup/developer, /signup/photographer etc. were 404 because there
   were no route files for them. Added signup/[role].tsx catch-all
   that maps all professional role slugs (developer, photographer,
   tutor, makeup-artist, video-editor, graphic-designer,
   social-media-manager, fitness-trainer, catering-services,
   ugc-content-creator) to /signup/professional?role=<ROLE>.

Verified via Playwright: all role-specific signup paths now load the
full signup form instead of 'Not found'.
2026-07-04 22:08:03 +05:30
Ashwin Kumar Sivakumar
6e92ed43b6 fix(signup): create proper index.tsx for signup folder, rename job-seeker to jobseeker
- Fix routing structure with index.tsx
- Remove conflicting signup.tsx at root level
- Rename job-seeker.tsx to jobseeker.tsx for cleaner URLs
2026-07-03 17:59:34 +05:30
Ashwin Kumar Sivakumar
cbe49ff5ad fix: update CTAs and fix company signup validation
- Update homepage CTAs to point to new signup URLs
- Fix company signup to not validate lastName
- Add customer signup page
- Fix professionals page CTA
2026-07-03 17:55:45 +05:30
Ashwin Kumar Sivakumar
bdf51ba3da feat(signup): create separate signup pages for each role
- /signup/company - dedicated company registration page
- /signup/job-seeker - dedicated job seeker registration page
- /signup/professional - dedicated professional registration page
- /signup - redirects to appropriate role-specific page
- Removed tabs, each role has its own clean registration flow

Fixes role assignment issues by having dedicated pages per role type.
2026-07-03 17:51:16 +05:30
Ashwin Kumar Sivakumar
9519337030 fix(signup): show role badge for professional/customer intents, fix role assignment
- Hide role selector tabs when intent is provided via URL
- Show role badge for professional/customer roles
- Add profession field to API call for backend role assignment
- Fixes issue where roles weren't properly assigned after signup
2026-07-03 17:40:14 +05:30
Tracewebstudio Dev
43f09b78d2 feat: notifications page, auto-apply settings, customer response profiles, job status UI
- NotificationsPage: full paginated notification list with unread filter, mark read, load more
- SettingsPage: AI auto-apply section for job seekers (toggle, preferences, skills/titles/locations, salary range)
- CustomerResponsesPage: enriched professional response cards with avatar, bio, skills, location
- CompanyJobsPage: show rejection reason banner and pending-approval notice on job cards
- NotificationBell: fix "View all" link to /dashboard?nav=notifications (deep-link support)
- dashboard.tsx: ?nav= param reads sidebar page on mount; Notifications added to all role sidebars
- PayU integration: payu.ts lib, payu-return route, wallet buy/invoice pages, marketplace route
- Razorpay removed, replaced by PayU across payments flow
- ProfilePage: photo upload UI with avatar preview for all roles
- PortfolioPage: showcase image upload with file picker and preview
- CompanyApplicationsPage: applicant profile snapshot with avatar, headline, skills, resume download
- profile-fields-config: removed resume_doc from job seeker (resume is now AI-generated)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-02 13:33:54 +02:00
Tracewebstudio Dev
ab054884eb Integrate Razorpay checkout flow 2026-06-26 20:50:39 +02:00
Rimuru
6666cc5f67 fix(frontend): replace broken file-based API routes with SolidStart middleware
Vinxi 0.5.7 + @solidjs/start 1.3.2 has a build bug where file-based API
routes (src/routes/api/*) are registered in the page router tree but never
mounted as Nitro handlers in the production build, so every /api/* request
returns a framework 404.

Fix: register a SolidStart middleware (src/middleware.ts) via the
middleware config field. The middleware intercepts all /api/* paths and
proxies them to the Rust gateway, bypassing the broken page router.

Covers:
- /api/gateway/* (catch-all proxy to gateway)
- /api/kb/categories
- /api/kb/articles
- /api/kb/articles/:slug

Also tightens the dev-server vite proxy from /api to /api/kb so it
doesn't shadow the new middleware in dev.

Removes the dead src/routes/api/ tree (no longer used).
2026-06-11 15:36:44 +05:30
Ashwin Kumar Sivakumar
aabfacc735 fix: route client /api/* through /api/gateway/* proxy\n\nLogin, signup, forgot-password, dashboard, contact, help-center, and all dashboard component fetches were calling bare /api/* paths. The SolidStart server has no /api/auth/*, /api/support/*, or /api/kb/* handlers -- only /api/gateway/[...path] proxies to the Rust gateway. So those calls returned HTML (SPA catch-all), the JSON parse threw silently, and the buttons looked dead. Sign In / Sign Up / Forgot Password all appeared to be no-ops.\n\nThis routes every client-side fetch through the existing gateway proxy, matching the pattern already used by src/lib/api.ts.\n\nAlso fixes hardcoded test121 -> test111 in canonical/og:url tags across index, professionals, help-center, and RoleLandingPage. 2026-06-11 14:10:10 +05:30
Tracewebstudio Dev
eee67d9ff7 Update components (CaptchaCanvas, DashboardLayout, MyDashboardPage, PortfolioPage, ProfilePage), form-validation, routes (dashboard, login, signup), app.css, add e2e tests and helpers, add manual test files and config 2026-05-08 15:34:49 +02:00
Tracewebstudio Dev
eb61206810 feat: dashboard session timer and verification UI improvements
- Add SessionTimer component with 13min warning / 15min idle auto-logout
- Move VerificationSubmissionGuide from ProfilePage to MyDashboardPage
- Remove duplicate VerificationSubmissionGuide from ProfilePage
- Fix 'Go to My Portfolio' button to navigate properly
- Change error messages to 'Service unavailable' for failed widget loads
- Brand color updates for VerificationSubmissionGuide
2026-05-05 17:22:04 +02:00
Tracewebstudio Dev
d3f3850e1d fix(wallet): fetch pricing by concrete role key 2026-04-29 09:59:41 +02:00
Tracewebstudio Dev
f386b0c298 chore: checkpoint workspace updates 2026-04-26 23:58:43 +02:00
Tracewebstudio Dev
188de040ae fix: MyDashboardPage reads role from URL directly, skips stale prop closure; loadRoleBundle uses auth; no fallback config fetch 2026-04-22 01:13:56 +02:00
Tracewebstudio Dev
aa79b30465 fix: RequireAuth hydration mismatch and role resolution
- RequireAuth: use setTimeout to defer clientReady=true until after hydration completes, preventing SSR/client mismatch
- dashboard.tsx: add SSR guard to return empty div on server
- playwright tests for dashboard role verification
2026-04-22 00:36:12 +02:00
Tracewebstudio Dev
1990b5c99d fix: remove RequireAuth render-time loading spinner causing SSR/hydration mismatch
The loading spinner in RequireAuth caused a hydration error: on SSR the session was available so children rendered, but during client hydration session.loading was true so the spinner rendered instead, causing DOM mismatch (null nextSibling).

Also includes role resolution priority fixes from previous session:
- prefer preferredRole when backendRole is JOB_SEEKER but preferredRole is not
- pass role via URL param to dashboard
- urlRoleLocked signal prevents auth effects from overriding URL role
2026-04-21 23:56:19 +02:00
Tracewebstudio Dev
159b051ac8 fix: resolve role resolution priority - backend roles override localStorage
- login.tsx: pass role via URL param to dashboard instead of relying on localStorage
- dashboard.tsx: add urlRoleLocked signal to prevent auth effects from overriding URL-passed role
- auth.tsx: trust passed-in role over re-reading from localStorage in saveUser
2026-04-21 21:50:57 +02:00
Tracewebstudio Dev
bb6db6c166 fix: correct API endpoint paths from /api/gateway/api to /api
- signup.tsx: fix check-email, register, verify-email, resend-otp paths
- login.tsx: fix check-email, login, resend-otp, verify-email paths
- forgot-password.tsx: fix forgot-password, reset-password paths
- contact.tsx: fix support/tickets path

The gateway expects /api/auth/... but frontend was calling /api/gateway/api/auth/...
2026-04-17 17:00:10 +02:00
Tracewebstudio Dev
34f46f09bd fix: route auth register via gateway proxy 2026-04-17 11:56:08 +02:00
Tracewebstudio Dev
152f918a7b fix(auth): correct resend-otp API endpoint path
- Change from /api/gateway/api/auth/resend-otp to /api/auth/resend-otp
- Fix in signup.tsx and login.tsx
- Gateway already proxies /api/auth/* to users service
2026-04-16 17:29:46 +02:00
Tracewebstudio Dev
6f31fb06a5 fix(signup): send first_name and last_name instead of full_name
- Backend now expects first_name and last_name separately
- Remove full_name field from registration payload
2026-04-16 10:35:40 +02:00
Tracewebstudio Dev
5922b98c93 fix: update forms to match DB schema - first_name/last_name, role keys 2026-04-15 06:23:28 +02:00
Tracewebstudio Dev
c2cbafc159 Wire external runtime preview mode and backend data in dashboard preview 2026-04-15 00:15:11 +02:00
Ashwin Kumar
f32cefeab9 feat(frontend): add lead requests, accepted leads, checkout, invoice detail, notification bell
- Add Lead Requests page with filters and cancel functionality
- Add Accepted Leads page with contact details and WhatsApp integration
- Add Buy Tracecoins checkout flow with Beeceptor payment
- Add Invoice Detail page with GST breakdown
- Add NotificationBell component with 30s polling
- Add manual E2E test script
- Update Playwright tests for company verification flow
2026-04-10 03:36:26 +02:00
Ashwin Kumar
30750f3797 docs: clarify real data implementations are wired to backend APIs
All job seeker pages are already connected to real APIs:
- Jobs: /api/jobseeker/jobs (real company job postings)
- Applications: /api/jobseeker/applications (my applied jobs)
- Saved Jobs: Custom data storage for bookmarked jobs
- Apply: POST /api/jobseeker/jobs/{id}/apply

Dashboard shows real data from backend, not mock preview.
2026-04-10 01:21:36 +02:00
Ashwin Kumar
7671ad8e55 feat: improve Help Center UI with mixed dark/light theme and structured content
- Updated Help Center with dark hero and light content sections
- Added ArticleContent component for rendering structured content blocks
- Updated seed data with detailed articles matching admin KB categories
- Fixed article alignment and spacing issues
- Uses ContentBlock[] instead of HTML strings for type-safe content
2026-04-09 21:52:16 +02:00
Ashwin Kumar
b8faf752e9 feat: align external dashboards, profile settings split, and role flows 2026-04-08 22:40:43 +02:00
Ashwin Kumar
86e1bbd268 fix: resolve solid-markdown build error
- Update solid-markdown from ^0.5.0 to ^2.1.1 (old version no longer exists)
- Replace Markdown component with innerHTML rendering for help center articles
- Build now succeeds without errors
2026-04-07 12:55:15 +02:00
Ashwin Kumar
d3630dbaa8 feat: use solid-markdown for Help Center article rendering
- Added solid-markdown dependency
- Replaced manual paragraph splitting with Markdown component
- Articles now render proper markdown (headings, lists, links, etc.)
- Improves readability and matches reference implementation
2026-04-06 18:39:32 +02:00
Ashwin Kumar
bbf11b91e1 feat(dashboard): real My Profile, My Portfolio, Verification pages
- DashboardShell: sticky sidebar + header wrapper with shared style tokens
- ProfilePage: 3-tab form (Basic, Documents, Settings) per role, save/submit-for-verification
- PortfolioPage: full CRUD wired to /api/:prefix/portfolio/me endpoints
- VerificationStatusPage: 7-state status display with progress timeline and resubmit flow
- dashboard.tsx: REAL_PAGES routing intercepts these three sidebar items and renders
  real components instead of DashboardDesignPreview mock

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 17:20:48 +02:00
Ashwin Kumar
e5406a0061 feat: add auth context, route guards, password reset, and API client
- Add AuthProvider context and RequireAuth route guard
- Create API client with all endpoint helpers
- Add forgot-password route wired to backend reset endpoints
- Remove dummy login button from login page
- Wire dashboard to auth context for user data
- Enhance profile save to send all fields
- Wire profile submit-for-verification to backend API
2026-04-06 06:19:23 +02:00
Ashwin Kumar
19a0850c49 feat: integrate dynamic help center with runtime-configured knowledge base 2026-04-06 03:33:29 +02:00
Ashwin Kumar
d008cd184d feat: improve public role pages and help center content 2026-04-06 01:47:05 +02:00
Ashwin Kumar
564a383a10 Wire user dashboard to real APIs — profile, credits, leads, requirements, jobs
- dashboard.tsx: fetch session for real user name/ID/role, fallback to
  localStorage; show dashboard with role defaults when runtime config unavailable
- DashboardDesignPreview: add liveData prop; createResource for credits,
  marketplace, lead requests, customer requirements, jobs, and profile
- Profile form: inputs now track state via profileFormData signal; pre-filled
  from GET /api/${prefix}/profile/me; Save Changes PATCHes real endpoint
- Lead actions: Send Request POSTs to /api/${prefix}/leads/request; Cancel
  DELETEs /api/${prefix}/leads/requests/{id}; both refetch after completion
- Requirement submit: POSTs to /api/customers/requirements then submits for approval
- Replace hardcoded "Alex" with real session name; credits from wallet balance API
- Fix launch.json PATH so npm is found in sh shell

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 21:13:54 +02:00
Ashwin Kumar
a8ad2b0620 chore: sync latest dashboard and role flow updates 2026-04-05 16:52:02 +02:00
Ashwin Kumar
9ba3adda64 Add form validation to all dashboard forms
- form-validation.ts: new validators (isValidPhone, isValidTitle, isValidDescription,
  isValidLocation, isValidPrice, isValidBudget, isValidSalaryRange, isValidDuration,
  isValidTags, isValidFullName)
- portfolio/index.tsx: title (3–255), description (optional 10+), tags (≤40 chars, max 20)
- settings.tsx: full_name, phone (Indian 10-digit), location, bio (≤500), password strength meter
- jobs/create.tsx: title (5–200), description (20+), location, salary range, experience, skills
- requirements/index.tsx: title, description, location, budget (optional), preferred date
- services/index.tsx: name (3–255), price (positive), duration (optional 1–1440), description (≤1000)
- All forms: VNote inline component (✓ orange / • gray), submitted signal prevents premature errors,
  red borders on invalid fields post-submit

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 22:55:56 +02:00
Ashwin Kumar
64ec515393 Add wallet invoices page
- wallet/invoices.tsx: table of invoices with download link; uses role-specific API prefix; handles loading/empty states

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 18:14:10 +02:00