790 Commits

Author SHA1 Message Date
giancarlo
7112560efe Update UI styling and fix bug in tier limits
Modified styles in radio-group, line-item-details and plan-picker components for improved user interface consistency. Specifically, certain font weights and transitions were adjusted, and some CSS classes were changed. Additionally, a bug in line-item-details was fixed where the 'unlimited' value wasn't properly returned for the previous tier's limit.
2024-04-06 12:37:44 +08:00
giancarlo
a1d86d2b7d Added tiers to billing config and related UI 2024-04-06 11:41:50 +08:00
giancarlo
9492b035a0 Update billing schema and enhance configuration display
Updated the billing schema to include a more descriptive line item and an optional tiers element. Also, billing configuration was refactored and displayed more prominently in the UI. The plan feature listing now utilizes checkmarks to denote each feature and the product details are more clearly displayed.
2024-04-05 19:23:03 +08:00
giancarlo
1cef5ac3db Update dependencies, add copy and adjust UI
This commit updates the version of Next.js along with a series of other dependencies outlined in the pnpm-lock.yaml file. The new copy "For each {{unit}}" has been added to the billing.json file and several adjustments have been made in the UI components. In particular, a separator has been added, animations have been set to re-run on re-render for certain elements, and the PricingTable component has been added.
2024-04-05 17:30:37 +08:00
giancarlo
f03c619fc7 Update UI styling in dashboard, pricing, and marketing
The changes include UI styling updates across dashboard, pricing, and marketing components. This involves updating animations and slide-in effects on the dashboard demo component, adjusting color schemes, animations, and spacing on pricing related components, and modifying layout and spacing on the marketing page. Other subtle style changes like font weights, colors and sizes were also addressed.
2024-04-05 16:51:19 +08:00
giancarlo
368bcf4dff Implement text color changes across components
The commit involves modifications in various components to change 'text-gray-500' to 'text-muted-foreground'. The purpose of this change is to create uniformity in text colors across the application, enhancing the user interface's overall look and making color scheme tweaks easier in the future.
2024-04-05 12:13:58 +08:00
giancarlo
b6f1ba6e68 Update UI and layout of PricingTable component
Separated billing schema from UI concerns and enhanced visuals of PricingTable for better user experience. This included restructuring the data display layout, refining text color and size for better readability, and implementing a new Separator component for improved aesthetics.
2024-04-05 12:10:29 +08:00
giancarlo
d64c620f69 Refine billing schema and enhance visuals of PricingTable
Removed redundant validation for 'lifetime' subscription plans in billing schema. Extensively updated the UI, layout and visuals of PricingTable component to offer a more user-friendly and aesthetically pleasing interface, improving overall user experience.
2024-04-05 11:49:09 +08:00
giancarlo
220a23e185 Implement updateSubscription feature and refactor billing services
This commit introduces the updateSubscription method to the BillingStrategyProviderService, ensuring that subscriptions can be updated within the billing core. Additionally, a refactor has been applied to the BillingGatewayFactoryService and stripe-billing-strategy.service to improve error handling and the robustness of subscription updates. Logging in the webhook route has been adjusted for clarity and the data model has been enhanced.
2024-04-04 20:15:12 +08:00
giancarlo
4a122ee5df Refactor usage reporting for metered subscriptions 2024-04-04 16:42:10 +08:00
giancarlo
5612c3f81f Implement environment-based dynamic mailer switching
This commit has modified the mailer system to allow flexible mailer selection according to the environment variable. Previously, it was set to use only 'Nodemailer' irrespective of the environment. Now, it has the ability to switch between 'Nodemailer' and 'CloudflareMailer' depending on the environment, facilitating better testing in diverse conditions.
2024-04-04 16:27:02 +08:00
giancarlo
a52c8dd31c Refactor database types definitions in Supabase
Various fields in the Supabase database types definitions have been modified. Primarily, the changes involve consistently ending each line with a semicolon. This enforces consistent formatting and improves code readability.
2024-04-04 15:50:28 +08:00
giancarlo
83cd86e3ee Update dependencies by adding 'lucide-react'
This update includes adding 'lucide-react' to the list of dependencies in the package.json file for the web app. The corresponding changes have also been made in the 'pnpm-lock.yaml' file to reflect the specifics of the newly added package.
2024-04-04 11:09:58 +08:00
giancarlo
64fca41f8d Refactor code and update dependencies configuration
This commit includes reorganizing dependencies in 'package.json' for better readability. It also refactors code associated with user and personal account data along with animations for AvatarFallback and profile name display. Additionally, the 'next' package version has been updated to '14.2.0-canary.56'. Some changes have been made for minor corrections and enhancements in the scripts.
2024-04-04 11:02:27 +08:00
giancarlo
5c5532dc22 Reorganize monitoring package dependencies
The changes include some reorganization of the dependencies in the 'package.json' of the monitoring package and the web app, aimed to enhance readability. Also, a minor correction in the whitespace around "@sentry/nextjs" dependency version was made. Furthermore, code related to the monitoring instrumentation provider has been refactored for more readable error handling.
2024-04-04 10:31:41 +08:00
giancarlo
ca2c3ebbbd Update theme selector and optimize button styling
Updated the theme selector to display the currently selected theme more clearly and enhance user-friendliness. Further, the button style is modernized with a class ensuring rounded edges for a sleeker appearance. These changes are applicable to the "ghost" button variant used for mode selection. Finally, the mode selection options utilize the MODES array for a dynamic approach, moving away from a fixed, hard-coded selection.
2024-04-04 10:27:43 +08:00
giancarlo
0b374c558a Create legal pages and refactor navigation
New pages for Cookie Policy, Terms of Service, and Privacy Policy were added. The navigation system was restructured using a mapped array of links instead of hard coded components. The 'Not Found' page's metadata handling was improved and its translation was updated. Certain components that aid this refactoring were created and some pre-existing components or functions were moved to more appropriate locations or renamed for clarity. The Site Navigation, Footer, and Page header components were updated in layout and content. Various pages including Blog and Documentation were updated or removed.
2024-04-04 10:04:07 +08:00
giancarlo
2782b26dc2 Refactor i18n handling for language cookie and headers
The commit encompasses the aspect of refactoring the i18n handling for language cookies and headers. It also includes the deletion of get-language-cookie file and its transformation into a function inside i18n.server file. Extra functionalities were added to the i18n.server like enhancing the i18n server instance creation to consider the 'accept-language' header and default to environment provided values when necessary. The changes were also adjusted accordingly on the packages/i18n/package.json where deletion of "./cookie" was realized.
2024-04-04 09:22:43 +08:00
giancarlo
24a68b2b1f Add Sentry and Baselime packages in the monitoring section
This commit introduces Sentry and Baselime packages into the monitoring section, complete with associated dependencies and scripts. These changes also reflect necessary updates to the 'pnpm-lock.yaml' file to account for these new dependencies.
2024-04-04 01:09:19 +08:00
giancarlo
35ef90b4f8 Update Supabase dependency, delete cookie handling, create logger
Updated Supabase dependency across multiple packages from "^2.41.1" to "^2.42.0". Removed files handling sidebar state and theme cookies. Created a new Logger interface for managing log messages in the shared package. Enhanced the middleware to track accounts membership webhook payload. Minor adjustments were also made in multiple package.json files.
2024-04-03 23:59:41 +08:00
giancarlo
406739d96d Refactor Supabase server client and improve team management features
Refactored Supabase server component client to improve type safety. Improved team account management by adjusting role data providers to consider account IDs, and adjusted invite member functionality to use account IDs and slugs. Enhanced invitation update dialog by adding account parameter. Fixed database webhook URLs in seed.sql. Overall, these changes enhance the robustness and usability of the team management functionalities.
2024-04-03 22:34:12 +08:00
giancarlo
53afd10f32 Update content categorization and handle hierarchical documentation
Enhancements were implemented to support hierarchical documentation. Local CMS now respects parent ID and order attributes of content items, and content can be categories as 'blog' or 'documentation'. Changes were also made to the wordpress integration supporting these new categorizations. Introduced working with nested documentation pages.
2024-04-03 21:06:54 +08:00
giancarlo
3fd216ba6e Update npm run commands and various dependencies
Npm run commands for 'dev' have been updated to 'start' in the Wordpress package. Also, removing peer dependencies for the CMS core and updating versions for various dependencies in pnpm-lock.yaml file. Furthermore, a modification to the SiteHeaderAccountSection function in the site-header-account-section.tsx file was made.
2024-04-03 16:29:05 +08:00
giancarlo
048d58dcdf Implement internationalization in pages and update CMS clients
The commit mainly revamps the code to support internationalization in various pages like pricing, docs, blog, etc. It modifies the code to generate metadata asynchronously, accommodating internationalized page titles and subtitles. Also, the commit restructures CMS Client scripts, particularly for ContentLayer and Wordpress. For Wordpress, it updates API fetch routes and handles embedded children data. Furthermore, unnecessary logging statements are cleaned up, and minor updates are done for better UI and code efficiency.
2024-04-03 16:05:34 +08:00
giancarlo
12058274f5 Fixed WP Client 2024-04-02 16:29:11 +08:00
giancarlo
2dc2c6461e Implement error handling and adjust import paths
This commit introduces error handling in the 'database-webhook-handler.service.ts' to log and rethrow errors when processing webhooks. It also adjusts the import paths for ContentlayerClient and WordpressClient in 'create-cms-client.ts'. Method names in 'database-webhook-router.service.ts' have been updated for clarity.
2024-04-02 16:03:11 +08:00
giancarlo
eb43059fda Update billing provider and related adjustments
This commit switches the billing provider from Stripe to Lemon Squeezy. It also includes necessary modifications in the web app, billing gateway, and database to accommodate this change. Additionally, updates have been made to the checkout process, billing strategy, and relevant services and components.
2024-04-02 14:31:53 +08:00
giancarlo
4576c8c14a Switch billing provider from Stripe to Lemon Squeezy
Changed the billing provider in the `.env.development` file from Stripe to Lemon Squeezy. This requires adaptations at many levels: at the web app to load Lemon Squeezy's script in the checkout process, at the billing gateway to handle Lemon Squeezy calls, and in the database to reflect the current billing provider. The checkout process is now done using Lemon Squeezy Sessions and its billing strategy was adjusted accordingly. Billing-related components and services were also updated.
2024-04-02 14:09:25 +08:00
giancarlo
d92d224250 Update UI of account selection component
Modified CSS styles in account-selector.tsx to enhance user experience. Added 'group' class for better hover effects and formatting for avatars. Also updated styling for account label to prevent overflow and ensure better readability.
2024-04-02 12:33:13 +08:00
giancarlo
d24cf8427f Refactor billing system and enhance logging
Updated the billing system's schema to change 'storeId' to a string type, and improved the cleanliness and readability of the code. Enhanced the logging system within the billing service for better tracking and debugging. In line with these changes, added corresponding error pages in the client side to handle any errors.
2024-04-02 12:19:09 +08:00
giancarlo
6149f6a313 Update package dependencies and refactor peer dependencies
Updated various package dependencies including "next", "turbo" and "@kit" packages. Moved some dependencies to devDependencies for better project structure. This aims to optimize the dependency graph, reduce unnecessary installation of packages, and enhance the overall development environment.
2024-04-02 11:13:57 +08:00
giancarlo
f58aaa330c Implement Lemon Squeezy billing services
Added implementation for various billing services with Lemon Squeezy. This includes processing of webhooks for order and subscription handling, verification of webhook signatures, and validating subscription statuses and order states. Additionally, types for order and subscription webhooks have been created.
2024-04-02 09:33:26 +08:00
giancarlo
dee0814e6d Add documentation for Stripe and Lemon Squeezy billing packages
New README files have been added for the packages dealing with the Stripe and Lemon Squeezy billing systems. They explain the purpose of the packages and detail what environment variables need to be set for development and production.
2024-04-01 21:47:31 +08:00
giancarlo
8784a40a69 Add Lemon Squeezy Billing System 2024-04-01 21:43:18 +08:00
giancarlo
84a4b45bcd Update billing system to support single and recurring payments
This update modifies the billing system to properly handle both single and recurring payment plans. Logic is introduced to determine whether the selected plan is recurring or a one-time payment and adjust the interface accordingly. The naming of some components and variables has been changed to more accurately reflect their purpose. Additionally, a
2024-04-01 20:58:26 +08:00
giancarlo
6b72206b00 Refactor CMS to handle ContentLayer and WordPress platforms
This commit refactors the CMS to handle two platforms: ContentLayer and WordPress. The CMS layer is abstracted into a core package, and separate implementations for each platform are created. This change allows the app to switch the CMS type based on environment variable, which can improve the flexibility of content management. It also updates several functions in the `server-sitemap.xml` route to accommodate these changes and generate sitemaps based on the CMS client. Further, documentation content and posts have been relocated to align with the new structure. Notably, this refactor is a comprehensive update to the way the CMS is structured and managed.
2024-04-01 19:47:51 +08:00
giancarlo
d6004f2f7e Refactor billing gateway and enhance localization
Refactored the 'plan-picker' component in the billing gateway to remove unwanted line items and improve checkout session and subscription handling. Enhanced the localization support by adding translations in the plan picker and introduced a new function to check trial eligibility so that existing customers can't start a new trial period. These changes enhance the usability of the application across different regions and provide accurate trial period conditions.
2024-04-01 11:52:35 +08:00
giancarlo
248ab7ef72 Update translations and add trial eligibility in plan picker
Added translations in "plan-picker" for better localization support. Introduced a new functionality to check trial eligibility where existing customers can't start a trial. Removed unnecessary billing line items like 'per-seat' and 'metered'. Also, made significant changes in multiple files to align with the updated internationalization best practices. The changes aim to make application more user-friendly across different locales and provide accurate trial period conditions.
2024-03-31 17:46:39 +08:00
giancarlo
ba92e14363 Add detailed plan info and additional subscription types
Implemented detailed pricing information for various subscription types in the plan-picker component. Two additional subscription types, 'per-seat' and 'metered', have been added to the billing configuration, providing more flexibility for customers to choose different billing methods that suit their needs. The billing schema has also been refined to allow plans without a 'base' line item.
2024-03-31 15:47:20 +08:00
giancarlo
57c8f89804 Modify layout and improve subscription fetching
The layout for responsive designs has been updated in plan-picker component. Subscription type has been removed from billing/page.tsx and subscription fetching has been improved with additional query parameters in both billing/page.tsx and current-plan-card.tsx. Errors were also corrected in i18n translation keys in team-account-checkout-form.tsx. CurrentPlanCard's component props now includes line items in the subscription object. Changes in billing/page.tsx include adaptation of container width to be fully responsive.
2024-03-31 15:24:31 +08:00
giancarlo
aa12ecd5a2 Refactor API code and simplify billing display
The code in the webhook API has been refactored to move the DatabaseWebhookHandlerService instance out of the POST function scope. Furthermore, the display of renewal plan details on the billing page has been simplified and certain parts deemed superfluous have been removed. Numerous types and interfaces in the database.types.ts file have also been corrected and formatted for consistency and improved readability.
2024-03-31 15:13:44 +08:00
giancarlo
2c0c616a2d Rename component files and update code dependencies
Numerous component files have been renamed for better organization and readability. This includes changing 'app' to 'account-layout' in various instances and 'organization' to 'team' to ensure consistency across code. Additionally, dependencies within codes have been updated in line with the renaming. The pull request also includes a minor update to the pnpm-lock file, reflecting the latest version of Next.js.
2024-03-31 01:05:32 +08:00
giancarlo
a02f597f57 Update billing card display and server actions
The code changes update the way the billing details are fetched and displayed in the system. In the billing card component, the baseLineItem price is replaced with the cost. For the server actions, getLineItemsFromPlanId is replaced with getProductPlanPair to fetch the product plan more efficiently. The change reduces unnecessary details, simplifying the code and possibly speeding up the operation.
2024-03-30 15:02:30 +08:00
giancarlo
57214ab517 Add AuthenticityToken component in makerkit
This new component, AuthenticityToken, is added to fetch CSRF token from the 'meta' tags. This is used to prevent Cross Site Request Forgery on forms by embedding a CSRF token as a hidden input field. When the form is submitted, the server can verify whether the request was legitimate by checking the CSRF token. This enhances the security of the application.
2024-03-30 15:00:24 +08:00
giancarlo
e158ff28d8 Improve and update billing flow
This commit updates various components in the billing flow due to a new schema that supports multiple line items per plan. The added flexibility rendered 'line-items-mapper.ts' redundant, which has been removed. Additionally, webhooks have been created for handling account membership insertions and deletions, as well as handling subscription deletions when an account is deleted. This message also introduces a new service to handle sending out invitation emails. Lastly, the validation of the billing provider has been improved for increased security and stability.
2024-03-30 14:51:16 +08:00
giancarlo
f93af31009 Refactor billing schema for increased flexibility
The billing schema has been revamped to allow more flexible billing setups, supporting multiple line items per plan. Changes extend to related app and UI components for a seamless experience. As a result, the previously used 'line-items-mapper.ts' is no longer needed and has been removed.
2024-03-30 00:59:06 +08:00
giancarlo
163eff6583 Update mode-toggle and package manager version
Added a function in 'mode-toggle.tsx' to set the theme as a cookie and changed the package manager version in 'package.json'. The theme selection by the user is now stored in a cookie for persistence across sessions, and an upgrade was made to the package manager for improved dependencies management.
2024-03-29 18:42:19 +08:00
giancarlo
65e970424f Refactor schemas, enhance data validation
Implemented improvements in the data validation methods used in Stripe and Team Account features by refining the schemas. Adapted string types to UUID for accountId attributes in various services and ensured that Stripe keys follow appropriate prefixes. Autocomplete was turned off for destructive actions for enhanced security.
2024-03-29 18:21:12 +08:00
giancarlo
59c08c59d7 Update and refine schemas in Stripe and Team Accounts features
Refactored both Stripe and Team Accounts features' schemas for better data validation and added specificity to keys. Enhanced form validations with methods to ensure Stripe keys follow appropriate prefixes. Replaced generic string types with UUID for accountId attributes in different services. Also turned off autocomplete for destructive actions for improved security.
2024-03-29 18:03:41 +08:00
giancarlo
af908ae685 Refactor team accounts feature and improve form validation
Updated several components within the team accounts feature to use more specific schema definitions and provide clearer form validation. Several schema files were renamed to better reflect their usage and additional properties were included. The commit also introduces handling for a new accountId property, which provides more accurate user account tracking. Autocomplete was turned off on deletion actions for better security. Changes related to account ownership transfer were also made, including transaction logging and error handling improvements.
2024-03-29 17:39:35 +08:00