create-sailor 1.2.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +96 -23
- package/dist/index.js +2785 -75
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,46 +19,118 @@ pnpm create sailor@latest
|
|
|
19
19
|
bun create sailor
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
## What You Get
|
|
23
|
+
|
|
24
|
+
- **8 apps + 54 packages + 9 microservices** — landing · dashboard · docs · storybook · api-gateway · community · IDP · studio + Python AI/ML workloads
|
|
25
|
+
- **AI-native** — 20+ provider registry, Vercel AI SDK v5, custom OpenAI-compatible endpoints, Multi-Agent orchestration
|
|
26
|
+
- **Dual-track: 海外 + 国内 双生态开箱即用**
|
|
27
|
+
- **Email**: Resend / Postmark / AWS SES / 阿里云邮件推送 / 腾讯云 SES / 网易企业邮箱
|
|
28
|
+
- **Storage**: R2 / S3 / Supabase / 阿里云 OSS / 腾讯云 COS / 七牛
|
|
29
|
+
- **Monitoring**: Sentry / Datadog / 阿里云 ARMS / 听云
|
|
30
|
+
- **Analytics**: PostHog / Plausible / Umami / 百度统计 / 神策 / GrowingIO
|
|
31
|
+
- **SMS**: Twilio / 阿里云短信 / 腾讯云短信 / 云片
|
|
32
|
+
- **Payment**: Stripe / Lemon Squeezy / 微信支付 / 支付宝
|
|
33
|
+
- **Social login (CN)**: 微信开放平台 · QQ · 钉钉 · 企业微信 · 飞书 · 微博
|
|
34
|
+
- **中国合规套件**: ICP 备案 · 公安备案 · Cookie 弹窗 · AIGC 算法备案声明 · 隐私政策模板
|
|
35
|
+
- **White-label**: `brand.config.ts` 一键换品牌(colors · domains · logos · SEO)
|
|
36
|
+
- **AGPL-3.0 + Commercial Exception**(Individual / OPC 免费)
|
|
37
|
+
|
|
38
|
+
## Usage
|
|
39
|
+
|
|
40
|
+
### Interactive (recommended)
|
|
23
41
|
|
|
24
42
|
```bash
|
|
25
|
-
|
|
43
|
+
npm create sailor@latest
|
|
26
44
|
```
|
|
27
45
|
|
|
28
|
-
|
|
46
|
+
Asks just 4 questions: **project name / region / auth / AI providers**. Everything else uses region-aware smart defaults.
|
|
29
47
|
|
|
30
|
-
|
|
31
|
-
- **54 packages** — auth · billing · i18n · notifications · permissions · queue · search · tenant · vault · metering · uploads · webhooks · agents · and more
|
|
32
|
-
- **9 microservices** — AI/ML workloads, Python-native
|
|
33
|
-
- **Full-stack TypeScript** — Next.js 16 + Hono + Prisma + Tailwind v4 + shadcn/ui + Radix + Framer Motion
|
|
34
|
-
- **AI-native** — Multi-Agent orchestration, LLM-ready, MCP server, agent-friendly CLI
|
|
35
|
-
- **White-label ready** — `brand.config.ts` one-command rebrand (colors, domains, logos, SEO)
|
|
36
|
-
- **Dual-license** — AGPL-3.0 + free Commercial Exception for OPC / solo founders
|
|
48
|
+
### Non-interactive (专家模式)
|
|
37
49
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
50
|
+
```bash
|
|
51
|
+
npm create sailor@latest my-app \
|
|
52
|
+
--region=cn \
|
|
53
|
+
--auth=clerk \
|
|
54
|
+
--social-login=wechat,dingtalk,feishu \
|
|
55
|
+
--ai=deepseek,qwen,siliconflow \
|
|
56
|
+
--email=aliyun-dm \
|
|
57
|
+
--storage=aliyun-oss \
|
|
58
|
+
--monitoring=sentry \
|
|
59
|
+
--analytics=baidu \
|
|
60
|
+
--sms=aliyun-sms \
|
|
61
|
+
--payment=wechat \
|
|
62
|
+
--deploy=aliyun \
|
|
63
|
+
-y
|
|
64
|
+
```
|
|
48
65
|
|
|
49
|
-
|
|
66
|
+
## CLI Flags
|
|
67
|
+
|
|
68
|
+
| Flag | Values | Default |
|
|
69
|
+
|------|--------|---------|
|
|
70
|
+
| `--region` | `global` · `cn` · `hybrid` | `global` |
|
|
71
|
+
| `--auth` | `clerk` · `betterauth` · `none` | `clerk` |
|
|
72
|
+
| `--social-login` | `wechat,qq,dingtalk,workweixin,feishu,weibo` (comma-sep) | none |
|
|
73
|
+
| `--payment` | `stripe` · `lemon` · `wechat` · `alipay` · `none` | region-based |
|
|
74
|
+
| `--ai` | comma-separated provider ids | `openai` |
|
|
75
|
+
| `--email` | `resend` · `postmark` · `ses` · `aliyun-dm` · `tencent-ses` · `netease` · `none` | region-based |
|
|
76
|
+
| `--storage` | `r2` · `s3` · `supabase` · `aliyun-oss` · `tencent-cos` · `qiniu` · `none` | region-based |
|
|
77
|
+
| `--monitoring` | `sentry` · `datadog` · `aliyun-arms` · `tingyun` · `none` | region-based |
|
|
78
|
+
| `--analytics` | `posthog` · `plausible` · `umami` · `baidu` · `sensors` · `none` | region-based |
|
|
79
|
+
| `--sms` | `twilio` · `aliyun-sms` · `tencent-sms` · `yunpian` · `none` | region-based |
|
|
80
|
+
| `--deploy` | `vercel` · `railway` · `cloudflare` · `selfhost` | `vercel` |
|
|
81
|
+
| `--docs` | `fumadocs` · `none` | `fumadocs` |
|
|
82
|
+
| `--orm` | `prisma` · `drizzle` · `none` | `prisma` |
|
|
83
|
+
| `--db` | `postgres` · `mysql` · `sqlite` · `none` | `postgresql` |
|
|
84
|
+
| `--i18n / --no-i18n` | boolean | `true` |
|
|
85
|
+
| `-y, --yes` | accept all defaults (non-interactive) | — |
|
|
86
|
+
| `--dry-run` | preview actions without writing | — |
|
|
87
|
+
| `--json` | machine-readable output | — |
|
|
88
|
+
|
|
89
|
+
## Region Presets
|
|
90
|
+
|
|
91
|
+
| Region | Email | Storage | Analytics | Monitoring | SMS | Payment |
|
|
92
|
+
|--------|-------|---------|-----------|------------|-----|---------|
|
|
93
|
+
| `global` | Resend | R2 | PostHog | Sentry | Twilio | Stripe |
|
|
94
|
+
| `cn` | 阿里云邮件推送 | 阿里云 OSS | 百度统计 | Sentry | 阿里云短信 | 微信支付 |
|
|
95
|
+
| `hybrid` | Resend | 阿里云 OSS | PostHog | Sentry | 阿里云短信 | Stripe |
|
|
96
|
+
|
|
97
|
+
## Social login (CN)
|
|
98
|
+
|
|
99
|
+
Adding `--social-login=wechat,dingtalk` extends your primary auth provider
|
|
100
|
+
(Clerk or Better Auth) with China-region OAuth:
|
|
101
|
+
|
|
102
|
+
- Generates `apps/web/src/app/api/auth/callback/<id>/route.ts` stubs with the
|
|
103
|
+
correct token-exchange endpoints (微信 / QQ / 钉钉 / 企业微信 / 飞书 / 微博)
|
|
104
|
+
- Generates `apps/web/src/components/auth/SocialLoginButtons.tsx` with one
|
|
105
|
+
button per selected provider
|
|
106
|
+
- Appends all required env vars to `.env.example`
|
|
107
|
+
|
|
108
|
+
The primary auth provider still owns user/session lifecycle — the generated
|
|
109
|
+
callbacks exchange `code` for provider access tokens and leave a
|
|
110
|
+
`// TODO: upsert into primary auth` marker for the user to wire up.
|
|
50
111
|
|
|
51
112
|
## After Scaffolding
|
|
52
113
|
|
|
53
114
|
```bash
|
|
54
|
-
cd my-
|
|
115
|
+
cd my-app
|
|
55
116
|
pnpm install
|
|
56
117
|
pnpm dev
|
|
57
118
|
```
|
|
58
119
|
|
|
59
120
|
## Why Sailor?
|
|
60
121
|
|
|
61
|
-
Unlike generic SaaS starters, **Sailor is both a template and a community** — you
|
|
122
|
+
Unlike generic SaaS starters, **Sailor is both a template and a community** — you
|
|
123
|
+
build your product with it, and you join the OPC creator network in the
|
|
124
|
+
process.
|
|
125
|
+
|
|
126
|
+
## Roadmap
|
|
127
|
+
|
|
128
|
+
- ✅ **v1.0** — Core scaffolding with cfonts banner + full CLI UX
|
|
129
|
+
- ✅ **v1.1** — Fumadocs integration + AI Provider registry
|
|
130
|
+
- ✅ **v1.2** — All flags working end-to-end
|
|
131
|
+
- ✅ **v1.3** — Region-aware defaults + 双生态 providers + 合规套件 + CN social login
|
|
132
|
+
- 🔜 **v1.4** — `sailor add <feature>` with remote registry
|
|
133
|
+
- 🔜 **v1.5** — Interactive AI Welcome page with onboarding assistant
|
|
62
134
|
|
|
63
135
|
## Documentation
|
|
64
136
|
|
|
@@ -71,6 +143,7 @@ Unlike generic SaaS starters, **Sailor is both a template and a community** —
|
|
|
71
143
|
|
|
72
144
|
AGPL-3.0 with Commercial License Exception for Individual / OPC use.
|
|
73
145
|
See [LICENSE-COMMERCIAL.md](https://github.com/nebutra/nebutra-sailor/blob/main/LICENSE-COMMERCIAL.md) for details.
|
|
146
|
+
Free for Individual / OPC: [get-license](https://nebutra.com/get-license).
|
|
74
147
|
|
|
75
148
|
---
|
|
76
149
|
|