Commit Graph

59 Commits

Author SHA1 Message Date
Giancarlo Buomprisco
7ebff31475 Next.js Supabase V3 (#463)
Version 3 of the kit:
- Radix UI replaced with Base UI (using the Shadcn UI patterns)
- next-intl replaces react-i18next
- enhanceAction deprecated; usage moved to next-safe-action
- main layout now wrapped with [locale] path segment
- Teams only mode
- Layout updates
- Zod v4
- Next.js 16.2
- Typescript 6
- All other dependencies updated
- Removed deprecated Edge CSRF
- Dynamic Github Action runner
2026-03-24 13:40:38 +08:00
gbuomprisco
4912e402a3 Revert "Unify workspace dropdowns; Update layouts (#458)"
This reverts commit 4bc8448a1d.
2026-03-11 14:47:47 +08:00
Giancarlo Buomprisco
4bc8448a1d Unify workspace dropdowns; Update layouts (#458)
Unified Account and Workspace drop-downs; Layout updates, now header lives within the PageBody component; Sidebars now use floating variant
2026-03-11 14:45:42 +08:00
Giancarlo Buomprisco
0636f8cf11 chore: bump version to 2.23.2 and enhance team account creation (#440)
* chore: bump version to 2.23.2 and enhance team account creation

- Updated application version from 2.23.1 to 2.23.2 in package.json.
- Enhanced team account creation to support slugs for non-Latin names, including validation and UI updates.
- Updated localization files to reflect new slug requirements and error messages.
- Refactored related schemas and server actions to accommodate slug handling in team account creation and updates.

* refactor: remove old trigger and function for adding current user to new account

- Dropped the trigger "add_current_user_to_new_account" and the associated function from the database schema.
- Updated permissions for the function public.create_team_account to ensure proper access control.
2026-01-08 14:18:13 +01:00
Giancarlo Buomprisco
d5dc6f2528 2.23.0: Enforce Policies API for invitations and creating accounts; added WeakPassword handling; Fix dialog open/closed states (#439)
* chore: bump version to 2.22.1 and update dependencies

- Updated application version from 2.22.0 to 2.22.1 in package.json.
- Updated various dependencies including @marsidev/react-turnstile to 1.4.1, @stripe/react-stripe-js to 5.4.1, @stripe/stripe-js to 8.6.1, and react-hook-form to 7.70.0.
- Adjusted lucide-react version to be referenced from the catalog across multiple package.json files.
- Enhanced consistency in pnpm-lock.yaml and pnpm-workspace.yaml with updated package versions.

* chore: bump version to 2.23.0 and update dependencies

- Updated application version from 2.22.1 to 2.23.0 in package.json.
- Upgraded turbo dependency from 2.7.1 to 2.7.3 in package.json and pnpm-lock.yaml.
- Enhanced end-to-end testing documentation in AGENTS.md and CLAUDE.md with instructions for running tests.
- Updated AuthPageObject to use a new secret for user creation in auth.po.ts.
- Refactored team ownership transfer and member role update dialogs to close on success.
- Improved error handling for weak passwords in AuthErrorAlert component.
- Adjusted database schemas and tests to reflect changes in invitation policies and role management.
2026-01-07 17:00:11 +01:00
Giancarlo Buomprisco
db4aa6007e chore: update package versions and dependencies across multiple files (#416)
* chore: update package versions and dependencies across multiple files

- Bumped application version to 2.21.4 in package.json.
- Updated @supabase/supabase-js to version 2.84.0 and @tanstack/react-query to version 5.90.10.
- Incremented various dependencies including lucide-react to version 0.554.0, react-hook-form to version 7.66.1, and react-i18next to version 16.3.5.
- Adjusted @types/nodemailer to version 7.0.4 for consistency.
- Refactored package.json files to utilize catalog dependencies for improved management.

* chore: update Stripe API version to 2025-11-17.clover in stripe-sdk.ts

* fix: update wording for password recovery prompt in auth.json
2025-11-25 10:18:44 +07:00
Giancarlo Buomprisco
ac12c9355c chore: bump version to 2.20.1 in package.json and refactor layout and… (#404)
* chore: bump version to 2.20.1 in package.json and refactor layout and form components

- Incremented application version from 2.20.0 to 2.20.1 in package.json.
- Refactored RootLayout to optimize asynchronous calls and introduced getRootClassName function for better class management.
- Updated font handling in getFontsClassName function to streamline class generation.
- Enhanced various authentication form components by replacing Input with EmailInput and PasswordInput for improved consistency and usability.
- Adjusted layout styles in AuthLayoutShell and other components for better responsiveness.

* fix: improve content rendering fallback logic in ContentRenderer component

- Enhanced the ContentRenderer function to explicitly check for the presence of a renderer before returning content.
- Added a fallback mechanism to return raw content as React nodes when no renderer is found, improving robustness and user experience.
2025-11-02 16:14:21 +07:00
Giancarlo Buomprisco
2c0d0bf7a1 Next.js 16, React 19.2, Identities page, Invitations identities step, PNPM Catalogs (#381)
* Upgraded to Next.js 16
* Refactored code to comply with React 19.2 ESLint rules
* Refactored some useEffect usages with the new useEffectEvent
* Added Identities page and added second step to set up an identity after accepting an invitation
* Updated all dependencies
* Introduced PNPM catalogs for some frequently updated dependencies
* Bugs fixing and improvements
2025-10-22 11:47:47 +09:00
gbuomprisco
dc55782a97 Remove language originally added for testing purposes. 2025-04-29 10:21:30 +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
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
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
53b09fcb8e Disable Team tests if required (#234)
1. Add env variables loader using dotenv to e2e tests
2. Skip Team account tests based on variable
3. Remove hardcoded instance of Makerkit in tests
2025-04-13 10:20:31 +08:00
gbuomprisco
765cef8736 2.7.1
Fix mocking dev modules in new Turbopack version
2025-04-10 14:02:02 +08:00
Giancarlo Buomprisco
131b1061e6 Enforce RLS when user opted in to MFA. (#188)
* Allow Super Admin to view tables using RLS
* Replace previous usages of the Admin client using the authed client using the new RLS
* Enforce MFA for Super Admin users
* Enforce RLS when user opted in to MFA.
* Add Super Admin Access Policies and Update Database Types
* Consolidate super admin logic into a single function that uses the RPC is_super_admin
* Added Super Admin E2E tests
* Fixes and improvements
* Bump version to 2.5.0
2025-03-02 11:21:01 +08:00
Giancarlo Buomprisco
d31f3eb993 Add support for OTPs and enhance sensitive apis with OTP verification (#191)
One-Time Password (OTP) package added with comprehensive token management, including OTP verification for team account deletion and ownership transfer.
2025-03-01 17:35:09 +08:00
Giancarlo Buomprisco
4e91f267e0 Tailwind CSS 4 Migration (#100)
* Updated to TailwindCSS v4
* Moved CSS module to its own CSS file because of lightingcss strict validation
* Respect next parameter in middleware
* Updated all packages. 
* Split CSSs for better organization.
* Redesigned theme and auth pages
* Improved pill and header design
* Formatted files using Prettier
* Better footer layout
* Better auth layout
* Bump version of the repository to 2.0.0
2025-01-28 14:19:52 +08:00
gbuomprisco
7e1dee8d16 Include fonts.ts in Tailwind configuration 2025-01-14 17:37:57 +07:00
Giancarlo Buomprisco
8f3c1b2aeb Updated Dependencies (#104) 2025-01-07 20:34:40 +08:00
Giancarlo Buomprisco
5a4bbb1716 Refactor Root layout theme and fonts. Encapsulate functions into separate files. Fix default theme handling when cookie is not set by fall-backing to the selected theme mode. (#103) 2025-01-04 16:07:12 +08:00
Giancarlo Buomprisco
5b9285a575 Next.js 15 Update (#26)
* Update Next.js and React versions in all packages
* Replace onRedirect function with next/link in BillingSessionStatus, since it's no longer cached by default
* Remove unused revalidatePath import in billing return page, since it's no longer cached by default
* Add Turbopack module aliases to improve development server speed
* Converted new Dynamic APIs to be Promise-based
* Adjust mobile layout
* Use ENABLE_REACT_COMPILER to enable the React Compiler in Next.js 15
* Report Errors using the new onRequestError hook
2024-10-22 14:39:21 +08:00
gbuomprisco
5d8e4b24d7 Fix correct locale env variable 2024-09-03 13:50:22 +02:00
gbuomprisco
ff18a294ad Refactor Supabase client usage
Replaced various Supabase client imports with standardized admin and server clients across multiple files. This change ensures consistent and appropriate usage of admin and non-admin Supabase clients in server actions and services.
2024-08-14 13:43:53 +02:00
gbuomprisco
babdecb78f Refactor code and update dependencies
Rearranged imports for better organization and readability across multiple files. Updated the `react-i18next` dependency to version 15.0.1 in various `package.json` files. Adjusted formatting in multiple TypeScript files to ensure code style consistency.
2024-08-11 12:04:49 +02:00
gbuomprisco
5c28eaabeb Removed types from the Plugins which mistakenly made it to the generated types 2024-07-31 17:57:07 +02:00
gbuomprisco
342c96abfa Update UI and improve i18n loading logic
Major changes include enhancements to the UI and modifications to the i18n loading logic to more effectively handle namespaces. Several components were updated to improve readability and layout consistency. The i18n loading logic now includes additional handling for waiting until all namespaces are loaded before the i18n instance is returned, with a warning if it takes longer than expected. Furthermore, code have been refactored for fonts, buttons, and other UI elements.
2024-07-18 04:01:45 +08:00
gbuomprisco
221f59b668 Update '@tanstack/react-query' version and refactor 'database.types.ts'
The '@tanstack/react-query' dependency version has been upgraded across several packages. Alongside, syntax and unnecessary semicolons in 'database.types.ts' have been cleaned up to adhere with the formatting standards.
2024-06-25 23:37:41 +08:00
gbuomprisco
b3d938144f Replace app name with title in root metadata
The root metadata in the application config now uses the title instead of the name both in the metadata base and openGraph sections. Adding title into OpenGraph can significantly improve SEO and make the app more discoverable on the internet.
2024-06-21 01:22:25 +08:00
giancarlo
3261f2b582 Add more efficient authentication check function to server components.
Added request logging to Next.js config.

This commit introduces a new function 'requireUserInServerComponent' which checks for user authentication and is used in multiple server components. The aim is to enhance efficiency by caching the function so that data is only fetched once per request, preventing unnecessary database hits. Existing components were modified accordingly to incorporate this new method.
2024-06-04 11:54:04 +07:00
Giancarlo Buomprisco
048ab96cbc Add AuthCallbackService to handle auth callbacks in Supabase (#25)
* Add AuthCallbackService to handle auth callbacks in Supabase

Created a new service, AuthCallbackService, in the Supabase package to centralize the handling of authentication callbacks. This service handles two main tasks: verifying the token hash for user email verification and exchanging the authentication code for a session. Code in the web app routes were updated to utilize this new service, improving code organization and reusability.

* Remove CSRF Token Meta component and add Jaeger exporter

The CSRF Token Meta component was removed from the application. Instead, CSRF tokens are now included in the root metadata of the application. Additionally, the "@opentelemetry/exporter-jaeger" package was added as a dependency to the Sentry monitoring package. This enables the tracing of application requests via Jaeger.

* Refactor README.md and remove redundant content

Removed the excessive content and detailed instruction from the README.md file. The documentation has been moved to a more suitable and detailed location elsewhere.

* Update package dependencies in sentry/package.json

An ordering change has been made in the dependencies within the sentry/package.json file. The "@opentelemetry/exporter-jaeger" dependency was moved to its correct alphabetical order. No version changes were made.
2024-05-19 23:45:12 +07:00
giancarlo
e88ae7268a Update UI styles and behavior across various components
This commit updates a variety of user interface styles and interactivity across multiple components. Changes include altering color schemes and border styles, modifying button interactivity and behaviors, and updating font weights. An emphasis has been placed on enhancing visual appearance, improving user experience, and maintaining a more consistent look-and-feel across the application.
2024-05-16 15:56:25 +07:00
giancarlo
39e0a229b6 Refactor account handling to improve performance
This commit dates the transition from a global user session to individual account handling based on user ID. The transition was made across several components, notably the account settings, icons, and selector. This change improves performance by reducing unnecessary requests and ensures more accurate data handling. The commit also includes some cleanups and minor fixes spread across different components.
2024-05-10 20:33:05 +07:00
giancarlo
19aa40493f Remove redundant files and update pnpm lockfile 2024-04-30 22:16:38 +07:00
giancarlo
faaa26c4e8 Remove account id dependencies from role management
This commit refactor the role management, removing the dependencies on account ids throughout our system. Changes include removing account id related attributes in the roles table schema and functions, modifying seed data and simplifying the role data provider code. This makes role structure more generic and simplifies the role handling process.
2024-04-29 21:14:33 +07:00
giancarlo
e09a10a7f9 Update notification and membership models, add extension installing method
Several updates are made to the notification model, mainly removing the 'entity_id', 'entity_type', and 'language_code' fields from the properties. We've also updated the 'accounts_memberships' table, by preventing its updates except for 'account_role'.
2024-04-29 20:04:11 +07:00
giancarlo
820ed1f56b Add notifications feature and update feature flags
This update includes creating new files for the notifications feature along with adding two feature flags for enabling notifications and realtime notifications. All the code and package dependencies required for the notifications functionality have been added. The 'pnpm-lock.yaml' has also been updated due to the inclusion of new package dependencies.
2024-04-29 18:12:30 +07:00
giancarlo
a004cbae63 Modify language identification in locale handling
The update changes the way locales are checked against the list of accepted languages. Now, instead the full locale, only the language segment is considered when determining if the locale is accepted. Additionally, a check in 'getPreferredLanguageFromBrowser' was added to ensure 'acceptLanguage' is not undefined before attempting to parse it.
2024-04-23 23:04:17 +07:00
giancarlo
448fee01c4 Add language priority feature flag
This commit adds a new 'languagePriority' key to the feature flags configuration. It determines whether to use user's preferred language or the application's default language. Adjustments to the language selection process according to new flag have been made in the 'createInstance' function in 'i18n.server.ts'. Additionally, updates have been made to 'README.md' and '.env' files to reflect these changes.
2024-04-23 22:51:45 +07:00
giancarlo
6814cc7089 Fix linting 2024-04-23 00:15:41 +08:00
giancarlo
70da6ef1fa Adjusted Per seat billing and added example to the sample schema 2024-04-22 22:48:02 +08:00
giancarlo
b6d303f90e Refactor monitoring package and improve error handling
The monitoring package has been significantly refactored to improve the granularity of error capture. Code from the 'capture-exception.ts' files in different locations have been deleted and replaced by a more unified approach in the 'use-baselime.ts' and 'use-sentry.ts' hooks. The README documentation has also been updated to reflect these changes and provide additional information about error monitoring setup and usage.
2024-04-22 15:24:01 +08:00
giancarlo
e2503333e2 Update CSRF protection and modify database types
The CSRF protection in middleware has been re-implemented with `@edge-csrf/nextjs`, to catch and handle CSRF errors more effectively. Additionally, some parameters are renamed and functions are added in `database.types.ts` for better role management. The dependency in `package.json` has also been updated to reflect the changes.
2024-04-22 11:27:54 +08:00
giancarlo
ae10f7b142 Refactor i18n settings and improve language load handling
This update separates the creation of i18n settings into its own function (@kit/i18n) and enhances the handling of language and namespace loading in i18n.client. It tracks loaded languages and namespaces, and prevents rendering if none are loaded or after a maximum number of iterations. The usage of Suspense has also been modified in root-providers to employ a null fallback.
2024-04-21 18:40:12 +08:00
giancarlo
bf0d2e1c87 Fixed bugs in memberships management 2024-04-20 18:12:04 +08:00
giancarlo
8281de12a0 Update i18n settings and upgrade dependencies in lockfile
This commit refactors the i18n settings in `i18n.settings.ts` to improve language handling. In addition, it updates the `pnpm-lock.yaml` file to upgrade the lockfile version and several package dependencies. Most notably, it integrates `tailwind-merge` and `@tanstack/react-table` into various packages.
2024-04-20 13:17:38 +08:00
giancarlo
b71b580331 Optimize content fetching and update configurations
Content fetching in the marketing section has been refactored to utilize the Next.js cache, which significantly improves performance. The date format of publishedAt has been updated to be more consistent across files. Code related to CSRF token, fonts, and metadata has been refactored into separate files for easier maintenance and readability.
2024-04-19 19:21:54 +08:00
giancarlo
c121a3bdad Update "Password Reset" to "Update Password"
The code changes correspond to the rebranding of "Password Reset" to "Update Password". The names of components, functions, and routes have been updated to reflect this change. Also, a minor code optimization has been made in the i18n.server file for the creation of i18n server instances.
2024-04-19 17:27:11 +08:00
giancarlo
a188ca92e1 Add semi-colons and correct formatting in database.types.ts
This commit implements proper syntax standards throughout the file. Every necessary line now ends with a semicolon, providing better readability and avoiding potential errors in future code interpretation.
2024-04-17 16:15:57 +08:00
giancarlo
8dd4b594d2 Update database types and relationships
The commit removes semicolons at the ends of lines and makes updates to the Database object in the `database.types.ts` file. This better aligns the syntax with TypeScript norms. It also affects many database relationships, including but not limited to `Accounts`, `Roles`, and `Subscriptions`.
2024-04-16 22:17:28 +08:00