Commit Graph

814 Commits

Author SHA1 Message Date
javayhu
5c213d014a refactor: 'popular' instead of 'recommended' for price plan 2025-07-10 14:54:07 +08:00
javayhu
861502c28f feat: implement credit distribution for all users based on subscription status 2025-07-10 14:52:23 +08:00
javayhu
737bd7f80f feat: enhance credits management with subscription renewal and lifetime monthly credits 2025-07-10 14:42:36 +08:00
javayhu
74d7cf44a1 Merge branch 'dev/credits-v2' of https://github.com/MkSaaSHQ/mksaas-template into dev/credits-v2 2025-07-10 10:54:10 +08:00
javayhu
e011d09803 feat: enhance CreditPackages component with loading indicator 2025-07-10 10:54:07 +08:00
javayhu
50c500deb5 refactor: streamline credit handling in StripeProvider
- 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.
2025-07-10 10:15:42 +08:00
javayhu
cd710bb9ed feat: support register gift credits 2025-07-10 09:58:48 +08:00
javayhu
04f7f891a4 feat: update credit expiration handling and configuration
- 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.
2025-07-10 01:12:11 +08:00
javayhu
3e0861f883 fix: update sidebar rendering logic and enhance credit package success toast
- 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.
2025-07-09 21:58:35 +08:00
javayhu
a7738f0cbf feat: implement credit checkout session and enhance credit package management
- 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.
2025-07-09 00:22:07 +08:00
javayhu
adb9b80572 fix: update default expireDays assignment in addCredits function 2025-07-08 00:51:04 +08:00
javayhu
2e8f70dc76 feat: enhance credits management with new configurations
- 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.
2025-07-08 00:48:17 +08:00
javayhu
73ce18f564 refactor: update credit package descriptions and improve component structure
- 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.
2025-07-07 01:10:06 +08:00
javayhu
e430a0c319 feat: implement credit packages management with translations and server integration
- 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.
2025-07-07 00:47:43 +08:00
javayhu
f7f7be2ef0 feat: add credits config in website config
- 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.
2025-07-07 00:04:45 +08:00
javayhu
0af0aa3b09 refactor: reorganize credit transaction types and update imports
- 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.
2025-07-06 23:25:38 +08:00
javayhu
04c2b2d7ee refactor: update translations and improve table component structure
- 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.
2025-07-06 18:20:31 +08:00
javayhu
d9cda3e122 feat: enhance credits settings with tabbed interface and improved translations
- 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.
2025-07-06 17:17:24 +08:00
javayhu
d8a12343c8 refactor: adjust spacing in layout components for consistency
- 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.
2025-07-06 11:30:10 +08:00
javayhu
40af0f6922 feat: add credit transactions table
- 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.
2025-07-06 10:44:13 +08:00
javayhu
1740c826c7 feat: add CreditsBalance component and integrate into dashboard and navbar
- 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.
2025-07-06 00:41:57 +08:00
javayhu
75083b32e4 refactor: reorganize credit-related imports and enhance user feedback
- 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.
2025-07-06 00:15:07 +08:00
javayhu
e933844479 feat: enhance credit management with transaction store and UI updates
- 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.
2025-07-05 23:59:30 +08:00
javayhu
13bee49f90 feat: add credits section to avatar configuration and update translations
- 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.
2025-07-05 23:25:37 +08:00
javayhu
fe2b1bbe39 feat: add credit purchase functionality with Stripe integration
- 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.
2025-07-05 22:30:22 +08:00
javayhu
98421afab8 Merge remote-tracking branch 'origin/main' into dev/credits 2025-07-05 15:52:40 +08:00
javayhu
6980507c43 chore: update dashboard and setting pages layout 2025-07-05 15:51:36 +08:00
javayhu
8657bf4e84 chore: show theme selector in demo website only 2025-07-05 10:10:39 +08:00
javayhu
8d17bd80c5 feat: implement admin access control in UsersLayout 2025-07-04 23:23:25 +08:00
javayhu
c7e3de816c chore: update credit related functions 2025-07-04 01:02:56 +08:00
javayhu
da26c2cf5d Merge branch 'main' of https://github.com/MkSaaSHQ/mksaas-template into dev/credits 2025-07-02 23:46:20 +08:00
javayhu
cc9a15db8f chore: make DiscordWidget deprecated 2025-07-02 22:52:32 +08:00
javayhu
aaadd7fcf4 fix: add type assertion for image generation response 2025-07-02 01:14:58 +08:00
javayhu
abf8b31ec7 chore: optimize the credit functions 2025-07-01 00:23:21 +08:00
javayhu
12fb19e97b chore: add credit related tables 2025-07-01 00:23:21 +08:00
javayhu
d8904750d9 chore: fix db instance 2025-07-01 00:23:21 +08:00
javayhu
b30355dfe5 chore: update credit related functions (2) 2025-07-01 00:23:21 +08:00
javayhu
dae7a3b0e8 chore: update credits related functions (2) 2025-07-01 00:23:21 +08:00
javayhu
e0c0ff9518 chore: update credits related functions 2025-07-01 00:23:21 +08:00
javayhu
e1b0e2f44c feat: support credits 2025-07-01 00:23:21 +08:00
javayhu
3fa44f92c7 chore: add config for enableTurnstileCaptcha 2025-06-30 23:50:56 +08:00
javayhu
55ae5ced9e fix: fix ai image default models 2025-06-30 23:50:01 +08:00
javayhu
111568d746 fix: show captcha when turnstile is enabled only 2025-06-30 23:05:38 +08:00
javayhu
91614ed6e5 fix: fix build error & remove Spinner 2025-06-28 22:50:40 +08:00
javayhu
0453db5ec6 chore: optimize ai image generator 2025-06-28 22:47:40 +08:00
javayhu
1a297e33f9 Merge branch 'main' of https://github.com/MkSaaSHQ/mksaas-template into dev/ai-image 2025-06-28 10:12:23 +08:00
javayhu
05b90fb0a7 chore: optimize validate captcha 2025-06-28 10:09:50 +08:00
javayhu
66567cfecd chore: optimize turnstile captcha 2025-06-28 00:34:31 +08:00
javayhu
958852335d feat: support cloudflare turnstile 2025-06-27 23:50:56 +08:00
javayhu
3058484803 custom: optimize ai image generator page 2025-06-27 01:05:19 +08:00
javayhu
985579b964 feat: support ai image generator 2025-06-26 00:41:27 +08:00
javayhu
b3180e617d chore: support datafast analytics revenue track 2025-06-25 20:28:09 +08:00
javayhu
bc915a53dc chore: add monitor api route 2025-06-24 23:48:43 +08:00
javayhu
bd67ac3517 chore: support allow promotion code in price config 2025-06-24 23:00:42 +08:00
javayhu
1cb0793a83 chore: change baseURL in fetch session 2025-06-21 09:27:22 +08:00
javayhu
40b313a2f2 chore: move mdx-components to docs folder 2025-06-20 23:51:25 +08:00
javayhu
9e54932b27 chore: move source.ts to lib folder 2025-06-20 23:12:29 +08:00
javayhu
befd10cc5b refactor: remove useless packages 2025-06-20 21:17:11 +08:00
javayhu
b17599976f chore: move blog types to index 2025-06-20 21:09:50 +08:00
javayhu
107f761716 chore: optimize email templates (found by knip) 2025-06-20 21:00:51 +08:00
javayhu
7c101d595e refactor(storage) replace with s3mini sdk & fix upload issue in cloudflare worker 2025-06-20 02:04:14 +08:00
javayhu
196f72ff68 chore: fix lint and format issues 2025-06-20 02:04:00 +08:00
javayhu
e49d4624fe fix: fix docs sidebar collapse issue 2025-06-18 23:56:28 +08:00
javayhu
8a5a49f041 fix: add type annotation for data in GitHubStarsButton component 2025-06-18 00:15:20 +08:00
javayhu
fcb58d2206 refactor(blog) remove blog toc component 2025-06-17 23:38:56 +08:00
javayhu
aa547f209e chore: adjust locale handling in Providers and DocsRootLayout, and simplify search API request handling 2025-06-17 23:38:45 +08:00
javayhu
5b30fd8c48 chore: update DynamicCodeBlock component props 2025-06-17 23:38:38 +08:00
javayhu
c8b29c59dc chore: fix fumadocs top empty banner shown when in cloudflare worker env 2025-06-17 23:38:34 +08:00
javayhu
da0176ffc5 refactor(blog) update sitemap for blog pages 2025-06-17 23:38:11 +08:00
javayhu
568ef9bc3a refactor(blog) blog category pages 2025-06-17 23:38:07 +08:00
javayhu
e05d20ee5e refactor(blog) optimize inline toc & blog page layout 2025-06-17 23:38:02 +08:00
javayhu
56fa6fb63c refactor(blog) blog page ready with toc 2025-06-17 23:37:56 +08:00
javayhu
ebeacae587 refactor(blog) refactor blog home page 2025-06-17 23:37:52 +08:00
javayhu
0a2d081b07 refactor(blog) remove content-collections & add blog source 2025-06-17 23:37:41 +08:00
javayhu
c477aae333 refactor(pages) migrate custom pages to using fumadocs 2025-06-17 23:36:57 +08:00
javayhu
543798e2c1 refactor(changelog) refactor release card component 2025-06-17 23:36:50 +08:00
javayhu
483a970b71 refactor(changelog) migrate changelog to use fumadocs 2025-06-17 23:36:44 +08:00
javayhu
292faddc7a refactor(docs) parse and render docs mdx files by fumadocs 2025-06-17 23:36:09 +08:00
javayhu
3136766a6d chore: add email to footer social config 2025-06-15 00:44:41 +08:00
javayhu
02b5ee1727 chore: optimize feishu notification message 2025-06-15 00:14:14 +08:00
javayhu
b10e27ee29 chore: optimize discord message information 2025-06-14 22:21:39 +08:00
javayhu
ea0c74aa12 fix: z-index 100 is higher than dropdown menu 2025-06-14 19:30:27 +08:00
javayhu
4015cb3143 chore: add 2 custom components 2025-06-14 19:00:21 +08:00
javayhu
2ad6eab666 chore: add 20+ animate ui components 2025-06-14 15:23:22 +08:00
javayhu
c23383fdde chore: add MotionHighlight component from animate-ui 2025-06-14 15:00:55 +08:00
javayhu
e610fe7335 feat: support send message to feishu 2025-06-14 02:09:40 +08:00
javayhu
a7a5a8a6a4 chore: update logo cloud image urls 2025-06-12 01:52:13 +08:00
javayhu
17c7d67743 refactor: add getDb function & update all db calls 2025-06-12 01:40:44 +08:00
javayhu
0684b16278 chore: optimize code for type safe 2025-06-12 00:54:28 +08:00
javayhu
a7c56f4a6c chore: optimize db instance init with schema 2025-06-12 00:20:06 +08:00
javayhu
563fc2099a refactor: move db migrations to src/db/migrations folder 2025-06-12 00:04:29 +08:00
javayhu
56df0bed46 fix: optimize og image url in metadata 2025-06-10 22:52:16 +08:00
javayhu
5b50e62774 chore: move tailark components from /src/app to /src/components (cf deployment error: too many open files) 2025-06-09 00:56:38 +08:00
javayhu
00dcd7ce61 chore: optimize navbar menu link active status 2025-06-07 23:36:18 +08:00
javayhu
9b7c1387f9 chore: make navbar z-index higher 2025-06-07 18:15:42 +08:00
javayhu
7edc627505 chore: set enableDiscordWidget to false as default 2025-05-31 13:43:48 +08:00
javayhu
34b7c1c74f custom: support promotekit affiliate 2025-05-31 12:13:28 +08:00
javayhu
80763b4efb chore: add generateStaticParams to blog post page 2025-05-31 09:21:40 +08:00
javayhu
6a4f0575c4 fix: fix cr bugs from coderabbit 2025-05-31 09:19:56 +08:00
javayhu
d391d35e26 fix: remove generateStaticParams in blog post page 2025-05-31 00:47:29 +08:00
javayhu
5f6e75fe93 Merge branch 'main' of github.com:MkSaaSHQ/mksaas-template 2025-05-31 00:42:54 +08:00
javayhu
5fae666b70 fix: set dynamic to force-static in blog post page 2025-05-31 00:42:14 +08:00
javayhu
f589fa2d00 refactor: update blog url path & components & sitemap 2025-05-31 00:07:25 +08:00
javayhu
c23fdee88f chore: optimize blog page metadata 2025-05-30 18:27:22 +08:00
javayhu
707399057e Merge branch 'main' of github.com:MkSaaSHQ/mksaas-template 2025-05-30 15:12:06 +08:00
javayhu
ce7978a572 chore: add affonso script to layout 2025-05-30 15:11:02 +08:00
javayhu
8dd3e12824 feat: support affonso affiliate 2025-05-30 14:05:45 +08:00
javayhu
1a4917c874 chore: optimize upgrade card config 2025-05-30 13:28:03 +08:00
javayhu
e27a7a081c chore: optimize discord widget config 2025-05-30 13:26:42 +08:00
javayhu
3ea18fcade chore: support config for enable upgrade card 2025-05-27 23:47:05 +08:00
javayhu
38bb93fa4f chore: support config for discord widget feature 2025-05-27 23:17:49 +08:00
javayhu
1e203f4e87 fix: do not show upgrade card when sidebar collapses 2025-05-27 23:09:47 +08:00
javayhu
5824e7489c fix: show post image as og image 2025-05-25 22:26:14 +08:00
javayhu
02df9d134f fix: change og:site_name to metadata name instead of title 2025-05-25 22:19:06 +08:00
javayhu
82f40d7dc6 fix: fix canonicalUrl in block pages 2025-05-22 22:53:29 +08:00
javayhu
28ad92e101 fix: fix canonicalUrl 2025-05-22 22:30:35 +08:00
javayhu
2db79a871a chore: show discord widget in homepage only 2025-05-18 23:58:58 +08:00
javayhu
3c1f1a60a3 fix: fix logo light config 2025-05-16 10:24:55 +08:00
javayhu
999ba40bba chore: udpate short link to roadmap 2025-05-16 10:20:33 +08:00
javayhu
48e188b0da chore: update social links 2025-05-16 10:17:15 +08:00
javayhu
b7808adee5 Merge branch 'main' of github.com:MkSaaSHQ/mksaas-template 2025-05-15 23:58:54 +08:00
javayhu
0585fb3253 chore: set baseURL in better auth 2025-05-15 23:58:48 +08:00
javayhu
136a123a56 chore: optimize discord widget for mobile 2025-05-15 09:31:17 +08:00
javayhu
50d6e2b069 Merge branch 'main' of github.com:MkSaaSHQ/mksaas-template 2025-05-15 00:43:56 +08:00
javayhu
ecc7952340 feat: support discord notification when successful one time payment 2025-05-15 00:43:45 +08:00
javayhu
036ea72b30 feat: show discord widget on the website 2025-05-15 00:24:26 +08:00
javayhu
cd44d3ae67 feat: support discord bot on website 2025-05-14 23:56:01 +08:00
javayhu
e5d3e9144d chore: optimize faking user data when in demo website 2025-05-14 22:48:54 +08:00
javayhu
0476d696de fix: remove version in ogImage 2025-05-14 07:29:58 +08:00
javayhu
c661dd60d7 custom: update og image version 2025-05-13 01:45:52 +08:00
javayhu
15c39fde7f
Merge branch 'main' into user-table 2025-05-11 14:58:49 +08:00
javayhu
e284de79a8 chore: support show admin user page in demo website 2025-05-11 14:50:13 +08:00
javayhu
29af46fa28
Merge pull request #35 from MkSaaSHQ/user-table
feat: user management
2025-05-11 14:04:12 +08:00
javayhu
dc86cfacd8 chore: i18n user table messages 2025-05-11 13:57:26 +08:00
javayhu
70d35e5fd5 chore: update default ban reason 2025-05-11 11:51:54 +08:00
javayhu
245dfaa6e1 chore: refresh table after ban or unban user 2025-05-11 11:46:43 +08:00
javayhu
bcb1e0ef9d chore: update user detail viewer date picker component 2025-05-11 11:26:50 +08:00
javayhu
f764bcb627 chore: update calendar component and downgrade react-date-picker 2025-05-11 11:21:55 +08:00
javayhu
5f6205c150 chore: define type User and use it in users-table 2025-05-11 10:52:11 +08:00
javayhu
78681df65f chore: call ban/unban user by authClient.admin 2025-05-11 10:44:48 +08:00
javayhu
d889cdf2b7 chore: update user detail viewer 2025-05-11 09:55:21 +08:00
javayhu
4e6496adc0 chore: optimize get users logic for sorting 2025-05-11 08:55:46 +08:00
javayhu
fd1bc9ee00 chore: support sort by ban reason and expires column 2025-05-11 08:52:41 +08:00
javayhu
3bb6d089fe chore: remove column emailVerified 2025-05-11 08:47:48 +08:00
javayhu
7248750277 chore: support sort by role and banned 2025-05-11 08:38:13 +08:00
javayhu
6cace107e5 chore: add doc link to analytics components 2025-05-11 07:49:10 +08:00
javayhu
3042894e13 feat: support ahrefs analytics 2025-05-11 07:36:09 +08:00
javayhu
4b6fb7beed chore: copy email when click it 2025-05-11 00:53:34 +08:00
javayhu
061b304aa8 feat: support ban and unban user & show user detailed information 2025-05-11 00:47:05 +08:00
javayhu
71e9e33fd7 chore: optimize email and status column cell ui 2025-05-11 00:04:20 +08:00