Commit graph

25 commits

Author SHA1 Message Date
Ashwin Kumar Sivakumar
cd695514fe Surface real B2 upload errors and enforce 10MB body limit on document uploads
All checks were successful
build-and-release / build (developers) (push) Successful in 1m27s
build-and-release / build (employees) (push) Successful in 1m52s
build-and-release / build (customers) (push) Successful in 1m56s
build-and-release / build (cron) (push) Successful in 2m16s
build-and-release / build (companies) (push) Successful in 2m21s
build-and-release / build (catering-services) (push) Successful in 2m29s
build-and-release / build (gateway) (push) Successful in 39s
build-and-release / build (fitness-trainers) (push) Successful in 2m0s
build-and-release / build (graphic-designers) (push) Successful in 1m52s
build-and-release / build (jobs) (push) Successful in 1m34s
build-and-release / build (job-seekers) (push) Successful in 2m4s
build-and-release / build (photographers) (push) Successful in 1m35s
build-and-release / build (makeup-artists) (push) Successful in 2m41s
build-and-release / build (payments) (push) Successful in 3m15s
build-and-release / build (tutors) (push) Successful in 2m16s
build-and-release / build (social-media-managers) (push) Successful in 2m33s
build-and-release / build (ugc-content-creators) (push) Successful in 2m47s
build-and-release / build (video-editors) (push) Successful in 2m32s
build-and-release / build (users) (push) Successful in 4m11s
Document upload endpoints (job_seekers, customers, companies, and the
profession_shared crate used by 10 profession apps) returned a generic
"File upload failed" 500 on any storage error, hiding the actual cause
from both the API response and (for job_seekers/companies) the server
logs, which only printed anyhow's outer context via Display instead of
the full error chain via Debug.

Also add an explicit DefaultBodyLimit(11MB) to every affected app's
router — none had one, so axum's implicit 2MB default could silently
reject uploads under the UI's advertised 10MB cap.
2026-07-26 19:25:53 +05:30
Ashwin Kumar Sivakumar
4e292efbdf fix: profession admin listing endpoints matched role_key in the wrong case
Each profession's admin list/get endpoint (apps/<role>/src/admin.rs) filtered
user_role_profiles by a lowercase role_key literal (e.g. 'photographer'), but
the app always stores it uppercase ('PHOTOGRAPHER', matching role_to_table in
apps/users/src/handlers/role_meta.rs). These endpoints therefore always
returned an empty list / 404, regardless of how many professionals had
actually submitted. catering_services also had a singular/plural mismatch
('catering_service' vs the stored 'CATERING_SERVICES'). Uppercased (and
correctly pluralized) all 10 literals to match.
2026-07-21 01:28:09 +05:30
Ashwin Kumar Sivakumar
ea622a4af8 chore: retrigger isolated CI builds for 6 more services on bad digests
All checks were successful
build-and-release / build (catering-services) (push) Successful in 3s
build-and-release / build (companies) (push) Successful in 5s
build-and-release / build (customers) (push) Successful in 4s
build-and-release / build (developers) (push) Successful in 5s
build-and-release / build (employees) (push) Successful in 6s
build-and-release / build (graphic-designers) (push) Successful in 5s
build-and-release / build (job-seekers) (push) Successful in 5s
build-and-release / build (leads) (push) Successful in 4s
build-and-release / build (makeup-artists) (push) Successful in 5s
build-and-release / build (payments) (push) Successful in 4s
build-and-release / build (photographers) (push) Successful in 4s
build-and-release / build (social-media-managers) (push) Successful in 5s
build-and-release / build (gateway) (push) Successful in 3m25s
build-and-release / build (users) (push) Successful in 4s
build-and-release / build (video-editors) (push) Successful in 3s
build-and-release / build (cron) (push) Successful in 4m4s
build-and-release / build (jobs) (push) Successful in 4m12s
build-and-release / build (tutors) (push) Successful in 7m13s
build-and-release / build (fitness-trainers) (push) Successful in 8m58s
build-and-release / build (ugc-content-creators) (push) Successful in 8m51s
Same congestion pattern from the crates/contracts push. gateway still had
2 healthy replicas serving traffic throughout, so no outage — just a
failed rolling-update replica for these 6 services.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-15 03:01:39 +05:30
Ashwin Kumar Sivakumar
95184f83c4 chore: retrigger isolated CI builds for 8 services stuck on bad digests
Some checks failed
build-and-release / build (makeup-artists) (push) Waiting to run
build-and-release / build (payments) (push) Waiting to run
build-and-release / build (photographers) (push) Waiting to run
build-and-release / build (social-media-managers) (push) Waiting to run
build-and-release / build (tutors) (push) Waiting to run
build-and-release / build (ugc-content-creators) (push) Waiting to run
build-and-release / build (users) (push) Waiting to run
build-and-release / build (video-editors) (push) Waiting to run
build-and-release / build (customers) (push) Successful in 14s
build-and-release / build (cron) (push) Successful in 14s
build-and-release / build (employees) (push) Successful in 12s
build-and-release / build (fitness-trainers) (push) Successful in 5s
build-and-release / build (gateway) (push) Successful in 6s
build-and-release / build (jobs) (push) Successful in 5s
build-and-release / build (developers) (push) Has been cancelled
build-and-release / build (companies) (push) Has been cancelled
build-and-release / build (catering-services) (push) Has been cancelled
build-and-release / build (graphic-designers) (push) Has been cancelled
build-and-release / build (job-seekers) (push) Has been cancelled
build-and-release / build (leads) (push) Has been cancelled
The last crates/db push (professional.rs role_key fix) rebuilt all 20
services concurrently again, and 8 of them landed ImagePullBackOff on a
digest the registry doesn't have — same congestion pattern as the
employees incident. This commit only touches apps/*/ for the affected
services so CI rebuilds just these 8 in relative isolation.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-15 02:32:46 +05:30
Ashwin Kumar Sivakumar
f7d0f6f9f5 fix: Update Dockerfiles to use ci.nxtgauge.com registry
Some checks failed
build-and-release / build (companies) (push) Failing after 39s
build-and-release / build (catering-services) (push) Failing after 57s
build-and-release / build (cron) (push) Failing after 1m4s
build-and-release / build (gateway) (push) Successful in 3m46s
build-and-release / build (fitness-trainers) (push) Successful in 9m8s
build-and-release / build (graphic-designers) (push) Successful in 8m58s
build-and-release / build (employees) (push) Successful in 9m17s
build-and-release / build (customers) (push) Successful in 9m47s
build-and-release / build (developers) (push) Successful in 9m48s
build-and-release / build (job-seekers) (push) Successful in 9m1s
build-and-release / build (jobs) (push) Successful in 4m17s
build-and-release / build (leads) (push) Successful in 8m23s
build-and-release / build (makeup-artists) (push) Successful in 8m40s
build-and-release / build (payments) (push) Successful in 9m21s
build-and-release / build (photographers) (push) Successful in 9m20s
build-and-release / build (social-media-managers) (push) Successful in 8m9s
build-and-release / build (tutors) (push) Successful in 8m16s
build-and-release / build (ugc-content-creators) (push) Successful in 6m59s
build-and-release / build (video-editors) (push) Successful in 6m9s
build-and-release / build (users) (push) Successful in 8m37s
2026-07-08 03:37:18 +05:30
Ashwin Kumar Sivakumar
cba7f607cd fix: resolve all warnings and errors
- Add #![allow(dead_code)] pragma to all main.rs files
- Remove unused imports from users handlers (ai_cache, AiCreditPackageRepository, AiCreditTransactionRepository)
- Make LiteLLMChatMessage and LiteLLMChoice public with public fields
- Fix remaining unused variables with cargo fix
- Add missing pub visibility modifiers to litellm structs

All packages now compile with ZERO warnings and errors!
2026-07-06 03:00:37 +05:30
Tracewebstudio Dev
eb009ac3d0 feat: profile photo upload, PDF resume generation, AI auto-apply, schema fixes
- Profile photo upload: POST /api/profile/photo for all roles, stores via B2 storage
- PDF resume: auto-generated from job seeker portfolio on every profile save (printpdf)
- Company applications: enriched with applicant name, avatar, headline, skills, education
- AI auto-apply cron: rewrote run_auto_apply with correct schema (job_seeker_profiles,
  cover_note, ai_auto_apply_settings, ai_auto_apply_logs, credit deduction)
- Schema fix: job_seeker_profiles table name (was incorrectly 'job_seekers' in two places)
- Migration: add resume_url column to job_seeker_profiles
- Migrations: PayU rename, tracecoin hardening, lead reserve linkage, invoice/wallet crates
- PayU integration: ai_credits, packages, admin payment handlers
- Wallet and invoice crates added

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-02 13:31:06 +02:00
Ashwin Kumar Sivakumar
c85e6af22e feat(ai): complete AI plans/credits implementation and build tooling
- Add AI plans, credits, model routing, LiteLLM client, and orchestrator services
- Add AI management endpoints, auto-apply/auto-request handlers, and log endpoints
- Add cron jobs for daily action reset and monthly credit reset
- Add AI credit purchase flow in payments service
- Add ai_credit_packages migration with seed data
- Update Dockerfile build tooling across services
2026-06-15 06:15:49 +05:30
Ashwin Kumar Sivakumar
8260d54534 feat: Add Ask Ash AI credit system endpoints
- Add AI credit management endpoints for companies
- Add AI usage history tracking
- Add AI content generation with Ollama integration
- Add Ollama client for generating job descriptions, resume analysis, and cover letters
- Integrate AI router into companies service
2026-05-29 20:53:51 +05:30
Tracewebstudio Dev
b16969a40f Update backend services: catering_services, companies, developers, gateway, job_seekers, photographers, social_media_managers, tutors, ugc_content_creators, users; update cache (otp, token), contracts (profession_shared, profession_state), db (job_seeker, verification), email; add revision-requested email template; update init-db.sql and start-services.sh 2026-05-08 15:34:29 +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
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
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
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
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
89b055b329 Add UGC Content Creator microservice (10th professional role)
- New service at apps/ugc_content_creators (port 8095)
- DB model + repository in crates/db/src/models/ugc_content_creator.rs
- Migration: ugc_content_creator_profiles table with platforms, content_niches,
  content_formats, follower_count, handles, and standard status/timestamps
- Contracts: is_professional_profile_approved() handles UGC_CONTENT_CREATOR case
- Gateway: routes /api/ugc-content-creators to new service
- Workspace Cargo.toml updated with new member

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