Commit Graph

1085 Commits

Author SHA1 Message Date
Giancarlo Buomprisco
180e0e0c5e Enable manual account linking (#289) 2025-06-19 15:25:39 +08:00
Giancarlo Buomprisco
cada76070f Fix healthcheck endpoint (#288)
* fix healthcheck db query
2025-06-18 23:25:51 +08:00
gbuomprisco
b4c8c74bd0 chore(dependencies): update packages to latest versions
- Bumped `lucide-react` to `^0.516.0`
- Upgraded `react-hook-form` to `^7.58.0`
- Updated `zod` to `^3.25.67`
- Incremented `@sentry/nextjs` to `^9.29.0`
- Miscellaneous upgrades for `eslint`, `@tailwindcss/postcss`, and `supabase` dependencies.
2025-06-17 13:33:32 +08:00
Giancarlo Buomprisco
1032fb7f94 feat(auth): add MFA handling in team invitations flow (#285)
- Export `MultiFactorAuthError` from `require-user` for reuse.
- Implement MFA handling during team invitations' sign-in flow.
- Add E2E test for team invitation flow with MFA.
- Update components to improve i18n translation handling.
2025-06-17 08:25:01 +08:00
Giancarlo Buomprisco
698e570545 fix(accounts): handle deletion failure in deleteUser method (#283)
- Added error handling for the `deleteUser` method to throw an error if the response contains an error property.
2025-06-17 08:13:59 +08:00
Giancarlo Buomprisco
1143a01727 feat(auth): add invite token handling to OTP sign-in and update metho… (#280)
* feat(auth): add invite token handling to OTP sign-in and update method descriptions
2025-06-14 15:31:30 +08:00
gbuomprisco
f95da27b8f refactor(translations): replace default namespaces with dynamic loading from filesystem 2025-06-14 00:00:10 +08:00
gbuomprisco
ab0e1c9948 fix(docs): update migration reset command in database.mdc 2025-06-13 18:07:17 +08:00
Giancarlo Buomprisco
9033155fcd Add OTP sign-in option + Account Linking (#276)
* feat(accounts): allow linking email password
* feat(auth): add OTP sign-in
* refactor(accounts): remove 'sonner' dependency and update toast imports
* feat(supabase): enable analytics and configure database seeding
* feat(auth): update email templates and add OTP template
* feat(auth): add last sign in method hints
* feat(config): add devIndicators position to bottom-right
* feat(auth): implement comprehensive last authentication method tracking tests
2025-06-13 17:47:35 +08:00
Giancarlo Buomprisco
856e9612c4 Improve billing plan lookup (#270)
Retrieve plan from Stripe/LS if not found in billing configuration. Useful for legacy plans.
2025-06-13 17:45:55 +08:00
Giancarlo Buomprisco
2b21b7bed4 Enhance EmbeddedCheckoutPopup to prevent default behavior on escape key down (#278)
- Added an onEscapeKeyDown handler to the EmbeddedCheckoutPopup component to prevent default actions when the escape key is pressed, improving user experience and accessibility.
2025-06-13 10:59:51 +08:00
Giancarlo Buomprisco
406e683091 Add prev/next metadata on blog pages (#273)
* feat(web): add prev/next seo tags to blog
2025-06-09 21:55:43 +08:00
Giancarlo Buomprisco
a416695400 feat(web): add mobile theme toggle (#274) 2025-06-09 21:55:26 +08:00
Giancarlo Buomprisco
2ae8e14158 Fix layout by removing unnecessary overflow-y-auto class from PageWithSidebar (#272) 2025-06-09 20:16:50 +08:00
gbuomprisco
81579fab72 Refactor documentation in AGENTS.md and CLAUDE.md for clarity and consistency
- Updated AGENTS.md and CLAUDE.md to enhance readability and organization.
- Streamlined project overview, multi-tenant architecture, and essential commands sections.
- Improved formatting and clarity in security guidelines and database operations.
- Added new entries to .prettierignore for .hbs and .md files to ensure proper formatting exclusions.
2025-06-09 16:47:40 +08:00
gbuomprisco
3b445169dd Merge branch 'main' of github.com:makerkit/next-supabase-saas-kit-turbo 2025-06-08 14:33:58 +08:00
Giancarlo Buomprisco
1c31e7ffab Update Calendar component and update dependencies and updated Agents MD files (#269)
* Update Calendar component and update dependencies

* Refactor AGENTS.md and CLAUDE.md for clarity and consistency

- Streamlined project overview and architecture sections in both AGENTS.md and CLAUDE.md to enhance readability.
- Updated command sections to reflect essential commands and improved formatting for better usability.
- Clarified multi-tenant architecture details and database operations, ensuring accurate representation of the project's structure.
- Enhanced component organization and security guidelines for better developer onboarding and adherence to best practices.

* Refactor code for consistency and readability

- Improved formatting in `env-variables-model.ts` for better description clarity.
- Enhanced readability of `current-plan-alert.tsx` and `current-plan-badge.tsx` by adjusting the status badge mapping.
- Standardized object syntax in `lemon-squeezy-webhook-handler.service.ts` for consistency.
- Refined className ordering in `account-selector.tsx` for better maintainability.
- Ensured proper syntax in `console.ts` with consistent object export.
- Reorganized imports in `calendar.tsx` for clarity and structure.
- Improved className formatting in `sidebar.tsx` for better readability.

* Update package version to 2.10.0 in package.json
2025-06-08 14:31:49 +08:00
gbuomprisco
e852877d6d Merge branch 'main' of github.com:makerkit/next-supabase-saas-kit-turbo 2025-06-06 13:11:01 +08:00
Giancarlo Buomprisco
67663b32d9 Deps update + basic Claude.md and Agents.md (#268)
* Add comprehensive guides for OpenAI Codex and Claude Code

- Introduced `AGENTS.md` and `CLAUDE.md` files to provide detailed guidance for working with OpenAI Codex and Claude Code within the project.
- Updated project architecture and common commands sections to reflect the multi-tenant SaaS application structure and core technologies.
- Enhanced documentation on database operations, schema management, security guidelines, and development patterns to improve developer onboarding and project maintainability.

Additionally, updated various package dependencies across the codebase to their latest versions, ensuring compatibility and performance improvements.
2025-06-06 13:10:14 +08:00
gbuomprisco
bc5ca295f8 Merge branch 'main' of github.com:makerkit/next-supabase-saas-kit-turbo 2025-06-01 20:11:07 +08:00
Giancarlo Buomprisco
fc2fda595a Snyk report fixes + offcanvas sidebar fix (#263)
Refactor:
- Improved consistency and robustness by standardizing file encoding arguments from 'utf-8' to 'utf8' across various file read/write operations.
- Simplified status mapping logic in billing components and services by replacing switch statements with direct mapping objects for clearer and more maintainable code.
- Enhanced type conversion and error handling in billing and internationalization components for improved reliability.
- Updated sorting logic in team member tables for more predictable member ordering.
- Improved error logging with sanitized output to prevent formatting issues.
- Adjusted environment variable whitelisting to use a more flexible matching pattern.
- Fix variables for sidebar style handling

Style:
- Refined spacing and layout in account selector and sidebar header components for better visual consistency.
2025-06-01 20:10:39 +08:00
gbuomprisco
e724c57261 Merge branch 'main' of github.com:makerkit/next-supabase-saas-kit-turbo 2025-05-28 09:28:14 +08:00
Giancarlo Buomprisco
cb80e4fdcf Sign in fails when the next parameter is empty (#261)
* Refactor sign-in flow to ensure fallback return paths

Updated logic to use fallback values for `returnPath` to prevent potential undefined behavior. Improved consistency in handling default paths during sign-in and redirection processes.
2025-05-28 09:27:45 +08:00
Giancarlo Buomprisco
40afecde93 28 05 2025 deps update (#262)
* Update dependencies across all packages

Updated multiple dependencies to their latest versions to ensure compatibility, security, and performance improvements. This includes packages like @supabase/supabase-js, @tanstack/react-query, @types/react, and zod across various projects.

* Update selector for Stripe form submission button

Replaced the form button selector with a `data-testid` attribute selector for improved reliability and maintainability. This ensures the test is less prone to breaks from UI changes.
2025-05-28 09:26:28 +08:00
gbuomprisco
8e3a10dac0 Merge branch 'main' of github.com:makerkit/next-supabase-saas-kit-turbo 2025-05-21 20:28:26 +08:00
Giancarlo Buomprisco
2b07c5cc3d Markdoc table style (#258)
* Add styling for tables in Markdoc content

This commit introduces consistent styles for tables in Markdoc, including adjustments for headers, footers, rows, and cells. It ensures better alignment, spacing, and visual clarity across table elements, enhancing readability and usability.
2025-05-20 11:58:02 +08:00
Giancarlo Buomprisco
2ede13dec9 20 05 2025 deps update (#257)
* Update dependencies across packages

Upgraded various package dependencies, including `zod`, `@supabase/supabase-js`, `react-hook-form`, `lucide-react`, and others to their latest versions. Ensures compatibility, security, and access to new features.
2025-05-20 11:46:09 +08:00
Giancarlo Buomprisco
ad1a673320 Revert radix slot (#256)
* Downgrade @radix-ui/react-slot to version 1.2.0

Pinned @radix-ui/react-slot to version 1.2.0 instead of using a caret (^). This ensures compatibility and avoids potential breaking changes from newer versions.
2025-05-18 22:29:36 +08:00
gbuomprisco
295ae0f864 Downgrade @radix-ui/react-slot to version 1.2.0
Pinned @radix-ui/react-slot to version 1.2.0 instead of using a caret (^). This ensures compatibility and avoids potential breaking changes from newer versions.
2025-05-18 22:18:06 +08:00
Giancarlo Buomprisco
6e28de759d Update dependencies across packages with minor version upgrades (#255)
Upgraded various dependencies to their latest minor versions, including `@types/react`, `@tanstack/react-query`, `lucide-react`, `@types/node`, and others. These updates aim to ensure compatibility, access to new features, and bug fixes.
2025-05-15 23:56:00 +08:00
gbuomprisco
804fb7fbe3 Handle trial periods for existing customers in Stripe checkout
Updated logic to skip trial periods for existing customers by setting `trialDays` to undefined when a customer is already provided. Modified subscription data and trial settings to use the adjusted `trialDays`. Additionally, added handling for metered billing line items and included a sample trial period configuration in the billing sample config.
2025-05-15 23:42:39 +08:00
Giancarlo Buomprisco
b55b02e2f9 Refactor auth event handling with improved typing and callbacks (#254)
Simplify and enhance the `onEvent` logic by using `useCallback` for better performance and typing with `AuthChangeEvent` and `Session`. Add handling for the `INITIAL_SESSION` event, ensuring proper user identification and monitoring initialization.
2025-05-14 22:27:35 +08:00
gbuomprisco
dd3d5ddf96 Merge branch 'main' of github.com:makerkit/next-supabase-saas-kit-turbo 2025-05-09 22:54:58 +08:00
gbuomprisco
66184b22b6 Fix formatting of generated script to ensure proper command execution 2025-05-09 22:46:47 +08:00
Giancarlo Buomprisco
3893806b4a Update dependencies to latest versions for improved stability and features (#253) 2025-05-09 21:57:02 +08:00
Giancarlo Buomprisco
de347005b1 Upgrade dependencies across multiple packages for improved stability and features (#252)
- Updated `@manypkg/cli` from `^0.23.0` to `^0.24.0` for enhanced functionality.
- Upgraded `@tanstack/react-query` from `5.74.11` to `5.75.2` to incorporate the latest improvements.
- Incremented `lucide-react` from `^0.503.0` to `^0.507.0` for better compatibility.
- Updated `nodemailer` from `^6.10.1` to `^7.0.2` to leverage new features and fixes.
- Upgraded `react-hook-form` from `^7.56.1` to `^7.56.2` for bug fixes and enhancements.
- Updated `zod` from `^3.24.3` to `^3.24.4` for improved type definitions.
- Incremented `@types/node` from `^22.15.3` to `^22.15.9` for better type support.

These updates enhance the overall stability, performance, and compatibility of the application.
2025-05-06 10:03:57 +08:00
Giancarlo Buomprisco
f66c269e79 Upgrade dependencies across packages for stability and features. (#250)
Updated various dependencies, including `@tanstack/react-query`, `@types/node`, `react-i18next`, and more to their latest compatible versions. This improves compatibility, fixes potential bugs, and ensures access to the latest features.
2025-05-01 17:37:35 +08:00
gbuomprisco
dc55782a97 Remove language originally added for testing purposes. 2025-04-29 10:21:30 +08:00
gbuomprisco
19bfe7af0c Remove "ai" dependency from package.json and pnpm-lock.yaml 2025-04-29 10:18:52 +08:00
Giancarlo Buomprisco
4cfb4f936f Open-next Cloudflare / Docker / Setup (#248)
* Add Cloudflare generator with Wrangler and OpenNext support

This update introduces a new Cloudflare generator to streamline configuration and deployment via Wrangler and OpenNext. It registers the necessary templates, modifies project files, and adds Cloudflare-specific scripts and dependencies to the package.json. Additionally, .hbs files are updated in .prettierignore for formatting consistency.

* Add GitHub username prompt and improve setup scripts

Introduce a prompt for GitHub username to personalize project setup. Enhance the setup scripts by adding PNPM verification, configuring `upstream` remote, and removing the `origin` remote. Adjust health check and error handling for better reliability.

* Add Dockerfile generator to turbo generators

Introduced a new generator to create Dockerfile configurations for standalone Next.js applications. This includes modifying `next.config.mjs` for standalone output, updating dependencies in `package.json`, and adding a Dockerfile template. The generator is now registered in the turbo setup.

* Add console-based logger implementation. This is required for edge environments such as Cloudflare.

* Remove deprecated Supabase client utilities

The `server-actions-client`, `route-handler-client`, and `server-component-client` utilities have been removed in favor of `getSupabaseServerClient`. This simplifies and consolidates the API, ensuring consistency across server-side usage. Version bumped to 2.9.0 to reflect breaking changes.
2025-04-29 10:12:08 +08:00
Giancarlo Buomprisco
76bfeddd32 Dev Tools improvements (#247)
* Refactor environment variables UI and update validation logic

Enhanced the environment variables page layout for better responsiveness and structure by introducing new components and styles. Added `EnvListDisplay` for grouped variable display and adjusted several UI elements for clarity and consistency. Updated `NEXT_PUBLIC_SENTRY_ENVIRONMENT` validation to make it optional, aligning with updated requirements.

* Add environment variable validation and enhance page headers

Introduces robust validation for environment variables, ensuring correctness and contextual dependency checks. Updates page headers with titles and detailed descriptions for better usability and clarity.

* Refactor variable page layout and improve code readability

Rearranged className attributes in JSX for consistency and readability. Refactored map and enum validation logic for better formatting and maintainability. Applied minor corrections to types and formatting in other components.

* Refactor styles and simplify component logic

Updated badge variants to streamline styles and removed redundant hover states. Simplified logic in email page by extracting breadcrumb values and optimizing title rendering. Adjusted environment variables manager layout for cleaner rendering and removed unnecessary elements.

* Add real-time translation updates with RxJS and UI improvements

Introduced a Subject with debounce mechanism for handling translation updates, enhancing real-time editing in the translations comparison module. Improved UI components, including conditional rendering, better input handling, and layout adjustments. Implemented a server action for updating translations and streamlined type definitions in the emails page.

* Enhance environment variable copying functionality and improve user feedback

Updated the environment variables manager to copy structured environment variable data to the clipboard, improving usability. Adjusted toast notifications to provide clearer success and error messages during the copy process. Additionally, fixed a minor issue in the translations comparison component by ensuring proper filtering of keys based on the search input.

* Add AI translation functionality and update dependencies

Implemented a new action for translating missing strings using AI, enhancing the translations comparison component. Introduced a loading state during translation and improved error handling for translation updates. Updated package dependencies, including the addition of '@ai-sdk/openai' and 'ai' to facilitate AI-driven translations. Enhanced UI components for better user experience and streamlined translation management.
2025-04-29 10:11:12 +08:00
Giancarlo Buomprisco
cea46b06a1 Update team member check in join page to use RPC call (#246)
* Update team member check in join page to use RPC call

Replaces direct API call with an RPC function to verify if a user is already a team member. This improves efficiency and ensures consistency with database operations.
2025-04-26 07:30:49 +08:00
gbuomprisco
2d4dc0fa5d Add "CONTACT_EMAIL" to turbo.json environment variables
This update includes "CONTACT_EMAIL" in the list of environment variables. It ensures proper handling of contact email within the application configuration.
2025-04-23 14:08:53 +08:00
Giancarlo Buomprisco
a4cde64fff Update dependencies across multiple packages (#244)
- Upgraded `lucide-react` from `^0.501.0` to `^0.503.0` in various packages to ensure compatibility with the latest features and improvements.
- Updated `@types/node` from `^22.14.0` to `^22.14.1` across multiple packages for better type definitions and compatibility.
- Incremented `@types/react` from `19.1.0` to `19.1.2` in several packages to align with the latest type definitions.
- Upgraded `react-hook-form` from `^7.56.0` to `^7.56.1` in multiple packages to incorporate bug fixes and enhancements.
- Updated `babel-plugin-react-compiler` from `19.0.0-beta-ebf51a3-20250411` to `19.1.0-rc.1` for improved compatibility with React 19.1.0.
- Incremented `supabase` from `^2.20.12` to `^2.22.4` to leverage the latest features and fixes.

These updates enhance the overall stability and performance of the application.
2025-04-23 10:10:36 +08:00
gbuomprisco
34b703f7ee Refactor dev mocks to use no-op functions with debug logs
Replaced undefined exports with no-op functions that log debug messages when invoked, making it clear which mocked functionality was called during development. This improves traceability and maintains clarity while keeping the development environment lightweight.
2025-04-23 07:21:37 +08:00
Giancarlo Buomprisco
db9ddab6ad Add Strict CSP Headers (#243)
* Add CSP nonce support and enhance security headers

Introduced secure headers and CSP nonce to improve app security by integrating `@nosecone/next`. Updated middleware, root providers, and layout to handle nonce propagation, enabling stricter CSP policies when configured. Also upgraded dependencies and tooling versions.

* Add OTP and security guidelines documentation and additional checks on client-provided values

- Introduced additional checks on client-provided values such as cookies
- Introduced a new OTP API documentation outlining the creation and verification of OTP tokens for sensitive operations.
- Added comprehensive security guidelines for writing secure code in Next.js, covering client and server components, environment variables, authentication, and error handling.

These additions enhance the project's security posture and provide clear instructions for developers on implementing secure practices.
2025-04-22 10:43:21 +08:00
Giancarlo Buomprisco
903ef6dc08 Update Stripe SDK to v18 and dependencies (#236)
* Update Stripe SDK and dependencies

1. Upgrade `stripe` package from version 17.7.0 to 18.0.0 in `package.json`.
2. Update `STRIPE_API_VERSION` in `stripe-sdk.ts` to '2025-03-31.basil'.
3. Refactor `StripeWebhookHandlerService` to retrieve subscription details using Supabase client, ensuring compatibility with the new Stripe version.
4. Introduce helper methods `getPeriodStartsAt` and `getPeriodEndsAt` for better handling of subscription periods based on the Stripe API changes.

These changes enhance the integration with the latest Stripe API and improve the overall reliability of the billing service.

* Refactor billing payload builders to remove config dependency

Removed direct dependency on `BillingConfig` in subscription payload builders.

Introduced `PlanTypeMap` to streamline plan type resolutions. Updated webhook handlers and event processing functions to handle plan types more efficiently and improve extensibility.

* Refactor Stripe subscription handling for improved accuracy
2025-04-22 10:42:12 +08:00
Giancarlo Buomprisco
4f41304be4 Allow super admin to create users and reset password (#238)
1. Add user creation and password reset dialog functionalities; added Junie guidelines

Introduced new `AdminCreateUserDialog` and `AdminResetPasswordDialog` components for managing user accounts in the admin panel. Updated the `AdminAccountsTable` page with a button for user creation and implemented backend logic for password resets with robust error handling.

2. Added Jetbrains AI guidelines
2025-04-22 07:36:34 +08:00
Giancarlo Buomprisco
e193c94f06 Cookies validation and Security Guidelines (#242)
* Add OTP and security guidelines documentation and additional checks on client-provided values

- Introduced additional checks on client-provided values such as cookies
- Introduced a new OTP API documentation outlining the creation and verification of OTP tokens for sensitive operations.
- Added comprehensive security guidelines for writing secure code in Next.js, covering client and server components, environment variables, authentication, and error handling.

These additions enhance the project's security posture and provide clear instructions for developers on implementing secure practices.

* Add OTP API documentation and enhance security guidelines

- Introduced comprehensive documentation for the OTP API, detailing the creation and verification of OTP tokens for sensitive operations.
- Enhanced security guidelines for Next.js, emphasizing the importance of input validation, environment variable management, and error handling.
- Implemented additional checks for client-provided values to improve overall security posture.

These updates provide clear instructions for developers and strengthen the project's security framework.
2025-04-22 06:44:55 +08:00
Giancarlo Buomprisco
1327a8efb7 Upgrade dependencies across packages (#241)
Updated multiple dependencies to their latest versions, including `next` to `15.3.1`, `zod` to `3.24.3`, `@tanstack/react-query` to `5.74.4`, and others. This ensures compatibility, improves stability, and incorporates the latest bug fixes.
2025-04-20 20:48:08 +08:00