- 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
- 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
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
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.
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+.
- 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.
- 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
- 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
- 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>
- Accept 'role' alias for 'role_key' and 'tracecoin_amount' alias for 'tracecoins_amount'
- Expose both field names in PackageDto so admin UI and user frontend both work
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- pricing.rs: public GET /api/packages?role= for user-facing package list
- main.rs: nest /api/packages public route
- gateway: route /api/packages to users service
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- handlers/reviews.rs: admin CRUD for /api/admin/reviews (list, create, patch status, delete)
- handlers/coupons.rs: admin CRUD for /api/admin/coupons and /api/admin/discounts
- handlers/pricing.rs: admin CRUD for /api/admin/tracecoin-packages + /api/admin/reports/{users,revenue}
- handlers/dashboard.rs: replace all hardcoded fake data with real DB queries (registrations per day, revenue per week, live KPIs including pending approvals and total revenue)
- Migrations: extend reviews table (nullable FKs + admin fields), add coupons.title/role_keys, create discounts table
- gateway: route new admin paths to users service
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 2 new migrations: summary/tags columns on kb_articles, description/requester fields on support_tickets
- handlers/kb.rs: public routes (GET /api/kb/categories|articles|articles/:slug) + admin CRUD (/api/admin/kb/*)
- handlers/support.rs: user ticket routes + admin support-cases CRUD with internal notes
- Registered all new routes in users service main.rs
- Gateway resolve_upstream: /api/kb/*, /api/support/*, /api/admin/kb/*, /api/admin/support-cases/* → users service
- scripts/seed_kb.sql: 8 categories, 28 full-length published articles covering all user roles
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Full CRUD handler for designations with department JOIN, employee count,
level/can_manage_team/can_approve fields, and migration to extend the
minimal designations table with all management columns.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Returns user info + onboarding state progress_json for a given user and
roleKey, enabling the admin panel to display full onboarding form answers
during approval review.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 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>