Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
2b7844e
feat(backend): wire up Supabase auth, Creem billing, and credits system
ubergonmx Mar 29, 2026
93fa238
docs: update README, ARCHITECTURE, and gitignore
ubergonmx Mar 29, 2026
e4753a2
feat: update components to use Next.js Link and Image for improved na…
ubergonmx Mar 29, 2026
1b29f81
fix(env): correct Supabase key variable name in .env.example
ubergonmx Mar 29, 2026
d3f4add
feat(database): enhance profiles, subscriptions, and credits tables w…
ubergonmx Mar 29, 2026
683fbb7
fix(env): rename NEXT_PUBLIC_SUPABASE_ANON_KEY to NEXT_PUBLIC_SUPABAS…
ubergonmx Mar 29, 2026
2eae204
feat(auth): extract Zod schemas and harden auth flows
ubergonmx Mar 29, 2026
6d72e6d
feat(billing): extract Zod schemas, fix subscription filters, use cre…
ubergonmx Mar 29, 2026
6a09fba
feat(credits): extract Zod schema and validate spendCredits input
ubergonmx Mar 29, 2026
462feba
fix(creem): use timing-safe comparison for webhook signature verifica…
ubergonmx Mar 29, 2026
19119b8
fix(middleware): restore and update env var for session refresh
ubergonmx Mar 29, 2026
7663800
feat(proxy): implement proxy middleware for authentication and sessio…
ubergonmx Mar 29, 2026
ef5ee1e
feat(docs): update README setup instructions for Supabase and Creem i…
ubergonmx Mar 29, 2026
4d0634b
feat(auth): implement callback route for handling authentication with…
ubergonmx Mar 29, 2026
d955e41
fix(features): add id attribute to features section for better access…
ubergonmx Mar 29, 2026
310360b
fix(faqs): clarify deployment instructions in FAQs section
ubergonmx Mar 29, 2026
de195a2
refactor(auth): remove obsolete callback route implementation
ubergonmx Mar 29, 2026
efaafd7
fix(auth): fix email confirmation redirect and post-signup toast
ubergonmx Mar 30, 2026
3d96597
fix(billing): migrate webhook to @creem_io/nextjs with idempotency
ubergonmx Mar 30, 2026
95f1dac
fix(dashboard): use Logo component in sidebar, clean up nav
ubergonmx Mar 30, 2026
26368a1
feat(dependencies): add @creem_io/nextjs package
ubergonmx Mar 30, 2026
c15a378
fix(billing): improve idempotency handling in webhook event processing
ubergonmx Mar 30, 2026
8ed9e98
fix(review): address remaining PR review comments
ubergonmx Mar 30, 2026
1d4fdb8
feat(auth): update login and signup actions to handle inputs and erro…
ubergonmx Mar 30, 2026
55751af
fix(webhooks): strip whsec_ prefix from CREEM_WEBHOOK_SECRET
ubergonmx Mar 30, 2026
84c3f0b
fix(webhooks): use full CREEM_WEBHOOK_SECRET as HMAC key
ubergonmx Mar 30, 2026
70a1398
refactor(cleanup): remove debug log from signup action and update ico…
ubergonmx Mar 30, 2026
cfe9de6
feat(security): add security headers to Next.js configuration
ubergonmx Mar 30, 2026
d9df6e7
feat(security): implement explicit permission hardening for public sc…
ubergonmx Mar 30, 2026
141e7d4
refactor(webhooks): simplify Creem webhook handling by exporting hand…
ubergonmx Mar 30, 2026
b52ff16
chore(config): update formatting and linting configurations
ubergonmx Mar 30, 2026
db07221
feat(config): enhance TypeScript configuration for production builds
ubergonmx Mar 31, 2026
155db59
feat(billing): revalidate billing dashboard on subscription cancellat…
ubergonmx Mar 31, 2026
9235d04
refactor(billing): simplify subscription management functions
ubergonmx Mar 31, 2026
6952ae3
feat(progress): integrate BProgress for loading indicators in auth an…
ubergonmx Mar 31, 2026
2107da0
refactor(imports): reorganize action imports for billing and credits …
ubergonmx Mar 31, 2026
bf4b557
feat(marketing): add view transitions cross-fade between marketing pages
ubergonmx Mar 31, 2026
a2a3866
fix(marketing): disable view transition for cross-layout navigations
ubergonmx Mar 31, 2026
a2a3527
fix(marketing): invert view transition strategy to opt-in cross-fade
ubergonmx Mar 31, 2026
44a818e
feat(billing): introduce Starter plan and enhance subscription manage…
ubergonmx Mar 31, 2026
2f1b203
fix(auth): resolve OAuth redirect using forwarded headers for tunnel/…
ubergonmx Mar 31, 2026
8c0839f
refactor(auth): streamline user authentication by replacing createCli…
ubergonmx Mar 31, 2026
d15d9ae
feat(toast): implement UrlToast component for error handling across p…
ubergonmx Mar 31, 2026
0923eb3
feat(billing): enhance subscription handling with past_due and unpaid…
ubergonmx Mar 31, 2026
c787550
feat(dashboard): integrate checkout success handling and enhance bill…
ubergonmx Mar 31, 2026
2068ac4
feat(dashboard): enhance dashboard components with credits balance an…
ubergonmx Mar 31, 2026
7c99977
feat: add AI Summarizer and Advanced Analytics pages; enhance subscri…
ubergonmx Mar 31, 2026
8d3fc61
feat: enhance environment configuration and error handling; add suppo…
ubergonmx Mar 31, 2026
ba58d53
feat: update README for CreemKit branding; enhance setup instructions…
ubergonmx Mar 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# App
NEXT_PUBLIC_APP_URL=http://localhost:3000
# Optional: comma-separated custom dev origins for Next.js allowedDevOrigins
# Leave empty unless you access the dev server from non-default origins (e.g. ngrok)
# Example: abc123.ngrok-free.dev,*.local-origin.dev
NEXT_ALLOWED_DEV_ORIGINS=

# Supabase
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=
SUPABASE_SERVICE_ROLE_KEY=

# Creem
CREEM_API_KEY=
CREEM_WEBHOOK_SECRET=
NEXT_PUBLIC_CREEM_PRODUCT_ID_STARTER=
NEXT_PUBLIC_CREEM_PRODUCT_ID_PRO=
NEXT_PUBLIC_CREEM_PRODUCT_ID_CREDITS=

# OAuth (configured in Supabase dashboard)
# GOOGLE_CLIENT_ID and GITHUB_CLIENT_ID are set in Supabase, not here
NEXT_PUBLIC_CREEM_PRODUCT_ID_BUSINESS=
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,34 @@ jobs:
cache: npm
- run: npm ci
- run: npm run lint

test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npm run test

build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npm run build
env:
NEXT_PUBLIC_SUPABASE_URL: http://localhost:54321
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY: placeholder
NEXT_PUBLIC_APP_URL: http://localhost:3000
NEXT_PUBLIC_CREEM_PRODUCT_ID_PRO: placeholder
NEXT_PUBLIC_CREEM_PRODUCT_ID_BUSINESS: placeholder
NEXT_PUBLIC_CREEM_PRODUCT_ID_CREDITS: placeholder
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ pnpm-debug.log*
next-env.d.ts

# local
TODO.md
# TODO.md
2 changes: 0 additions & 2 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"endOfLine": "lf",
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"printWidth": 100,
"sortTailwindcss": {
"stylesheet": "src/app/globals.css",
Expand Down
8 changes: 1 addition & 7 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,7 @@
"env": {
"builtin": true
},
"ignorePatterns": [
".next/**",
"out/**",
"build/**",
"next-env.d.ts",
"**/*.mdx"
],
"ignorePatterns": [".next/**", "out/**", "build/**", "next-env.d.ts", "**/*.mdx"],
"rules": {
"@next/next/google-font-display": "warn",
"@next/next/google-font-preconnect": "warn",
Expand Down
20 changes: 20 additions & 0 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,27 @@ supabase/
├── 001_profiles.sql # profiles + auth trigger
├── 002_subscriptions.sql # Creem subscription tracking
└── 003_credits.sql # wallet + ledger

tests/ # App-level and cross-feature test suites
├── integration/ # Multi-feature contracts (auth + billing + credits)
└── e2e/ # Playwright user journeys across route groups
```

## Testing Strategy

Use a hybrid testing layout so ownership is clear and suites scale with the codebase.

- Colocate unit and component tests with the feature they validate (`src/features/**`) and with shared UI in `src/components/**`.
- Keep cross-feature integration tests in `tests/integration/` when behavior spans multiple domains.
- Keep end-to-end tests in `tests/e2e/` to validate full user journeys at the app boundary.

### Example Test Paths

- `src/features/auth/components/login-form.test.tsx`
- `src/features/billing/actions/create-checkout.test.ts`
- `tests/integration/subscription-lifecycle.test.ts`
- `tests/e2e/signup-to-upgrade.spec.ts`

## Principles

| Rule | How it's applied |
Expand All @@ -127,6 +146,7 @@ supabase/
| `lib/` = zero business logic | Only infrastructure clients (Supabase, Creem SDK) |
| `components/ui/` = shadcn only | No feature logic leaks into shared UI primitives |
| Webhooks co-located with billing | `features/billing/webhooks/` not `app/api/webhooks/` |
| Tests follow feature boundaries | Unit/component tests are colocated; integration + e2e tests live in `tests/` |

## Why Feature-Based?

Expand Down
Loading
Loading