- Updated StripeProvider to retrieve priceId from session metadata instead of line items.
- Introduced credit package retrieval to include expiration information when adding credits.
- Enhanced logging to reflect credit expiration details during credit addition.
- Removed obsolete code related to priceId retrieval for improved clarity and maintainability.
- Added expireDays property to credit packages and related configurations in website.tsx for better management of credit expiration.
- Modified addCredits function to handle expireDays more flexibly, allowing for undefined values.
- Updated functions for adding register gift and monthly free credits to utilize the new expireDays configuration.
- Enhanced type definitions for credits to include optional expireDays for improved clarity.
- Removed obsolete creditExpireDays from the credits configuration to streamline the codebase.
- Updated DashboardSidebar to conditionally render SidebarMain based on loading state.
- Modified CreditPackages to trigger a refresh of credits data and show success toast with a delay to avoid React lifecycle conflicts.
- Added new credit checkout session functionality to facilitate credit purchases.
- Introduced credit package configurations in env.example for better management.
- Updated English and Chinese JSON files with new messages for checkout processes.
- Refactored existing components to utilize the new credit checkout session and streamline the credit purchasing workflow.
- Removed obsolete payment intent handling to simplify the codebase.
- Added credit expiration days, register gift credits, and free monthly credits options in website configuration.
- Updated credits handling functions to utilize the new configuration settings for improved flexibility and maintainability.
- Removed obsolete constants related to credits from constants.ts to streamline the codebase.
- Enhanced type definitions for credits configuration in index.d.ts for better clarity.
- Revised credit package descriptions in the English JSON file for clarity and consistency.
- Refactored CreditPackages component to utilize a more efficient method for retrieving credit packages.
- Removed obsolete functions and streamlined the code for better maintainability and performance.
- Added new credit packages structure in English and Chinese JSON files for better localization.
- Introduced server-side functions to retrieve credit packages and package details.
- Updated client-side components to utilize new credit package retrieval methods.
- Refactored existing code to enhance modularity and maintainability by separating client and server logic.
- Removed obsolete credit package retrieval functions to streamline the codebase.
- Added a new credits management system with configurable credit packages in website.tsx.
- Replaced hardcoded credit package definitions with a dynamic retrieval system using getCreditPackages and getCreditPackageById functions.
- Updated CreditPackages and StripePaymentForm components to utilize the new credit package structure.
- Removed obsolete CREDIT_PACKAGES constant from constants.ts to streamline the codebase.
- Enhanced type definitions for credit packages in types.ts for better clarity and maintainability.
- Updated README.md to reflect changes in credit packages configuration.
- Moved CREDIT_TRANSACTION_TYPE from constants to a new types.ts file for better modularity.
- Updated import paths in credit-related components to reflect the new structure.
- Removed the old CREDIT_TRANSACTION_TYPE definition from constants.ts to streamline the codebase.
- Removed unused translation keys from English and Chinese JSON files.
- Updated UsersTable and CreditTransactionsTable components to utilize a centralized translation function for table-related messages.
- Initialized sorting state in both table components for consistent default behavior.
- Implemented a tabbed interface in the CreditsPage component to separate balance and transactions views.
- Updated CreditPackages and CreditTransactionsPageClient components to utilize the new tab structure.
- Enhanced translation support for credits-related messages in both English and Chinese.
- Improved error handling and user feedback in credit-related components.
- Refactored CreditTransactionsTable to utilize translations for table headers and pagination controls.
- Updated spacing from `space-y-10` to `space-y-8` in layout components for Billing, Credits, Notifications, Profile, and Security to ensure uniformity across the settings pages.
- Introduced a new CreditTransactionsPageClient component to display credit transactions.
- Implemented getCreditTransactions action for fetching transaction data.
- Added CreditTransactionsTable component for rendering transaction details with pagination and sorting.
- Updated English and Chinese translation files to include credit transaction messages.
- Integrated the credit transactions page into the existing credits settings layout.
- Introduced a new CreditsBalance component to display user credits.
- Integrated CreditsBalance into DashboardHeader, Navbar, and NavbarMobile for improved visibility of user credits.
- Enhanced user interaction by allowing navigation to the credits settings page.
- Updated import paths for credit-related actions and functions to improve module organization.
- Removed redundant refresh trigger declaration in CreditPackages component.
- Simplified success toast message in CreditPackages and PaymentForm components for clarity.
- Introduced a new credits.ts file to centralize credit management logic and improve maintainability.
- Added a new transaction store to manage refresh triggers for credit-related components.
- Updated CreditPackages and StripePaymentForm components to utilize the transaction store for refreshing UI after credit purchases.
- Modified .gitignore to include certificates.
- Introduced a new script in package.json for running the development server with HTTPS support.
- Added "Credits" entry to the avatar configuration for navigation.
- Updated English and Chinese translation files to include "Credits" label.
- Refactored error messages in credit payment actions for clarity.
- Enhanced loading state management in CreditPackages component.
- Replaced icons in CreditPackages component for improved UI consistency.
- Introduced credit purchase payment intent actions in credits.action.ts.
- Created new components for credit packages and Stripe payment form.
- Added routes and layout for credits settings page.
- Updated sidebar configuration to include credits settings.
- Enhanced constants for credit packages with detailed pricing and descriptions.
- Implemented loading and layout components for credits page.
- Integrated payment confirmation handling in Stripe provider.
- Changed the secondary button text in the English JSON file from "Book Demo" to "See Demo" for improved clarity.
- Added a new Open Graph image to enhance social media sharing capabilities.
- Adjusted grid gap properties in Features2Section and FeaturesSection components for better layout consistency.
- Simplified the BlogCard component by removing unnecessary border classes and updating text color for improved readability.
- Modified the Navbar component to change the background color to transparent when scrolled, enhancing visual appeal.
- Introduced a new PricingSection component to display pricing options, enhancing user engagement and decision-making.
- Updated English and Chinese JSON files to include titles and descriptions for the pricing section.
- Refactored the homepage layout to integrate the new PricingSection, improving overall user experience.
- Renamed CallToAction component to CallToActionSection for consistency in naming conventions.
- Adjusted image sources in Features4Section for improved asset management.
- Introduced Integration2Section and Features5Section components to showcase integrations and additional product features, improving user engagement and workflow.
- Updated English and Chinese JSON files to include new titles, descriptions, and buttons for the integration and features sections.
- Refactored the homepage layout to integrate the new sections, enhancing overall user experience.
- Adjusted existing FeaturesSection and Features2Section components for consistency and clarity in feature presentation.
- Introduced a new CallToAction component to encourage user engagement with clear action prompts.
- Updated English and Chinese JSON files to include titles, descriptions, and buttons for the call-to-action section.
- Refactored the homepage layout to integrate the new CallToAction section, enhancing overall user experience.
- Introduced a new TestimonialsSection component to display customer testimonials, enhancing user engagement and trust.
- Updated English and Chinese JSON files to include testimonials titles, descriptions, and individual customer quotes.
- Refactored the homepage layout to integrate the new testimonials section, improving overall user experience.
- Introduced a new IntegrationSection component to showcase integrations with popular tools, enhancing user workflow.
- Updated English and Chinese JSON files to include integration titles and descriptions.
- Added a new Features4Section component with a different layout for product features, improving presentation and user engagement.
- Refactored homepage layout to integrate the new sections, enhancing overall user experience.
- Updated English and Chinese JSON files to include additional product features and descriptions, enhancing user engagement.
- Introduced a new Features3Section component to showcase more product features on the homepage.
- Refactored the homepage layout to integrate the new Features3Section, improving overall user experience.
- Adjusted existing FeaturesSection and Features2Section components for consistency and clarity in feature presentation.
- Added FeaturesSection and Features2Section components to showcase product features on the homepage, improving user engagement and information accessibility.
- Updated English and Chinese JSON files to include new feature descriptions and titles for both features sections.
- Refactored the homepage layout to integrate the new features sections, enhancing overall user experience.
- Made adjustments to the LogoCloud section for improved styling and consistency.
- Introduced a new LogoCloudSection component to showcase partner logos on the homepage, enhancing brand visibility.
- Updated English and Chinese JSON files to include a title for the LogoCloud section.
- Refactored the homepage to integrate the new LogoCloudSection, improving overall layout and user engagement.
- Added multiple SVG logos to the public/svg directory for use in the LogoCloud section.
- Introduced a new HeroSection component to the homepage, featuring an engaging introduction, title, and action buttons to improve user engagement.
- Updated the English and Chinese JSON files to include a hero section with descriptive content.
- Refactored the FAQ component to FaqSection for consistency and updated its usage in both the homepage and pricing page.
- Added a tagline to the footer for better branding visibility.
- Updated multiple files to replace the deprecated getBaseUrlWithLocale function with the new getUrlWithLocale function for generating localized URLs.
- Ensured consistency across the application by standardizing URL generation methods in checkout, customer portal, and various marketing pages.
- Modified the FAQ section in both English and Chinese JSON files to enhance user support with clearer descriptions and additional contact information.
- Updated the layout of the PricingPage to include the FAQs component, improving information accessibility.
- Introduced new components for the hero section and pricing table, enhancing the overall user experience and engagement.
- Refactored the pricing layout to streamline the presentation of pricing options and improve maintainability.
Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:
- A server/client branch `if (typeof window !== 'undefined')`.
- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.
- Date formatting in a user's locale which doesn't match the server.
- External changing data without sending a snapshot of it along with the HTML.
- Invalid HTML tag nesting.
- Updated HomePage title and description to reflect new branding.
- Added a comprehensive FAQ section with questions and answers to improve user support.
- Modified the PricingPage layout to include the new FAQs component for better information accessibility.
- Updated import paths for various components to use the new nsui directory structure, enhancing organization and maintainability.
- Refactored layout and page components to align with the new structure, ensuring consistency across the codebase.
- Introduced new components such as BlockPreview and BlocksNav to improve modularity and reusability.
- Updated NavbarMobile to use UserButtonMobile for mobile user interactions.
- Introduced UserButtonMobile component to handle user actions in a mobile-friendly manner, including sign-out functionality and user avatar display.
- Removed unused drawer-related imports from UserButton component to streamline the codebase.
- Introduced multiple FAQ pages (two, three, four) to enhance user support and information accessibility.
- Added integration sections (one, two, three, four, five, six, seven, eight) to showcase various tools and services.
- Implemented a development toolbar for easier debugging and page reloading during development.
- Removed the loading component as it was no longer needed.
- Updated the layout to conditionally render the development toolbar in development mode.
- Removed scaled and mono theme options from the theme selector and related components to streamline theme management.
- Updated localization files to reflect the removal of unused theme translations.
- Cleaned up CSS by eliminating unnecessary theme styles, enhancing maintainability and performance.
- Adjusted the WebsiteMetadata interface to remove references to obsolete themes, improving code clarity.
- Renamed and reorganized the ActiveThemeProvider and PaymentProvider components for better clarity and structure.
- Introduced the ActiveThemeProvider component to manage the active theme and set cookies accordingly.
- Implemented the PaymentProvider component to initialize payment state based on the user's session.
- Updated imports in related components to reflect the new file structure.
- Deleted multiple marketing section files including call-to-action, content, FAQ, features, hero, pricing, stats, and testimonials to streamline the codebase.
- This cleanup enhances maintainability by removing obsolete components that are no longer in use.
- Changed canonical URLs for cookie, privacy, and terms pages to remove unnecessary suffixes, enhancing SEO and URL consistency.
- Renamed the layout component for better clarity regarding its purpose in the marketing blocks structure.
- Replaced hardcoded locale data with a centralized website configuration structure, enhancing maintainability and consistency across components.
- Updated various components to utilize the new websiteConfig for locale flags and names, improving code clarity and reducing redundancy.
- Removed obsolete LOCALE_LIST and streamlined routing logic to align with the new configuration approach.
- Renamed variables in the pricing table and billing card components for clarity, changing 'paymentConfig' to 'pricePlans'.
- Updated the getPricePlans function to return a more explicit Record type for better type safety and maintainability.
- Enhanced the structure of price plans by consolidating translation logic within the returned plans object, improving code organization and readability.
- Updated sidebar, footer, navbar, and user button components to use new naming conventions for configuration retrieval functions, enhancing code clarity and consistency.
- Renamed functions from getSidebarConfig, getFooterConfig, getNavbarConfig, and getAvatarConfig to getSidebarLinks, getFooterLinks, getNavbarLinks, and getAvatarLinks respectively.
- Adjusted the website configuration structure to include metadata for logos and social links, improving maintainability and organization of configuration data.
- Introduced a new admin section with user management capabilities, including a dedicated AdminUsersPage.
- Updated localization files to support new admin titles in English and Chinese.
- Added routing for the admin users page and integrated it into the sidebar configuration.
- Created necessary layout and loading components for the admin section.
- Implemented a data structure for user management, enhancing the overall admin functionality.
- Added descriptive comments for the DashboardPage, DashboardHeader, DashboardSidebar, SidebarMain, and SidebarUser components to improve code readability and maintainability.
- Enhanced understanding of component purposes and functionalities through clear documentation.
- Removed the old sitemap implementation and replaced it with a new one that generates dynamic routes for categories, posts, and documentation.
- Introduced a new robots.txt handler to manage crawling rules and specify the sitemap location.
- Updated URL handling functions to improve locale support in callback URLs.
- Enhanced the content-collections.ts file by reorganizing documentation comments and reintroducing the extractLocaleAndBase function for better clarity and maintainability.
- Updated login-form.tsx, register-form.tsx, and social-login-button.tsx to utilize useLocale for dynamic callback URL generation based on the user's locale.
- Adjusted the default callback URL to include the locale, improving user experience and localization support in authentication flows.
- Enhanced middleware functionality to manage access for protected routes based on user authentication status.
- Added logic to redirect users to the login page if they attempt to access protected routes while not logged in.
- Implemented a utility function to strip locale from the pathname for better route handling.
- Updated route definitions to categorize routes that are not accessible to logged-in users and those that require authentication.
- Improved comments and logging for better traceability and understanding of middleware operations.
- Created new SQL tables for account, payment, session, user, and verification to support user management and payment processing.
- Added foreign key constraints to link account, payment, and session tables to the user table for data integrity.
- Updated journal and snapshot metadata to reflect the new schema changes.
- Added detailed logging for active subscription retrieval in get-active-subscription.ts to improve traceability.
- Updated comments in pricing-table.tsx and billing-card.tsx to better describe the purpose of price plan retrieval.
- Modified payment types in types.ts to include 'incomplete_expired' for better status handling.
- Improved logging messages in stripe.ts for clearer debugging information during payment processing.
- Replaced getPlanById with findPlanByPlanId in create-checkout-session.ts and stripe.ts for improved clarity.
- Removed unused getAllPricePlans import in pricing/layout.tsx to streamline the code.
- Updated price-plan.ts to enhance the findPlanByPlanId function and added error handling in findPriceInPlan.
- Adjusted payment-store.ts to reflect the updated price plan retrieval method.
- Updated import paths for price plan functions to use the new price-plan module for better modularity and maintainability.
- Removed redundant price plan functions from the payment module to streamline the codebase.
- Introduced a new price-plan.ts file to encapsulate price plan logic and improve code organization.
- Added TODO comments in middleware.ts, routes.ts, sitemap.ts, and routing.ts to indicate areas for future improvements, including middleware rules for protected routes, route configuration, and sitemap entries.
- Included a comment in globals.css for reference to shadcn UI theming documentation.
- Modified translation keys in avatar, footer, navbar, sidebar, and social configuration files to enhance modularity and maintainability.
- Removed redundant 'Marketing' prefix from translation keys for improved clarity and consistency across the application.
- Deleted the config.tsx file as it is no longer needed for backward compatibility.
- Updated import paths in blog-card.tsx to reference the new location of PLACEHOLDER_IMAGE in constants.ts.
- Introduced a new constants.ts file to define PLACEHOLDER_IMAGE for improved modularity and maintainability.
- Introduced new configuration files for navbar, footer, avatar, sidebar, social links, and payment plans to enhance modularity and maintainability.
- Updated import paths across the codebase to reference the new configuration files.
- Removed deprecated functions and streamlined the config.tsx file for better organization.
- Moved website configuration to a new file for better modularity and maintainability.
- Updated import paths across the codebase to reference the new website configuration location.
- Removed the old website configuration from the config.tsx file to streamline the codebase.
- Introduced new pricing plans (Free, Pro, Lifetime) with detailed descriptions and features in both English and Chinese.
- Updated payment configuration to include new plans and their pricing structures.
- Refactored payment-related functions to retrieve pricing plans consistently across the application.
- Enhanced the PricingTable component to dynamically display available plans based on the new configuration.
- Removed deprecated payment configuration file to streamline the codebase.
- Changed import paths for StorageError to use the correct types module across storage-related API routes.
- Renamed functions in storage/index.ts for clarity, updating getStorageProvider and initializeStorageProvider to better reflect their functionality.
- Streamlined API endpoint constants for improved readability and maintainability in storage operations.
- Updated mail provider functions to improve naming consistency and clarity, renaming initializeMailProvider to getMailProvider and vice versa.
- Enhanced README documentation for both mail and newsletter modules to reflect structural changes and clarify usage.
- Streamlined imports and exports in mail and newsletter files for better organization.
- Added error handling in ResendNewsletterProvider constructor to ensure required environment variables are set.
- Removed deprecated code and unnecessary type exports to simplify the codebase.
- Merged sendTemplate and sendRawEmail functions into a single sendEmail function for improved clarity and maintainability.
- Introduced getTemplate function to handle rendering of email templates with context and locale.
- Updated EmailTemplates export to include all available templates directly in types.ts.
- Removed deprecated mail.ts and templates/index.ts files to streamline the codebase.
- Updated references from send to sendEmail in send-message.ts and auth.ts for consistency.
- Adjusted exports in mail/index.ts to reflect the new function name.
- Removed unused mail-config.ts file to streamline the mail configuration process.
- Renamed Template type to EmailTemplate for consistency across the codebase.
- Updated email template functions to use simplified translation keys.
- Removed unused MailConfig interface and adjusted default mail configuration.
- Enhanced imports in mail-related files for better organization and readability.
- Changed button class in ForgotPasswordForm and ResetPasswordForm to improve user interaction.
- Updated PricingCard to replace Check icon with CheckCircleIcon for better visual representation.
- Enhanced PricingTable logic to filter out disabled plans and prices, ensuring only available options are displayed.
- Added comments in payment types to clarify when to disable plans and prices for existing users.
- Introduced userId parameter in createCheckoutAction and createPortalAction for improved user-specific session management.
- Updated components to pass userId instead of customerId, aligning with the new payment structure.
- Added new actions to retrieve active subscription and lifetime status, ensuring users can check their subscription details securely.
- Created SQL migration for new payment-related tables, establishing a robust foundation for payment management.
- Enhanced error handling and logging in payment actions for better debugging and user feedback.
- Removed commented-out code in BillingPage to enhance readability.
- Updated CheckoutButton to always refetch session data for accurate user information.
- Streamlined console log statements in BillingCard for better clarity.
- Adjusted comments in BillingCard to provide clearer context on button visibility based on user status.
- Refactored usePayment hook to fetch payment data whenever the user session changes, improving data accuracy.
- Enhanced getCustomerSubscriptionAction to return the most recent active or trialing subscription when multiple subscriptions exist.
- Simplified UpgradeCard component by removing the user prop and directly utilizing the payment hook for current plan checks.
- Updated CustomerPortalButton to use 'default' variant instead of 'outline'.
- Refactored PricingTable to accept currentPlan instead of currentPlanId for improved clarity.
- Adjusted BillingCard to streamline error handling and utilize currentPlan for determining user status.
- Renamed ListCustomerSubscriptionsParams to getCustomerSubscriptionsParams for clarity.
- Updated listCustomerSubscriptions method in StripeProvider to getCustomerSubscriptions, improving consistency in naming.
- Adjusted method implementations to reflect the new naming conventions, enhancing code readability and maintainability.
- Made customerId in the payment schema mandatory to ensure data integrity.
- Updated Subscription interface to make currentPeriodStart optional and replaced canceledAt with trialStartDate for better clarity.
- Refactored listCustomerSubscriptions method in StripeProvider to fetch subscriptions from the database instead of Stripe API, enhancing performance and maintainability.
- Added a new private method to map Stripe subscription status to the application's PaymentStatus for improved status handling.
- Added new SQL migration to create "account", "payment", "user", and "verification" tables, establishing a foundational structure for payment management.
- Updated existing codebase to replace subscription references with payment, including hooks, providers, and actions.
- Refactored components to utilize the new payment system, enhancing clarity and maintainability.
- Removed deprecated subscription provider and related logic, streamlining the payment handling process.
- Enhanced error handling and logging for improved debugging in payment management.
- Renamed SubscriptionTypes to PaymentTypes to better reflect the payment model.
- Updated references in getUserLifetimeStatus action and StripeProvider to use the new PaymentTypes enum.
- Adjusted type definitions in payment/types.ts for clarity and consistency in payment handling.
- Enhanced comments to clarify the purpose of payment types and their usage in the codebase.
- Introduced a new column "type" in the "subscription" table to differentiate between subscription types (one-time and recurring).
- Updated existing records to set the "type" based on the presence of "subscription_id".
- Modified the "interval" column to allow null values.
- Updated SQL snapshots and journal to reflect the new migration versions.
- Enhanced the getUserLifetimeStatus action to utilize the new subscription type logic for better membership status checks.
- Added userId to metadata in createCheckoutAction for improved webhook event processing.
- Updated StripeProvider to handle userId and planId from session metadata, enhancing subscription management.
- Introduced 'paused' status in PaymentStatus type for better subscription state representation.
- Improved comments for clarity in metadata handling and subscription status conversion.
- Replaced instances of `authSession` with `session` for consistency across actions.
- Removed unused `getCustomer` function and related types from payment module to streamline codebase.
- Enhanced `createOrGetCustomer` method to simplify customer creation logic.
- Updated metadata handling in checkout session creation for improved clarity and maintainability.
- Created SQL migration to drop unique constraint and columns from the user table.
- Updated journal and snapshot metadata to reflect the new migration version.
- Refactored user schema to remove the lifetimeMember field, aligning with the new subscription management logic.
- Enhanced getUserLifetimeStatus action to utilize updated subscription data structure.
- Implemented getUserLifetimeStatus action to retrieve user's lifetime membership status from the database.
- Updated subscription store to check lifetime membership status against the database if session data is outdated.
- Enhanced error handling and logging for better debugging in the subscription management process.
- Added console logs for tracking user session and lifetime status checks in billing components.
- Added SubscriptionProvider to manage subscription state and initialize it on app load.
- Integrated useSubscription hook for accessing subscription data across components.
- Updated NavUser and UserButton components to reset subscription state on sign out.
- Refactored BillingCard to utilize the new subscription logic, improving clarity and performance.
- Enhanced UpgradeCard to conditionally render based on subscription status.
- Renamed variables for clarity, changing `isLifetimeMember` to `isLifetimePlan` and `canUpgrade` logic to improve readability.
- Added localization support for the price label in both English and Chinese.
- Optimized the UI to conditionally display messages for free and lifetime plans, enhancing user experience.
- Commented out console log statements in createCheckoutSession, createCustomerPortalSession, getUserSubscription, PricingCard, and CheckoutButton for cleaner output.
- Updated the reset-password-form to optimize the token validation check with a clearer comment.
- Replaced instances of productId with priceId in PricingCard, BillingCard, and payment utility functions for consistency.
- Updated the Price interface in types.ts to reflect the change from productId to priceId.
- Adjusted payment configuration to use priceId instead of productId for better clarity and alignment with Stripe's API.
- Introduced a new email template for contact messages, including localization for English and Chinese.
- Updated the send-message action to utilize the new contact message template and added locale support.
- Enhanced the contact form validation schema and improved code formatting for consistency.
- Introduced a new "interval" column in the "subscription" table to store subscription intervals.
- Updated the journal and snapshot metadata to reflect the new schema version and changes.
- Adjusted the schema definition to include the new column for better subscription management.
- Introduced new database tables for managing subscriptions and user subscriptions.
- Updated package.json with new database commands for generation, migration, and studio.
- Refactored the user schema to remove deprecated fields and added foreign key relationships.
- Enhanced Stripe payment provider logic to handle subscription creation, updates, and cancellations.
- Improved error handling and logging for subscription events.
- Added locale parameter to the createCustomerPortal function for better localization support.
- Simplified the membership check in the UpgradeCard component to only consider lifetime membership.
- Updated billing card logic to fetch subscription data based on lifetime membership status.
- Added new localization keys for billing management in English and Chinese message files.
- Updated the sidebar to include a billing link.
- Refactored the billing card component to improve loading state handling and user session management.
- Enhanced subscription fetching logic to include better error handling and logging.
- Adjusted the upgrade card visibility based on user membership status.
- Added new localization keys for email and password requirements in English and Chinese message files.
- Refactored page retrieval logic by replacing `getCustomPage` with `getPage` in cookie, privacy, and terms of service policy pages.
- Removed the unused `schemas.ts` file.
- Deleted the `ISSUES.md` file as it contained outdated information.
- Updated image paths in various components to remove the `/images` prefix for consistency.
- Removed unnecessary `items` segment path in internationalization messages for settings.
- Updated localization keys in the English and Chinese files for consistency and clarity.
- Changed key `authorIntroduction` to `introduction` in English and Chinese localization files for consistency.
- Added email validation message to the newsletter form.
- Restored the `NotFoundPage` section in the Chinese localization file.
- Cleaned up commented-out AI tools section in the sidebar configuration.
- Updated `DashboardSidebar` to use the `Routes` enum for improved routing clarity.
- Renamed `getNavMainLinks` to `getSidebarLinks` for improved clarity in the configuration file.
- Updated the `DashboardSidebar` component to utilize the new `getSidebarLinks` function and integrated `useCurrentUser` for user status handling.
- Enhanced the sidebar to conditionally display the upgrade card and user profile based on membership status.
- Updated comments for better understanding of the code functionality.
- Removed unnecessary parameter handling in `BillingLayout`, `NotificationsLayout`, `ProfileLayout`, and `SecurityLayout` for cleaner code.
- Renamed `SettingsBillingPage` to `BillingPage` and `SettingsNotificationPage` to `NotificationPage` for improved clarity and consistency.
- Added new loading components for marketing legal and pages sections to enhance user experience during data fetching.
- Cleaned up commented-out code in the blog category metadata generation for better maintainability.
- Added new `BillingLayout`, `NotificationsLayout`, `ProfileLayout`, and `SecurityLayout` components to structure the respective settings pages.
- Introduced loading components for each section to enhance user experience during data fetching.
- Refactored `SettingsBillingPage`, `SettingsNotificationPage`, `ProfilePage`, and `SecurityPage` to utilize the new layouts, improving code organization and readability.
- Updated `DashboardHeader` to ensure consistent breadcrumb navigation across settings pages.
- Updated `LoginForm`, `RegisterForm`, and `SocialLoginButton` components to accept and utilize a `callbackUrl` prop for improved redirection after authentication.
- Removed the `showSocialLoginButton` prop from `AuthCard` as social login functionality is now integrated directly within the forms.
- Enhanced `LoginWrapper` to append the `callbackUrl` as a query parameter in the routing logic.
- Improved logging for better debugging and user feedback during authentication processes.
- Moved common authentication messages to a new `common` namespace in English and Chinese translation files for better organization.
- Updated `LoginPage`, `RegisterPage`, and various form components to utilize the new translation keys.
- Enhanced loading indicators in `ForgotPasswordForm`, `LoginForm`, `RegisterForm`, and `ResetPasswordForm` components for improved user feedback.
- Refactored `SocialLoginButton` and `NavbarMobile` components to utilize the current user context for better user experience.
- Introduced a new `LoginWrapper` component to manage user authentication through modal or redirect modes.
- Integrated responsive design using media queries to control modal visibility based on device type.
- Updated routing logic to close the modal on route changes and handle login actions effectively.
- Refactored existing components to utilize the new `LoginWrapper` for improved user experience in authentication flows.
- Replaced instances of `useRouter` with `useLocaleRouter` for consistent locale handling across components.
- Added locale parameter to the `createCheckoutAction` for improved localization support during checkout.
- Refactored `ForgotPasswordForm`, `LoginForm`, and `RegisterForm` components to optimize state management and remove redundant code.
- Updated `CheckoutButton` and `CustomerPortalButton` components to improve error logging and user feedback.
- Introduced a new `formatPrice` and `formatDate` utility functions in the `formatter` module for better code reuse.
- Cleaned up the `BillingCard` component by removing inline utility functions and utilizing the new formatter functions.
- Updated `StripeProvider` to handle locale in checkout session creation and improved error handling for better debugging.
- Added user email to metadata in the `createCheckoutAction` for improved user tracking during checkout.
- Updated `PricePlan` interface to remove commented-out properties and clarify the `isLifetime` field.
- Refactored payment configuration to ensure `isLifetime` is consistently defined across plans.
- Improved error logging messages in the `StripeProvider` for better debugging and user feedback.
- Renamed the webhook handler method for clarity in the `StripeProvider`.
- Adjusted padding and font size in the PricingTable component for improved UI consistency.
- Removed the `registerWebhookHandler` function and related comments from the payment module to streamline the codebase.
- Updated README to reflect changes in webhook functionality, emphasizing the use of the default handler in the Stripe provider.
- Cleaned up unused type definitions related to webhook event handling in the types module.
- Introduced a new column `subscription_status` to the user table for improved subscription management.
- Updated the user schema in the database to reflect this change.
- Added a new migration file and snapshot for versioning.
- Updated the StripeProvider to handle subscription status updates in webhook events.
- Introduced new columns `subscription_id` and `lifetime_member` to the user table for enhanced subscription management.
- Updated the user schema in the database to reflect these changes.
- Refactored actions to utilize the new user fields for better subscription handling.
- Enhanced error handling and logging in relevant actions for improved user feedback.
- Updated translations to include new messages related to subscription status and lifetime access.
- Added loading messages in English and Chinese translations for better user feedback during checkout and customer portal actions.
- Updated `CheckoutButton` and `CustomerPortalButton` components to utilize new translation keys for loading states and error messages.
- Refactored `PricingCard` and `PricingTable` components to incorporate translated text for pricing details and actions, improving localization support.
- Updated success and cancel URLs in checkout session and customer portal session actions for consistency.
- Removed PaymentCancelPage and PaymentSuccessPage components to streamline the payment process.
- Refactored PricingCard component to improve link handling for free plans.
- Added logging for user customer ID in BillingCard for better debugging.
- Updated English and Chinese translations for the PricingPage, adding a subtitle for clarity.
- Refactored the PricingPage layout to include a HeaderSection for improved presentation.
- Modified PricingCard component to handle optional interval and payment type parameters.
- Enhanced PricingTable component styling and logic for better user experience.
- Updated `create-checkout-session` to require user login before checkout and added user ID and name to metadata.
- Removed email parameter from checkout actions and components to streamline the process.
- Refactored `CheckoutButton`, `PricingCard`, and `PricingTable` components to eliminate email handling.
- Improved `CreateCheckoutParams` to enforce customer email as a required field.
- Updated payment configuration to utilize enums for payment types and intervals for better maintainability.
- Renamed translation keys for password setup to reset for clarity in English and Chinese.
- Added new `getUserBillingDataAction` for fetching user subscription data.
- Refactored `create-checkout-session` to ensure user authentication during checkout.
- Updated `BillingCard` to utilize the new billing data fetching logic and improved error handling.
- Modularized profile settings components by updating import paths for better organization.
- Enhanced `CheckoutButton` to initiate checkout sessions with improved user feedback.
- Renamed password management keys in translation files for clarity.
- Added new translation keys for saving and cancel actions in both English and Chinese.
- Refactored the DeleteAccountCard component to utilize a new PasswordCardWrapper for better modularity.
- Updated UpdatePasswordCard to enhance user feedback and maintain consistency in translation usage.
- Removed unnecessary client directive from billing page for improved performance.
- Renamed SettingsAccountPage to SettingsProfilePage for better clarity in profile settings.
- Introduced a new `DynamicCodeBlock` component for interactive code examples.
- Updated documentation structure by creating a `lazy` module for dynamic imports of components.
- Removed the deprecated `UiOverview` component to streamline the documentation.
- Enhanced image handling in `CustomMDXContent` with a new `ImageZoom` integration for better user experience.
- Added a new `Wrapper` component for consistent styling across documentation elements.
- Refactored checkout session creation to enhance error handling and logging.
- Updated payment types and intervals to use enums for better clarity and maintainability.
- Improved pricing card and table components to utilize new payment type constants.
- Adjusted pricing amounts for subscription plans to reflect updated pricing structure.
- Enhanced user feedback for error scenarios during checkout and customer management.
- Added pagination size and related posts size configurations to the website config.
- Updated blog components to utilize the new pagination settings.
- Introduced a new feature to display related posts on individual blog pages, improving user engagement.
- Added new translations for "More Posts" in English and Chinese.
- Replaced `groupId` prop with `items` prop in `<Tabs>` components across multiple MDX files for consistency.
- Added `<Tab>` components for "Fumadocs MDX" and "Content Collections" in relevant sections to enhance content organization.
- Improved code readability and maintainability by structuring tab content more clearly.
- Introduced new author files for "Fox" in both English and Chinese with associated avatar images.
- Updated existing author names.
- Added new blog documentation files covering various topics, including "Fumadocs" and "Search" in both English and Chinese.
- Updated existing blog metadata, including authors and publication dates, to reflect recent changes and improve content organization.
- Introduced `extractLocaleAndBase` function to streamline locale and base name extraction from filenames.
- Added new blog documentation files covering comparisons, internationalization, manual installation, and markdown usage in both English and Chinese.
- Removed outdated author and blog content files to enhance content organization and clarity.
- Updated `content-collections.ts` to utilize the new locale extraction function for improved file handling.
- Updated multiple components to utilize CustomMDXContent, allowing for better integration of Fumadocs components.
- Removed direct imports of MDXContent and defaultMdxComponents, streamlining the content rendering process.
- Introduced CustomMDXContent in a new shared component file to encapsulate common MDX functionalities.
- Introduced multiple new MDX files covering various topics including comparisons, customization, internationalization, manual installation, markdown usage, and component documentation.
- Enhanced the overall structure and organization of the documentation to improve user experience and accessibility.
- Added a meta JSON file to define the documentation structure and navigation.
- Implemented new layout files for different document types, improving the flexibility of the documentation framework.
- Introduced `cleanup-old-content.js` for backing up and cleaning up old content directories.
- Added `migrate-content.js` to facilitate the migration of content types across locales.
- Created new author and blog content files in both English and Chinese, enhancing the content structure.
- Updated `content-collections.ts` to reflect new slug formats for authors.
- Added new category files for better content organization.
- Included privacy, cookie, and terms of service pages in both languages.
- Implemented initial release notes for versioning.
- Deleted the fumadocs-twoslash dependency from package.json and pnpm-lock.yaml.
- Updated accordion documentation to remove unnecessary twoslash syntax.
- Cleaned up imports in the DocPage component by removing unused Popup components.
- Deleted the fumadocs-typescript dependency from package.json and pnpm-lock.yaml.
- Removed the props.ts file as it was no longer needed.
- Updated various MDX files to comment out AutoTypeTable references to props.ts for better clarity and maintainability.
- Added a URL to the navigation in the DocsRootLayout for better routing.
- Increased padding in the NewsletterCard component for enhanced visual appeal.
- Updated the NewsletterForm button class to include a cursor pointer for better user interaction.
- Updated content collections to include new schemas for better document handling.
- Added new documentation files for comparisons, customization, and internationalization.
- Introduced a manual installation guide and improved markdown support.
- Updated package.json with new dependencies for enhanced functionality.
- Added new images for documentation and improved layout components for better user experience.
- Adjusted TypeScript configurations for better path management.
- Modified the meta collection to include files with 'meta**.json' for improved matching.
- Added new translation keys for 'blog' in English and Chinese localization files.
- Updated social links in the layout to use the XTwitterIcon for consistency.
- Adjusted image paths in the features page for better organization.
- Removed unused LocaleSwitcher import from the footer component.
- Replaced font imports in the layout and font index files to use Noto and Bricolage fonts for improved typography.
- Updated global CSS variables to reflect the new font settings.
- Enhanced author introduction in English and Chinese localization files with a greeting emoji for better user engagement.
- Adjusted heading styles in the About page for consistency.
- Changed the comment for average reading speed in content-collections.ts for clarity.
- Added a new translation key for reading time in English and Chinese localization files.
- Updated the BlogPostPage to utilize the new translation key for displaying estimated reading time, improving user experience and localization support.
- Changed the prose class to prose-neutral in blog post and custom page components for improved typography consistency.
- Added a comment in the blog post page to clarify the necessity of the prose class for MDX styling.
- Enhanced the table of contents component with line-clamp for better text handling.
- Replaced <Image> component with <img> tag in multiple MDX files to standardize image rendering.
- Updated alt text in the Chinese blog post for improved accessibility.
- Replaced the custom Mdx component with MDXContent from @content-collections/mdx/react for improved MDX processing.
- Updated content handling in various legal and blog pages to directly use the transformed body from content collections.
- Introduced estimated reading time calculation in the posts collection for better user experience.
- Added a new mdx.css file for consistent styling across MDX components.
- Removed the obsolete shared mdx-component file to reduce redundancy.
- Translated the title and paragraphs in multiple .mdx files from Chinese to English for consistency and clarity.
- Adjusted the layout.tsx to change the font class for improved typography.
- Enhanced the Providers component with detailed comments for better understanding of the provider structure.
- Replaced isSubmitting state with useTransition for improved form submission handling in ContactFormCard and WaitlistFormCard components.
- Updated form submission logic to handle errors more effectively and provide user feedback through toast notifications.
- Adjusted button states to reflect pending submissions, enhancing user experience during form interactions.
- Modified styling in mdx-component to use 'text-primary' for anchor elements, ensuring consistent theming across the application.
- Updated English and Chinese translation files to nest mode-related entries for better clarity.
- Adjusted components to utilize the new translation structure, enhancing accessibility and maintainability.
- Ensured consistent usage of translation keys across ModeSwitcher and ThemeSelector components.
- Refactored theme-related translations in English and Chinese to a nested structure for better organization.
- Updated the default theme in the configuration to "default" for consistency.
- Enhanced the WaitlistPage and Newsletter components with improved descriptions and error handling.
- Integrated the NewsletterCard component into the BlogPostPage for better user engagement.
- Adjusted the ThemeSelector to utilize the new translation structure for theme names.
- Improved styling and layout in the NewsletterForm for a better user experience.
- Introduced PreContext to track whether the code component is inside a pre element, improving styling logic.
- Updated heading components (h3, h4, h5, h6) to use 'font-medium' instead of 'font-semibold' for consistent typography.
- Adjusted code component styling to conditionally apply background based on context, enhancing visual clarity.
- Commented out the <Cards> component in index.mdx and introduction.mdx for clarity.
- Added new translation entries for "homepage" and "title" in both English and Chinese message files.
- Refactored layout.tsx to include a new baseOptions configuration for improved layout management and theme support.
- Integrated ModeSwitcher and Logo components into the layout for enhanced user experience.
- Updated page.tsx to prepare for potential Mdx component integration.
- Added new mode switcher components for both horizontal and dropdown layouts to facilitate theme toggling.
- Updated translation files to include new theme-related entries in English and Chinese.
- Refactored existing components to replace ThemeSwitcher with ModeSwitcher for consistency.
- Introduced new themes in the configuration and updated the theme selector to utilize translations for theme names.
- Enhanced global styles to support new themes and ensure proper application across the project.
- Updated ISSUES.md to reflect a new issue regarding page layout shifting when navigating between docs and the homepage.
- Changed permissions for several image files to ensure proper access and usage.
- Added new SVG files for enhanced iconography in the project.
- Un-commented the TailwindIndicator component in layout.tsx to ensure it is rendered for styling purposes.
- Updated the login button in login-form.tsx to include a cursor-pointer class for better user experience when hovering over the button.
- Introduced new translation entries for the DocsPage, including Table of Contents, search functionality, last update information, and pagination controls in both English and Chinese.
- Refactored layout.tsx to utilize dynamic translations from the message files, enhancing internationalization support and maintainability.
- Refactored the locales array in layout.tsx to dynamically generate language options from LOCALE_LIST for improved maintainability and consistency with internationalization practices.
- Removed hardcoded locale entries to streamline the code and enhance flexibility in supporting additional languages.
- Added a guideline to use `pnpm` as the default package manager in TypeScript best practices.
- Refactored the search API route to improve readability by simplifying the mapping of pages to search indexes.
- Wrapped the GET handler with locale detection from the referer header and ensured the locale parameter is passed to the search API for better internationalization support.
- Added generateStaticParams function in page.tsx to support dynamic locale and slug parameters for improved routing.
- Included console logging in the search API route for better debugging and visibility of search index data.
- Updated content-collections.ts to clarify usage for Fumadocs.
- Added new ISSUES.md file to track known issues.
- Introduced @orama/orama and @orama/tokenizers dependencies in package.json for improved search functionality.
- Enhanced search API route to support internationalization and custom tokenizers for Chinese.
- Added new introduction and documentation files in both English and Chinese.
- Removed outdated test.mdx file to streamline documentation.
- Improved error handling and metadata generation in page.tsx for better user experience.
- Updated documentation links in content-collections.ts for accuracy.
- Modified index.mdx and test.mdx files to improve content structure and clarity.
- Added new Chinese documentation file (index.zh.mdx) to support localization.
- Enhanced layout.tsx to include translations for English and Chinese.
- Updated page.tsx to handle locale parameters for improved routing.
- Refactored source.ts to streamline imports and maintain consistency.
- Added a new layout configuration for documentation with internationalization support.
- Created a dedicated DocsRootLayout and associated providers for better structure.
- Updated middleware to refine route handling for documentation.
- Removed outdated layout configurations and components to streamline the codebase.
- Enhanced localization support for documentation in English and Chinese.
- Introduced new content collections for documentation and metadata using Fumadocs.
- Created initial documentation files and layout for the docs section.
- Updated routing and middleware to support the new docs structure.
- Enhanced localization support by adding new entries for documentation in English and Chinese.
- Implemented a new API route for search functionality within the documentation.
- Removed unnecessary checks in locale handling functions across NavUser, LocaleSelector, and LocaleSwitcher components to simplify the code.
- Adjusted padding in NavbarMobile component for improved layout consistency and user experience.
- Changed import path for Pricing component in HomePage to utilize the new preview structure.
- Adjusted layout in ContactPage and WaitlistPage by adding bottom padding for improved spacing.
- Modified HeroSection component to enhance layout with consistent padding.
- Cleaned up commented-out code in BlockPreview and Navbar components for better readability and maintainability.
- Added a new route for blocks to improve navigation structure.
- Fixed locale inconsistency in BlocksNav component by removing custom locale handling.
- Implemented checks in locale selector components to prevent unnecessary locale updates.
- Updated comments to reflect changes and improve code clarity.
- Replaced imports in HomePage component to utilize new preview paths for better organization.
- Updated Features and Pricing components to align with the new structure.
- Wrapped CallToAction component in a div for improved layout consistency.
- Commented out unused HeroHeader in the HeroSection component for clarity.
- Updated Chinese translations in zh.json to include spaces between words and components for improved readability.
- Enhanced BlocksNav component to correctly handle locale from URL parameters, ensuring accurate navigation across different locales.
- Commented out unused imports in blocks.ts for clarity and to prevent confusion.
- Moved BlockCategoryPageProps interface definition to improve code structure.
- Refactored BlockPreview component to utilize useCopyToClipboard hook for better clipboard functionality.
- Cleaned up commented-out code and improved readability in the BlockPreview component.
- Disabled development indicators in next.config.ts for cleaner output.
- Updated English and Chinese message files to include new block titles for logo, login, signup, and contact sections.
- Refactored routes to include new paths for login, signup, and contact blocks.
- Introduced new layout and page components for marketing sections, including logo cloud and various call-to-action pages.
- Enhanced blocks navigation component to utilize updated paths and improve user experience.
- Introduced a new layout for category pages to enhance navigation and organization of blocks.
- Added a block preview component to display various UI blocks dynamically based on category.
- Updated routes to reflect the new structure for hero blocks.
- Refactored existing hero section components to utilize the new block structure for improved modularity.
- Updated import paths for marketing components to a new directory structure under 'sections'.
- Removed the deprecated features page and replaced it with a new structure for content and sections.
- Added new sections for call-to-action, content, FAQs, features, hero, pricing, stats, and testimonials to enhance the marketing layout.
- Introduced multiple new components for better organization and modularity in the marketing section.
- Updated import statements across multiple files to use consistent semicolon usage.
- Enhanced component structure by ensuring proper formatting and return statements.
- Improved readability and maintainability of the codebase by adhering to coding standards.
- Added Cloudinary as an allowed image domain in next.config.ts for image optimization.
- Included new dependencies: react-use-measure and use-media in package.json for enhanced UI responsiveness.
- Introduced a service worker for caching iframe content to improve performance.
- Added multiple new block components and layouts for enhanced UI features and organization.
- Implemented utility functions and motion primitives for improved animations and effects.
- Integrated authentication session validation in createCheckoutAction and createPortalAction to ensure only authorized users can create sessions.
- Enhanced unsubscribeNewsletterAction with similar authentication checks for improved security and user feedback.
- Updated drizzle configuration to use the Neon HTTP driver for improved compatibility with Next.js.
- Added @neondatabase/serverless package to package.json for serverless database support.
- Modified database connection logic to utilize the new Neon client.
- Removed deprecated customer creation method in StripeProvider for cleaner code.
- Added functionality to create or get a Stripe customer based on email, improving user experience during checkout.
- Implemented robust error handling for updating user records with customer IDs.
- Updated README to reflect new actions for creating checkout sessions and customer portal sessions.
- Added actions for checking newsletter subscription status, subscribing, and unsubscribing.
- Introduced actions for creating checkout and customer portal sessions with validation.
- Replaced deprecated newsletter actions in components with new implementations.
- Enhanced error handling and logging for all new actions to improve user feedback.
- Renamed "Site" to "Metadata" in translation files for clarity.
- Updated the title, tagline, and description in both English and Chinese translations to reflect the new branding.
- Adjusted references in various components to use the updated metadata structure.
- Removed the obsolete site.webmanifest file and updated the manifest path in the metadata construction.
- Added new icons (CircleUserRoundIcon and LockKeyholeIcon) to the main navigation links for better visual representation.
- Introduced a new data.json file to centralize dashboard data management, improving organization and modularity.
- Updated the dashboard page to correctly import the new data source.
- Enhanced the billing settings page layout with additional spacing and descriptions for better user guidance.
- Improved mobile navbar styles for a more consistent user experience.
- Refactored billing card component to streamline the display of subscription plans and billing history.
- Renamed account settings to profile in English and Chinese translations for clarity.
- Updated routing and component references to reflect the new profile terminology.
- Removed the multilingual blog documentation as it is no longer needed.
- Enhanced the profile settings page with appropriate translations and layout improvements.
- Added descriptions for AI Text, Image, Video, Audio tools in English and Chinese translations to improve user guidance.
- Introduced a loading component for better user experience during data fetching in the dashboard.
- Refactored AI tool pages to utilize updated translations and improved layout for consistency across the application.
- Updated Chinese translation for password hint to improve clarity.
- Added rounded styling to the logo in the dashboard sidebar for better aesthetics.
- Replaced loading state with a skeleton card in the password update component to enhance user experience during data fetching.
- Adjusted skeleton card dimensions for improved visual consistency.
- Introduced a new Security settings page with options for password management and account deletion.
- Updated English and Chinese translations to include new terms for saving, canceling, and security settings.
- Enhanced navigation by adding a link to the Security settings in the main sidebar.
- Refactored existing components to utilize updated translations for consistency across the application.
- Updated English translations for password setup to remove trailing periods for consistency.
- Refactored DashboardLayout to improve spacing around children components.
- Enhanced styling in various card components (ContactFormCard, DeleteAccountCard, ResetPasswordCard, UpdateAvatarCard, UpdateNameCard, UpdatePasswordCard, NewsletterFormCard, WaitlistFormCard) to ensure consistent use of flexbox and improved layout.
- Adjusted font weight in card titles for a more uniform appearance across components.
- Added descriptions for account and notification settings in the English translation file for better user guidance.
- Updated the layout of the account and notification settings pages to improve readability and organization.
- Adjusted the Dashboard route to '/dashboard' for consistency.
- Enhanced various card components to ensure full height and improved styling.
- Introduced a loading skeleton for the password update card to enhance user experience during data fetching.
- Added a new data.json file to centralize dashboard data management.
- Refactored dashboard components to improve organization and modularity, including the introduction of ChartAreaInteractive and SectionCards.
- Updated imports in the dashboard page to reflect new component paths and data source.
- Removed deprecated dashboardv4 components to streamline the codebase.
- Enhanced the DashboardSidebar for better navigation and user experience.
- Updated AI section titles in English and Chinese translations for clarity.
- Refactored sidebar components to improve navigation structure, replacing SidebarMain with NavMain and NavUser for better modularity.
- Introduced SidebarUpgradeCard to promote upgrade options within the sidebar.
- Adjusted DashboardLayout and DashboardHeader for improved styling and responsiveness.
- Removed deprecated SidebarMain component to streamline the codebase.
- Changed the Dashboard route to '/dashboardv4' for versioning clarity.
- Improved styling in BlogCategoryListDesktop and BlogCategoryListMobile for better user interaction with cursor styles.
- Added cursor pointer to various components including SidebarUser, LocaleSelector, and ThemeSwitcher for enhanced usability.
- Updated global CSS variables for improved color consistency across the application.
- Adjusted layout and styling in AuthCard, LoginForm, RegisterForm, and SocialLoginButton for improved alignment and responsiveness.
- Updated icon sizes in various components to maintain uniformity.
- Enhanced Card components in ContactFormCard, DeleteAccountCard, ResetPasswordCard, UpdateAvatarCard, UpdateNameCard, UpdatePasswordCard, and NewsletterFormCard with consistent padding and margin.
- Refined Navbar and BackButtonSmall for better user interaction with cursor styles.
- Removed unused CSS variables from globals.css to streamline styles.
- Deleted the `mdx.css` file as it contained redundant styles.
- Added new MDX styles directly into `globals.css` for improved organization and maintainability.
- Updated legal pages to remove the import of the now-deleted `mdx.css`, streamlining the codebase.
- Replaced font class in `LocaleLayout` with `fontDMSans` for improved typography consistency.
- Enhanced paragraph, list, and list item components in `mdx-component` to include `text-muted-foreground` for better readability.
- Added a `strong` component to `mdx-component` for semantic emphasis with appropriate styling.
- Updated global CSS import to use `theme.css` for unified theming across the application.
- Replaced existing font imports with new Google Fonts (DM Sans, DM Mono, DM Serif Text) for improved typography.
- Updated Tailwind configuration to reflect the new font variables and added a new heading font style.
- Adjusted layout component to utilize the updated font classes, enhancing overall design consistency.
- Updated the `UserAvatar` component to require a non-optional `image` prop, enhancing type safety.
- Simplified the usage of `UserAvatar` in `SidebarUser` and `UserButton` components by removing unnecessary nullish coalescing.
- Improved code clarity and consistency in user-related components by ensuring direct access to user properties.
- Introduced a comprehensive newsletter module for managing subscriptions, including functions to subscribe, unsubscribe, and check subscription status.
- Created a `ResendNewsletterProvider` class to handle interactions with the Resend API, improving modularity and code organization.
- Re-exported relevant types for better accessibility and convenience.
- Added a README file detailing usage, configuration, and advanced features of the newsletter module.
- Implemented automatic configuration using environment variables and provided a programmatic configuration option.
- Introduced a new S3Provider class for managing file uploads, deletions, and presigned URL generation with Amazon S3.
- Refactored existing storage functions to utilize the new provider, improving modularity and code organization.
- Re-exported types for better accessibility and convenience.
- Implemented robust error handling for storage operations, ensuring clear error messages for configuration and upload issues.
- Updated the storage configuration to support S3-compatible services, enhancing flexibility.
- Added locale handling to email sending functions, allowing for localized URLs in reset password and verification emails.
- Introduced a new utility function `addLocaleToUrl` to append locale to callback URLs in authentication flows.
- Refactored the email sending process to utilize a mail provider interface, supporting both templated and raw email sending.
- Created a comprehensive README for the email system, detailing usage, configuration, and available templates.
- Established a default mail configuration for improved email management.
- Updated English and Chinese localization files to include detailed billing and subscription management messages.
- Introduced new payment actions for creating checkout and customer portal sessions.
- Added success and cancel pages for payment processing.
- Implemented a billing card component to manage subscriptions and payment methods.
- Created a pricing table component to display available plans with interval selection.
- Established a Stripe webhook handler for processing payment events.
- Refactored existing components to integrate new payment functionalities and improve user experience.
- Replaced primary color references with foreground color for hover and focus states in Navbar and MainMobileMenu components.
- Adjusted padding in the mobile menu's bottom buttons for better layout consistency.
- Switched the global CSS import from theme.css to theme-blue.css for updated styling.
- Removed the custom translation function and replaced it with `useTranslations` from `next-intl` for better integration with localization.
- Updated `getMenuLinks`, `getFooterLinks`, `getAvatarLinks`, and `getSidebarMainLinks` functions to eliminate the need for passing a translation function as a parameter.
- Simplified the `SidebarMain`, `Footer`, `Navbar`, and `UserButton` components to directly utilize the updated link retrieval functions, enhancing code clarity and maintainability.
- Updated English and Chinese localization files to improve newsletter subscription labels and team references.
- Renamed route for notifications from `SettingsNotification` to `SettingsNotifications` for consistency.
- Refactored `DashboardPage`, `SettingsBillingPage`, and `SettingsAccountPage` to streamline layout and improve responsiveness.
- Introduced `SettingsNotificationPage` to handle notification settings with a dedicated component.
- Enhanced various settings components to accept `className` props for better styling flexibility.
- Added new API routes for uploading files, generating pre-signed URLs, and retrieving file URLs using AWS S3.
- Implemented error handling for storage operations, including custom error classes for better clarity.
- Updated localization files to include success and failure messages for avatar updates.
- Enhanced the `UpdateAvatarCard` component to support file uploads directly from the browser, improving user experience.
- Updated error message display in `ForgotPasswordForm`, `LoginForm`, `RegisterForm`, and `ResetPasswordForm` to use `ctx.error.message` instead of `ctx.error.statusText`, providing clearer feedback to users on authentication errors.
- Changed the hero section title and description to better reflect the MkSaaS offering.
- Updated the user button to use `replace` instead of `push` for navigation after sign out, ensuring a smoother user experience.
- Modified the delete account card to also use `replace` for navigation after account deletion, enhancing consistency in routing behavior.
- Updated Chinese localization file to include a new "cancel" message for improved user experience during account deletion.
- Adjusted `DeleteAccountCard` footer styling for better alignment and spacing of buttons.
- Modified `auth.ts` to disable freshness check for user deletion, ensuring smoother account removal process.
- Introduced `ResetPasswordCard` component to guide users who signed up with social providers in setting up a password through the forgot password flow.
- Updated `ConditionalUpdatePasswordCard` to conditionally render `ResetPasswordCard` for users without a credential provider but with an email.
- Enhanced localization files to include new messages for the password setup process in both English and Chinese.
- Implemented email pre-filling in the forgot password form based on URL parameters for improved user experience.
- Replaced `UpdatePasswordCard` with `ConditionalUpdatePasswordCard` in `SettingsAccountPage` to ensure the password update option is only available for users with a credential provider.
- Added `ConditionalUpdatePasswordCard` component to handle the logic for checking user credentials and rendering the password update form accordingly.
- Updated documentation in `UpdatePasswordCard` to clarify its usage and the need for credential providers.
- Adjusted `AuthCard` to enhance readability by formatting the `CardContent` section.
- Simplified the `DividerWithText` component by removing unnecessary padding.
- Updated `MainMobileMenu` to improve layout consistency with adjusted padding and spacing.
- Replaced `Dialog` with `AlertDialog` in `DeleteAccountCard` for better user experience and consistency in alert handling.
- Enhanced error message display logic in `DeleteAccountCard` for improved clarity.
- Replaced instances of `user.username` with `user.name` in `SidebarUser`, `UserButton`, and `UpdateNameCard` components for consistency and clarity.
- Adjusted the default values in the form handling to reflect the change from username to name.
- Updated comments in `auth.ts` to clarify the implementation status of username support.
- Replaced `pageTranslations` with `pt` for improved clarity in localization across multiple pages including About, Changelog, Contact, Waitlist, Blog, Pricing, and Auth pages.
- Enhanced maintainability by standardizing the variable naming for translation functions.
- Updated English and Chinese localization files to nest waitlist form messages under a `form` object for better organization.
- Adjusted `WaitlistFormCard` component to utilize the new message structure, enhancing clarity and maintainability of the code.
- Added `contactAction` to handle contact form submissions, including validation using Zod.
- Integrated email sending functionality to notify the configured recipient upon form submission.
- Updated `ContactFormCard` to utilize the new action, providing user feedback through toast notifications.
- Enhanced error handling for email sending failures and improved logging for better debugging.
- Updated `websiteConfig` to include the recipient email address for notifications.
- Introduced a new `SettingsNotificationPage` component for managing newsletter subscriptions.
- Added `NewsletterFormCard` to handle subscription status with user feedback through toast notifications.
- Implemented `isSubscribedAction` to check user subscription status, enhancing user experience.
- Updated localization files to include new messages for newsletter management in English and Chinese.
- Enhanced sidebar with a new notification settings link for easy access to subscription preferences.
- Updated multiple card components (`ContactFormCard`, `DeleteAccountCard`, `UpdateAvatarCard`, `UpdateNameCard`, `UpdatePasswordCard`, and `WaitlistFormCard`) to include `overflow-hidden` for better layout management.
- Improved the structure of card titles and descriptions for better readability.
- Adjusted card footers to include `rounded-none` for consistent styling across components.
- Enhanced overall UI consistency and maintainability by refining component styles.
- Added `subscribeAction` and `unsubscribeAction` in `newsletter.ts` to handle newsletter subscriptions and unsubscriptions with validation using Zod.
- Introduced new localization messages for email validation in English and Chinese localization files.
- Updated `WaitlistFormCard` to utilize the new subscription action, improving user feedback with toast notifications.
- Replaced the alert icon in `FormError` component for better visual representation of errors.
- Updated the `index.ts` file to export the `send` function from the new `mail.ts` file, improving code organization.
- Introduced `mail.ts` to encapsulate the email sending logic, including template rendering and error handling, enhancing modularity and maintainability.
- Implemented a structured approach for sending emails with templates or direct content, streamlining the email functionality.
- Deleted the `WaitlistForm` component to streamline the codebase and improve modularity.
- Introduced a new `types.ts` file in the `mail` directory to centralize email-related type definitions, enhancing code organization and maintainability.
- Updated imports across email components to reference the new `types.ts`, ensuring consistency and clarity in type usage.
- Added new CSS variables for sidebar theming in `globals.css` to support light and dark modes.
- Removed redundant sidebar variables from individual theme files (`theme-blue.css`, `theme-green.css`, `theme-orange.css`, `theme-red.css`, `theme-rose.css`, `theme-violet.css`, `theme-yellow.css`, `theme-zinc.css`, and `theme.css`) to streamline styling and ensure consistency.
- Improved overall theme management for better maintainability and customization.
- Introduced several new UI components including `AlertDialog`, `AspectRatio`, `Calendar`, `Carousel`, `Command`, `ContextMenu`, `Dialog`, `DropdownMenu`, `HoverCard`, `InputOTP`, `Menubar`, `Popover`, `Progress`, `RadioGroup`, `Resizable`, `ScrollArea`, `Select`, `Slider`, `Switch`, `Table`, `ToggleGroup`, and `Toggle`.
- Updated `package.json` and `pnpm-lock.yaml` to include new dependencies for Radix UI components and other libraries.
- Improved existing components with better structure and styling, ensuring consistency across the application.
- Enhanced responsiveness and accessibility of UI elements using Tailwind CSS and Shadcn/ui.
- Added new success and failure messages for waitlist and contact form submissions in English and Chinese localization files.
- Introduced `WaitlistFormCard` component to streamline waitlist form handling and improve user feedback with toast notifications.
- Updated `ContactFormCard` to utilize new localization messages for form submission states, enhancing user experience.
- Improved structure and validation for both forms, ensuring better error handling and user guidance.
- Removed the old `ContactForm` component and integrated the new `ContactFormCard` for improved structure and validation.
- Updated `ContactPage` to utilize the new `ContactFormCard`, enhancing user experience with better form handling and error management.
- Implemented form validation using Zod and improved user feedback with toast notifications.
- Introduced `DeleteAccountCard` component for users to permanently delete their accounts, including a confirmation dialog to prevent accidental deletions.
- Updated localization files in English and Chinese to include new messages related to account deletion, enhancing user guidance and clarity.
- Improved layout of the account settings page to incorporate the new delete account functionality alongside existing update features.
- Added new success and failure messages for password updates in English and Chinese localization files.
- Updated `UpdateAvatarCard`, `UpdateNameCard`, and `UpdatePasswordCard` components to improve error handling and user feedback with toast notifications.
- Enhanced styling for the user avatar fallback icon in `UpdateAvatarCard` for better visual consistency.
- Implemented password visibility toggle functionality in the `ResetPasswordForm` component, enhancing user experience during password entry.
- Updated localization files in English and Chinese to include new messages for showing and hiding passwords.
- Ensured accessibility by providing appropriate icons and screen reader support for the password visibility toggle.
- Added password visibility toggle functionality to `LoginForm` and `RegisterForm` components, improving user experience during authentication.
- Updated localization files to include new messages for showing and hiding passwords in both English and Chinese.
- Ensured consistent styling and accessibility for the password input fields with appropriate icons and screen reader support.
- Added new localization messages for logout failure and success notifications in English and Chinese.
- Updated `SidebarUser` and `UserButton` components to display the username instead of the name for better clarity.
- Improved `UpdateNameCard` to handle username updates with appropriate success and error messages using toast notifications.
- Refactored `MainMobileMenu` to utilize the translation function directly for login and sign-up links, enhancing consistency across the application.
- Enhanced localization messages in English and Chinese for user name and password fields, adding hints for better user guidance.
- Refactored `UpdateAvatarCard`, `UpdateNameCard`, and `UpdatePasswordCard` components to improve state management and user experience.
- Updated validation hints in the `UpdateNameCard` and `UpdatePasswordCard` for clearer instructions on input requirements.
- Added a bottom border to the `DashboardHeader` for better visual separation.
- Updated `SidebarMenuButton` and `SidebarMenuSubButton` components in `SidebarMain` to include padding for improved touch target size and user experience.
- Ensured consistent styling across sidebar items for a more cohesive look.
- Revised localization messages in English and Chinese for avatar upload, name input, and password change to improve clarity and consistency.
- Adjusted the layout of `UpdateAvatarCard`, `UpdateNameCard`, and `UpdatePasswordCard` components for better user experience and responsiveness.
- Added `CardFooter` to `UpdateAvatarCard` and `UpdateNameCard` for improved information display.
- Updated validation schema for user name to reflect new minimum and maximum character requirements.
- Added `ThemeSwitcher` and `LocaleSwitcher` components to the right side of the `DashboardHeader` for improved user customization options.
- Cleaned up imports and ensured consistent formatting in the `DashboardHeader` component.
- Updated the layout to accommodate new switchers while maintaining responsiveness.
- Adjusted the maximum length for name input validation in both English and Chinese localization files from 32 to 30 characters.
- Refactored `UpdateNameCard` to initialize the form with a fallback for user name and check user existence after hooks initialization.
- Commented out the `TailwindIndicator` in the layout for potential future use.
- Introduce new components: `UpdateAvatarCard`, `UpdateNameCard`, and `UpdatePasswordCard` for managing user account settings.
- Update localization files for English and Chinese to include new fields related to avatar upload, name input, and password change.
- Refactor `SettingsAccountPage` to utilize the new components, improving code organization and user experience.
- Replace breadcrumb and sidebar trigger implementations in AI feature pages (Audio, Image, Text, Video) with a new `DashboardHeader` component for improved code reuse and consistency.
- Update localization handling for breadcrumbs in each AI feature page to enhance user navigation experience.
- Clean up imports by removing unused components related to breadcrumb and sidebar triggers.
- Refactor the `SidebarMain` component to improve active link detection and enhance user experience with collapsible menus.
- Introduce `useLocalePathname` for better path management and implement functions to check active states for sidebar items.
- Update `SidebarUser` component layout for improved readability and consistency in locale display.
- Replace `UserIcon` with `User2Icon` in the `UserAvatar` component for a more modern appearance.
- Replace the `General` and `Security` settings pages with a new `Account` settings page, updating the corresponding routes and localization files for both English and Chinese.
- Implement `useTranslations` in the new `SettingsAccountPage` to enhance localization support.
- Clean up sidebar links and remove the obsolete `SettingsGeneralPage` to streamline the settings navigation.
- Update the `SidebarMain` component to reflect the changes in settings structure.
- Introduce new pages for AI features: Audio, Image, Text, and Video, enhancing the dashboard's functionality.
- Update the sidebar to replace the `DashboardIcon` with `LayoutDashboardIcon` for improved visual consistency.
- Adjust icon sizes in the sidebar and menu links for uniformity across the application.
- Refactor the `SidebarMain` component to improve the organization of sidebar items and enhance user experience.
- Update locale selection functions in `SidebarUser`, `LocaleSelector`, and `LocaleSwitcher` components to use arrow function syntax for improved readability.
- Adjust the `SidebarUser` component's layout by adding padding to the `SidebarMenu` for better visual spacing.
- Ensure consistent naming conventions for locale selection functions across components.
- Add new dashboard sidebar item for navigation in both English and Chinese localization files.
- Introduce a new `site.webmanifest` file for improved PWA support.
- Update routing constants to include specific settings routes for better organization.
- Clean up imports in `config.tsx` and adjust sidebar links for clarity.
- Replace `BadgeCheckIcon` with `BotIcon` and `SettingsIcon` with `Settings2Icon` in the sidebar for improved visual consistency.
- Add `UserCircleIcon` to the settings link for better user representation.
- Update sidebar theme imports in `globals.css` to use `theme-blue.css` and provide manual theming instructions.
- Introduce new sidebar color variables in multiple theme files to enhance customization options.
- Introduce a new `DashboardSidebar` component to replace the obsolete `AppSidebar`, improving organization and clarity.
- Implement `SidebarMain` and `SidebarUser` components for better separation of concerns within the sidebar.
- Update localization files to include new sidebar items for AI features and settings in both English and Chinese.
- Streamline sidebar navigation by utilizing the `getSidebarMainLinks` function for dynamic link generation.
- Remove unused `NavSecondary` component to reduce complexity and improve maintainability.
- Rename `Page` component to `DashboardPage` for clarity.
- Simplify the dashboard layout by removing unnecessary `SidebarProvider` and `SidebarInset`.
- Add a new `SettingsGeneralPage` component for general settings with a structured layout.
- Update navigation components to utilize `LocaleLink` for improved routing.
- Remove obsolete `NavProjects` component to streamline the sidebar navigation.
- Eliminate the `WebsiteInfo` type from the types definition to simplify the codebase.
- Update `config.tsx` to remove the import of the now obsolete `WebsiteInfo` type, enhancing clarity and maintainability.
- Remove the `getWebsiteInfo` function to streamline website information handling.
- Update components to directly use translation functions for site name and tagline.
- Clean up `DashboardLayout`, `Footer`, `Navbar`, and `NavbarMobile` by removing unnecessary imports and improving readability.
- Maintain consistent use of translations across the application for better localization support.
- Introduce locale and theme selection functionality in the `NavUser` component.
- Implement `DropdownMenuSub` for organizing theme and language options.
- Utilize `useLocaleStore` for managing current locale state and transitions.
- Refactor imports and improve user experience with responsive design elements.
- Update translations for consistency across the dropdown menu items.
- Refactor routes for AI features and settings to improve clarity and organization.
- Update `AppSidebar` navigation items to reflect new route paths.
- Introduce `UserAvatar` component for consistent user representation across the dashboard.
- Adjust avatar sizes in various components for uniformity.
- Enhance `LocaleSwitcher` and `ThemeSwitcher` button styles for better UI consistency.
- Move `AppSidebar` to a new directory for better organization.
- Update imports for `PricingComparator` to reflect its new location within the blocks directory.
- Remove obsolete `fill-remaining-space.tsx` component to clean up the codebase.
- Introduce new `PricingComparator` component for improved pricing comparison functionality.
- Add new dashboard navigation components (`NavMain`, `NavProjects`, `NavSecondary`, `NavUser`) to enhance user experience and organization within the dashboard.
- Add "or" translation to English and Chinese localization files for improved user guidance.
- Introduce `DividerWithText` component to visually separate social login options in the authentication UI.
- Integrate `DividerWithText` in the `SocialLoginButton` component for enhanced layout clarity.
- Add __rawString__ property to MDX component for improved code handling.
- Refactor pre element to extract code content dynamically and support copy functionality.
- Update login translation in English to "Log in" for consistency.
- Refactor email components (ForgotPassword, SubscribeNewsletter, VerifyEmail) to utilize `defaultMessages` for improved localization.
- Enhance `EmailLayout` to accept locale and messages props, ensuring consistent translation across email templates.
- Update manifest generation to use `defaultMessages` for site name and description, streamlining metadata handling.
- Adjust copyright formatting in translation files for better presentation.
- Remove `title` and `description` fields from English and Chinese translation files to streamline website metadata.
- Update `getWebsiteInfo` function to exclude removed fields, ensuring consistency in website information retrieval.
- Adjust `WebsiteInfo` type definition to reflect the changes in metadata structure.
- Add `username` column to the `user` table and enforce uniqueness constraint.
- Introduce new SQL migration file for the `username` addition.
- Update `schema.ts` to reflect changes in the `user`, `session`, and `account` tables.
- Enhance authentication client by integrating `usernameClient` plugin for better user management.
- Adjust session management settings for improved caching and freshness.
- Refactor metadata generation in the home page for consistency.
- Delete the outdated `site.webmanifest` file to clean up the codebase.
- Enhance documentation in `manifest.ts` to clarify the purpose of the generated web app manifest.
- Replace top-level await for default messages with a dedicated `getDefaultMessages` function to improve code organization and readability.
- Update email components (ForgotPassword, SubscribeNewsletter, VerifyEmail) to utilize the new `getDefaultMessages` function for localization.
- Modify the manifest function to fetch default messages asynchronously, enhancing the metadata generation process.
- Delete obsolete `robots.ts` and `opengraph-image.tsx` files to streamline the codebase.
- Update metadata generation across various pages to utilize `getBaseUrlWithLocale` for improved localization.
- Ensure all pages have consistent canonical URLs for better SEO and accessibility.
- Clean up imports and enhance the organization of metadata-related functions.
- Update English and Chinese translation files to include descriptions for various pages, improving user experience and clarity.
- Refactor metadata generation in multiple pages to utilize the new `constructMetadata` function for consistency.
- Ensure all pages have appropriate titles and descriptions for better SEO and accessibility.
- Clean up imports and streamline metadata handling in the application.
- Introduce a new configuration file `.cursor/mcp.json` to define the MCP server settings for console-ninja.
- Specify the command and arguments for the MCP server to streamline setup.
- Replace direct usage of Routes.DefaultLoginRedirect with DEFAULT_LOGIN_REDIRECT in LoginForm, RegisterForm, and SocialLoginButton for consistency.
- Add documentation comment to websiteConfig for clarity.
- Change team name to "MkSaaS Team" in English and Chinese email templates.
- Remove unnecessary website info references in email components to streamline localization.
- Ensure consistent usage of the `defaultMessages` for translations in email templates.
- Introduce a new `send` utility function for sending emails with templates and context.
- Refactor email templates to utilize the updated `defaultMessages` from the i18n module.
- Consolidate email-related types into a new `types.ts` file for better organization.
- Remove deprecated `messages.ts` and `types.ts` files from the mail module.
- Update email components to use the new `BaseEmailProps` type and routing for default locale.
- Update error handling in ForgotPasswordForm, LoginForm, RegisterForm, and ResetPasswordForm to use a consistent format for error messages.
- Replace direct error message access with structured error status and statusText for improved clarity.
- Remove commented-out console logs for cleaner code.
- Replace GeistSans with fontDMSans in layout component
- Introduce new DM Sans font file for weight 500
- Update fontDMSans to include variable for weight 500
- Update `next-intl` dependency from version 3.26.5 to 4.0.0
- Modify global type definitions to include new `Locale` and `Messages` types
- Refactor various components and pages to use `Locale` type for params
- Enhance internationalization handling by integrating `hasLocale` checks
- Clean up imports and ensure consistent usage of `next-intl` features
- Remove `createTranslator` and `getWebsiteInfo` imports
- Eliminate unused translator and website info variables
- Replace `UserCircleIcon` with a simple div for avatar fallback
- Streamline the About page component by removing redundant code
- Add code copy button to code blocks with internationalized label
- Modify MDX component to support raw code string extraction
- Update content collections to inject raw code string into pre elements
- Improve code block styling and add hover-based copy button
- Remove unnecessary prose wrapper from various components
- Enhance code block presentation with better overflow and border handling
- Update `en.json` and `zh.json` with new translations for theme and language switching
- Modify `LocaleSwitcher` and `ThemeSwitcher` components to use internationalized labels
- Replace hardcoded strings with translations from `useTranslations` hook
- Improve accessibility by using translated aria-labels and sr-only text
- Refactor button styling to use `size-9` utility class
- Create new `LocaleSwitcher` component with dropdown menu for language selection
- Modify `LocaleSelector` to remove `showLocaleName` prop
- Update `Navbar` to use new `LocaleSwitcher` instead of `LocaleSelector`
- Adjust `ThemeSwitcher` button styling for consistency
- Enhance locale switching user experience with more intuitive UI
- Import and configure DM Sans font from local file
- Update layout to include DM Sans font variable
- Add font file for DM Sans regular weight
- Enhance typography configuration with additional font option
- Expand `websiteConfig` to include detailed metadata and social media links
- Add optional social media platform URLs to improve website connectivity
- Update type definitions to support more flexible configuration
- Modify social links generation to conditionally render based on configuration
- Update references to website configuration across components and utilities
- Improve metadata generation with optional author information
- Replace static `siteConfig` with dynamic `getWebsiteInfo()` function
- Add `Site` section to translation JSON files for multilingual support
- Update types to distinguish between website config and website info
- Remove deprecated `site.ts` configuration file
- Modify components and utilities to use new translation-based configuration
- Ensure consistent website metadata generation across the application
- Move menu, footer, and social links to `config.tsx`
- Create `constants.ts` for shared constants like `POSTS_PER_PAGE`
- Extract translation utility to `translator.ts`
- Move table of contents generation to `lib/blog/toc.ts`
- Update import paths across multiple components
- Simplify email configuration using `siteConfig`
- Replace hardcoded site URL references with dynamic getBaseUrl() function
- Remove unnecessary keywords and author fields from siteConfig
- Simplify metadata generation in constructMetadata function
- Add EMAIL_FROM constant for email configuration
- Improve type definitions and remove redundant configurations
- Create waitlist page with responsive design and email subscription form
- Add localized messages for English and Chinese waitlist pages
- Implement form inputs with labels and validation
- Use Shadcn/ui Card and Button components for consistent styling
- Add padding to page container for improved layout
- Create about page with author information and contact section
- Add localized messages for English and Chinese about page
- Implement responsive image gallery with multiple column layouts
- Use Pexels images for gallery content
- Add image loading optimization with eager and lazy loading
- Update Next.js image configuration to support Pexels image domain
- Enhance page layout with Shadcn/ui Avatar and Button components
- Create contact page with responsive design and form layout
- Add localized messages for English and Chinese contact pages
- Implement form inputs with labels and validation
- Use Shadcn/ui components for consistent styling
- Add Card and Textarea components for enhanced UI
- Implement releases collection in content-collections.ts for tracking version updates
- Create changelog page with dynamic release rendering for multiple locales
- Add ReleaseCard component to display version details and changes
- Implement getReleases utility function to fetch and sort release notes
- Update internationalization messages for changelog page
- Add English and Chinese release notes for v1.0.0, v1.1.0, and v1.2.0
- Implement pages collection in content-collections.ts for legal documents
- Add cookie policy, privacy policy, and terms of service pages for English and Chinese locales
- Create custom page layout and component for rendering legal documents
- Add metadata generation and custom page fetching logic
- Update not-found page to use LocaleLink for internationalization
- Enhance blog post page with prose styling
- Modify all posts button variant
- Introduce new features block variants (Features, Features2, Features4, Features5, Features6, Features7, Features8, Features9)
- Add Recharts and Dotted Map libraries for advanced charting and visualization
- Create a new chart component with support for light and dark themes
- Update features page to include all new feature block components
- Add reference links to NSUI design system for each feature block
- Enhance feature sections with responsive layouts and modern design patterns
- Introduce new content block variants (Content, Content2, Content3, Content4, Content5, Content6)
- Replace WebP images with PNG for better compatibility and performance
- Update content page to include all new content block components
- Add reference links to NSUI design system for each content block
- Enhance content sections with responsive layouts and modern design patterns
- Introduce new hero section variants (HeroSection2, HeroSection3, HeroSection4)
- Add Swiper library for carousel functionality in HeroSection3
- Include new block images for light and dark modes
- Update home page to use HeroSection4
- Add block images for card, charts, and music sections
- Update navbar mobile and desktop components with consistent styling
- Enhance active and hover states for navigation menu items
- Remove dark mode specific text color variants
- Add active state detection for sub-menu items
- Simplify background and text color transitions
- Remove testimonials component
- Switch to default theme CSS import
- Introduce new theme CSS files for various color palettes:
- Blue
- Green
- Orange
- Red
- Rose
- Violet
- Yellow
- Zinc
- Update global CSS to import themes dynamically
- Remove hardcoded theme variables from globals.css
- Provide flexible theming options for light and dark modes
- Refine and expand best practices for:
- AI SDK
- Date-fns
- Next.js
- Radix UI
- React
- React Hook Form
- Stripe
- Tailwind CSS
- TypeScript
- Zustand
- Improve guidelines with more specific and actionable recommendations
- Enhance type safety and performance suggestions across different technologies
- Introduce new blocks routes for hero, pricing, features, FAQ, stats, call-to-action, and content components
- Update marketing navigation configuration to include new blocks menu section
- Add corresponding route entries in `routes.ts`
- Create placeholder pages for block components
- Update localization files to support new blocks menu items
- Modify pricing page to include pricing comparator component
- Refactor pricing component styling for consistency
- Create new `/pricing` route with dynamic localization
- Implement three pricing components (Pricing3, Pricing4, Pricing5) from NSUI design system
- Update routes configuration to use dedicated pricing page instead of anchor link
- Add localization support for pricing page title
- Adjust home page margin for consistent layout
- Modify mobile navbar to conditionally render login/signup buttons based on user authentication
- Update English locale translations with minor text refinements
- Add `userLoggedIn` prop to `MainMobileMenu` component for dynamic rendering
- Improve mobile menu layout and user experience
- Move AI menu section to the top of the marketing menu configuration
- Remove duplicate AI menu section in marketing links
- Add TODO comment for mobile menu scrollbar layout issue
- Remove scrollbar from mobile menu using RemoveScroll component
- Improve mobile menu accessibility and scrolling behavior
- Update blog post page with refined category link styling
- Modify blog table of contents to add hover state for links
- Enhance locale selector with optional locale name display
- Refactor navbar mobile and desktop components with improved layout and styling
- Reorganize marketing menu links and update icon usage
- Adjust font weights and hover states across navigation components
- Update footer, navbar, and mobile navbar to use dynamic social and menu links
- Implement active state highlighting for navigation items using locale pathname
- Replace static social links with a dynamic function in marketing configuration
- Improve icon and styling consistency across navigation components
- Add null checks for menu and social links to prevent rendering errors
- Update icon for About page in menu links
- Change "publisher" to "author" in English and Chinese translation files
- Add Lucide icons for date and reading time in blog post page
- Implement link underline animation in global CSS
- Enhance blog post page layout with icon-based metadata display
- Improve visual consistency and internationalization for blog components
- Add "logout" translation key to English and Chinese locale files
- Update `UserButton` component to use translated logout text
- Modify mobile and desktop navbar to conditionally render user button based on session
- Adjust styling for blog category list mobile and navbar components
- Improve internationalization and user authentication UI
- Add translation support for menu links, footer links, and avatar links
- Create `createTranslator` utility function for dynamic translations
- Update marketing configuration to use translation-based menu and link generation
- Modify navbar, footer, and user button components to use translated content
- Add new "Common" translation keys for login and signup buttons
- Refactor marketing configuration to dynamically generate links with translations
- Improve internationalization across marketing-related components
- Add new `MenuItem` and `NestedMenuItem` types for improved type safety
- Update marketing configuration to use new types with `title` instead of `name`
- Modify footer, navbar, and user button components to handle optional icons
- Enhance media query hook with server-side rendering support
- Update Chinese translation with minor punctuation adjustments
- Improve component rendering with null checks for icons
- Modify `routes.ts` to add AI feature routes and remove deprecated routes
- Update `marketing.tsx` with new AI feature menu links and more descriptive icons
- Refactor navbar mobile and locale selector components with improved icon imports
- Adjust theme switcher button styling for better visual consistency
- Enhance menu link descriptions and icons for improved user experience
- Merge marketing-related configuration files into a single `marketing.tsx`
- Remove deprecated configuration files: `marketing.ts`, `marketing-links.tsx`, `footer.ts`, `hero.ts`, `landing.ts`, and `user-button.ts`
- Update navbar, footer, and user button components to use new centralized configuration
- Add comprehensive social links, footer links, menu links, and avatar links
- Simplify site configuration by removing unnecessary links
- Improve code organization and reduce configuration complexity
- Move MDX component from marketing to shared folder
- Remove deprecated blog post and blog posts components
- Update blog page imports to use new MDX component location
- Add reading time estimation utility function
- Reorganize navbar and mobile navbar components
- Update marketing links configuration
- Improve component modularity and code organization
- Remove type assertions for href in various components
- Update blog card and blog post page to use `query` instead of `params`
- Simplify routing configuration by commenting out `pathnames` in `routing.ts`
- Remove commented TODOs related to href type handling
- Improve type safety and routing consistency across components
- Delete email template files: `email-formats.ts`, `newsletter-welcome.tsx`, `reset-password.tsx`, and `verify-email.tsx`
- Move `getLocaleFromRequest` utility function from `auth.ts` to `utils.ts`
- Update Chinese translation for newsletter and copyright text
- Improve code organization and remove redundant email-related files
- Update middleware to exclude API routes from locale redirection
- Modify public routes to include new pages and remove documentation routes
- Adjust auth routes order for better readability
- Replace `NEXT_PUBLIC_APP_URL` with `NEXT_PUBLIC_BASE_URL` across configuration files
- Clean up and standardize authentication and site configuration
- Replace `templateId` with `template` in email sending function
- Rename `translations` to `messages` in email template props
- Consolidate email template and sending logic in `send.ts`
- Remove separate `templates.ts` file and merge functionality
- Update email template components to use new message structure
- Improve type definitions for email-related functions and props
- Update `auth-card.tsx` to use `LocaleLink` for logo navigation
- Modify `bottom-button.tsx` with a temporary type assertion for href
- Replace `Link` with `LocaleLink` in `navbar-mobile.tsx` and `navbar.tsx`
- Ensure consistent internationalization routing across components
- Rename `usePathname` and `useRouter` to `useLocalePathname` and `useLocaleRouter`
- Update imports in locale selector component to use new navigation hook names
- Improve type safety and consistency in internationalization routing
- Rename `getPathname` to `getLocalePathname` in navigation module
- Update sitemap generation to use new locale-specific pathname function
- Add root path to routing pathnames configuration
- Improve type safety and internationalization consistency in routing
- Rename `Link` import to `LocaleLink` in navigation module
- Remove console log statements in blog page components
- Update blog card, blog category list, and other components to use `LocaleLink`
- Simplify routing configuration by removing unnecessary pathname entries
- Enhance type safety and internationalization consistency
- Add comprehensive email template system with React Email and use-intl
- Implement dynamic email template rendering with locale-specific translations
- Create reusable email components for consistent design
- Update authentication flow to support multilingual email templates
- Add new email-related dependencies and configuration
- Refactor email sending logic to support dynamic locale detection
- Integrate React Email library for creating email templates
- Add email templates for newsletter welcome, reset password, and email verification
- Create email format styles for consistent email design
- Configure Resend email service with new mail utility
- Update authentication flow to use React Email templates
- Add new email-related dependencies in package.json
- Uncomment Image components in blog posts for English and Chinese locales
- Replace blog-specific images with a consistent "mksaas-og.png" across all posts
- Update avatar images for HaiTang author in both English and Chinese content collections
- Create content collections for Boilerplate Hunt, Coupon, HaiTang, and OG Generator
- Add blog posts and author profiles in English and Chinese
- Include corresponding blog post images and avatars
- Update blog page routing and pagination to support localized routes
- Restore ThemeSwitcher in navbar
- Fix pagination route prefix to include locale
- Add new localization keys for "all" and "noPostsFound" in English and Chinese
- Update blog components to use localized translations
- Add optional chaining for category properties to prevent rendering errors
- Improve mobile and desktop category list components with translations
- Simplify blog page translation keys in English and Chinese
- Remove hardcoded category labels in blog post page
- Use server-side translations for publisher, categories, and table of contents
- Remove font-serif class from blog post content
- Enhance content collections to support cross-language content matching
- Update blog post categories from "guide" to "product"
- Add documentation for multilingual blog implementation
- Modify category and blog post pages to handle localized content
- Update locale routing with more detailed language information
- Improve content relationship resolution in content collections
- Add new "Product" category for blog posts in English and Chinese
- Update blog page subtitle using localization messages
- Enhance reset password page and form with better error handling
- Modify auth card styling with subtle border and shadow
- Update mobile navbar background for improved visual clarity
- Refine authentication form labels and button text
- Add NextPageProps type for consistent page props handling
- Resolve async params and searchParams in blog and category pages
- Simplify type annotations and improve type safety
- Remove redundant type definitions
- Modify blog card to use dynamic routing with slugAsParams
- Remove getBaseUrl import and simplify link generation
- Update blog post categories in Chinese content
- Adjust blog category list desktop component localization
- Improve key generation for category tags
- Add blog category filter for desktop and mobile views
- Implement category-based blog post filtering
- Add pagination support for blog and category pages
- Update localization messages for blog categories
- Reduce posts per page from 9 to 6
- Add loading states for blog pages
- Create new content collections for blog categories in Chinese
- Update blog post descriptions and categories
- Add new "Company" category for blog posts
- Enhance blog card and grid UI with improved styling and layout
- Refactor blog card skeleton for better visual consistency
- Update blog post dates in English and Chinese content
- Refactor blog layout with header section and container
- Simplify blog page and post layouts
- Improve blog card and grid styling
- Add initial dashboard page with sidebar and breadcrumbs
- Adjust header section subtitle color
- Adjust localization text spacing in English and Chinese translations
- Temporarily disable theme switcher in navbar
- Swap sign-up and sign-in labels in registration form
- Replace existing favicon and logo images with updated versions
- Remove unused logo SVG and PNG variants
- Normalize file permissions for public assets
- Update content collections to support locale-based content filtering
- Modify blog post, author, and category schemas to include optional locale
- Implement dynamic locale detection from file path or fallback to default locale
- Update blog components to filter posts by current locale
- Remove sample blog posts and categories from default content
- Update English and Chinese message files to remove unnecessary translations
- Remove root page redirect component
- Update home page to use new 'HomePage' translation key
- Modify marketing links by commenting out docs link
- Adjust locale selector width for better UI consistency
- Update English and Chinese message files to remove unnecessary translations
- Remove root page redirect component
- Update home page to use new 'HomePage' translation key
- Modify marketing links by commenting out docs link
- Adjust locale selector width for better UI consistency
- Add Radix UI Select component for improved locale selection
- Create Zustand store for managing current locale state
- Update navbar and mobile navbar to use new LocaleSelector
- Remove deprecated LocaleSwitcher and LocaleSwitcherSelect components
- Update routing configuration with emoji flags for locales
- Add deepmerge and Zustand dependencies to package.json
- Move global and MDX styles to `src/styles` directory
- Update import paths for CSS files in layout and blog page
- Add comments to theme switcher components for clarity
- Reorganize style imports to improve project structure
- Add German and Chinese language translations
- Update routing configuration to support multiple locales (en, de, zh)
- Create new components for locale switching and navigation
- Implement dynamic error and not-found pages with internationalized content
- Refactor global styles and MDX styling
- Update middleware and navigation configuration for improved i18n routing
- Create a new client-side component to dynamically set the lang attribute
- Refactor root and locale layouts to separate HTML structure and language setting
- Improve internationalization support by handling locale attribute more flexibly
- Remove redundant HTML tag nesting in layout components
- Move HTML and body tags to root layout
- Add font and styling configuration to root layout
- Simplify locale layout by removing redundant HTML structure
- Remove separate public layout and integrate navbar and footer into locale layout
- Update page components to handle async params
- Add multi-language support using next-intl
- Configure routing and localization for English and Chinese
- Update project structure to support i18n routing
- Add middleware and navigation helpers for localized routing
- Create message files for translations
- Modify layout and page components to support internationalization
You are an expert in TypeScript, Node.js, Next.js with the app router, React, Shadcn/ui, Magic UI, Tailwind, Better Auth, Drizzle ORM, Content Collections, and Vercel AI SDK.
General Principles
- Write clean, concise, and well-commented TypeScript code
- Favor functional and declarative programming patterns over object-oriented approaches
- Prioritize code reuse and modularization over duplication
Naming and Conventions
- Use PascalCase for class names and type definitions
- Utilize camelCase for variables, functions, and methods
- Employ kebab-case for file and directory names
- Reserve UPPERCASE for environment variables and constants
- Avoid magic numbers by defining constants with meaningful names
- Start each function name with a verb to indicate its purpose
TypeScript Usage
- Leverage TypeScript for all code
- Prefer types over interfaces
- Favor functional components over class components
Code Organization
- Structure files logically, grouping related components, helpers, types, and static content
- Prefer named exports for components over default exports
- Favor small, single-purpose components over large, monolithic ones
- Separate concerns between presentational and container components
UI and Styling
- Utilize Shadcn/ui, Radix, and Tailwind for building consistent and accessible UI components
- Implement responsive design using Tailwind CSS with a mobile-first approach
- Use Magic UI for advanced components and animations
- Use Lucide for icons
Data Management
- Interact with the database using Drizzle ORM
- Leverage Drizzle's generated types
Next.js and React
- Minimize the use of `use client`, `useEffect`, and `setState`
- Favor React Server Components (RSC) whenever possible
- Wrap client-side components in `Suspense` with a fallback
- Implement dynamic loading for non-critical components
- Use server actions for mutations instead of route handlers
Error Handling and Logging
- Implement robust error handling and logging mechanisms
- Provide clear and user-friendly error messages to the end-users
MkSaaS grants you an ongoing, non-exclusive license to use the software components and templates included in the SaaS Starter Kit.
The license permits usage by a single individual, team, or organization (the Licensee) and does not transfer to additional individuals, teams, or organizations without explicit permission.
You can:
- Use MkSaaS to create unlimited end products.
- Modify MkSaaS components to create derivative works, subject to this license.
- Use MkSaaS to create projects for unlimited clients.
- Use MkSaaS to create end products sold to end users.
- Use MkSaaS to build and run SaaS applications where end users interact with your end product.
You cannot:
- Redistribute MkSaaS’s components or templates, even if modified, separately from an end product.
- Share your access to MkSaaS with anyone outside your team or organization without explicit permission.
- Use MkSaaS to create products that compete with MkSaaS or provide a SaaS starter kit in conflict with MkSaaS’s business.
Example Usage
Examples of permitted usage:
- Creating personal, team, or organizational websites or applications.
- Building commercial SaaS applications or web apps for clients.
Examples of prohibited usage:
- Creating a repository of MkSaaS (components) and sharing or selling it.
- Making a derivative product (e.g. starter kit) and offering it for sale or free.
Enforcement and Liability
MkSaaS reserves the right to revoke licenses in case of a material breach of this agreement. The liability of MkSaaS is limited to the refund of the license fee. This agreement is governed by the laws of Switzerland.
Questions?
Unsure if your use case is covered by the license? Email us at support@MkSaaS.com with your questions.
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
# MkSaaS
## Getting Started
Make AI SaaS in a weekend.
First, run the development server:
The complete Next.js boilerplate for building profitable SaaS, with auth, payments, i18n, newsletter, dashboard, blog, docs, blocks, themes, SEO and more.
```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```
## Author
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
This project is created by [Fox](https://x.com/indie_maker_fox), the founder of [MkSaaS](https://mksaas.com) and [Mkdirs](https://mkdirs.com). The official X account for [MkSaaS](https://mksaas.com) is [@mksaascom](https://x.com/mksaascom), you can follow this account for the updates about MkSaaS.
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
## Documentation
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
The documentation is available on the [website](https://mksaas.com/docs). It includes guides, tutorials, and detailed explanations of the code. I designed it to be as beginner-friendly as possible, so you can start making money from day one.
## Learn More
If you found anything that could be improved, please let me know.
To learn more about Next.js, take a look at the following resources:
## Links
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
## Repositories
## Deploy on Vercel
By default, you should have access to all 5 repositories. If you find that you’re unable to access any of them, please don’t hesitate to reach out to me, and I’ll assist you in resolving the issue.
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
## Notice
> If you have any questions, please [submit an issue](https://github.com/MkSaaSHQ/mksaas-template/issues/new), or contact me at [support@mksaas.com](mailto:support@mksaas.com), or join our [discord community](https://mksaas.link/discord) and ask for help there.
> If you want to receive notifications whenever code changes, please click `Watch` button in the top right.
> When submitting any content to the issues of the repository, please use **English** as the main Language, so that everyone can read it and help you, thank you for your supports.
## License
For any details on the license, please refer to the [License](LICENSE) file.
Fumadocs <span className='text-fd-muted-foreground text-sm'>(Foo-ma docs)</span> is a **documentation framework** based on Next.js, designed to be fast, flexible,
The default theme of Fumadocs offers a beautiful look for documentation sites and interactive components.
</Card>
<Card icon={<Database />} title='Content Source'>
The source of your content, can be a CMS or local data layers like [Content Collections](https://www.content-collections.dev) and [Fumadocs MDX](/docs/mdx), the official content source.
</Card>
<Card icon={<Terminal />} title='Fumadocs CLI'>
A command line tool to install UI components and automate things, useful for customizing layouts.
</Card>
</Cards>
<Callout title="Want to learn more?">
Read our in-depth [What is Fumadocs](/docs/what-is-fumadocs) introduction.
</Callout>
### Terminology
**Markdown/MDX:** Markdown is a markup language for creating formatted text. Fumadocs supports Markdown and MDX (superset of Markdown) out-of-the-box.
Although not required, some basic knowledge of Next.js App Router would be useful for further customisations.
## Automatic Installation
A minimum version of Node.js 18 required, note that Node.js 23.1 might have problems with Next.js production build.
It will ask you the framework and content source to use, a new fumadocs app should be initialized. Now you can start hacking!
<Callout title='From Existing Codebase?'>
You can follow the [Manual Installation](/docs/manual-installation) guide to get started.
</Callout>
### Enjoy!
Create your first MDX file in the docs folder.
```mdx title="content/docs/index.mdx"
---
title: Hello World
---
## Yo what's up
```
Run the app in development mode and see http://localhost:3000/docs.
```mdx
npm run dev
```
## Explore
In the project, you can see:
- `lib/source.ts`: Code for content source adapter, [`loader()`](/docs/headless/source-api) provides an interface to interact with your content source, and assigns URL to your pages.
- `app/layout.config.tsx`: Shared options for layouts, optional but preferred to keep.
And tell Fumadocs to use the new route in `source.ts`:
```ts title="lib/source.ts"
import { loader } from 'fumadocs-core/source';
export const source = loader({
baseUrl: '/info',
// other options
});
```
</Accordion>
<Accordion id='dynamic-route' title="It uses Dynamic Route, will it be poor in performance?">
Next.js turns dynamic route into static routes when `generateStaticParams` is configured.
Hence, it is as fast as static pages.
You can enable Static Exports on Next.js to get a static build output. (Notice that Route Handler doesn't work with static export, you have to configure static search)
</Accordion>
<Accordion id='custom-layout-docs-page' title='How to create a page in /docs without docs layout?'>
Same as managing layouts in Next.js App Router, remove the original MDX file from content directory (`/content/docs`).
This ensures duplicated pages will not cause errors.
Now, You can add the page to another route group, which isn't a descendant of docs layout.
For example, under your `app` folder:
<Files>
<File name="(home)/docs/page.tsx" />
<Folder name="docs">
<File name="layout.tsx" />
<File name="[[...slug]]/page.tsx" />
</Folder>
</Files>
will replace the `/docs` page with your `page.tsx`.
</Accordion>
<Accordion id='multi-versions' title="How to implement docs with multi-version?">
Use a separate deployment for each version.
On Vercel, this can be done by creating another branch for a specific version on your GitHub repository.
To link to the sites of other versions, use the Links API or a custom navigation component.
</Accordion>
<Accordion id='multi-docs' title="How to implement multi-docs?">
We recommend to use [Sidebar Tabs](/docs/navigation/sidebar#sidebar-tabs).
</Accordion>
</Accordions>
## Learn More
New to here? Don't worry, we are welcome for your questions.
If you find anything confusing, please give your feedback on [Github Discussion](https://github.com/fuma-nama/fumadocs/discussions)!
<Cards>
<Card
href="/docs/static-export"
title="Configure Static Export"
description="Learn how to enable static export on your docs"
/>
<Card
href="/docs/search"
title="Customise Search"
description="Learn how to customise document search"
/>
<Card
href="/docs/theme"
title="Theming"
description="Add themes to Fumadocs UI"
/>
<Card
href="/docs/components"
title="Components"
description="See all available components to enhance your docs"
description: Support multiple languages in your documentation
image: /images/blog/post-3.png
date: "2025-03-15"
published: true
categories: [company, product]
author: mksaas
---
<Callout title='Before you get started'>
Fumadocs is not a full-powered i18n library, it manages only its own components and utilities.
You can use other libraries like [next-intl](https://github.com/amannn/next-intl) for the rest of your app.
Read the [Next.js Docs](https://nextjs.org/docs/app/building-your-application/routing/internationalization) to learn more about implementing I18n in Next.js.
</Callout>
## Manual Setup
Define the i18n configurations in a file, we will import it with `@/ilb/i18n` in this guide.
{/* <include cwd meta='title="lib/i18n.ts"'>
../../examples/i18n/lib/i18n.ts
</include> */}
Pass it to the source loader.
```ts title="lib/source.ts"
import { i18n } from '@/lib/i18n';
import { loader } from 'fumadocs-core/source';
export const source = loader({
i18n, // [!code highlight]
// other options
});
```
And update Fumadocs UI layout options.
```tsx title="app/layout.config.tsx"
import { i18n } from '@/lib/i18n';
import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared';
export function baseOptions(locale: string): BaseLayoutProps {
return {
i18n,
// different props based on `locale`
};
}
```
### Middleware
Create a middleware that redirects users to appropriate locale.
```json doc-gen:file
{
"file": "../../examples/i18n/middleware.ts",
"codeblock": {
"lang": "ts",
"meta": "title=\"middleware.ts\""
}
}
```
See [Middleware](/docs/headless/internationalization#middleware) for customisable options.
> Note that this is optional, you can also use your own middleware or the one provided by i18n libraries.
### Routing
Create a `/app/[lang]` folder, and move all files (e.g. `page.tsx`, `layout.tsx`) from `/app` to the folder.
Wrap the root provider inside `I18nProvider`, and provide available languages & translations to it.
Note that only English translations are provided by default.
```tsx title="app/[lang]/layout.tsx"
import { RootProvider } from 'fumadocs-ui/provider';
import { I18nProvider, type Translations } from 'fumadocs-ui/i18n';
const cn: Partial<Translations> = {
search: 'Translated Content',
// other translations
};
// available languages that will be displayed on UI
// make sure `locale` is consistent with your i18n config
const locales = [
{
name: 'English',
locale: 'en',
},
{
name: 'Chinese',
locale: 'cn',
},
];
export default async function RootLayout({
params,
children,
}: {
params: Promise<{ lang: string }>;
children: React.ReactNode;
}) {
const lang = (await params).lang;
return (
<html lang={lang}>
<body>
<I18nProvider
locale={lang}
locales={locales}
translations={{ cn }[lang]}
>
<RootProvider>{children}</RootProvider>
</I18nProvider>
</body>
</html>
);
}
```
### Pass Locale
Pass the locale to Fumadocs in your pages and layouts.
Fumadocs only handles navigation for its own layouts (e.g. sidebar).
For other places, you can use the `useParams` hook to get the locale from url, and attend it to `href`.
```tsx
import Link from 'next/link';
import { useParams } from 'next/navigation';
const { lang } = useParams();
return <Link href={`/${lang}/another-page`}>This is a link</Link>;
```
In addition, the [`fumadocs-core/dynamic-link`](/docs/headless/components/link#dynamic-hrefs) component supports dynamic hrefs, you can use it to attend the locale prefix.
It is useful for Markdown/MDX content.
```mdx title="content.mdx"
import { DynamicLink } from 'fumadocs-core/dynamic-link';
<DynamicLink href="/[lang]/another-page">This is a link</DynamicLink>
Make sure to configure the library correctly following their setup guide before continuing, we will import the source adapter using `@/lib/source.ts` in this guide.
### Root Layout
Wrap the entire application inside [Root Provider](/docs/layouts/root-provider), and add required styles to `body`.
```tsx
import { RootProvider } from 'fumadocs-ui/provider';
import type { ReactNode } from 'react';
export default function Layout({ children }: { children: ReactNode }) {
return (
<html lang="en" suppressHydrationWarning>
<body
// you can use Tailwind CSS too
style={{
display: 'flex',
flexDirection: 'column',
minHeight: '100vh',
}}
>
<RootProvider>{children}</RootProvider>
</body>
</html>
);
}
```
### Styles
Setup Tailwind CSS v4 on your Next.js app, add the following to `global.css`.
```css title="Tailwind CSS"
@import 'tailwindcss';
@import 'fumadocs-ui/css/neutral.css';
@import 'fumadocs-ui/css/preset.css';
/* path of `fumadocs-ui` relative to the CSS file */
Learn more about [Document Search](/docs/headless/search).
### Done
You can start the dev server and create MDX files.
```mdx title="content/docs/index.mdx"
---
title: Hello World
---
## Introduction
I love Anime.
```
## Customise
You can use [Home Layout](/docs/layouts/home-layout) for other pages of the site, it includes a navbar with theme toggle.
## Deploying
It should work out-of-the-box with Vercel & Netlify.
### Docker Deployment
If you want to deploy your Fumadocs app using Docker with **Fumadocs MDX configured**, make sure to add the `source.config.ts` file to the `WORKDIR` in the Dockerfile.
The following snippet is taken from the official [Next.js Dockerfile Example](https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile):
```zsh title="Dockerfile"
WORKDIR /app
# Install dependencies based on the preferred package manager
The design system was inspired by [Shadcn UI](https://ui.shadcn.com), you can easily customize the colors using CSS variables.
```css title="global.css"
:root {
--color-fd-background: hsl(0, 0%, 100%);
}
.dark {
--color-fd-background: hsl(0, 0%, 0%);
}
```
### Typography
We have a built-in plugin forked from [Tailwind CSS Typography](https://tailwindcss.com/docs/typography-plugin).
The plugin adds a `prose` class and variants to customise it.
```tsx
<div className="prose">
<h1>Good Heading</h1>
</div>
```
> The plugin works with and only with Fumadocs UI's MDX components, it may conflict with `@tailwindcss/typography`.
> If you need to use `@tailwindcss/typography` over the default plugin, [set a class name option](https://github.com/tailwindlabs/tailwindcss-typography/blob/main/README.md#changing-the-default-class-name) to avoid conflicts.
description: Introducing Fumadocs, a docs framework that you can break.
image: /images/blog/post-1.png
date: "2025-04-01"
published: true
categories: [company, product]
author: fox
---
Fumadocs was created because I wanted a more customisable experience for building docs, to be a docs framework that is not opinionated, **a "framework" that you can break**.
## Philosophy
**Less Abstraction:** Fumadocs expects you to write code and cooperate with the rest of your software.
While most frameworks are configured with a configuration file, they usually lack flexibility when you hope to tune its details.
You can’t control how they render the page nor the internal logic. Fumadocs shows you how the app works, instead of a single configuration file.
**Next.js Fundamentals:** It gives you the utilities and a good-looking UI.
You are still using features of Next.js App Router, like **Static Site Generation**. There is nothing new for Next.js developers, so you can use it with confidence.
**Opinionated on UI:** The only thing Fumadocs UI (the default theme) offers is **User Interface**. The UI is opinionated for bringing better mobile responsiveness and user experience.
Instead, we use a much more flexible approach inspired by Shadcn UI — [Fumadocs CLI](/docs/cli), so we can iterate our design quick, and welcome for more feedback about the UI.
## Why Fumadocs
Fumadocs is designed with flexibility in mind.
You can use `fumadocs-core` as a headless UI library and bring your own styles.
Fumadocs MDX is also a useful library to handle MDX content in Next.js. It also includes:
- Many built-in components.
- Typescript Twoslash, OpenAPI, and Math (KaTeX) integrations.
- Fast and optimized by default, natively built on App Router.
- Tight integration with Next.js, you can add it to an existing Next.js project easily.
You can read [Comparisons](/docs/comparisons) if you're interested.
### Documentation
Fumadocs focuses on **authoring experience**, it provides a beautiful theme and many docs automation tools.
It helps you to iterate your codebase faster while never leaving your docs behind.
You can take this site as an example of docs site built with Fumadocs.
### Blog sites
Since Next.js is already a powerful framework, most features can be implemented with **just Next.js**.
Fumadocs provides additional tooling for Next.js, including syntax highlighting, document search, and a default theme (Fumadocs UI).
It helps you to avoid reinventing the wheels.
## When to use Fumadocs
For most of the web applications, vanilla React.js is no longer enough.
Nowadays, we also wish to have a blog, a showcase page, a FAQ page, etc. With a
fancy UI that's breathtaking, in these cases, Fumadocs can help you build the
docs easier, with less boilerplate.
Fumadocs is maintained by Fuma and many contributors, with care on the maintainability of codebase.
While we don't aim to offer every functionality people wanted, we're more focused on making basic features perfect and well-maintained.
You can also help Fumadocs to be more useful by contributing!
description: IndieHub is the best directory for indie hackers.
date: 2024-11-24T12:00:00.000Z
published: true
categories: [news]
author: indiehub
---
Until now, trying to style an article, document, or blog post with Tailwind has been a tedious task that required a keen eye for typography and a lot of complex custom CSS.
By default, Tailwind removes all of the default browser styling from paragraphs, headings, lists and more. This ends up being really useful for building application UIs because you spend less time undoing user-agent styles, but when you _really are_ just trying to style some content that came from a rich-text editor in a CMS or a markdown file, it can be surprising and unintuitive.
We get lots of complaints about it actually, with people regularly asking us things like:
> Why is Tailwind removing the default styles on my `h1` elements? How do I disable this? What do you mean I lose all the other base styles too?
> We hear you, but we're not convinced that simply disabling our base styles is what you really want. You don't want to have to remove annoying margins every time you use a `p` element in a piece of your dashboard UI. And I doubt you really want your blog posts to use the user-agent styles either — you want them to look _awesome_, not awful.
The `@tailwindcss/typography` plugin is our attempt to give you what you _actually_ want, without any of the downsides of doing something stupid like disabling our base styles.
It adds a new `prose` class that you can slap on any block of vanilla HTML content and turn it into a beautiful, well-formatted document:
```html
<article class="prose">
<h1>Garlic bread with cheese: What the science tells us</h1>
<p>
For years parents have espoused the health benefits of eating garlic bread
with cheese to their children, with the food earning such an iconic status
in our culture that kids will often dress up as warm, cheesy loaf for
Halloween.
</p>
<p>
But a recent study shows that the celebrated appetizer may be linked to a
series of rabies cases springing up around the country.
</p>
</article>
```
For more information about how to use the plugin and the features it includes, [read the documentation](https://github.com/tailwindcss/typography/blob/master/README.md).
---
## What to expect from here on out
What follows from here is just a bunch of absolute nonsense I've written to dogfood the plugin itself. It includes every sensible typographic element I could think of, like **bold text**, unordered lists, ordered lists, code blocks, block quotes, _and even italics_.
It's important to cover all of these use cases for a few reasons:
1. We want everything to look good out of the box.
2. Really just the first reason, that's the whole point of the plugin.
3. Here's a third pretend reason though a list with three items looks more realistic than a list with two items.
Now we're going to try out another header style.
### Typography should be easy
So that's a header for you — with any luck if we've done our job correctly that will look pretty reasonable.
Something a wise person once told me about typography is:
> Typography is pretty important if you don't want your stuff to look like trash. Make it good then it won't be bad.
It's probably important that images look okay here by default as well:
<Image
src="/images/blog/indiehub-og.png"
width="718"
height="404"
alt="Image"
/>
Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.
Now I'm going to show you an example of an unordered list to make sure that looks good, too:
- So here is the first item in this list.
- In this example we're keeping the items short.
- Later, we'll use longer, more complex list items.
And that's the end of this section.
## What if we stack headings?
### We should make sure that looks good, too.
Sometimes you have headings directly underneath each other. In those cases you often have to undo the top margin on the second heading because it usually looks better for the headings to be closer together than a paragraph followed by a heading should be.
### When a heading comes after a paragraph …
When a heading comes after a paragraph, we need a bit more space, like I already mentioned above. Now let's see what a more complex list would look like.
- **I often do this thing where list items have headings.**
For some reason I think this looks cool which is unfortunate because it's pretty annoying to get the styles right.
I often have two or three paragraphs in these list items, too, so the hard part is getting the spacing between the paragraphs, list item heading, and separate list items to all make sense. Pretty tough honestly, you could make a strong argument that you just shouldn't write this way.
- **Since this is a list, I need at least two items.**
I explained what I'm doing already in the previous list item, but a list wouldn't be a list if it only had one item, and we really want this to look realistic. That's why I've added this second list item so I actually have something to look at when writing the styles.
- **It's not a bad idea to add a third item either.**
I think it probably would've been fine to just use two items but three is definitely not worse, and since I seem to be having no trouble making up arbitrary things to type, I might as well include it.
After this sort of list I usually have a closing statement or paragraph, because it kinda looks weird jumping right to a heading.
## Code should look okay by default.
I think most people are going to use [highlight.js](https://highlightjs.org/) or [Prism](https://prismjs.com/) or something if they want to style their code blocks but it wouldn't hurt to make them look _okay_ out of the box, even with no syntax highlighting.
Here's what a default `tailwind.config.js` file looks like at the time of writing:
```js
module.exports = {
purge: [],
theme: {
extend: {},
},
variants: {},
plugins: [],
};
```
Hopefully that looks good enough to you.
### What about nested lists?
Nested lists basically always look bad which is why editors like Medium don't even let you do it, but I guess since some of you goofballs are going to do it we have to carry the burden of at least making it work.
1. **Nested lists are rarely a good idea.**
- You might feel like you are being really "organized" or something but you are just creating a gross shape on the screen that is hard to read.
- Nested navigation in UIs is a bad idea too, keep things as flat as possible.
- Nesting tons of folders in your source code is also not helpful.
2. **Since we need to have more items, here's another one.**
- I'm not sure if we'll bother styling more than two levels deep.
- Two is already too much, three is guaranteed to be a bad idea.
- If you nest four levels deep you belong in prison.
3. **Two items isn't really a list, three is good though.**
- Again please don't nest lists if you want people to actually read your content.
- Nobody wants to look at this.
- I'm upset that we even have to bother styling this.
The most annoying thing about lists in Markdown is that `<li>` elements aren't given a child `<p>` tag unless there are multiple paragraphs in the list item. That means I have to worry about styling that annoying situation too.
- **For example, here's another nested list.**
But this time with a second paragraph.
- These list items won't have `<p>` tags
- Because they are only one line each
- **But in this second top-level list item, they will.**
This is especially annoying because of the spacing on this paragraph.
- As you can see here, because I've added a second line, this list item now has a `<p>` tag.
This is the second line I'm talking about by the way.
- Finally here's another list item so it's more like a list.
- A closing list item, but with no nested list, because why not?
And finally a sentence to close off this section.
## There are other elements we need to style
I almost forgot to mention links, like [this link to the Tailwind CSS website](https://tailwindcss.com). We almost made them blue but that's so yesterday, so we went with dark gray, feels edgier.
| Bret "The Hitman" Hart | Calgary, AB | Sharpshooter |
| Stone Cold Steve Austin | Austin, TX | Stone Cold Stunner |
| Randy Savage | Sarasota, FL | Elbow Drop |
| Vader | Boulder, CO | Vader Bomb |
| Razor Ramon | Chuluota, FL | Razor's Edge |
We also need to make sure inline code looks good, like if I wanted to talk about `<span>` elements or tell you the good news about `@tailwindcss/typography`.
### Sometimes I even use `code` in headings
Even though it's probably a bad idea, and historically I've had a hard time making it look good. This _"wrap the code blocks in backticks"_ trick works pretty well though really.
Another thing I've done in the past is put a `code` tag inside of a link, like if I wanted to tell you about the [`tailwindcss/docs`](https://github.com/tailwindcss/docs) repository. I don't love that there is an underline below the backticks but it is absolutely not worth the madness it would require to avoid it.
#### We haven't used an `h4` yet
But now we have. Please don't use `h5` or `h6` in your content, Medium only supports two heading levels for a reason, you animals. I honestly considered using a `before` pseudo-element to scream at you if you use an `h5` or `h6`.
We don't style them at all out of the box because `h4` elements are already so small that they are the same size as the body copy. What are we supposed to do with an `h5`, make it _smaller_ than the body copy? No thanks.
### We still need to think about stacked headings though.
#### Let's make sure we don't screw that up with `h4` elements, either.
Phew, with any luck we have styled the headings above this text and they look pretty good.
Let's add a closing paragraph here so things end with a decently sized block of text. I can't explain why I want things to end that way but I have to assume it's because I think things will look weird or unbalanced if there is a heading too close to the end of the document.
What I've written here is probably long enough, but adding this final sentence can't hurt.
## GitHub Flavored Markdown
I've also added support for GitHub Flavored Mardown using `remark-gfm`.
With `remark-gfm`, we get a few extra features in our markdown. Example: autolink literals.
A link like www.example.com or https://example.com would automatically be converted into an `a` tag.
This works for email links too: contact@example.com.
description: Mkdirs is the best boilerplate for building directory websites.
date: 2024-11-25T12:00:00.000Z
published: true
categories: [news]
author: mkdirs
---
Until now, trying to style an article, document, or blog post with Tailwind has been a tedious task that required a keen eye for typography and a lot of complex custom CSS.
By default, Tailwind removes all of the default browser styling from paragraphs, headings, lists and more. This ends up being really useful for building application UIs because you spend less time undoing user-agent styles, but when you _really are_ just trying to style some content that came from a rich-text editor in a CMS or a markdown file, it can be surprising and unintuitive.
We get lots of complaints about it actually, with people regularly asking us things like:
> Why is Tailwind removing the default styles on my `h1` elements? How do I disable this? What do you mean I lose all the other base styles too?
> We hear you, but we're not convinced that simply disabling our base styles is what you really want. You don't want to have to remove annoying margins every time you use a `p` element in a piece of your dashboard UI. And I doubt you really want your blog posts to use the user-agent styles either — you want them to look _awesome_, not awful.
The `@tailwindcss/typography` plugin is our attempt to give you what you _actually_ want, without any of the downsides of doing something stupid like disabling our base styles.
It adds a new `prose` class that you can slap on any block of vanilla HTML content and turn it into a beautiful, well-formatted document:
```html
<article class="prose">
<h1>Garlic bread with cheese: What the science tells us</h1>
<p>
For years parents have espoused the health benefits of eating garlic bread
with cheese to their children, with the food earning such an iconic status
in our culture that kids will often dress up as warm, cheesy loaf for
Halloween.
</p>
<p>
But a recent study shows that the celebrated appetizer may be linked to a
series of rabies cases springing up around the country.
</p>
</article>
```
For more information about how to use the plugin and the features it includes, [read the documentation](https://github.com/tailwindcss/typography/blob/master/README.md).
---
## What to expect from here on out
What follows from here is just a bunch of absolute nonsense I've written to dogfood the plugin itself. It includes every sensible typographic element I could think of, like **bold text**, unordered lists, ordered lists, code blocks, block quotes, _and even italics_.
It's important to cover all of these use cases for a few reasons:
1. We want everything to look good out of the box.
2. Really just the first reason, that's the whole point of the plugin.
3. Here's a third pretend reason though a list with three items looks more realistic than a list with two items.
Now we're going to try out another header style.
### Typography should be easy
So that's a header for you — with any luck if we've done our job correctly that will look pretty reasonable.
Something a wise person once told me about typography is:
> Typography is pretty important if you don't want your stuff to look like trash. Make it good then it won't be bad.
It's probably important that images look okay here by default as well:
<Image
src="/images/blog/mkdirs-opengraph.png"
width="718"
height="404"
alt="Image"
/>
Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.
Now I'm going to show you an example of an unordered list to make sure that looks good, too:
- So here is the first item in this list.
- In this example we're keeping the items short.
- Later, we'll use longer, more complex list items.
And that's the end of this section.
## What if we stack headings?
### We should make sure that looks good, too.
Sometimes you have headings directly underneath each other. In those cases you often have to undo the top margin on the second heading because it usually looks better for the headings to be closer together than a paragraph followed by a heading should be.
### When a heading comes after a paragraph …
When a heading comes after a paragraph, we need a bit more space, like I already mentioned above. Now let's see what a more complex list would look like.
- **I often do this thing where list items have headings.**
For some reason I think this looks cool which is unfortunate because it's pretty annoying to get the styles right.
I often have two or three paragraphs in these list items, too, so the hard part is getting the spacing between the paragraphs, list item heading, and separate list items to all make sense. Pretty tough honestly, you could make a strong argument that you just shouldn't write this way.
- **Since this is a list, I need at least two items.**
I explained what I'm doing already in the previous list item, but a list wouldn't be a list if it only had one item, and we really want this to look realistic. That's why I've added this second list item so I actually have something to look at when writing the styles.
- **It's not a bad idea to add a third item either.**
I think it probably would've been fine to just use two items but three is definitely not worse, and since I seem to be having no trouble making up arbitrary things to type, I might as well include it.
After this sort of list I usually have a closing statement or paragraph, because it kinda looks weird jumping right to a heading.
## Code should look okay by default.
I think most people are going to use [highlight.js](https://highlightjs.org/) or [Prism](https://prismjs.com/) or something if they want to style their code blocks but it wouldn't hurt to make them look _okay_ out of the box, even with no syntax highlighting.
Here's what a default `tailwind.config.js` file looks like at the time of writing:
```js
module.exports = {
purge: [],
theme: {
extend: {},
},
variants: {},
plugins: [],
};
```
Hopefully that looks good enough to you.
### What about nested lists?
Nested lists basically always look bad which is why editors like Medium don't even let you do it, but I guess since some of you goofballs are going to do it we have to carry the burden of at least making it work.
1. **Nested lists are rarely a good idea.**
- You might feel like you are being really "organized" or something but you are just creating a gross shape on the screen that is hard to read.
- Nested navigation in UIs is a bad idea too, keep things as flat as possible.
- Nesting tons of folders in your source code is also not helpful.
2. **Since we need to have more items, here's another one.**
- I'm not sure if we'll bother styling more than two levels deep.
- Two is already too much, three is guaranteed to be a bad idea.
- If you nest four levels deep you belong in prison.
3. **Two items isn't really a list, three is good though.**
- Again please don't nest lists if you want people to actually read your content.
- Nobody wants to look at this.
- I'm upset that we even have to bother styling this.
The most annoying thing about lists in Markdown is that `<li>` elements aren't given a child `<p>` tag unless there are multiple paragraphs in the list item. That means I have to worry about styling that annoying situation too.
- **For example, here's another nested list.**
But this time with a second paragraph.
- These list items won't have `<p>` tags
- Because they are only one line each
- **But in this second top-level list item, they will.**
This is especially annoying because of the spacing on this paragraph.
- As you can see here, because I've added a second line, this list item now has a `<p>` tag.
This is the second line I'm talking about by the way.
- Finally here's another list item so it's more like a list.
- A closing list item, but with no nested list, because why not?
And finally a sentence to close off this section.
## There are other elements we need to style
I almost forgot to mention links, like [this link to the Tailwind CSS website](https://tailwindcss.com). We almost made them blue but that's so yesterday, so we went with dark gray, feels edgier.
| Bret "The Hitman" Hart | Calgary, AB | Sharpshooter |
| Stone Cold Steve Austin | Austin, TX | Stone Cold Stunner |
| Randy Savage | Sarasota, FL | Elbow Drop |
| Vader | Boulder, CO | Vader Bomb |
| Razor Ramon | Chuluota, FL | Razor's Edge |
We also need to make sure inline code looks good, like if I wanted to talk about `<span>` elements or tell you the good news about `@tailwindcss/typography`.
### Sometimes I even use `code` in headings
Even though it's probably a bad idea, and historically I've had a hard time making it look good. This _"wrap the code blocks in backticks"_ trick works pretty well though really.
Another thing I've done in the past is put a `code` tag inside of a link, like if I wanted to tell you about the [`tailwindcss/docs`](https://github.com/tailwindcss/docs) repository. I don't love that there is an underline below the backticks but it is absolutely not worth the madness it would require to avoid it.
#### We haven't used an `h4` yet
But now we have. Please don't use `h5` or `h6` in your content, Medium only supports two heading levels for a reason, you animals. I honestly considered using a `before` pseudo-element to scream at you if you use an `h5` or `h6`.
We don't style them at all out of the box because `h4` elements are already so small that they are the same size as the body copy. What are we supposed to do with an `h5`, make it _smaller_ than the body copy? No thanks.
### We still need to think about stacked headings though.
#### Let's make sure we don't screw that up with `h4` elements, either.
Phew, with any luck we have styled the headings above this text and they look pretty good.
Let's add a closing paragraph here so things end with a decently sized block of text. I can't explain why I want things to end that way but I have to assume it's because I think things will look weird or unbalanced if there is a heading too close to the end of the document.
What I've written here is probably long enough, but adding this final sentence can't hurt.
## GitHub Flavored Markdown
I've also added support for GitHub Flavored Mardown using `remark-gfm`.
With `remark-gfm`, we get a few extra features in our markdown. Example: autolink literals.
A link like www.example.com or https://example.com would automatically be converted into an `a` tag.
This works for email links too: contact@example.com.
description: MkSaaS is the best boilerplate for building AI SaaS websites.
date: 2024-11-24T12:00:00.000Z
published: true
categories: [news, guide]
author: mksaas
---
Until now, trying to style an article, document, or blog post with Tailwind has been a tedious task that required a keen eye for typography and a lot of complex custom CSS.
By default, Tailwind removes all of the default browser styling from paragraphs, headings, lists and more. This ends up being really useful for building application UIs because you spend less time undoing user-agent styles, but when you _really are_ just trying to style some content that came from a rich-text editor in a CMS or a markdown file, it can be surprising and unintuitive.
We get lots of complaints about it actually, with people regularly asking us things like:
> Why is Tailwind removing the default styles on my `h1` elements? How do I disable this? What do you mean I lose all the other base styles too?
> We hear you, but we're not convinced that simply disabling our base styles is what you really want. You don't want to have to remove annoying margins every time you use a `p` element in a piece of your dashboard UI. And I doubt you really want your blog posts to use the user-agent styles either — you want them to look _awesome_, not awful.
The `@tailwindcss/typography` plugin is our attempt to give you what you _actually_ want, without any of the downsides of doing something stupid like disabling our base styles.
It adds a new `prose` class that you can slap on any block of vanilla HTML content and turn it into a beautiful, well-formatted document:
```html
<article class="prose">
<h1>Garlic bread with cheese: What the science tells us</h1>
<p>
For years parents have espoused the health benefits of eating garlic bread
with cheese to their children, with the food earning such an iconic status
in our culture that kids will often dress up as warm, cheesy loaf for
Halloween.
</p>
<p>
But a recent study shows that the celebrated appetizer may be linked to a
series of rabies cases springing up around the country.
</p>
</article>
```
For more information about how to use the plugin and the features it includes, [read the documentation](https://github.com/tailwindcss/typography/blob/master/README.md).
---
## What to expect from here on out
What follows from here is just a bunch of absolute nonsense I've written to dogfood the plugin itself. It includes every sensible typographic element I could think of, like **bold text**, unordered lists, ordered lists, code blocks, block quotes, _and even italics_.
It's important to cover all of these use cases for a few reasons:
1. We want everything to look good out of the box.
2. Really just the first reason, that's the whole point of the plugin.
3. Here's a third pretend reason though a list with three items looks more realistic than a list with two items.
Now we're going to try out another header style.
### Typography should be easy
So that's a header for you — with any luck if we've done our job correctly that will look pretty reasonable.
Something a wise person once told me about typography is:
> Typography is pretty important if you don't want your stuff to look like trash. Make it good then it won't be bad.
It's probably important that images look okay here by default as well:
<Image
src="/images/blog/mkdirs-opengraph.png"
width="718"
height="404"
alt="Image"
/>
Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.
Now I'm going to show you an example of an unordered list to make sure that looks good, too:
- So here is the first item in this list.
- In this example we're keeping the items short.
- Later, we'll use longer, more complex list items.
And that's the end of this section.
## What if we stack headings?
### We should make sure that looks good, too.
Sometimes you have headings directly underneath each other. In those cases you often have to undo the top margin on the second heading because it usually looks better for the headings to be closer together than a paragraph followed by a heading should be.
### When a heading comes after a paragraph …
When a heading comes after a paragraph, we need a bit more space, like I already mentioned above. Now let's see what a more complex list would look like.
- **I often do this thing where list items have headings.**
For some reason I think this looks cool which is unfortunate because it's pretty annoying to get the styles right.
I often have two or three paragraphs in these list items, too, so the hard part is getting the spacing between the paragraphs, list item heading, and separate list items to all make sense. Pretty tough honestly, you could make a strong argument that you just shouldn't write this way.
- **Since this is a list, I need at least two items.**
I explained what I'm doing already in the previous list item, but a list wouldn't be a list if it only had one item, and we really want this to look realistic. That's why I've added this second list item so I actually have something to look at when writing the styles.
- **It's not a bad idea to add a third item either.**
I think it probably would've been fine to just use two items but three is definitely not worse, and since I seem to be having no trouble making up arbitrary things to type, I might as well include it.
After this sort of list I usually have a closing statement or paragraph, because it kinda looks weird jumping right to a heading.
## Code should look okay by default.
I think most people are going to use [highlight.js](https://highlightjs.org/) or [Prism](https://prismjs.com/) or something if they want to style their code blocks but it wouldn't hurt to make them look _okay_ out of the box, even with no syntax highlighting.
Here's what a default `tailwind.config.js` file looks like at the time of writing:
```js
module.exports = {
purge: [],
theme: {
extend: {},
},
variants: {},
plugins: [],
};
```
Hopefully that looks good enough to you.
### What about nested lists?
Nested lists basically always look bad which is why editors like Medium don't even let you do it, but I guess since some of you goofballs are going to do it we have to carry the burden of at least making it work.
1. **Nested lists are rarely a good idea.**
- You might feel like you are being really "organized" or something but you are just creating a gross shape on the screen that is hard to read.
- Nested navigation in UIs is a bad idea too, keep things as flat as possible.
- Nesting tons of folders in your source code is also not helpful.
2. **Since we need to have more items, here's another one.**
- I'm not sure if we'll bother styling more than two levels deep.
- Two is already too much, three is guaranteed to be a bad idea.
- If you nest four levels deep you belong in prison.
3. **Two items isn't really a list, three is good though.**
- Again please don't nest lists if you want people to actually read your content.
- Nobody wants to look at this.
- I'm upset that we even have to bother styling this.
The most annoying thing about lists in Markdown is that `<li>` elements aren't given a child `<p>` tag unless there are multiple paragraphs in the list item. That means I have to worry about styling that annoying situation too.
- **For example, here's another nested list.**
But this time with a second paragraph.
- These list items won't have `<p>` tags
- Because they are only one line each
- **But in this second top-level list item, they will.**
This is especially annoying because of the spacing on this paragraph.
- As you can see here, because I've added a second line, this list item now has a `<p>` tag.
This is the second line I'm talking about by the way.
- Finally here's another list item so it's more like a list.
- A closing list item, but with no nested list, because why not?
And finally a sentence to close off this section.
## There are other elements we need to style
I almost forgot to mention links, like [this link to the Tailwind CSS website](https://tailwindcss.com). We almost made them blue but that's so yesterday, so we went with dark gray, feels edgier.
| Bret "The Hitman" Hart | Calgary, AB | Sharpshooter |
| Stone Cold Steve Austin | Austin, TX | Stone Cold Stunner |
| Randy Savage | Sarasota, FL | Elbow Drop |
| Vader | Boulder, CO | Vader Bomb |
| Razor Ramon | Chuluota, FL | Razor's Edge |
We also need to make sure inline code looks good, like if I wanted to talk about `<span>` elements or tell you the good news about `@tailwindcss/typography`.
### Sometimes I even use `code` in headings
Even though it's probably a bad idea, and historically I've had a hard time making it look good. This _"wrap the code blocks in backticks"_ trick works pretty well though really.
Another thing I've done in the past is put a `code` tag inside of a link, like if I wanted to tell you about the [`tailwindcss/docs`](https://github.com/tailwindcss/docs) repository. I don't love that there is an underline below the backticks but it is absolutely not worth the madness it would require to avoid it.
#### We haven't used an `h4` yet
But now we have. Please don't use `h5` or `h6` in your content, Medium only supports two heading levels for a reason, you animals. I honestly considered using a `before` pseudo-element to scream at you if you use an `h5` or `h6`.
We don't style them at all out of the box because `h4` elements are already so small that they are the same size as the body copy. What are we supposed to do with an `h5`, make it _smaller_ than the body copy? No thanks.
### We still need to think about stacked headings though.
#### Let's make sure we don't screw that up with `h4` elements, either.
Phew, with any luck we have styled the headings above this text and they look pretty good.
Let's add a closing paragraph here so things end with a decently sized block of text. I can't explain why I want things to end that way but I have to assume it's because I think things will look weird or unbalanced if there is a heading too close to the end of the document.
What I've written here is probably long enough, but adding this final sentence can't hurt.
## GitHub Flavored Markdown
I've also added support for GitHub Flavored Mardown using `remark-gfm`.
With `remark-gfm`, we get a few extra features in our markdown. Example: autolink literals.
A link like www.example.com or https://example.com would automatically be converted into an `a` tag.
This works for email links too: contact@example.com.
You can specify an `id` for accordion. The accordion will automatically open when the user is navigating to the page with the specified `id` in hash parameter.
```mdx
<Accordions>
<Accordion title="My Title" id="my-title">
My Content
</Accordion>
</Accordions>
```
> The value of accordion is same as title by default. When an id presents, it will be used as the value instead.
description: Allow zoom-in images in your documentation
preview: zoomImage
---
## Usage
Replace `img` with `ImageZoom` in your MDX components.
```tsx title="app/docs/[[...slug]]/page.tsx"
import { ImageZoom } from 'fumadocs-ui/components/image-zoom';
import defaultMdxComponents from 'fumadocs-ui/mdx';
return (
<MdxContent
components={{
...defaultMdxComponents,
img: (props) => <ImageZoom {...(props as any)} />,
// other Mdx components
}}
/>
);
```
Now image zoom will be automatically enabled on all images.
```mdx

```
### Image Optimization
A default [`sizes` property](https://nextjs.org/docs/app/api-reference/components/image#sizes) will be defined for Next.js `<Image />` component if not specified.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.