Commit graph

74 commits

Author SHA1 Message Date
Ashwin Kumar
dbe1706a07 feat(deployment): add optimized build system for faster deployments
- Add Dockerfile.optimized with cargo-chef caching

- Add build-changed.sh script to build only modified services

- Add deploy-changed.sh script for selective deployment

- Add comprehensive deployment optimization guide

- Support independent service rollouts (no full redeploy needed)
2026-04-10 05:14:27 +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
58eff5ce63 fix: regenerate SQLx cache and fix type annotation errors in offline mode 2026-04-09 07:01:31 +02:00
Ashwin Kumar
466b972e9f ci: trigger pipeline 2026-04-09 06:34:19 +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
594086bdb0 fix: remove invalid build.rustdoc key from cargo config 2026-04-09 04:50:08 +02:00
Ashwin Kumar
1ffb489266 ci: trigger pipeline 2026-04-09 03:09:41 +02:00
Ashwin Kumar
a6ebbeb3f9 ci: trigger pipeline 2026-04-09 03:00:18 +02:00
Ashwin Kumar
e16d28a405 fix: track Cargo.lock (required for reproducible Docker builds) 2026-04-09 02:09:11 +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
5d0c65bded ci: trigger pipeline 2026-04-09 01:16:49 +02:00
Ashwin Kumar
e924aaf5cb ci: pin docker-buildx to 5.0.0 to match PLUGINS_PRIVILEGED allowlist 2026-04-09 01:11:18 +02:00
Ashwin Kumar
4adab13314 ci: trigger pipeline 2026-04-09 01:10:06 +02:00
Ashwin Kumar
2afad6cb95 ci: revert privileged flag 2026-04-09 01:03:39 +02:00
Ashwin Kumar
2def9d056b ci: add privileged flag for docker-buildx plugin 2026-04-09 01:01:56 +02:00
Ashwin Kumar
b90243f89f ci: trigger pipeline 2026-04-09 01:00:59 +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
3b52e71c75 chore: remove workflow file for current token permissions 2026-04-08 22:41:17 +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
3716f60806 docs: add work implementation roadmap (wir.md)
Full plan for completing all pending features across backend, frontend,
and admin. Includes Beeceptor mock payment endpoints, Wave 1-5 breakdown,
file-level implementation details, and parallelization strategy.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 22:26:45 +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
Ashwin Kumar
5cd00b74bc feat: implement user verification system and database migrations 2026-04-06 03:39:41 +02:00
Ashwin Kumar
d5cfef0fa6 chore: update service startup script 2026-04-06 01:47:10 +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
Ashwin Kumar
f9995586e2 chore: sync latest dashboard and role flow updates 2026-04-05 16:52:01 +02:00
Ashwin Kumar
5451ff5657 Fix users service startup panic — route syntax and admin login
- All /:param routes converted to /{param} (Axum v0.8 breaking change)
- admin.rs, kb.rs, reviews.rs, support.rs, pricing.rs, coupons.rs fixed
- employees app routes fixed (departments, designations, employees handlers)
- kb.rs multiline route definitions also fixed
- Users service now boots successfully

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 02:32:46 +02:00
Ashwin Kumar
3935277fb7 Fix backend compile errors after schema migrations
- employees.rs: rewrite for new standalone schema (email/password_hash,
  no user_id/role_id FK — matches 20260402030000 migration)
- migration: DROP old employees table before CREATE (old schema incompatible)
- pricing.rs: merge if-else sqlx::query! branches into single nullable param query
- kb.rs: fix target_roles Option<Vec<String>> unwrap, category_id Some() wrapping
- support.rs: fix .or() call with non-optional user_email (use Some())
- roles.rs: fix employees JOIN from role_id (deleted) to role_code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 02:25:47 +02:00