Commit graph

76 commits

Author SHA1 Message Date
Tracewebstudio Dev
5946bfe3a8 chore: checkpoint workspace updates 2026-04-26 23:58:43 +02:00
Tracewebstudio Dev
1ac60f9756 fix: gateway routes /api/runtime-config to users service (was missing, causing 404) 2026-04-22 01:13:59 +02:00
Tracewebstudio Dev
f37c48f1ee fix: get_user_role_keys returns newest role first, not oldest
- models/user.rs: ORDER BY ur.created_at DESC so most recently assigned role is returned first
- handlers/auth.rs: resolve_signup_role_candidates returns empty vec instead of JOB_SEEKER when no valid intent
2026-04-21 21:51:02 +02:00
Tracewebstudio Dev
04f9ab52fa fix: suppress dead_code warnings with #[allow(dead_code)] 2026-04-18 18:30:56 +02:00
Tracewebstudio Dev
0e7ab9ceb8 fix: add v1 otp routes and fail on email send errors 2026-04-17 12:02:26 +02:00
Tracewebstudio Dev
d08449185e feat: add v1 users API routes for backward compatibility
- Add /api/v1/users path routing to users service in gateway
- Add v1_router() in auth.rs with resend-otp endpoint
- Nest /api/v1/users route in main.rs
- Support legacy /api/v1/users/resend-otp endpoint
2026-04-16 18:06:06 +02:00
Tracewebstudio Dev
52ed6d7975 fix(support): add missing status bind parameter in admin create case
- Fix INSERT statement to use , ,  instead of hardcoded 'new' with placeholders
- Add .bind("new") for status parameter
2026-04-16 10:28:05 +02:00
Tracewebstudio Dev
ebc0a29437 fix(ai): use Ollama cluster URL and gemma3:270m model defaults
- Default OLLAMA_BASE_URL to http://ollama.nxtgauge-ai.svc.cluster.local:11434
- Default OLLAMA_CHAT_MODEL to gemma3:270m (matches gitops configmap)
2026-04-15 19:54:58 +02:00
Tracewebstudio Dev
430711a0ae feat: add AI endpoints for chat, tickets, form extraction via Ollama
- Add /api/ai/chat/message: LLM-powered chat with intent classification
- Add /api/ai/tickets/create and /api/ai/tickets/🆔 AI ticket management
- Add /api/ai/forms/extract: LLM-powered form field extraction
- Add /api/support/tickets/ai/create: unauthenticated ticket creation for AI service
- Add reqwest to workspace dependencies
2026-04-15 18:19:07 +02:00
Tracewebstudio Dev
a3076ed526 feat: update DB schema - split users.first_name, users.last_name, roles split 2026-04-15 06:23:27 +02:00
Tracewebstudio Dev
92ded2b43d Fix role/config schema alignment and external dashboard runtime loading 2026-04-15 00:16:25 +02:00
Tracewebstudio Dev
3432d67cc4 fix(auth): remove phone from INSERT and User struct since column doesn't exist
- Remove phone from INSERT INTO users (users table has no phone column)
- Remove phone from User struct and CreateUserPayload
- Return null for phone in API responses
- Keep phone field in RegisterPayload for backward compat (just not persisted)
2026-04-13 20:15:32 +02:00
Tracewebstudio Dev
1d50d21f00 fix(auth): also accept 'name' field for signup compatibility
Frontend sends 'name' field directly. RegisterPayload now accepts:
- name (direct, used by frontend)
- full_name (legacy)
- first_name + last_name (new format)
2026-04-13 20:13:53 +02:00
Tracewebstudio Dev
63eb27a160 fix(auth): accept both full_name and first_name+last_name for backward compatibility
RegisterPayload now accepts:
- full_name (single field, for old frontend clients)
- first_name + last_name (new format)

Error returned only if none of these are provided.
2026-04-13 19:59:48 +02:00
Tracewebstudio Dev
2861e7a5fe fix: replace u.full_name with u.name in remaining services
- companies: user.name in email and contact queries
- customers: user.name in email
- job_seekers: u.name in company user query
- cron tasks (jobs/leads/requirements): use u.name instead of u.full_name
- contracts/profession_shared: u.name for customer_name fields
2026-04-13 17:12:49 +02:00
Tracewebstudio Dev
231ff9530f fix(auth): use 'name' column instead of 'full_name', combine first_name + last_name
- Replace full_name with name in User struct and all queries
- RegisterPayload now takes first_name + last_name instead of full_name
- Combine first_name and last_name into name before saving to DB
- Update all response structs to use 'name' field instead of 'full_name'
- Fix support and dashboard queries to use u.name instead of u.full_name

Root cause: DB has 'name' column, code was using 'full_name' which doesn't exist.
2026-04-13 16:55:09 +02:00
Tracewebstudio Dev
f5130569e5 fix: migrate route params to Axum 0.7+ syntax ({id} instead of :id)
- apps/jobs/src/main.rs: Update /jobs/:id to /jobs/{id}
- apps/leads/src/main.rs: Update /leads/:id to /leads/{id}
2026-04-13 16:04:55 +02:00
Tracewebstudio Dev
f7e18cd4d6 feat: pricing packages with multi-select roles, lead requests, mock checkout 2026-04-13 01:36:13 +02:00
Tracewebstudio Dev
c433ab5fed feat(db): update service handlers and models for new schema
- Update leads service to use 'leads' table
- Update extension models to use user_role_profile_id
- Update ProfessionalRepository to work with new schema
- Create TracecoinWalletRepository for wallet operations
- Update all handlers to use new model fields
- Rename Application fields (job_seeker_id -> applicant_user_id)
- Update cron tasks for new schema
- Fix compilation errors across all services
2026-04-13 00:29:44 +02:00
Tracewebstudio Dev
1e6abd9397 feat: add separate jobs and leads services
- Create jobs service (port 9103) for job postings management
- Create leads service (port 9118) for lead/requirement management
- Update gateway to route /api/jobs to jobs service
- Update gateway to route /api/leads to leads service
- Add jobs and leads to Woodpecker CI matrix
2026-04-12 22:03:06 +02:00
Tracewebstudio Dev
8d920c4b34 fix(users): update Axum routes to 0.7 syntax for email templates 2026-04-12 16:58:07 +02:00
Ashwin Kumar
e948dc7175 feat(smtp): add SMTP management APIs and test functionality
- Add GET /api/admin/email/smtp-config endpoint

- Add POST /api/admin/email/smtp-config endpoint

- Add POST /api/admin/email/smtp-test endpoint

- Add send_test_email method to Mailer

- Update SMTP management page with test functionality
2026-04-10 04:55:35 +02:00
Ashwin Kumar
b4f714f43f feat(emails): complete email system with 35 branded templates and full wiring
- Add 35 branded HTML email templates with Nxtgauge styling

- Create email template engine with base template system

- Add email management API for admin panel

- Wire email triggers from all services

- All services compile successfully
2026-04-10 04:49:39 +02:00
Ashwin Kumar
ff4e23d991 fix(payments): update axum router path syntax to v0.7 2026-04-10 03:09:16 +02:00
Ashwin Kumar
d46f455c03 fix: use unique ports 9100-9117 (avoids conflicts with BrowserOS on 9000/9103) 2026-04-09 22:18:30 +02:00
Ashwin Kumar
d151653ab1 chore: trigger rebuild 2026-04-09 21:51:17 +02:00
Ashwin Kumar
4fbc8d8b1f chore: trigger CI rebuild 2026-04-09 13:51:11 +02:00
Ashwin Kumar
73d167c333 fix: add OpenSSL static linking for musl builds
Added openssl-libs-static and OPENSSL_STATIC=1 environment variable
to fix reqwest/native-tls compilation errors with musl target.

Changes:
- Install openssl-libs-static in builder
- Set OPENSSL_STATIC=1 and OPENSSL_DIR=/usr
- Ensures OpenSSL is statically linked for all services
2026-04-09 11:59:57 +02:00
Ashwin Kumar
5b4e8fe908 refactor: use Alpine Linux with static musl binaries for all services
Switched from Debian to Alpine Linux for significant improvements:
- Image size: ~5MB vs ~100MB (95% smaller)
- Security: Minimal attack surface, no glibc vulnerabilities
- Static linking: No glibc version issues ever again
- Uses rust:alpine builder with x86_64-unknown-linux-musl target
- Static binaries with RUSTFLAGS='-C target-feature=+crt-static'

Fixes the GLIBC_2.38 error permanently by avoiding glibc entirely.
2026-04-09 11:51:57 +02:00
Ashwin Kumar
219960399b fix: update Dockerfiles to use debian:trixie-slim for glibc 2.38+ compatibility
Fixed glibc version mismatch between rust:latest builder (glibc 2.38+)
and debian:bookworm-slim runtime (glibc 2.36). This was causing:
- ./companies: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.38 not found
- ./payments: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.38 not found
- Similar errors for users service

Updated all 19 service Dockerfiles + Dockerfile.template to use
debian:trixie-slim which includes glibc 2.38+.
2026-04-09 11:48:46 +02:00
Ashwin Kumar
3e557e54e8 fix: convert all remaining SQLx macros in handlers to runtime API 2026-04-09 08:11:26 +02:00
Ashwin Kumar
83c62a1c5e fix: convert all SQLx macros to runtime API, remove SQLX_OFFLINE requirement 2026-04-09 07:40:15 +02:00
Ashwin Kumar
1d3d07f001 fix: add Docker Hub login + switch runtime to AWS ECR Public to avoid rate limits 2026-04-09 06:26:01 +02:00
Ashwin Kumar
085b3169f6 fix: limit CARGO_BUILD_JOBS=2 to reduce OOM during parallel matrix builds 2026-04-09 05:55:50 +02:00
Ashwin Kumar
329f650079 fix: add SQLx offline cache and SQLX_OFFLINE=true for Docker builds 2026-04-09 05:46:32 +02:00
Ashwin Kumar
a2fa6cfbb9 fix: use rust:latest image tag (1.88 tag does not exist yet) 2026-04-09 05:34:07 +02:00
Ashwin Kumar
3318a0aec1 fix: bump Rust to 1.88 to satisfy dependency toolchain requirements 2026-04-09 01:49:34 +02:00
Ashwin Kumar
0a067bcb7b fix: add libssl-dev and Cargo.lock to all service Dockerfiles 2026-04-09 01:43:28 +02:00
Ashwin Kumar
4b4a45f90d fix: bump Rust to 1.85 to support required dependency features 2026-04-09 01:23:44 +02:00
Ashwin Kumar
235c5fce76 ci: add Woodpecker CI matrix pipeline and missing cron Dockerfile
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 00:09:04 +02:00
Ashwin Kumar
2ded64e71b feat: extend admin/user flows with settings, verification, and approval updates 2026-04-08 22:40:54 +02:00
Ashwin Kumar
23c2edd567 feat: improve startup and routing
- Create scripts/init-db.sql for DB schema initialization
- Enhance start-services.sh to auto-initialize DB if needed
- Fix users admin handler: change root route from '/users' to '/' to avoid double prefix
- Remove deprecated handlers (departments/designations/employees) from users service
- Add missing admin route mappings for users and approval/case endpoints in gateway
- Update gateway to correctly handle /api/admin/users, /api/admin/approvals, etc.
- Update .env.example and docs

These changes enable running the stack without Docker and fix admin panel routing.
2026-04-07 22:12:37 +02:00
Ashwin Kumar
7928e21a21 fix: resolve all compilation warnings and errors across services
- Remove duplicate departments/designations/employees handlers from users service (already in employees service)
- Fix all 9 profession admin handlers to use correct DB schema (display_name, bio, location, custom_data)
- Fix companies admin handler to match CompanyProfile DB model with all fields
- Fix customers admin handler to match Requirement model with preferred_date
- Fix missing serde_json imports and type annotations in admin handlers
- Add #[allow(dead_code)] for intentionally unused structs/fields
- Add test infrastructure: auth crypto tests (2 passing), test directory structure
- Zero compilation warnings across all services
2026-04-07 12:52:55 +02:00
Ashwin Kumar
7457af5e3f feat: add admin leads endpoint and fix routing
- Customers service: add admin.rs with GET /api/admin/leads returning requirements with customer info
- Update customers main.rs to mount admin router at /api/admin/leads (instead of /api/admin/requirements)
- Gateway: route /api/admin/leads to customers service; remove /api/admin/requirements routing
- This enables Leads Management page to fetch all platform requirements
- Removed redundant /admin/requirements list page from frontend (kept detail page)
2026-04-06 19:23:47 +02:00
Ashwin Kumar
2c0c979c91 feat: add admin APIs for jobs, applications, and all 9 professions
- Companies service: add GET /api/admin/jobs and GET /api/admin/applications
- Gateway: route /api/admin/applications to companies; add routing for all 9 profession admin endpoints
- For each profession service (photographers, makeup_artists, tutors, developers, video_editors, graphic_designers, social_media_managers, fitness_trainers, catering_services):
  - Create admin.rs with list and detail endpoints that join with users
  - Update main.rs to mount admin router under /api/admin/<profession>
- Admin endpoints enable cross-platform visibility of all professionals by internal staff
2026-04-06 19:08:38 +02:00
Ashwin Kumar
13643ffb1b feat(companies): add admin jobs and applications list endpoints
- Add AdminJobRow and AdminApplicationRow response structs
- Implement GET /api/admin/jobs with company join and applications count
- Implement GET /api/admin/applications with applicant and job details
- Gateway routing update will follow
2026-04-06 18:56:23 +02:00
Ashwin Kumar
d996131890 feat: add activity logs audit endpoint, payment notifications, gateway routing
- Add activity_logs handler with paginated admin API
- Register /api/admin/activity-logs route in users service
- Add gateway routing for activity-logs to users service
- Trigger notification on successful tracecoin purchase
- Update handlers mod to include activity_logs module
2026-04-06 18:23:04 +02:00
Ashwin Kumar
ab25f7a994 feat(users): profile save, submit-for-verification, verification status endpoints
- profile.rs: GET/PATCH /api/profile, POST /api/profile/submit-for-verification,
  GET /api/me/verification-status — all role-aware, guards against duplicate pending
- verifications.rs: add POST /api/admin/verifications/:id/request-documents,
  fix RoleRepository/wallet_id match arm type errors
- coupons.rs: fix update_discount missing match block and i64/i32 type mismatch
- main.rs: mount /api/profile and /api/me verification-status routers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 17:20:49 +02:00
Ashwin Kumar
f3487ccff9 feat: verify payments with wallet credit, coupon validation, profile approval enhancements
- payments service: add DB persistence, wallet credit & ledger on verify
- users: coupons validate endpoint, coupon usage validation
- users: trigger_activation: assign user_role, credit 250 TC, ledger, notification
- users: add_notes: send document request notification
- fix employees port conflict
- update gateway payments route
- misc: add promotions and notifications on approval
2026-04-06 08:24:08 +02:00
Ashwin Kumar
cb53b68f49 feat: complete backend implementation - payments service, admin endpoints, auth guards, submit-for-verification for all roles
- Add payments service proxying to Beeceptor mock gateway (create-order, verify, status)
- Add companies admin approve/reject/suspend + get detail endpoints
- Apply require_admin auth guards to all employee/department/designation handlers
- Add submit-for-verification endpoint to all 12 roles (10 professions + job seekers + customers + companies)
- Fix port conflict (employees moved from 8085 to 8096)
- Add submit_for_verification methods to all profile repositories
2026-04-06 06:19:10 +02:00