Commit graph

13 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
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
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
83c62a1c5e fix: convert all SQLx macros to runtime API, remove SQLX_OFFLINE requirement 2026-04-09 07:40:15 +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
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
bb8155dd27 feat: add Redis for OTP, auth tokens, rate limiting, lead dedup and marketplace cache
- Add crates/cache with client, otp, rate_limit, token, lead, jobs modules
- OTP tokens stored in Redis (15-min TTL, single-use GETDEL on verify)
- Refresh tokens stored in Redis (30-day TTL) — removed DB storage
- Password reset tokens stored in Redis (1-hour TTL, single-use)
- Rate limiting: register (10/hr), login (10/15min), OTP resend (3/hr), lead (5/hr), job post (20/hr)
- Lead request deduplication: 24-hour Redis lock per professional+requirement pair
- Marketplace listings cached in Redis (5-min TTL per profession+page+limit)
- Add ProfessionState{pool, redis} to contracts crate, replacing bare PgPool in all 9 profession apps
- All profession handlers and main.rs updated to use ProfessionState
- REDIS_URL env var (default: redis://127.0.0.1:6379) used across all services
- Fix profession model struct name mangling in 6 handlers (MakeupArtistRepository etc.)
- Add custom_data JSONB migration for all 9 profession profile tables
- Add onboarding_state model and repository (save_progress, complete, is_complete)
- Add onboarding handler accepting roleKey:String (not role_id:UUID) for frontend compat

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 22:58:42 +01:00
Ashwin Kumar
5640cd4ee5 feat: complete rust microservices migration with real db logic 2026-03-17 20:42:51 +01:00