[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-3846":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":29,"readmeContent":30,"aiSummary":31,"trendingCount":16,"starSnapshotCount":16,"syncStatus":32,"lastSyncTime":33,"discoverSource":34},3846,"saas-starter","nextjs\u002Fsaas-starter","nextjs","Get started quickly with Next.js, Postgres, Stripe, and shadcn\u002Fui.","https:\u002F\u002Fnext-saas-start.vercel.app",null,"TypeScript",15879,2661,94,21,0,8,22,96,26,45,"MIT License",false,"main",[7,26,27,28],"postgres","shadcn-ui","stripe","2026-06-12 02:00:55","# Next.js SaaS Starter\n\nThis is a starter template for building a SaaS application using **Next.js** with support for authentication, Stripe integration for payments, and a dashboard for logged-in users.\n\n**Demo: [https:\u002F\u002Fnext-saas-start.vercel.app\u002F](https:\u002F\u002Fnext-saas-start.vercel.app\u002F)**\n\n## Features\n\n- Marketing landing page (`\u002F`) with animated Terminal element\n- Pricing page (`\u002Fpricing`) which connects to Stripe Checkout\n- Dashboard pages with CRUD operations on users\u002Fteams\n- Basic RBAC with Owner and Member roles\n- Subscription management with Stripe Customer Portal\n- Email\u002Fpassword authentication with JWTs stored to cookies\n- Global middleware to protect logged-in routes\n- Local middleware to protect Server Actions or validate Zod schemas\n- Activity logging system for any user events\n\n## Tech Stack\n\n- **Framework**: [Next.js](https:\u002F\u002Fnextjs.org\u002F)\n- **Database**: [Postgres](https:\u002F\u002Fwww.postgresql.org\u002F)\n- **ORM**: [Drizzle](https:\u002F\u002Form.drizzle.team\u002F)\n- **Payments**: [Stripe](https:\u002F\u002Fstripe.com\u002F)\n- **UI Library**: [shadcn\u002Fui](https:\u002F\u002Fui.shadcn.com\u002F)\n\n## Getting Started\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fnextjs\u002Fsaas-starter\ncd saas-starter\npnpm install\n```\n\n## Running Locally\n\n[Install](https:\u002F\u002Fdocs.stripe.com\u002Fstripe-cli) and log in to your Stripe account:\n\n```bash\nstripe login\n```\n\nUse the included setup script to create your `.env` file:\n\n```bash\npnpm db:setup\n```\n\nRun the database migrations and seed the database with a default user and team:\n\n```bash\npnpm db:migrate\npnpm db:seed\n```\n\nThis will create the following user and team:\n\n- User: `test@test.com`\n- Password: `admin123`\n\nYou can also create new users through the `\u002Fsign-up` route.\n\nFinally, run the Next.js development server:\n\n```bash\npnpm dev\n```\n\nOpen [http:\u002F\u002Flocalhost:3000](http:\u002F\u002Flocalhost:3000) in your browser to see the app in action.\n\nYou can listen for Stripe webhooks locally through their CLI to handle subscription change events:\n\n```bash\nstripe listen --forward-to localhost:3000\u002Fapi\u002Fstripe\u002Fwebhook\n```\n\n## Testing Payments\n\nTo test Stripe payments, use the following test card details:\n\n- Card Number: `4242 4242 4242 4242`\n- Expiration: Any future date\n- CVC: Any 3-digit number\n\n## Going to Production\n\nWhen you're ready to deploy your SaaS application to production, follow these steps:\n\n### Set up a production Stripe webhook\n\n1. Go to the Stripe Dashboard and create a new webhook for your production environment.\n2. Set the endpoint URL to your production API route (e.g., `https:\u002F\u002Fyourdomain.com\u002Fapi\u002Fstripe\u002Fwebhook`).\n3. Select the events you want to listen for (e.g., `checkout.session.completed`, `customer.subscription.updated`).\n\n### Deploy to Vercel\n\n1. Push your code to a GitHub repository.\n2. Connect your repository to [Vercel](https:\u002F\u002Fvercel.com\u002F) and deploy it.\n3. Follow the Vercel deployment process, which will guide you through setting up your project.\n\n### Add environment variables\n\nIn your Vercel project settings (or during deployment), add all the necessary environment variables. Make sure to update the values for the production environment, including:\n\n1. `BASE_URL`: Set this to your production domain.\n2. `STRIPE_SECRET_KEY`: Use your Stripe secret key for the production environment.\n3. `STRIPE_WEBHOOK_SECRET`: Use the webhook secret from the production webhook you created in step 1.\n4. `POSTGRES_URL`: Set this to your production database URL.\n5. `AUTH_SECRET`: Set this to a random string. `openssl rand -base64 32` will generate one.\n\n## Other Templates\n\nWhile this template is intentionally minimal and to be used as a learning resource, there are other paid versions in the community which are more full-featured:\n\n- https:\u002F\u002Fachromatic.dev\n- https:\u002F\u002Fshipfa.st\n- https:\u002F\u002Fmakerkit.dev\n- https:\u002F\u002Fzerotoshipped.com\n- https:\u002F\u002Fturbostarter.dev\n","Next.js SaaS Starter 是一个用于快速构建 SaaS 应用程序的模板，支持用户认证、Stripe 支付集成以及登录用户仪表板。项目采用 TypeScript 编写，基于 Next.js 框架，使用 Postgres 数据库和 Drizzle ORM，集成了 Stripe 作为支付解决方案，并利用 shadcn\u002Fui 提供了美观的用户界面。它具备营销落地页、定价页面、用户\u002F团队管理、角色基础访问控制（RBAC）、订阅管理和活动日志记录等功能。此模板适合需要快速搭建在线服务或产品的开发者，尤其适用于那些希望在短时间内完成从原型到生产环境部署的应用场景。",2,"2026-06-11 02:56:39","top_language"]