Commit Graph

745 Commits

Author SHA1 Message Date
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
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
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
af84676454 2.7.0 (#232)
1. Enable Turbopack for testing builds
2. Move turbopack configuration to new top-level config property
3. Bump package.json version
4. Add missing env in .env
5. Added more ignored paths to .cursorignore
2025-04-10 10:48:51 +08:00
Giancarlo Buomprisco
81f50777ea Supabase Declarative Schema (#230)
1. Added declarative schemas to Supabase
2. Added Cursor Ignore to ignore some files from Cursor
3. Added Prettier Ignore to ignore some files from Prettier
4. Formatted files so that PG Schema diff won't return any changes
2025-04-10 08:41:46 +08:00
Giancarlo Buomprisco
a149c52b99 Next.js 15.3.0 (#231)
1. Upgrade to Next.js 15.3.0
2. Formatted files
2025-04-10 08:41:07 +08:00
Giancarlo Buomprisco
c5828325a2 Updated dependencies (#229) 2025-04-09 10:15:47 +08:00
Giancarlo Buomprisco
15b316dd7b Updated dependencies (#228) 2025-04-05 10:39:43 +08:00
Giancarlo Buomprisco
39fc9497db Update dependencies across multiple packages (#226)
- Bump versions for `@hookform/resolvers`, `@tanstack/react-query`, `lucide-react`, `tailwindcss`, and `@types/node` to their latest compatible versions.
- Update `babel-plugin-react-compiler` to a newer beta version.
- Adjust `@supabase/supabase-js` and `@stripe/react-stripe-js` to their latest versions.
- Increment `sonner` and `tailwind-merge` versions for improved functionality.
- Update `@react-email/components` to the latest version for email templates.

This update ensures compatibility with the latest features and fixes across the codebase.
2025-04-02 23:54:34 +08:00
gbuomprisco
7b1e261750 Add RootProviders to global-error.tsx 2025-03-31 14:06:55 +08:00
Giancarlo Buomprisco
7a1903d0c2 Links prefetching (#225)
1. Marketing Layout: speed up rendering by retrieving user session from cookies instead of using server side request
2. Use "redirecting" state when signing in to keep displaying a loading state while Next.js redirects to home page
3. Use "useCallback" to prevent double tracking when switching pages
4. Add links pre-fetching in marketing navigation
5. Add new pending state to MFA verification form
6. Pre-fetch sign-in/sign-up pages
7. Fix i18n when using regional languages
8. currency formatter should default to the region if it exists
9. Update packages
2025-03-31 11:06:37 +08:00
Giancarlo Buomprisco
dd5219e445 New Data Loader + Improvement to accounts filtering in admin
1. Update data loaders (#223)
2. Use new data loader functionality to allow filtering by both name and email in Super Admin
3. Update test to use email filtering
2025-03-28 17:23:05 +08:00
Giancarlo Buomprisco
e7f17dd34f Deps Update and minor changes (#222)
1. Revert Card changes
2. Use X logo instead of Twitter
3. Update Dependencies

* Remove reference to pg_sodium as new Supabase CLI doesn't play well with it
2025-03-28 11:51:38 +08:00
Giancarlo Buomprisco
6fbc5cf6e5 Dependencies cleanup (#216)
1. Updated dependencies
2. Disable Next.js Telemetry by default
3. Cleaned up unused dependencies
4. Refactored NPM scripts
2025-03-25 10:26:32 +08:00
Giancarlo Buomprisco
a3c37d0e7c 1. Updated dependencies (#215)
2. Conditionally render childAction
2025-03-24 11:24:48 +08:00
Giancarlo Buomprisco
fcb37e7d75 Improve overall responsiveness on mobile devices (#214) 2025-03-19 11:24:53 +08:00
Giancarlo Buomprisco
4bba67246b 1. Updated packages (#211)
1. Updated packages
2. Improved responsiveness
2025-03-18 20:07:10 +08:00
gbuomprisco
d415263b81 Remove webhooks check for the time being, as it needs more work to actually verify the secret 2025-03-13 12:13:43 +07:00
Giancarlo Buomprisco
a45fda44cf Deps Update, CSSNano, Sentry env (#210)
1. Update dependencies
2. Use cssnano for production
3. Assign an environment variable to Sentry's environment settings
4. `Pill` now accepts React Nodes so we can pass translations using Trans component
5. Switch to mailpit API during tests
6. Do not require Email Sender to be of type email and add proper error messages
2025-03-12 16:51:11 +08:00
Giancarlo Buomprisco
bd723dccce Validate special chars when creating a team (#209)
* Add validation for team account names

- Prevent creating teams with reserved names like 'billing' and 'settings'
- Add regex validation to block team names with special characters
- Update localization for new error messages
- Extend E2E tests to cover various invalid team name scenarios

* Enhance team account name validation and slug generation

- Add comprehensive tests for account slug generation in Supabase
- Improve team name validation schema to handle special characters
- Add form validation message display in update team account name form
- Refine slug generation to handle various edge cases like special characters, non-ASCII text, and mixed case
2025-03-11 10:58:21 +08:00
Giancarlo Buomprisco
b265f596da Set default oAuth scopes for azure and keycloak. Allow passing custom… (#207)
* Set default oAuth scopes for azure and keycloak. Allow passing custom query parameters from the OauthProviders component.

* Pass return path if a next query parameter is provided. Use home path otherwise.
2025-03-09 12:17:30 +08:00
gbuomprisco
08cd6983f4 1. Adjusted gitignore path
2. Formatted files
2025-03-06 07:47:32 +07:00
gbuomprisco
723fb1743e 1. Added more tests to OTP schema
2. Alter default values for verifying nonces: verification time is reduced to 15 minutes, max attempts before a nonce expires is set to 1 when using the service
2025-03-05 12:49:08 +07:00
Giancarlo Buomprisco
a5b7b0a06b Create a migration to set missing search paths (#203)
* Create a migration to set missing search paths to existing OTP functions to avoid warnings in the Supabase linter
2025-03-05 10:58:12 +08:00
Giancarlo Buomprisco
c41d88b2e6 Dependencies Update (#201)
* Updated packages
* Adjust package.json scripts quotes so they work well on Windows
2025-03-04 14:30:08 +08:00
gbuomprisco
784682a0f5 Rename MFA migration to respect the order of creation based on the commit date. 2025-03-02 11:36:24 +07:00
gbuomprisco
fb14fcb36e Remove null values from mfa_factors seed 2025-03-02 11:17:37 +07:00
Giancarlo Buomprisco
d14d19f330 Dependencies + Next.js 15.2.0 (#193)
- Updated All dependencies
- Updated Next.js 15.2.0
- Updated Stripe API version
- Remove Sentry replayIntegration by default
- Added IMPROVEMENT.yml file
- Bump version to 2.5.1
2025-03-02 11:41:12 +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
gbuomprisco
9cf7bf0aac Rename new migration to the correct timestamp 2025-03-01 16:56:32 +07: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
gbuomprisco
a5d3338950 Merge remote-tracking branch 'origin/main' 2025-02-23 07:47:23 +07:00
gbuomprisco
30e98ebb7d Updated dependencies 2025-02-23 07:46:47 +07:00
Giancarlo Buomprisco
a3bd62fb11 Contextual variable validation (#187)
* Added contextual environment variables validation to Dev Tool
2025-02-23 08:46:16 +08:00
Giancarlo Buomprisco
68c6d51d33 Add MFA Flow also to Super Admin (#186)
* Add MFA flow to Super Admin checks
2025-02-23 08:44:15 +08:00
gbuomprisco
e9f323e5f2 Use Port 3010 for Dev Tools 2025-02-21 13:46:17 +07:00
Giancarlo Buomprisco
c185bcfa11 2.3.0 Dev Tools (#180)
* 2.3.0 - Added new Dev Tools app
2025-02-21 14:29:42 +08:00
Giancarlo Buomprisco
59dfc0ad91 Update Email Templates. Use "autoComplete={'new-password'}" in password reset form. (#183) 2025-02-21 10:01:26 +08:00
Giancarlo Buomprisco
031e0810a6 Enhance password update error handling and localization (#175)
* Enhance password update error handling and localization
2025-02-19 16:38:05 +08:00
Giancarlo Buomprisco
0808b91e0d 171 bug allow passing refs to inputbutton components (#172)
* Refactor UI components to use ComponentPropsWithRef for improved type safety
* Updated dependencies and removed duplicate instance of Tslint since it's already provided in the Next.js config
2025-02-19 09:34:20 +08:00
gbuomprisco
bb4e318c54 Improve pricing table design 2025-02-18 14:26:57 +07:00
gbuomprisco
9a503412e5 Capture exceptions in DB Webhook route 2025-02-17 14:19:14 +07:00