Commit graph

5 commits

Author SHA1 Message Date
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
Ashwin Kumar Sivakumar
8f0cf64eb4 fix: update jsonwebtoken 9.3→10.3, add audit.toml to ignore local crate false positives, fix cache/ollama.rs compile errors
- Update jsonwebtoken from 9.3 to 10.3 in crates/auth/Cargo.toml and crates/contracts/Cargo.toml
- Create .cargo/audit.toml to ignore false positives for local workspace crates 'cache' and 'users'
- Fix pre-existing compile errors in crates/cache/src/ollama.rs (missing reqwest dep, broken format! string literals)
- Add reqwest workspace dependency to crates/cache/Cargo.toml
2026-05-31 18:25:38 +05:30
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
91534d74c0 chore: checkpoint current workspace changes 2026-03-22 15:55:29 +01:00
Ashwin Kumar
5640cd4ee5 feat: complete rust microservices migration with real db logic 2026-03-17 20:42:51 +01:00