Commit Graph

196 Commits

Author SHA1 Message Date
javayhu
2ba2eebbaa chore: update database schema and enhance authentication features
- 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.
2025-03-15 00:54:13 +08:00
javayhu
0045ecf91e chore: remove obsolete site.webmanifest and update manifest.ts documentation
- 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.
2025-03-15 00:51:32 +08:00
javayhu
130880cf87 chore: refactor localization handling in email templates and 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.
2025-03-14 23:14:14 +08:00
javayhu
2d8f70f09a chore: refactor metadata handling and remove unused files
- 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.
2025-03-14 23:09:30 +08:00
javayhu
5d925b65c9 tmp: optimize international metadata 2025-03-14 10:11:46 +08:00
javayhu
30bd8d1cf3 chore: optimize manifest.ts 2025-03-14 10:02:24 +08:00
javayhu
1c4f86c7ef chore: enhance localization and metadata across application
- 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.
2025-03-14 01:31:17 +08:00
javayhu
695a4b9ecb chore: add MCP server configuration for console-ninja
- 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.
2025-03-14 01:03:16 +08:00
javayhu
dab2bbac0c refactor: update authentication forms to use DEFAULT_LOGIN_REDIRECT
- Replace direct usage of Routes.DefaultLoginRedirect with DEFAULT_LOGIN_REDIRECT in LoginForm, RegisterForm, and SocialLoginButton for consistency.
- Add documentation comment to websiteConfig for clarity.
2025-03-14 00:56:51 +08:00
javayhu
edbec45660 chore: remove author metadata from website configuration 2025-03-14 00:13:18 +08:00
javayhu
bb4169f4bc fix: update team name in email templates for localization
- 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.
2025-03-13 23:50:54 +08:00
javayhu
3dbf65b62a refactor: streamline email handling and localization
- 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.
2025-03-13 23:46:24 +08:00
javayhu
7a1991f56c refactor: standardize error handling in authentication forms
- 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.
2025-03-13 23:46:04 +08:00
javayhu
e549a0546e fix: fix import Locale from next-intl 2025-03-13 10:14:50 +08:00
javayhu
ce28a0e51d feat: update typography by adding DM Sans font weight 500
- Replace GeistSans with fontDMSans in layout component
- Introduce new DM Sans font file for weight 500
- Update fontDMSans to include variable for weight 500
2025-03-13 00:35:47 +08:00
javayhu
8d85680fce
Merge pull request #10 from MkSaaSHQ/next-intl
chore: upgrade next-intl to version 4.0.0 and update type definitions
2025-03-13 00:25:07 +08:00
javayhu
df1c75f56a chore: upgrade next-intl to version 4.0.0 and update type definitions
- 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
2025-03-13 00:23:37 +08:00
javayhu
d7389eef47 chore: update home page 2025-03-12 23:46:02 +08:00
javayhu
1416cd9d43 refactor: simplify About page by removing unnecessary translations and imports
- 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
2025-03-11 00:40:47 +08:00
javayhu
805a871146 feat: enhance MDX rendering with code copy functionality
- 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
2025-03-11 00:33:14 +08:00
javayhu
9a6ce6b7c3 feat: add internationalization for theme and language switchers
- 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
2025-03-11 00:08:32 +08:00
javayhu
c96d3952d0 feat: improve locale switching with dedicated LocaleSwitcher component
- 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
2025-03-11 00:01:51 +08:00
javayhu
57166fe250 feat: add DM Sans font to website typography
- 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
2025-03-10 09:53:43 +08:00
javayhu
031a05e549 refactor: enhance website configuration with comprehensive social and metadata options
- 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
2025-03-10 01:06:39 +08:00
javayhu
8b4dde9042 refactor: centralize website configuration with dynamic translations
- 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
2025-03-10 00:48:12 +08:00
javayhu
c7ab08f01d refactor: consolidate configuration and utility files
- 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`
2025-03-09 23:40:29 +08:00
javayhu
4f5f216296 refactor: rename marketing.tsx to config.tsx 2025-03-09 23:28:57 +08:00
javayhu
df17877ede refactor: replace siteConfig.url with dynamic base URL generation
- 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
2025-03-09 23:11:51 +08:00
javayhu
8d54beee58 refactor: optimize code & rename files 2025-03-09 22:38:14 +08:00
javayhu
34006556c8 refactor: run biome format to src folder 2025-03-09 22:13:59 +08:00
javayhu
92ec1b14c5 refactor: format src/app folder 2025-03-09 20:01:07 +08:00
javayhu
02bdb93bbd fix: fix export images in AboutPage 2025-03-09 16:34:47 +08:00
javayhu
6144cdcd3a feat: add waitlist page with internationalization support
- 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
2025-03-09 16:23:28 +08:00
javayhu
99c8827eb8 feat: add about page with responsive image gallery and internationalization
- 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
2025-03-09 16:14:28 +08:00
javayhu
e8b9dfb3c3 feat: add contact page with internationalization support
- 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
2025-03-09 15:09:55 +08:00
javayhu
bc4b5527eb feat: add changelog page with localized release notes
- 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
2025-03-09 14:42:04 +08:00
javayhu
8da4488106 refactor: optimize the folder structure 2025-03-09 14:17:51 +08:00
javayhu
9bd85d7b6f feat: add legal pages with content collections and localization support
- 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
2025-03-09 12:22:53 +08:00
javayhu
76748cf0b2 feat: add features block variants and chart component
- 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
2025-03-09 11:17:18 +08:00
javayhu
8af6e89675 feat: add multiple content block variants and update block images
- 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
2025-03-09 11:01:59 +08:00
javayhu
b8f0801112 feat: add multiple hero section variants with Swiper and new block images
- 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
2025-03-09 10:48:08 +08:00
javayhu
090734c0c3 chore: add robots.tx and update sitemap.ts 2025-03-09 10:43:25 +08:00
javayhu
35836cdc56 refactor: improve navigation styling and active state handling
- 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
2025-03-09 09:49:43 +08:00
javayhu
45b407765b feat: add multiple theme CSS files for customizable color schemes
- 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
2025-03-09 09:44:17 +08:00
javayhu
59ae1d9830 chore: update best practices documentation for various technologies
- 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
2025-03-09 08:44:53 +08:00
javayhu
f2d616cd2f feat: add landing page blocks and block pages 2025-03-09 01:53:43 +08:00
javayhu
416e184a59 feat: add blocks section to marketing navigation and routes
- 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
2025-03-09 01:11:05 +08:00
javayhu
63b549212e fix: unset overflow-y to scroll 2025-03-09 00:27:02 +08:00
javayhu
129aac2c12 feat: add dedicated pricing page with multiple pricing components
- 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
2025-03-09 00:26:34 +08:00
javayhu
6160622ccd refactor: update mobile navbar and localization
- 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
2025-03-09 00:05:14 +08:00