Commit Graph

134 Commits

Author SHA1 Message Date
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
19c16cfb44 Update dependencies and enhance admin account page
This commit updates various dependencies in pnpm-lock file and introduces enhancements to the admin account page. This includes adding several new functionality like 'Delete User', 'Ban User', 'Impersonate User' and 'Delete Account'. Various UI components are also added for these features.
2024-04-09 15:26:31 +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
c77c9295c3 Update billing schema and plan picker logic
Modified the logic in create-billing-schema.ts so if a plan contains more than one line item, it no longer returns true but false. In plan-picker.tsx, added a condition to check if a product is selected before setting the 'planId'. Also, the 'planId' is now set based on the selected plan's id rather than an empty string.
2024-04-07 19:20:03 +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
b049dfca80 Add enhanced route handler functionality and improve code
This commit provides the addition of a new enhanced route handler functionality for Next.js utilities. The handler facilitates additional functionality, allowing more control over HTTP requests. Changes also include improved code where 'zodParseFactory' functionality moved to utils for better code reuse and organization.
2024-04-07 16:22:05 +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
aa7237bfce Update README with Beta release completion
The project's README file has been updated to mark the completion of the Beta release phase. The roadmap section now accurately reflects the current status of the project, providing up-to-date information about the completed and pending milestones.
2024-04-07 12:54:02 +08:00
giancarlo
91811033f4 Update README with project roadmap and package details
This commit introduces checkbox formatting for project's roadmap dates in the README, enhancing readability and visibility. Also, new details about the '@kit/database-webhooks', '@kit/cms', '@kit/next' packages, and the CMS additions to the application are included to provide clearer understanding of project's structure and functionality.
2024-04-07 12:53:20 +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
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
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
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