Commit Graph

609 Commits

Author SHA1 Message Date
gbuomprisco
2c59dfd7f0 Updated dependencies 2024-07-26 21:10:58 +02:00
gbuomprisco
4eef94fcd6 Refactor analytics event handling and manager setup
Updated event handling in `analytics-provider.tsx` to return results, enhancing consistency. Added a new function `registerActiveServices` in `analytics-manager.ts` for initializing active services, streamlining provider setup. Clarified types for `AnalyticsProviderFactory` to accept optional configuration.
2024-07-26 21:09:02 +02:00
gbuomprisco
b9e9b8af48 Refactor analytics services to support multiple providers
The analytics manager has been significantly refactored to allow the use of multiple providers simultaneously. The API has been adjusted, replacing the single active service with a new Map called activeServices, to hold the active analytics services. Additionally, several methods have been modified to return promises rather than void. The 'defaultProvider' property has been removed, as it no longer fits into the system architecture.
2024-07-23 10:49:04 +02:00
gbuomprisco
24c2ea2d27 Update various package versions
Several of the package versions across the project have been updated. These include, among others, "typescript" in tailwind, "lucide-react" in team-accounts, billing, auth, and web, "@keystatic/core" in cms/keystatic, and "@playwright/test" in e2e. Other altered versions include those of "supabase" and "eslint" in web, along with numerous changes in the lock file.
2024-07-23 10:30:04 +02:00
gbuomprisco
84f838d3a1 Add feature flag for team account deletion
Updated the team account settings page to support a new feature flag for enabling team deletion. Only the primary user can delete the account if this feature is enabled. Also, corrected the required error message in feature-flags.config.ts file for more clarity.
2024-07-22 19:14:48 +02:00
Giancarlo Buomprisco
5eefa7ff16 Add events handling and enhance analytics tracking (#47)
* Add events handling and enhance analytics tracking

Added a new events system to track user actions throughout the application. Specific significant events such as user signup, sign-in, and checkout have dedicated handlers. Updated the analytics system to handle these event triggers and improved analytics reporting. An analytics provider has been implemented to manage event subscriptions and analytics event mappings.

* Remove unused dependencies from package.json files

Unused packages "@tanstack/react-table" and "next" have been removed from the packages/shared and tooling directories respectively. These changes help ensure that only needed packages are included in the project, reducing potential security risks and unnecessary processing overhead.

* Update dependencies

Multiple package versions were updated including "@tanstack/react-query" and "lucide-react"
2024-07-22 14:03:03 +08:00
gbuomprisco
868f907c81 Update dependencies in multiple packages
This commit updates version numbers for several dependencies across multiple packages, including "@tanstack/react-query", "lucide-react", and "eslint-config-turbo". It also fixes a linebreak in makerkit marketing index file for better code consistency.
2024-07-20 09:08:19 +02:00
gbuomprisco
41578b8b65 Add newsletter signup components
This commit introduces two new components for handling newsletter signups. 'NewsletterSignup' captures the form elements for newsletter subscriptions, and 'NewsletterSignupContainer' wraps the form and handles the subscription flow, including loading, success, and error states. These components have been exposed in the marketing module's index file.
2024-07-20 09:06:20 +02:00
Giancarlo Buomprisco
86d82d889c Add Analytics package (#46)
* Add Analytics package

Created a new analytics package with a manager to handle tracking of events and page views. The package includes a default provider that can be switched out and uses a NullAnalyticsService if no provider is registered. Additional types, scripts, and package configuration are also provided to support development.

* Add marketing components for UI package

Introduced new React components under "marketing" for the UI package. These include 'Pill', 'GradientSecondaryText', 'Hero', 'CtaButton', 'FeatureCard', 'FeatureGrid', 'FeatureShowcase', 'GradientText', 'Header', and 'SecondaryHero'. Updated 'package.json' to export these components. Replaced the implementation of 'Home', 'SiteHeader', and 'SiteFooter' with these components for cleaner code and better reusability.
2024-07-19 23:33:52 +08:00
gbuomprisco
5ee7bacb2a Update site navigation styles and cleanup page imports
The navigation menu item styles were adjusted for better appearance. Also, the spacing in the NavigationMenuList was increased for better user experience. Moreover, a few unused imports in page.tsx were removed to clean up the code. Additionally, the button class formatting was adjusted for better readability and consistency.
2024-07-19 00:00:57 +02:00
gbuomprisco
1510ddec09 Update CSS classes for multiple components
The commit refactors CSS classes of multiple components to improve the visual consistency across different resolutions. The changes include adjusting margin, padding, fonts, and adding hover states to some elements. Furthermore, the logo size has been made responsive for both small and large views.
2024-07-18 19:39:09 +02:00
gbuomprisco
3fbb4f7b97 Update visuals and improve readability on marketing pages
The visuals on the marketing pages are updated and readability is improved by tightening up the text tracking. Title sizes in several components are adjusted to be more consistent. The duration and appearance of various animations and transitions are also changed for an enhanced user experience. New image assets and additional UI elements are added to provide more detailed information.
2024-07-18 16:58:44 +02:00
gbuomprisco
7f1b03f4dc Update pricing display logic in pricing-table
The commit refactors how pricing is displayed in the pricing-table component. It now displays the plan label if one exists and defaults to 'billing:custom' otherwise. This provides more flexibility and accuracy in displaying plan details.
2024-07-18 09:43:53 +02:00
gbuomprisco
1876bbd9e4 Update error handling and UI design across multiple files
Enhanced error handling in documentation and blog pages, to ensure smoother running and user experience. This also includes additional UI updates related to font selection, layout arrangement, and interactive elements on error pages, marketing pages, and general site navigation components. Moreover, a "contact us" feature has been added to error pages to help users seek assistance more conveniently.
2024-07-18 09:18:16 +02:00
gbuomprisco
56dfcb872b Update multiple packages across the project
Multiple packages have been upgraded including both "@tanstack/react-query" and "@types/node" among others. React-i18next package have also been upgraded to version 15. All changes have been reflected in the "pnpm-lock.yaml" file.
2024-07-18 09:06:45 +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
35717c79f7 Update package versions and improve code handling
Multiple package versions have been updated to their latest versions for better compatibility and stability. In addition, modifications were made to the `getGitHash` function in `route.ts` to handle potential failures more gracefully.
2024-07-17 18:43:57 +08:00
gbuomprisco
fb04be4d26 Updated dependencies, fixed turbo gen command deps 2024-07-15 20:20:33 +08:00
gbuomprisco
837a0bb02e Update subscription cancellation logic
The previous implementation attempted to cancel a subscription without checking its status. This commit adds a check to see if the subscription is already cancelled before attempting to cancel it, avoiding unnecessary cancellation requests. This improves the efficiency and reliability of the subscription management process.
2024-07-14 11:05:18 +08:00
gbuomprisco
f48c6993dd Update interval count in lemon-squeezy-webhook-handler
The interval count value for yearly subscriptions in the lemon-squeezy-webhook-handler service has been corrected. It was previously set to 12, which inaccurately represented a monthly subscription, so it has been updated to reflect the correct annual figure of 1.
2024-07-12 14:32:10 +08:00
Giancarlo Buomprisco
a75f7c576d Add terms and conditions checkbox to sign-up methods (#45)
A checkbox has been added for user acceptance of terms and conditions during sign-up. This change includes adding a new adjustable flag in the configuration to control the display of the checkbox. A new file "terms-and-conditions-form-field.tsx" is added to handle the checkbox UI part. Also, localization support has been added for the feature.
2024-07-12 14:32:02 +08:00
Giancarlo Buomprisco
3393863dd2 Add status property to content item structure (#44)
* Add status property to content item structure

This commit introduces a new `status` property to the content item structure, allowing content items to maintain a status such as 'draft', 'published', 'review', 'pending'. This status is mapped to the corresponding status in Wordpress and Keystatic clients to ensure consistent usage across platforms. Content retrieval methods now also include a status filter.

* Refactor code for style and readability improvements

This commit includes changes in various files across different packages to improve code readability, including adjusting spacing and breaking down complex lines into simpler parts. In addition, the switch statement in `wp-client.ts` has been refactored and status values are now held in variables, and the CSS classes in `global-loader.tsx` have been reorganized.
2024-07-11 15:06:15 +08:00
Giancarlo Buomprisco
21f42f14ce Invite prefill email (#43)
* Add prepopulation of email field in sign-up form
* Updated packages
2024-07-11 13:59:14 +08:00
gbuomprisco
4f0e6b9bbb Update 'next' and 'lucide-react' across all packages
This commit upgrades 'next' from version 14.2.4 to 14.2.5 and 'lucide-react' from version 0.403.0 to 0.407.0 across all packages. Also, minor version increments for '@keystatic/core' and '@sentry/nextjs' to enhance the overall functionality. The pnpm-lock.yaml file has also been updated accordingly.
2024-07-10 23:39:35 +08:00
gbuomprisco
1e2f3023bc Add onSubmit callback to multi-step form
The multi-step form has been updated to include an onSubmit callback, enhancing its functionality. This is achieved via a hook `useMutation` from `@tanstack/react-query` that handles submission operations. This change enables the application to perform specific operations upon submission.
2024-07-10 15:04:10 +08:00
gbuomprisco
27533c94e6 Refactor user authorization in AdminSidebar
The commit simplifies user authorization in 'AdminSidebar' component by removing unnecessary imports and functions and passing user directly as a prop instead. This change optimizes code readability and makes user authorization more efficient.
2024-07-10 09:26:25 +08:00
gbuomprisco
94199fa775 Add multi-step form and dot variant for stepper component
This update includes the addition of a new multi-step form component for handling complex, multi-part forms. Alongside this, a dot variant for the stepper component has been introduced to provide increased UI/UX flexibility. The new multi-step form component includes validation, navigation between steps and conditional rendering for steps. The modification improves overall user experience in completing multistep forms and enhances the versatility of the stepper component.
2024-07-09 22:09:22 +08:00
gbuomprisco
03594d4e33 Update package dependencies across multiple modules
The commit updates package dependencies throughout various modules, including the bumping of "lucide-react" from "^0.402.0" to "^0.403.0", as well as "@types/node" from "^20.14.6" to "^20.14.10". The package "@typescript-eslint/eslint-plugin" and "@typescript-eslint/parser" have also been upgraded from "^7.15.0" to "^7.16.0". This ensures that the latest functionalities and bug fixes from these packages are utilized across the project.
2024-07-09 14:43:09 +08:00
gbuomprisco
e8b605968e Update subscription query in team-accounts API
The data selection in the getSubscription API for team-accounts has been updated. The query now retrieves all items related to the subscription by implementing an inner join within the 'subscription_items' table.
2024-07-08 19:40:07 +08:00
gbuomprisco
4c392e02fe Replace Accounts API with Team Accounts API in billing page loader
The commit modifies the teamAccountBillingPageLoader by swapping out the previously used Accounts API for the Team Accounts API. This change includes adjustments in the import statement and the creation of the api variable, aligning better with the team account related functionalities.
2024-07-08 19:36:35 +08:00
gbuomprisco
37104d749d Update multiple dependencies across packages
These package updates include version upgrades for the "@supabase/supabase-js" from "^2.44.2" to "^2.44.3", and "@hookform/resolvers" from "^3.7.0" to "^3.9.0" in multiple packages. Other changes involve version updates for minor dependencies, like the "lucide-react" from "^0.400.0" to "^0.402.0" and "stripe" from "^16.1.0" to "^16.2.0".
2024-07-08 16:52:47 +08:00
gbuomprisco
57f9d4364c Update URL pattern in middleware
This change updates the URL patterns for 'admin', 'auth', and 'home' in the middleware file. The updated patterns now include a trailing wildcard and a questioning mark to match any potential following routes, which makes routing more flexible and accurate.
2024-07-06 16:01:47 +08:00
gbuomprisco
bda79d41c0 Rename useAccountWorkspace to useTeamAccountWorkspace
The function useAccountWorkspace has been renamed to useTeamAccountWorkspace to better reflect its usage and context. The corresponding references and related error message were also updated to ensure consistency.
2024-07-05 12:50:41 +08:00
gbuomprisco
49fa8e966c Updated dependencies 2024-07-05 12:32:13 +08:00
gbuomprisco
c93fea9658 Add logging to admin actions and dashboard service
The new logging will enhance the visibility of important actions by the admin, including banning and unbanning users, deleting users and accounts. The features/admin logging dependency has been added. In the admin dashboard service, specific logging has been implemented to track errors in fetching data.
2024-07-05 12:31:43 +08:00
Giancarlo Buomprisco
8f097a4016 Add workspace context and custom hooks for user and team accounts (#41)
* Add workspace context and custom hooks for user and team accounts

The commit introduces a new workspace context for both user and team accounts. New custom hooks, useUserWorkspace and useAccountWorkspace, were created to access this context data. These changes allow for more streamlined data access and manipulation, enabling features that depend on account context information to function more efficiently.

* Upgrade pnpm action-setup to version 4

The commit updates the version of pnpm action-setup used in GitHub workflows from v2 to v4. This upgrade can provide enhancements and improved features offered by the newer version.

* Update pnpm/action-setup version in workflow

The commit removes the explicit "version: 8" specifier in the Github Action workflow for "pnpm/action-setup". The updated workflow now points to "pnpm/action-setup@v4" instead of "pnpm/action-setup@v2", aligning it with usage elsewhere in the workflow.

* Refactor magic link auth container for URL handling

The magic link auth container has been updated to use a standard URL interface for managing URL and query parameters. This improves readability and error handling in the code.URL-related operations are now conducted via the URL object.
2024-07-05 00:28:06 +08:00
gbuomprisco
c5a50fa6c7 Update package dependencies
Updated several package dependencies to their latest versions, improving the general robustness and bringing in the latest features and fixes. This includes the '@typescript-eslint' related packages, '@keystatic/core', and '@sentry/nextjs'.
2024-07-04 21:04:43 +08:00
gbuomprisco
fe8dfd0bea Add condition to account creation trigger
The trigger "add_current_user_to_new_account" has been updated to execute only when a new account is not personal. This adjustment to the trigger condition will ensure the function kit.add_current_user_to_new_account() only fires in these circumstances.
2024-07-04 21:04:00 +08:00
gbuomprisco
fa73cf103a Update multiple package versions across the project
This commit performs an update of the version numbers for several packages used across the project. Overall, this is part of a maintenance task to ensure the latest version of each package is used to gain performance improvements, bug fixes and new features where applicable.
2024-07-03 10:52:32 +08:00
gbuomprisco
d155940df2 Update interval values in lemon-squeezy-webhook-handler
Changed the 'monthly' interval value to 'month' and the 'yearly' interval to 'year'. This change improves code consistency and alignment with the expected format for interval values.
2024-07-03 10:49:05 +08:00
gbuomprisco
6cdb46ea44 Remove redundant 'next' parameter check in auth callback
Refactored the condition handling for the next path in auth-callback.service.ts to only rely on the callbackUrl instead of an additional 'next' parameter. This not only simplifies the code but also reduces potential errors linked to multiple sources of truth for the next path direction.
2024-07-02 11:46:19 +08:00
gbuomprisco
bb846f461e Enhance handling of 'next' path in auth callback
This update improves the logic for handling the 'next' path in the auth callback service. Now, it first checks the query parameters for the 'next' path. If it's not found there, it looks into the callback URL
2024-07-01 16:25:34 +08:00
Giancarlo Buomprisco
9583aeec9f Update webhook handler and tailwind paths, add first subscription ite… (#40)
* Update webhook handler and tailwind paths, add first subscription item to types

In the lemon-squeezy-webhook-handler, changed logger from error to warning and refactored the generation of lineItems to use firstSubscriptionItem details and obtain the priceAmount. In tailwind's index file, adjusted the path to include src directories in packages. Also, the first_subscription_item has been added to the subscription-webhook type for better data representation.

* Refactor subscription interval calculation

The subscription interval calculation was refactored to use the new 'getSubscriptionIntervalType' function. This new function provides a more accurate calculation, where it determines the interval type ('monthly' or 'yearly') by comparing the renewal date with the current date.

* Update dependencies across multiple packages

This commit includes updates to the version of "supabase-js", "lucide-react", "react-query", "react-table", "postcss", "stripe" among other dependencies in multiple package.json files. The "pnpm-lock.yaml" file is also updated to reflect these changes. This ensures the project dependencies stay up-to-date to include new features, improvements and bug fixes.
2024-06-30 23:29:06 +08:00
gbuomprisco
90c1e23821 Update dependency versions
Updated several dependency versions across multiple packages. This includes updating "@supabase/supabase-js" from "^2.43.5" to "^2.44.1", "lucide-react" from "^0.396.0" to "^0.397.0", and "@stripe/react-stripe-js" from "^2.7.1" to "^2.7.2". Also, some dependencies in the lock file were updated.
2024-06-28 00:23:56 +08:00
gbuomprisco
82dbf0128f Refactor Keystatic configuration and update turbo.json
The keystatic.config.ts has been again refactor with new field validations and a new dedicated function to get collections. The "turbo.json" file is also updated with a new "ui" field. The refactor aims to streamline the collection generation, and the "ui" field in "turbo.json" enhances its configuration capabilities.
2024-06-28 00:20:35 +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
6e218dc47b Update multiple packages and fix warning logs indentation
This commit includes the upgrade of multiple packages to their latest versions, including "@supabase/ssr", "stripe", "@playwright/test", "@typescript-eslint/eslint-plugin" and "@typescript-eslint/parser". It also ensures consistent warning logs indentation in route.ts.
2024-06-25 09:43:17 +08:00
gbuomprisco
5e26e1256e Fix testing value 2024-06-24 13:03:44 +08:00
gbuomprisco
6ea75bf10a Update Keystatic version and refactor version updater
This commit updates the Keystatic version to 0.5.23 and changes the interval for version refetching. The environment variable used for the refetch interval has been modified to NEXT_PUBLIC_VERSION_UPDATER_REFETCH_INTERVAL_SECONDS. Additionally, the code for checking for new version has been refactored and a visual change has been implemented to include a RocketIcon in the dialog header.
2024-06-24 12:38:21 +08:00
gbuomprisco
a3e5f928c4 Add guard clauses in getHashFromProcess
Additional logic has been introduced to the getHashFromProcess function. It will now exit early if the runtime is not Node.js or if the environment is not a development environment to prevent calling a Node.js command. This is done to avoid potential issues in the edge runtime and non-development environments.
2024-06-23 21:09:00 +08:00