Commit Graph

41 Commits

Author SHA1 Message Date
Giancarlo Buomprisco
9104ce9a2c refactor(auth): migrate to new Supabase JWT Signing keys (#303)
* refactor(auth): replace Supabase `User` type with new `JWTUserData` type across the codebase

- Replaced usage of Supabase's `User` type with the newly defined `JWTUserData` type for better type mapping and alignment with JWT claims.
- Refactored session-related components and hooks (`useUser`, `requireUser`) to use the updated user structure.
- Updated Supabase client keys to use `publicKey` instead of `anonKey`.
- Adjusted multi-factor authentication logic and components to use `aal` and additional properties.
- Applied consistent naming for Supabase secret key functions.
- Incremented version to 2.12.0.

- Introduced a new `deprecated` property in the `EnvVariableModel` type to handle deprecated environment variables.
- Updated the `EnvList` component to display a warning badge for deprecated variables, including reason and alternative suggestions.
- Enhanced filtering logic to allow users to toggle the visibility of deprecated variables.
- Added new deprecated variables for Supabase keys with appropriate reasons and alternatives.

- Added support for filtering deprecated environment variables in the `FilterSwitcher` component.
- Updated the `Summary` component to display a badge for the count of deprecated variables.
- Introduced a button to filter and display only deprecated variables.
- Adjusted filtering logic to include deprecated variables in the overall state management.

add BILLING_MODE configuration to environment variables

- Introduced a new environment variable `BILLING_MODE` to configure billing options for the application.
- The variable supports two values: `subscription` and `one-time`.
- Marked as deprecated with a reason indicating that this configuration is no longer required, as billing mode is now automatically determined.
- Added validation logic for the new variable to ensure correct value parsing.
2025-07-16 17:17:10 +08:00
Giancarlo Buomprisco
abcf1ae3d7 chore(dependencies): update multiple dependencies to latest versions (#301)
- Upgraded `@supabase/supabase-js` to `2.51.0`
- Bumped `@tanstack/react-query` to `5.83.0`
- Incremented `next` and related packages to `15.4.1`
- Miscellaneous upgrades including `@react-email/components`, `eslint`, and `cssnano`.
2025-07-15 06:27:23 +08:00
Giancarlo Buomprisco
50337298fd Dependencies Updates, Sidebar fixes, default plan, Radix single package (#297)
* Refactor Radix UI imports and update package dependencies, fix Sidebar "group" references, add default value to plan picker to preselect a plan
2025-07-11 17:57:27 +08:00
Giancarlo Buomprisco
c1fda420e6 chore(dependencies): update libraries and added File Uploader component (#292)
- Bumped dependencies: `lucide-react`, `react-hook-form`, `@supabase/supabase-js`, `@tanstack/react-query`, `@sentry/nextjs`, and more.
- Added `react-dropzone` to `@kit/ui` for file upload support.
- Adjusted `reset-password.html` to streamline style usage and HTML structure.
- Added new translation keys for file upload functionality.
- Cleaned up import order in `existing-account-hint.tsx`.
2025-06-26 13:40:54 +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
gbuomprisco
f95da27b8f refactor(translations): replace default namespaces with dynamic loading from filesystem 2025-06-14 00:00:10 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
gbuomprisco
08cd6983f4 1. Adjusted gitignore path
2. Formatted files
2025-03-06 07:47:32 +07: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
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
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
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