[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-71357":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":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":10,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":20,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},71357,"platforms","vercel\u002Fplatforms","vercel","A full-stack Next.js app with multi-tenancy.","https:\u002F\u002Fvercel.pub",null,"TypeScript",6679,1049,122,10,0,3,5,40.06,false,"main",[23,24,25,26,7],"multi-tenancy","multi-tenant-applications","nextjs","tailwindcss","2026-06-12 02:02:51","# Next.js Multi-Tenant Example\n\nA production-ready example of a multi-tenant application built with Next.js 15, featuring custom subdomains for each tenant.\n\n## Features\n\n- ✅ Custom subdomain routing with Next.js middleware\n- ✅ Tenant-specific content and pages\n- ✅ Shared components and layouts across tenants\n- ✅ Redis for tenant data storage\n- ✅ Admin interface for managing tenants\n- ✅ Emoji support for tenant branding\n- ✅ Support for local development with subdomains\n- ✅ Compatible with Vercel preview deployments\n\n## Tech Stack\n\n- [Next.js 15](https:\u002F\u002Fnextjs.org\u002F) with App Router\n- [React 19](https:\u002F\u002Freact.dev\u002F)\n- [Upstash Redis](https:\u002F\u002Fupstash.com\u002F) for data storage\n- [Tailwind 4](https:\u002F\u002Ftailwindcss.com\u002F) for styling\n- [shadcn\u002Fui](https:\u002F\u002Fui.shadcn.com\u002F) for the design system\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js 18.17.0 or later\n- pnpm (recommended) or npm\u002Fyarn\n- Upstash Redis account (for production)\n\n### Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https:\u002F\u002Fgithub.com\u002Fvercel\u002Fplatforms.git\n   cd platforms\n   ```\n\n2. Install dependencies:\n\n   ```bash\n   pnpm install\n   ```\n\n3. Set up environment variables:\n   Create a `.env.local` file in the root directory with:\n\n   ```\n   KV_REST_API_URL=your_redis_url\n   KV_REST_API_TOKEN=your_redis_token\n   ```\n\n4. Start the development server:\n\n   ```bash\n   pnpm dev\n   ```\n\n5. Access the application:\n   - Main site: http:\u002F\u002Flocalhost:3000\n   - Admin panel: http:\u002F\u002Flocalhost:3000\u002Fadmin\n   - Tenants: http:\u002F\u002F[tenant-name].localhost:3000\n\n## Multi-Tenant Architecture\n\nThis application demonstrates a subdomain-based multi-tenant architecture where:\n\n- Each tenant gets their own subdomain (`tenant.yourdomain.com`)\n- The middleware handles routing requests to the correct tenant\n- Tenant data is stored in Redis using a `subdomain:{name}` key pattern\n- The main domain hosts the landing page and admin interface\n- Subdomains are dynamically mapped to tenant-specific content\n\nThe middleware (`middleware.ts`) intelligently detects subdomains across various environments (local development, production, and Vercel preview deployments).\n\n## Deployment\n\nThis application is designed to be deployed on Vercel. To deploy:\n\n1. Push your repository to GitHub\n2. Connect your repository to Vercel\n3. Configure environment variables\n4. Deploy\n\nFor custom domains, make sure to:\n\n1. Add your root domain to Vercel\n2. Set up a wildcard DNS record (`*.yourdomain.com`) on Vercel\n","vercel\u002Fplatforms 是一个基于 Next.js 构建的多租户全栈应用示例，支持每个租户自定义子域名。该项目通过 Next.js 中间件实现子域名路由，提供租户特定的内容和页面，并使用 Upstash Redis 存储租户数据。此外，项目还包含一个管理界面用于租户管理，并支持本地开发环境中的子域名配置。其技术栈包括 Next.js 15、React 19、Tailwind CSS 4 和 shadcn\u002Fui 设计系统。适用于需要快速搭建多租户 SaaS 应用或希望在 Vercel 上部署此类应用的开发者。",2,"2026-06-11 03:37:20","high_star"]