2026-03-17 20:42:51 +01:00
|
|
|
[package]
|
|
|
|
|
name = "auth"
|
|
|
|
|
version = "0.1.0"
|
|
|
|
|
edition = "2021"
|
|
|
|
|
|
|
|
|
|
[dependencies]
|
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
|
|
|
jsonwebtoken = { version = "10.3", features = ["rust_crypto"] }
|
2026-03-17 20:42:51 +01:00
|
|
|
argon2 = "0.5"
|
|
|
|
|
rand_core = { version = "0.6", features = ["std"] }
|
|
|
|
|
serde = { workspace = true }
|
|
|
|
|
tracing = { workspace = true }
|
|
|
|
|
chrono = { workspace = true }
|
|
|
|
|
uuid = { workspace = true }
|
|
|
|
|
anyhow = { workspace = true }
|
|
|
|
|
axum = { workspace = true }
|
2026-03-22 15:55:29 +01:00
|
|
|
async-trait = { workspace = true }
|
2026-03-17 20:42:51 +01:00
|
|
|
db = { path = "../db" }
|
2026-04-07 12:52:55 +02:00
|
|
|
|
|
|
|
|
[dev-dependencies]
|
|
|
|
|
tokio = { version = "1" }
|