Skip to content

Dev - #120

Merged
rekabytes merged 5 commits into
mainfrom
dev
Apr 7, 2026
Merged

Dev#120
rekabytes merged 5 commits into
mainfrom
dev

Conversation

@rekabytes

Copy link
Copy Markdown
Owner

📝 Description

Brief description of what this PR does.

🔗 Related Issue

Fixes #(issue number)

🏷️ Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🧹 Code refactoring (no functional changes)
  • 🧪 Test update (adding or updating tests)

✅ Checklist

  • I have read the Contributing Guidelines
  • My branch is created from dev (not main)
  • I have run pnpm lint:fix
  • I have run pnpm typecheck
  • I have tested my changes locally
  • My code follows the project's coding standards
  • I have updated documentation (if applicable)

📸 Screenshots (if applicable)

Add screenshots to help explain your changes.

🧪 How to Test

Steps to test this PR:

  1. ...
  2. ...
  3. ...

📝 Additional Notes

Any additional information reviewers should know.

- Add Stripe checkout session and customer portal via tRPC
- Add webhook handler for checkout.completed, subscription.updated/deleted, invoice.payment_failed
- Add pricing page with 3-tier cards (Free, Tier 1 RM45/mo, Tier 2 RM75/mo)
- Add upgrade/manage billing buttons to dashboard settings
- Add Stripe fields to User type (stripeCustomerId, stripeSubscriptionId, stripeCurrentPeriodEnd)
- Add TIER_PRICING constants to kal-shared
- Add DB migration for Stripe user fields
- Fix email unique index bug (E11000 duplicate key on null emails)
  - Migration 2: sparse index (insufficient)
  - Migration 3: partialFilterExpression on string type (correct fix)
- Fix context.ts to not set email: null explicitly on upsert
- Add stripe and @stripe/stripe-js dependencies
- Create site-config.ts with centralized env var helpers (SITE_URL, SITE_DOMAIN, API_URL_DISPLAY, SUPPORT_EMAIL, PRIVACY_EMAIL)
- Replace all hardcoded kalori-api.my references with env vars in layout, robots, sitemap, terms, privacy pages
- Replace all hardcoded api.kalori-api.my in docs, setup, and api-docs code examples
- Add production env var validation to backend (exits if critical vars missing)
- Restrict CORS localhost origins to development only
- Fix Logto port mismatch in backend .env.example (3301 -> 3001)
- Add BACKEND_BASE_URL, PUBLIC_URL to backend .env.example
- Add NEXT_PUBLIC_SITE_URL, SITE_DOMAIN, API_DOMAIN, SUPPORT_EMAIL, PRIVACY_EMAIL to frontend .env.example
- All .env.example defaults use localhost (safe for public repo)
- Make pricing page accessible without authentication
- Visitors see plans with sign-in CTAs, authenticated users can subscribe/manage billing
- Add standalone navbar and footer to pricing page
- Add pricing link to landing page navbar
- Add v1.1.0 changelog entry
@vercel

vercel Bot commented Apr 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
kal-admin Ready Ready Preview, Comment Apr 7, 2026 3:45am
kal-frontend Ready Ready Preview, Comment Apr 7, 2026 3:45am

@rekabytes
rekabytes merged commit e350dd7 into main Apr 7, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant