V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
tianzx
V2EX  ›  分享创造

分享我们基于 Next.js 的开源 SaaS 开发模板🚀

  •  6
     
  •   tianzx ·
    saasfly · 32 天前 · 5554 次点击
    这是一个创建于 32 天前的主题,其中的信息可能已经有所发展或是发生改变。

    🎉 Saasfly - 让构建现代化 SaaS 应用变得简单、高效、愉悦!

    📢 项目简介

    Saasfly 是一款完全免费、开源的企业级 Next.js 模板,专为创业团队和个人开发者量身打造。它集成了诸多开箱即用的特性,如国际化支持、SEO 优化、Monorepo 管理等,助您快速搭建现代化的 SaaS 应用。Saasfly 采用了业界领先的技术栈,在保证开发效率的同时,兼顾了代码质量和性能优化。

    🌟 项目特色

    • 🆓 完全免费:Saasfly 是一款开源项目,遵循 MIT 许可协议,您可以免费使用和修改。
    • 🚀 快速开发:Saasfly 提供了一系列开发脚手架和 UI 组件库,帮助您快速搭建应用原型。
    • 🌍 国际化支持:Saasfly 内置了国际化方案,让您的应用轻松实现多语言支持。
    • 🔍 SEO 友好:Saasfly 针对搜索引擎进行了优化,提高您的应用在搜索结果中的排名。
    • 📦 Monorepo 管理:Saasfly 采用了 Monorepo 架构,方便您管理复杂的应用代码。
    • 🛠️ 企业级支持:我们为企业用户提供专业的支持和咨询服务,助您发挥 Saasfly 的最大潜力。

    🙌 社区互动

    Saasfly 的成长离不开社区的支持。我们诚邀您参与到 Saasfly 的建设中来,无论是点赞 ⭐️、提 Issue 🐛,还是贡献代码 🎁,都是对我们莫大的鼓励。让我们携手打造更加优秀的 Saasfly!

    👀 项目预览

    想要近距离感受 Saasfly 的魅力?快来我们的 demo 站点体验一下吧!

    🔗 相关链接

    🚀 立即开始

    使用 Saasfly 开启您的 SaaS 创业之旅,让 SaaS 开发变得前所未有的简单!给 Saasfly 一个 ⭐️,鼓励我们做得更好!

    46 条回复    2024-03-29 14:59:04 +08:00
    xinbaoCode
        1
    xinbaoCode  
       32 天前
    额,文档点击中文切换不了~🐶
    tianzx
        2
    tianzx  
    OP
       32 天前
    @xinbaoCode 之后会逐步完善中文文档的,感谢您的关注🥺
    amon
        3
    amon  
       32 天前
    为开源点赞,已 star
    think2011
        4
    think2011  
       32 天前
    tianzx
        5
    tianzx  
    OP
       32 天前
    @amon 十分感谢🙏
    tianzx
        6
    tianzx  
    OP
       32 天前
    @think2011 感谢指出🙏 ,文档这块确实没有仔细测试,所以想要开源出来能够得到社区的帮助🥺
    771007147
        7
    771007147  
       32 天前
    看着很棒,已 star
    tianzx
        8
    tianzx  
    OP
       32 天前
    @771007147 十分感谢🙏
    BaiLinfeng
        9
    BaiLinfeng  
       32 天前
    中文文档支持的很不好友啊
    tianzx
        10
    tianzx  
    OP
       32 天前
    @BaiLinfeng 我们会尽快支持中文文档,希望您持续关注我们的项目🙏
    LiuN1an
        11
    LiuN1an  
       31 天前
    pricing 页面的升级版和专业版点击后经典报错:Application error a client-side exception has occurred
    tomdddd
        12
    tomdddd  
       31 天前
    看起来基于 Taxonomy 项目改的把,现在 contentlayer 和 nextjs 14 都不兼容了,我看了下现在 contentlayer 也不维护了,建议换一个。。。
    tianzx
        13
    tianzx  
    OP
       31 天前
    @LiuN1an 已修复,十分感谢您的帮助🙏
    tianzx
        14
    tianzx  
    OP
       31 天前
    @tomdddd 没错主要参考的是 Taxonomy 和 create-t3 ,但是做了大量的改动,您有什么建议吗对于 markdown 这块的支持🙏
    theprimone
        15
    theprimone  
       31 天前
    Astro 梭哈 😏
    tianzx
        16
    tianzx  
    OP
       31 天前   ❤️ 1
    @theprimone Astro 我们主要用于公司的博客 https://blog.nextify.ltd/ ,以及使用了 starlight 来构建我们的文档 https://document.saasfly.io ,感谢您的关注,之后我们会逐步开源我们用到的技术栈🙏
    mnsw
        17
    mnsw  
       31 天前
    现在针对国内做 SaaS 还有钱途么?
    tianzx
        18
    tianzx  
    OP
       31 天前
    @mnsw 我们主要想做的是全球市场,所以从技术栈的选型也考虑到这一点,感谢您的关注🙏
    lilei2023
        19
    lilei2023  
       31 天前
    这 UI 不是是用的 shadcn 那一套吧?
    tianzx
        20
    tianzx  
    OP
       31 天前
    @lilei2023 是的,我们主要参考了 shadcn's Taxonomy and t3-oss's create-t3-turbo 这两个项目,感谢您的关注🙏
    hooych
        21
    hooych  
       31 天前
    太棒啦
    tianzx
        22
    tianzx  
    OP
       31 天前
    @hooych 十分感谢您的关注🙏
    tomdddd
        23
    tomdddd  
       31 天前   ❤️ 1
    @tianzx 目前基于 mdx 和 mdx-remote 魔改了下,但是确实没有 contentlayer 方便
    isno
        24
    isno  
       30 天前
    这是干啥的啊? 没看懂。打开 demo ,里面咋是一个 k8s 集群呢?
    tianzx
        25
    tianzx  
    OP
       30 天前   ❤️ 1
    @isno 主要是给初创公司和个人开发者提供一个基于 Next.js 快速开发模板,demo 是我们用来展示的这套技术默认启动后的样子,k8s 集群是我们展示一个默认的增删改查的实现,感谢关注🙏
    tianzx
        26
    tianzx  
    OP
       30 天前   ❤️ 1
    @isno 很早就关注了您的 theByteBook ,在做 k8s 全套解决方案的时候学习到了不少东西,再次感谢🙏
    8520ccc
        27
    8520ccc  
       30 天前 via iPhone
    跑不起来
    tianzx
        28
    tianzx  
    OP
       30 天前
    @8520ccc 具体的报错有吗,项目强制依赖数据库,可以看下是这个原因吗,感谢关注🙏
    8520ccc
        29
    8520ccc  
       30 天前 via iPhone   ❤️ 1
    @tianzx 数据库设置了的,执行了后还可以看到数据库表的结构都建立好了,等会发报错吧
    convolution
        30
    convolution  
       30 天前
    登录有支持谷歌么?
    tianzx
        31
    tianzx  
    OP
       30 天前
    @convolution 支持的,GitHubProvider({
    clientId: env.GITHUB_CLIENT_ID,
    clientSecret: env.GITHUB_CLIENT_SECRET,
    }), 把这个换成对应 Google 的,或者加进去同时提供就可以了,感谢关注🙏
    8520ccc
        32
    8520ccc  
       30 天前
    root@code-server /saas# bun run build
    $ turbo build
    • Packages in scope: @saasfly/api, @saasfly/auth, @saasfly/common, @saasfly/db, @saasfly/eslint-config, @saasfly/nextjs, @saasfly/prettier-config, @saasfly/stripe, @saasfly/tailwind-config, @saasfly/typescript-config, @saasfly/ui
    • Running build in 11 packages
    • Remote caching disabled
    @saasfly/nextjs:build: cache miss, executing 12d13155ec2e6d30
    @saasfly/nextjs:build: $ contentlayer build && bun with-env next build
    @saasfly/nextjs:build: Generated 9 documents in .contentlayer
    @saasfly/nextjs:build: TypeError: The "code" argument must be of type number. Received an instance of Object
    @saasfly/nextjs:build: at process.set [as exitCode] (node:internal/bootstrap/node:123:9)
    @saasfly/nextjs:build: at Cli.runExit (/node_modules/clipanion/lib/advanced/Cli.js:232:26)
    @saasfly/nextjs:build: at run (file:///node_modules/@contentlayer/cli/src/index.ts:39:3)
    @saasfly/nextjs:build: at main (/node_modules/contentlayer/bin/cli.cjs:5:3) {
    @saasfly/nextjs:build: code: 'ERR_INVALID_ARG_TYPE'
    @saasfly/nextjs:build: }
    @saasfly/nextjs:build: $ dotenv -e ../../.env.local -- next build
    @saasfly/nextjs:build: ▲ Next.js 14.0.3
    @saasfly/nextjs:build:
    @saasfly/nextjs:build: ✓ Creating an optimized production build
    @saasfly/nextjs:build: ✓ Compiled successfully
    @saasfly/nextjs:build: Skipping validation of types
    @saasfly/nextjs:build: Skipping linting
    Collecting page data ..sa [VercelPostgresError]: VercelPostgresError - 'invalid_connection_string': This connection string is meant to be used with a direct connection. Make sure to use a pooled connection string or try `createClient()` instead.
    @saasfly/nextjs:build: at su (/apps/nextjs/.next/server/chunks/406.js:18:5468)
    @saasfly/nextjs:build: at sg (/apps/nextjs/.next/server/chunks/406.js:18:7411)
    @saasfly/nextjs:build: at 15491 (/apps/nextjs/.next/server/app/api/webhooks/stripe/route.js:1:13596)
    @saasfly/nextjs:build: at t (/apps/nextjs/.next/server/webpack-runtime.js:1:128)
    @saasfly/nextjs:build: at 36577 (/apps/nextjs/.next/server/app/api/webhooks/stripe/route.js:1:14487)
    @saasfly/nextjs:build: at t (/apps/nextjs/.next/server/webpack-runtime.js:1:128)
    @saasfly/nextjs:build: at 75138 (/apps/nextjs/.next/server/app/api/webhooks/stripe/route.js:1:1028)
    @saasfly/nextjs:build: at t (/apps/nextjs/.next/server/webpack-runtime.js:1:128)
    @saasfly/nextjs:build: at r (/apps/nextjs/.next/server/app/api/webhooks/stripe/route.js:1:17593)
    @saasfly/nextjs:build: at /apps/nextjs/.next/server/app/api/webhooks/stripe/route.js:1:17628 {
    @saasfly/nextjs:build: code: 'invalid_connection_string'
    @saasfly/nextjs:build: }

    > Build error occurred
    Error: Failed to collect page data for /api/webhooks/stripe
    @saasfly/nextjs:build: at /node_modules/next/dist/build/utils.js:1217:15
    @saasfly/nextjs:build: at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
    @saasfly/nextjs:build: type: 'Error'
    @saasfly/nextjs:build: }
    @saasfly/nextjs:build: Collecting page data .error: script "with-env" exited with code 1
    @saasfly/nextjs:build: error: script "build" exited with code 1
    @saasfly/nextjs:build: ERROR: command finished with error: command (/apps/nextjs) /root/.bun/bin/bun run build exited (1)
    @saasfly/nextjs#build: command (/apps/nextjs) /root/.bun/bin/bun run build exited (1)

    Tasks: 0 successful, 1 total
    Cached: 0 cached, 1 total
    Time: 5.326s
    Failed: @saasfly/nextjs#build

    ERROR run failed: command exited (1)
    error: script "build" exited with code 1
    tianzx
        33
    tianzx  
    OP
       30 天前
    @8520ccc #32 你的.env.local 中的 POSTGRES_URL= 有配置正确吗 ? vercel 创建的 postgres://default:****@*******.us-east-1.aws.neon.tech:5432/verceldb?sslmode=require 大概是像这个样子
    zephyr1
        34
    zephyr1  
       29 天前
    提个建议
    zephyr1
        35
    zephyr1  
       29 天前
    不应该叫 Country
    tianzx
        36
    tianzx  
    OP
       29 天前
    @zephyr1 #35 感谢指出,我现在改一下🙏
    zephyr1
        37
    zephyr1  
       29 天前
    @tianzx #36 还有个疑问,点击创建新的集群按钮后,即使我没有点击最后的 submit 按钮,控制台也会出现新的 Cluster ,不知道这里的逻辑是否正确。
    tianzx
        38
    tianzx  
    OP
       29 天前
    @zephyr1 #37 为了方便起见,会在 create 的时候预先创建一部分默认的数据,当用户打开的时候就只需要修改自己需要的部分了,只是为了展示一种不同的实现,您可以根据自己的需求直接修改🙏
    limuen
        39
    limuen  
       29 天前
    fork 了,空了👀
    wbrobot
        40
    wbrobot  
       29 天前
    admin panel 有吗?想看看用户管理和设置这些
    tianzx
        41
    tianzx  
    OP
       29 天前
    @wbrobot 感谢您的关注,开源的 admin dashboard 我正在开发中,相对来说比较简陋,乐观看大概可能还需要 1-2 周的时间,付费版会提供更加完善的 dashboard 功能🙏
    tianzx
        42
    tianzx  
    OP
       29 天前
    @limuen 感谢您的关注,期待您的反馈🙏
    limuen
        43
    limuen  
       29 天前
    @tianzx 有一点想问的是为什么要用 bun(没了解过...),pnpm 的 workspace 不更好一点?哈哈,个人建议哈,直接 pnpm-workspace ,再结合 monorepo ,芜湖起飞~
    tianzx
        44
    tianzx  
    OP
       29 天前
    @limuen #43 一个是 bun 确实是非常快的 主要是 install 还有 build ,另外我们在商业版里做了对 pnpm 和 yarn 的支持😂
    TeslaM3
        45
    TeslaM3  
       29 天前
    @tianzx
    @BaiLinfeng LiuN1an 8520ccc
    tianzx
        46
    tianzx  
    OP
       29 天前
    @TeslaM3 你好,请问有什么可以帮到您的吗😂
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1415 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 17:21 · PVG 01:21 · LAX 10:21 · JFK 13:21
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.