nxtgauge-backend-rust/crates/cache/src
Ashwin Kumar Sivakumar 3c0f45f1ee feat: Complete Ask Ash AI Credits implementation (Tasks 1-10)
- Task 1: Admin endpoints for wallet management (balance, ledger, adjust, reconcile)
- Task 2: AI Credits admin UI (pricing.tsx, credit.tsx)
- Task 3: Ollama security (NetworkPolicy, prompt validation, audit logging)
- Task 4: LiteLLM integration (litellm.rs, migrated AI feature handlers)
- Task 5: Refund architecture (ai_refunds table, endpoints)
- Task 6: Coupons, promotions, referrals (order creation with coupon validation)
- Task 7: Subscription lifecycle (plan upgrades/downgrades/cancellations, cron jobs)
- Task 8: Credit expiration enforcement (daily cron task)
- Task 9: Token cost engine (ai_model_cost_config, margin view)
- Task 10: Observability (metrics tables, aggregation function)

New files:
- apps/users/src/litellm.rs (LiteLLM client)
- apps/users/src/ai_credits.rs (Charging primitives)
- apps/users/src/ai_subscription.rs (Plan lifecycle)
- apps/users/src/handlers/ai_credits.rs (Admin endpoints)
- apps/payments/src/ai_credits.rs (Package purchase)
- apps/payments/src/payu.rs (PayU integration)
- apps/cron/src/tasks/ai_credits.rs (Cron jobs)
- 9 SQL migrations for schema
- crates/db/src/models/ai_credits.rs (Repository)
- tests for ai_credits
2026-07-06 01:47:54 +05:30
..
ai.rs Add Redis caching for AI generation rate limiting 2026-05-01 03:02:46 +02:00
client.rs feat: add Redis for OTP, auth tokens, rate limiting, lead dedup and marketplace cache 2026-03-18 22:58:42 +01:00
jobs.rs chore: checkpoint current workspace changes 2026-03-22 15:55:29 +01:00
lead.rs feat: add Redis for OTP, auth tokens, rate limiting, lead dedup and marketplace cache 2026-03-18 22:58:42 +01:00
lib.rs feat: Add Ask Ash AI credit system endpoints 2026-05-29 20:53:51 +05:30
ollama.rs feat: Complete Ask Ash AI Credits implementation (Tasks 1-10) 2026-07-06 01:47:54 +05:30
otp.rs 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
rate_limit.rs chore: checkpoint current workspace changes 2026-03-22 15:55:29 +01:00
token.rs 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