Commit Graph

120 Commits

Author SHA1 Message Date
giancarlo
e00cb3c591 Refactor logger usage and add discount field to checkout
This commit refactors the logger usage in various files to make it more streamlined and consistent. It also introduces a new 'enableDiscountField' feature for the checkout that can be toggled on specific products. This allows customers to apply discounts at checkout if the product or subscription plan has the 'enableDiscountField' set to true.
2024-04-10 22:24:11 +08:00
giancarlo
37c5e3ed76 Refactor logger usage and add discount field to checkout
This commit refactors the logger usage in various files to make it more streamlined and consistent. It also introduces a new 'enableDiscountField' feature for the checkout that can be toggled on specific products. This allows customers to apply discounts at checkout if the product or subscription plan has the 'enableDiscountField' set to true.
2024-04-10 22:04:38 +08:00
giancarlo
69942ec243 Refactor language switcher and enhance site routing
Renamed 'LanguageDropdownSwitcher' to 'LanguageSelector' for better representation of the component's functionality. Removed unnecessary dependencies and optimized function declarations. Updated site routing to include new pages like 'contact', 'terms-of-service', and 'privacy-policy'. Also made adjustments for multi-language support, providing better user experience.
2024-04-10 21:23:41 +08:00
giancarlo
67139d069f Update visibility settings for AuthButtons
The 'Div' and 'Link' elements visibility within AuthButtons component have been updated. Previously, they were hidden for smaller screens or at lower resolutions, now it has been adjusted to be visible for such instances allowing better user interface for all types of devices.
2024-04-10 20:38:38 +08:00
giancarlo
59e7eaf1a4 Refine UI/UX across multiple components and pages
This commit focuses on refining UI/UX across various components and pages of the application. Changes include adjusting padding and spacing to enhance the overall readability and user interaction, amending hyperlink styling, modifying dropdown menus for optimized mobile experience, and adjusting key UI elements. Other modifications include revising imports for better maintainability, and adding enhancements to several UI components to improve their visual presentation.
2024-04-10 20:34:43 +08:00
giancarlo
7e3843adbe Update Next.js version and remove GridList component
The Next.js version was updated in the 'pnpm-lock.yaml' file which resulted in changes to multiple dependencies. Also, the '_components/grid-list.tsx' file was deleted as it was deemed no longer necessary. Additional small changes were made to the blog page and 'marketing.json' file.
2024-04-10 16:51:20 +08:00
giancarlo
f94557e333 Update getContentItems to return total count and items
The changes involved modifying the implementation of `getContentItems` across multiple files, specifically in the CMS-related codebase. This method now returns an object containing the total count of items and the items themselves. The updates also included necessary adjustments in the code where `getContentItems` is called to accommodate the new structure of the returned result.
2024-04-10 16:29:19 +08:00
giancarlo
44373c0372 Update CMS client configuration and refactor content organization
The code changes involve a significant update to the configuration of our CMS client. The nature of retrieving content items has been refactored to be more granular, allowing for the identification and fetching of content from specified collections rather than general categories. These modifications improve the efficiency and specificity of content queries. Furthermore, other changes were made to provide a better alignment of our content structure, including the reorganization of content files and renaming of image paths in various components for consistency.
2024-04-10 15:52:26 +08:00
giancarlo
006c4d430f Replaced contentlayer with keystatic 2024-04-10 14:52:18 +08:00
giancarlo
f729bf6077 Removed shamefully-hoist and updated all packages to respect that 2024-04-10 01:45:03 +08:00
giancarlo
37f1db6b2b Refactor admin action naming and move user assertions
Renamed the admin actions to have a more uniform approach with "Action" suffixed. This makes the action function's purpose clear in the codebase. Also, moved the `assertUserIsNotCurrentSuperAdmin` method to a more suitable place in the code, arranging it in a private scope. This helps in maintaining clean code architecture and enhances readibility.
2024-04-09 19:08:40 +08:00
giancarlo
a9eaaafd3d Update packages and refactor logging in diverse services
This commit updates diverse packages such as "@makerkit/data-loader-supabase-core" and "@makerkit/data-loader-supabase-nextjs" to the new versions in the package.json files. Also, several refactorings were done in logging within services and loaders by progressing 'server-only' imports and improving context handling. Additionally, type annotations have been added to several exported functions for better code readability and maintainability.
2024-04-09 17:23:48 +08:00
giancarlo
a7c9680da9 Remove "Back to Blog" button from post header
The "Back to Blog" button, a link to the main blog page, has been removed from the post header component in the marketing blog module. This changes the page navigation and streamlines the post header design, making it cleaner and less cluttered.
2024-04-09 15:34:37 +08:00
giancarlo
e7f2660032 Update UI design across multiple pages and components
Several changes have been made to improve the user interface and enhance the user experience. This includes redesigning Auth buttons, modifying website layouts and routing, tweaking heading and text sizes for clarity, and revamping the marketing, documentation, and pricing pages. These changes collectively contribute to a cleaner, more concise and navigable interface.
2024-04-09 13:35:12 +08:00
giancarlo
80952dc445 Update UI styling and layout in site components
The commit modifies various components across the marketing site to update layout and styling. The changes include adjustments to shadowing, spacing, and button configurations. It also updates the text and image assets, enhancing the overall visual representation of the website. Some buttons and components have also been removed or replaced for a more streamlined interface.
2024-04-08 21:28:58 +08:00
giancarlo
13308194ec Update admin and marketing layouts, add new admin components
Refined both admin and marketing layouts for a clearer design. Newly added components for the admin page include admin-account-page, admin-members-table and admin-memberships-table. Also included in this update are route renaming, minor text edits and corrections in the code.
2024-04-08 20:00:52 +08:00
giancarlo
767e2f21b5 Added accounts table page in Admin 2024-04-08 16:32:22 +08:00
giancarlo
45417fe2c5 Wrap admin pages with AdminGuard component
The AdminGuard component has been added to the AccountPage, AccountsPage, and AdminPage in the web app. This server-side implementation ensures that these pages are only accessible to super-admin users. If a user is not a super-admin, the guard will trigger a redirect to a 404 page.
2024-04-08 14:39:02 +08:00
giancarlo
4655f56143 Add admin dashboard data loading & package dependencies
Removed 'admin-header.tsx' and 'admin-sidebar.tsx' components and added 'admin-dashboard.loader.ts' to handle loading data for the admin dashboard. Updated 'admin-dashboard.tsx' and 'page.tsx' to use this loader. Package dependencies were also updated in 'pnpm-lock.yaml' and 'package.json' files of relevant packages. This commit prioritizes loading dashboard data effectively and managing package dependencies.
2024-04-08 14:34:47 +08:00
giancarlo
9a5e614ad5 Add user authentication and profile dropdown to admin sidebar
The AdminSidebar function has been updated to include user authentication. If user authentication fails, a redirect is initiated. Additionally, a ProfileAccountDropdownContainer has been included in the sidebar to display user information. This improves the user experience and security of the admin sidebar.
2024-04-08 14:03:22 +08:00
giancarlo
9fca45c2de Replace Logger with getLogger and update next version
This commit replaces the use of Logger with getLogger in various parts of the code to handle logging. The Logger has been replaced with getLogger, which assists in getting logs in an asynchronous manner. In addition to this, it updates the next version in pnpm-lock.yaml from next@14.2.0-canary.61 to next@14.2.0-canary.62 and various other dependencies. Also made minor annotations and comments to the function 'isBrowser' and 'formatCurrency' in the 'utils.ts' file.
2024-04-08 12:23:15 +08:00
giancarlo
2b447167f7 Add new pages and refactor existing code
This commit adds new Admin and Accounts pages, while also improving code by refactoring various portions such as extracting services from the join page and dynamically importing packages in logging and monitoring code. The build command is also removed from the WordPress package, and SWC minification is enabled in the Next.js configuration. Updated marketing content is also included in this commit.
2024-04-08 11:47:26 +08:00
giancarlo
ab1e90f093 Update Billing Provider and Refactor Pricing UI
Updated the billing provider in the environment configuration to use 'stripe' instead of 'lemon-squeezy'. Multiple changes were also made to UI components related to pricing, including better data handling for different billing tiers and enhanced visualization of selected options. These revisions aim to both enhance the user experience and ensure compatibility with the new billing provider.
2024-04-07 18:12:45 +08:00
giancarlo
1e23ee2783 Replace 'base' line item type with 'flat'
This commit updates all instances of 'base' line item type to 'flat'. It modifies the BillingIntervalSchema, the validation rules for one-time plans, and the function to get the primary line item for a plan. Furthermore, it adjusts the display and filtering of line items in the pricing table component and the plan picker component. The SQL migration script and the sample billing configuration are also updated to reflect this change.
2024-04-07 17:34:47 +08:00
giancarlo
9ecbf0816e Update CSS classes in web pages
The CSS classes used across different web pages in the web application have been updated. This change mainly consists of adjustments to spacing on various elements to improve the visual layout. The alterations should enhance the readability and user experience of the mentioned pages.
2024-04-07 15:37:03 +08:00
giancarlo
0002ac6255 Refactor billing imports, reorganize package scripts and improve action structure
Deleted unnecessary schema files and reorganized their imports into more logical order. Modified the package script structure to align more accurately with standard conventions. Also refactored the team-billing.service file to improve action structure, making it easier to understand and edit. Furthermore, upgraded various dependencies, reflecting their new versions in the lockfile.
2024-04-07 12:47:29 +08:00
giancarlo
0a9c1f35c6 Add captcha support to authentication features
The update includes the implementation of captcha support during the sign-in and sign-up process for user accounts. The process ensures a better level of security against bot-based attacks. Also, the code has been refactored to separate error and success alerts and unnecessary useEffect hooks have been removed. Moreover, some logic concerning the authentication rendering has been simplified.
2024-04-07 10:56:33 +08:00
giancarlo
36bcf64f52 Add logging and error-handling to billing service
Enhanced the TeamBillingService class by including several logging statements and added error-handling surrounding the creation of a checkout session and a billing portal session. The logging statements provide more context about the processes such as the associated user and account, adding a layer of transparency and traceability.
2024-04-06 14:44:35 +08:00
giancarlo
67e9c8b676 Update Next.js version and improve session handling
Next.js version has been upgraded from 14.2.0-canary.58 to 14.2.0-canary.60 for performance and stability improvements. Additionally, account session handling has been improved by fetching the session data during server-side processing and passing it to various components, thus optimizing the user experience.
2024-04-06 14:34:05 +08:00
giancarlo
9303e8f5dd Add loaders for team and personal account billing pages
A new loader for team and personal account billing pages has been created to fetch subscription and customer data. This change offloads the task of loading account data from the account billing pages to the newly created loaders, thus simplifying the code in the billing pages.

Furthermore, caching allows the same requested to be deduped across server components
2024-04-06 14:09:17 +08:00
giancarlo
fa205ace32 Add UserBillingService for handling checkout and billing portal sessions
This update refactors the handling of checkout and billing portal sessions into a new UserBillingService. The new service centralizes related functions that were previously scattered throughout server-actions and ensures that all related functionality is handled in a single place. This improves maintainability and coherence of the code related to billing sessions.
2024-04-06 13:59:38 +08:00
giancarlo
127063402b Refactor logging and error handling in billing actions
The billing actions code received updated logging, improving readability and traceability. Error handling was also enhanced, specifically around creating checkout sessions and billing portal sessions. Errors now include pertinent information and properly propagate to maintain application stability.
2024-04-06 13:51:13 +08:00
giancarlo
d3bd8fb033 Refactor code and simplify billing services
Code for billing services has been refactored for simplicity and improved organization. This includes updated locations for the 'loadTeamWorkspace' function and adjusted component imports. Redundant scripts have been eliminated and new schemas have been introduced for input data validation.
2024-04-06 13:37:38 +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
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
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
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
67763d3e1f Remove unnecessary logging in middleware
Removed an extraneous logging command from the middleware function in the web application. This was redundant and did not contribute to error tracking or debugging, enhancing readability and maintenance of the code.
2024-04-04 00:07:38 +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