Nxtgauge Backend Services
Find a file
Ashwin Kumar Sivakumar 8e4d64d33b fix(db): correct ai_credit_packages pricing (paise not rupees), add missing ai_credit_orders table
Discovered while wiring up role-scoped AI credit packages: the active
seed migration (20260615060600) stored price_inr as 99/349/999/2499 -
values that read like whole rupees, but every consumer (PayU's
paise_to_rupee_string, matching pricing_packages' existing paise
convention) treats price_inr as paise, meaning a real purchase would
have charged ~1% of the intended price.

The actual fix already existed as 20260705110000_ai_credit_packages
.up.sql.skip (correct paise values + the ai_credit_orders table
create_order inserts into) but got disabled in the same bulk skip
pass as everything else this session has been un-tangling - its
CREATE TABLE ai_credit_packages (no IF NOT EXISTS) hit 'relation
already exists' since 20260615060600 had already created it, aborting
before ai_credit_orders was ever created.

Net effect before this fix: buying AI credits was completely broken
(create_order would 500 - no ai_credit_orders table to insert into).
Confirmed zero rows anywhere in ai_credit_orders (the table simply
didn't exist) - nothing to reconcile, this is a pre-launch fix.

New migration (not resurrecting the old .skip file, to keep a clean
linear history matching this session's other fixes): UPDATE the 4
known-wrong rows by name to their correct paise values, CREATE TABLE
IF NOT EXISTS ai_credit_orders. Applied to both nxtgauge_test and
prod; verified.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-14 01:38:59 +05:30
.cargo chore(deps): document rkyv CVE exemption, restore + expand audit.toml comments 2026-08-12 23:30:30 +05:30
.forgejo fix(ci): run ai_credits tests via buildx build, not runtime apt-get/docker run -v 2026-08-13 18:08:31 +05:30
.gitea/workflows chore: remove the dead apps/leads microservice 2026-07-21 04:19:56 +05:30
.github/workflows ci: remove GitHub Actions workflow - using Forgejo CI exclusively 2026-07-06 04:19:40 +05:30
.mavis/plans feat: add LiteLLM support and auto-apply cron job 2026-06-14 18:00:38 +02:00
.sqlx chore: checkpoint workspace updates 2026-04-26 23:58:43 +02:00
apps fix: security, wallet holds, printpdf upgrade 2026-08-12 13:38:17 +02:00
crates fix(db): correct ai_credit_packages pricing (paise not rupees), add missing ai_credit_orders table 2026-08-14 01:38:59 +05:30
docs feat(db,ci): fix missing ai_credits tables, wire integration tests to CI 2026-08-13 17:31:22 +05:30
load-tests feat(emails): complete email system with 35 branded templates and full wiring 2026-04-10 04:49:39 +02:00
scripts Add runtime-config foundation for verification wizard + field locking 2026-07-28 20:10:15 +05:30
tests
.env.example feat(emails): complete email system with 35 branded templates and full wiring 2026-04-10 04:49:39 +02:00
.gitignore feat(db,ci): fix missing ai_credits tables, wire integration tests to CI 2026-08-13 17:31:22 +05:30
cargo-deny.toml feat: extend admin/user flows with settings, verification, and approval updates 2026-04-08 22:40:54 +02:00
Cargo.lock fix: security, wallet holds, printpdf upgrade 2026-08-12 13:38:17 +02:00
Cargo.toml chore: remove the dead apps/leads microservice 2026-07-21 04:19:56 +05:30
companies.pid feat: update DB schema - split users.first_name, users.last_name, roles split 2026-04-15 06:23:27 +02:00
customers.pid feat: update DB schema - split users.first_name, users.last_name, roles split 2026-04-15 06:23:27 +02:00
deny.toml chore(deps): document rkyv CVE exemption, restore + expand audit.toml comments 2026-08-12 23:30:30 +05:30
DEPLOYMENT_OPTIMIZATION.md feat(deployment): add optimized build system for faster deployments 2026-04-10 05:14:27 +02:00
docker-compose.yml chore: remove the dead apps/leads microservice 2026-07-21 04:19:56 +05:30
Dockerfile.base fix: Update Dockerfiles to use ci.nxtgauge.com registry 2026-07-08 03:37:18 +05:30
Dockerfile.fast fix: Update Dockerfiles to use ci.nxtgauge.com registry 2026-07-08 03:37:18 +05:30
Dockerfile.from-binary feat(woodpecker): use internal registry docker-registry.registry.svc.cluster.local:5000 2026-04-10 17:39:26 +02:00
Dockerfile.migrate fix(migrate): fix db-migrate build and job manifest, both broken 2026-07-19 03:07:26 +05:30
Dockerfile.optimized fix: Update Dockerfiles to use ci.nxtgauge.com registry 2026-07-08 03:37:18 +05:30
Dockerfile.simple perf(ci): cache cargo registry and target dir across image builds 2026-07-16 21:07:33 +05:30
Dockerfile.superfast fix: Update Dockerfiles to use ci.nxtgauge.com registry 2026-07-08 03:37:18 +05:30
Dockerfile.template fix: Update Dockerfiles to use ci.nxtgauge.com registry 2026-07-08 03:37:18 +05:30
Dockerfile.test fix(db): convert ai_credits timestamp columns to TIMESTAMPTZ 2026-08-13 21:44:30 +05:30
Dockerfile.ultrafast fix: Update Dockerfiles to use ci.nxtgauge.com registry 2026-07-08 03:37:18 +05:30
Dockerfile.working fix: Update Dockerfiles to use ci.nxtgauge.com registry 2026-07-08 03:37:18 +05:30
gateway.pid feat: update DB schema - split users.first_name, users.last_name, roles split 2026-04-15 06:23:27 +02:00
job_seekers.pid feat: update DB schema - split users.first_name, users.last_name, roles split 2026-04-15 06:23:27 +02:00
k8s-migration-job.yaml fix(migrate): fix db-migrate build and job manifest, both broken 2026-07-19 03:07:26 +05:30
README.md trigger: force build all services with high-performance-latest tag 2026-06-12 03:45:06 +05:30
start-services.pid chore: checkpoint workspace updates 2026-04-26 23:58:43 +02:00
start-services.sh 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
TESTING_STRATEGY.md
users.pid feat: update DB schema - split users.first_name, users.last_name, roles split 2026-04-15 06:23:27 +02:00
wir.md

NXTGAUGE Backend Rust

Rust migration target for nxtgauge-nov-2025-backend, preserving the same microservices and request flow.

Target Service Topology

  • gateway (HTTP API)
  • users (identity, runtime roles, onboarding, approvals)
  • companies
  • customers
  • professionals
  • jobseekers

Migration Policy

  • Keep contracts stable (REST + proto semantics).
  • Keep runtime-config and onboarding schema behavior unchanged during parity phases.
  • Replace service implementations one by one.

See docs/MIGRATION_MASTER_PLAN.md for full staged plan.

CI (Woodpecker)

Required secrets:

  • REGISTRY_USERNAME
  • REGISTRY_PASSWORD

See .forgejo/workflows/README.md for details.

Trigger build Fri Jun 12 03:45:06 AM IST 2026