shipd 0.1.0

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.
Files changed (145) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +205 -0
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.js +1366 -0
  5. package/docs-template/README.md +255 -0
  6. package/docs-template/[slug]/[subslug]/page.tsx +1242 -0
  7. package/docs-template/[slug]/page.tsx +422 -0
  8. package/docs-template/api/page.tsx +47 -0
  9. package/docs-template/components/docs/docs-category-page.tsx +162 -0
  10. package/docs-template/components/docs/docs-code-card.tsx +135 -0
  11. package/docs-template/components/docs/docs-header.tsx +69 -0
  12. package/docs-template/components/docs/docs-nav.ts +95 -0
  13. package/docs-template/components/docs/docs-sidebar.tsx +112 -0
  14. package/docs-template/components/docs/docs-toc.tsx +38 -0
  15. package/docs-template/components/ui/badge.tsx +47 -0
  16. package/docs-template/components/ui/button.tsx +60 -0
  17. package/docs-template/components/ui/card.tsx +93 -0
  18. package/docs-template/components/ui/sheet.tsx +140 -0
  19. package/docs-template/documentation/page.tsx +80 -0
  20. package/docs-template/layout.tsx +27 -0
  21. package/docs-template/lib/utils.ts +7 -0
  22. package/docs-template/page.tsx +360 -0
  23. package/package.json +66 -0
  24. package/template/.env.example +45 -0
  25. package/template/README.md +239 -0
  26. package/template/app/api/auth/[...all]/route.ts +4 -0
  27. package/template/app/api/chat/route.ts +16 -0
  28. package/template/app/api/subscription/route.ts +25 -0
  29. package/template/app/api/upload-image/route.ts +64 -0
  30. package/template/app/blog/[slug]/page.tsx +314 -0
  31. package/template/app/blog/page.tsx +107 -0
  32. package/template/app/dashboard/_components/chart-interactive.tsx +289 -0
  33. package/template/app/dashboard/_components/chatbot.tsx +39 -0
  34. package/template/app/dashboard/_components/mode-toggle.tsx +46 -0
  35. package/template/app/dashboard/_components/navbar.tsx +84 -0
  36. package/template/app/dashboard/_components/section-cards.tsx +102 -0
  37. package/template/app/dashboard/_components/sidebar.tsx +90 -0
  38. package/template/app/dashboard/_components/subscribe-button.tsx +49 -0
  39. package/template/app/dashboard/billing/page.tsx +277 -0
  40. package/template/app/dashboard/chat/page.tsx +73 -0
  41. package/template/app/dashboard/cli/page.tsx +260 -0
  42. package/template/app/dashboard/layout.tsx +24 -0
  43. package/template/app/dashboard/page.tsx +216 -0
  44. package/template/app/dashboard/payment/_components/manage-subscription.tsx +22 -0
  45. package/template/app/dashboard/payment/page.tsx +126 -0
  46. package/template/app/dashboard/settings/page.tsx +613 -0
  47. package/template/app/dashboard/upload/page.tsx +324 -0
  48. package/template/app/error.tsx +78 -0
  49. package/template/app/favicon.ico +0 -0
  50. package/template/app/globals.css +126 -0
  51. package/template/app/layout.tsx +135 -0
  52. package/template/app/not-found.tsx +45 -0
  53. package/template/app/page.tsx +28 -0
  54. package/template/app/pricing/_component/pricing-table.tsx +276 -0
  55. package/template/app/pricing/page.tsx +23 -0
  56. package/template/app/privacy-policy/page.tsx +280 -0
  57. package/template/app/robots.txt +12 -0
  58. package/template/app/sign-in/page.tsx +228 -0
  59. package/template/app/sign-up/page.tsx +243 -0
  60. package/template/app/sitemap.ts +62 -0
  61. package/template/app/success/page.tsx +123 -0
  62. package/template/app/terms-of-service/page.tsx +212 -0
  63. package/template/auth-schema.ts +47 -0
  64. package/template/components/homepage/cli-workflow-section.tsx +138 -0
  65. package/template/components/homepage/features-section.tsx +150 -0
  66. package/template/components/homepage/footer.tsx +53 -0
  67. package/template/components/homepage/hero-section.tsx +112 -0
  68. package/template/components/homepage/integrations.tsx +124 -0
  69. package/template/components/homepage/navigation.tsx +116 -0
  70. package/template/components/homepage/news-section.tsx +82 -0
  71. package/template/components/homepage/testimonials-section.tsx +34 -0
  72. package/template/components/logos/BetterAuth.tsx +21 -0
  73. package/template/components/logos/NeonPostgres.tsx +41 -0
  74. package/template/components/logos/Nextjs.tsx +72 -0
  75. package/template/components/logos/Polar.tsx +7 -0
  76. package/template/components/logos/TailwindCSS.tsx +27 -0
  77. package/template/components/logos/index.ts +6 -0
  78. package/template/components/logos/shadcnui.tsx +8 -0
  79. package/template/components/provider.tsx +8 -0
  80. package/template/components/ui/avatar.tsx +53 -0
  81. package/template/components/ui/badge.tsx +46 -0
  82. package/template/components/ui/button.tsx +59 -0
  83. package/template/components/ui/card.tsx +92 -0
  84. package/template/components/ui/chart.tsx +353 -0
  85. package/template/components/ui/checkbox.tsx +32 -0
  86. package/template/components/ui/dialog.tsx +135 -0
  87. package/template/components/ui/dropdown-menu.tsx +257 -0
  88. package/template/components/ui/form.tsx +167 -0
  89. package/template/components/ui/input.tsx +21 -0
  90. package/template/components/ui/label.tsx +24 -0
  91. package/template/components/ui/progress.tsx +31 -0
  92. package/template/components/ui/resizable.tsx +56 -0
  93. package/template/components/ui/select.tsx +185 -0
  94. package/template/components/ui/separator.tsx +28 -0
  95. package/template/components/ui/sheet.tsx +139 -0
  96. package/template/components/ui/skeleton.tsx +13 -0
  97. package/template/components/ui/sonner.tsx +25 -0
  98. package/template/components/ui/switch.tsx +31 -0
  99. package/template/components/ui/tabs.tsx +66 -0
  100. package/template/components/ui/textarea.tsx +18 -0
  101. package/template/components/ui/toggle-group.tsx +73 -0
  102. package/template/components/ui/toggle.tsx +47 -0
  103. package/template/components/ui/tooltip.tsx +61 -0
  104. package/template/components/user-profile.tsx +139 -0
  105. package/template/components.json +21 -0
  106. package/template/db/drizzle.ts +14 -0
  107. package/template/db/migrations/0000_worried_rawhide_kid.sql +77 -0
  108. package/template/db/migrations/meta/0000_snapshot.json +494 -0
  109. package/template/db/migrations/meta/_journal.json +13 -0
  110. package/template/db/schema.ts +85 -0
  111. package/template/drizzle.config.ts +13 -0
  112. package/template/emails/components/layout.tsx +181 -0
  113. package/template/emails/password-reset.tsx +67 -0
  114. package/template/emails/payment-failed.tsx +167 -0
  115. package/template/emails/subscription-confirmation.tsx +129 -0
  116. package/template/emails/welcome.tsx +100 -0
  117. package/template/eslint.config.mjs +16 -0
  118. package/template/hooks/use-mobile.ts +21 -0
  119. package/template/lib/auth-client.ts +8 -0
  120. package/template/lib/auth.ts +276 -0
  121. package/template/lib/email.ts +118 -0
  122. package/template/lib/polar-products.ts +49 -0
  123. package/template/lib/subscription.ts +148 -0
  124. package/template/lib/upload-image.ts +28 -0
  125. package/template/lib/utils.ts +6 -0
  126. package/template/middleware.ts +30 -0
  127. package/template/next-env.d.ts +5 -0
  128. package/template/next.config.ts +27 -0
  129. package/template/package.json +99 -0
  130. package/template/postcss.config.mjs +5 -0
  131. package/template/public/add.png +0 -0
  132. package/template/public/favicon.svg +4 -0
  133. package/template/public/file.svg +1 -0
  134. package/template/public/globe.svg +1 -0
  135. package/template/public/iphone.png +0 -0
  136. package/template/public/logo.png +0 -0
  137. package/template/public/next.svg +1 -0
  138. package/template/public/polar-sh.svg +1 -0
  139. package/template/public/shadcn-ui.svg +1 -0
  140. package/template/public/site.webmanifest +21 -0
  141. package/template/public/vercel.svg +1 -0
  142. package/template/public/window.svg +1 -0
  143. package/template/tailwind.config.ts +89 -0
  144. package/template/template.config.json +138 -0
  145. package/template/tsconfig.json +27 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Anton
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,205 @@
1
+ # Shipd CLI
2
+
3
+ > Generate production-ready SaaS applications in minutes
4
+
5
+ Shipd is a powerful CLI tool that generates complete SaaS applications with authentication, billing, user management, and a beautiful dashboard - all configured and ready to deploy.
6
+
7
+ ## Features
8
+
9
+ - **Complete Authentication System** - Powered by Better Auth with Google OAuth, magic links, and secure session management
10
+ - **Integrated Billing** - Polar.sh integration with subscription management and checkout flow
11
+ - **Modern Tech Stack** - Next.js 15, React 19, TypeScript, Tailwind CSS, Drizzle ORM
12
+ - **Database Ready** - PostgreSQL with Supabase integration out of the box
13
+ - **Beautiful UI** - Pre-built dashboard, pricing page, and user management interface
14
+ - **Production Ready** - Configured for deployment on Vercel and Railway
15
+ - **Email System** - Resend integration for transactional emails
16
+ - **TypeScript First** - Full type safety across the entire application
17
+
18
+ ## Installation
19
+
20
+ You don't need to install Shipd globally. Use `npx` to run it directly:
21
+
22
+ ```bash
23
+ npx shipd init my-saas-app
24
+ ```
25
+
26
+ Or install globally:
27
+
28
+ ```bash
29
+ npm install -g shipd
30
+ ```
31
+
32
+ ## Quick Start
33
+
34
+ ### 1. Authenticate
35
+
36
+ First, authenticate with your Shipd account:
37
+
38
+ ```bash
39
+ npx shipd login
40
+ ```
41
+
42
+ This will open your browser for authentication. You'll need an active Shipd subscription to generate projects.
43
+
44
+ ### 2. Create Your Project
45
+
46
+ Generate a new SaaS application:
47
+
48
+ ```bash
49
+ npx shipd init my-saas-app
50
+ ```
51
+
52
+ The CLI will:
53
+ - Create a new Next.js project with all features configured
54
+ - Set up the database schema
55
+ - Configure authentication and billing
56
+ - Install all dependencies
57
+ - Prepare your `.env.local` with required environment variables
58
+
59
+ ### 3. Configure Environment Variables
60
+
61
+ Update the `.env.local` file with your credentials:
62
+
63
+ ```env
64
+ # Database (Supabase)
65
+ DATABASE_URL=your-supabase-connection-string
66
+
67
+ # Auth (Better Auth)
68
+ BETTER_AUTH_SECRET=your-secret-key
69
+ GOOGLE_CLIENT_ID=your-google-client-id
70
+ GOOGLE_CLIENT_SECRET=your-google-client-secret
71
+
72
+ # Email (Resend)
73
+ RESEND_API_KEY=your-resend-api-key
74
+
75
+ # Billing (Polar.sh)
76
+ POLAR_ACCESS_TOKEN=your-polar-access-token
77
+ NEXT_PUBLIC_STARTER_TIER=your-product-id
78
+ NEXT_PUBLIC_STARTER_SLUG=your-product-slug
79
+ ```
80
+
81
+ ### 4. Run Your Application
82
+
83
+ ```bash
84
+ cd my-saas-app
85
+ npm run dev
86
+ ```
87
+
88
+ Your SaaS application is now running at `http://localhost:3000`!
89
+
90
+ ## Available Commands
91
+
92
+ ### `shipd login`
93
+
94
+ Authenticate with your Shipd account via browser-based OAuth flow.
95
+
96
+ ```bash
97
+ npx shipd login
98
+ ```
99
+
100
+ ### `shipd logout`
101
+
102
+ Sign out from your Shipd account.
103
+
104
+ ```bash
105
+ npx shipd logout
106
+ ```
107
+
108
+ ### `shipd init [project-name]`
109
+
110
+ Initialize a new SaaS project with all features configured.
111
+
112
+ ```bash
113
+ npx shipd init my-saas-app
114
+ ```
115
+
116
+ Options:
117
+ - `--mock` - Skip authentication for development/testing purposes
118
+
119
+ ### `shipd list`
120
+
121
+ List all available features included in the generated project.
122
+
123
+ ```bash
124
+ npx shipd list
125
+ ```
126
+
127
+ ### `shipd append`
128
+
129
+ Add Shipd features to an existing Next.js project.
130
+
131
+ ```bash
132
+ npx shipd append
133
+ ```
134
+
135
+ Options:
136
+ - `--features <features>` - Comma-separated list of features to add (e.g., `docs`)
137
+ - `--dry-run` - Preview changes without applying them
138
+
139
+ **Available features:**
140
+ - `docs` - Documentation pages with navigation and layout
141
+
142
+ **Example:**
143
+ ```bash
144
+ # Interactive mode
145
+ npx shipd append
146
+
147
+ # Add specific feature
148
+ npx shipd append --features docs
149
+
150
+ # Preview changes
151
+ npx shipd append --features docs --dry-run
152
+ ```
153
+
154
+ ## What's Included
155
+
156
+ Every Shipd project includes:
157
+
158
+ ### Pages & Features
159
+ - Landing page with pricing section
160
+ - User authentication (sign up, sign in, password reset)
161
+ - User dashboard with subscription management
162
+ - Billing page with Polar.sh integration
163
+ - Settings page for user profile management
164
+ - Success page after subscription purchase
165
+
166
+ ### Technical Components
167
+ - **Framework**: Next.js 15 with App Router
168
+ - **Language**: TypeScript with strict mode
169
+ - **Styling**: Tailwind CSS with custom design system
170
+ - **Database**: PostgreSQL via Supabase with Drizzle ORM
171
+ - **Auth**: Better Auth with Google OAuth and email authentication
172
+ - **Billing**: Polar.sh for subscription and payment management
173
+ - **Email**: Resend for transactional emails
174
+ - **UI Components**: Shadcn/ui component library
175
+ - **Deployment**: Optimized for Vercel (frontend) and Railway (database)
176
+
177
+ ## Requirements
178
+
179
+ - Node.js 18.x or higher
180
+ - Active Shipd subscription
181
+ - npm or yarn package manager
182
+
183
+ ## Pricing
184
+
185
+ Shipd requires an active subscription to generate projects. Visit [shipd.dev](https://www.shipd.dev) to view pricing and subscribe.
186
+
187
+ ## Support
188
+
189
+ - Documentation: [shipd.dev/docs](https://www.shipd.dev/docs)
190
+ - Issues: [GitHub Issues](https://github.com/kedbrant/Saas-scaffold/issues)
191
+ - Email: support@shipd.com
192
+
193
+ ## License
194
+
195
+ MIT
196
+
197
+ ## Links
198
+
199
+ - [Website](https://www.shipd.dev)
200
+ - [GitHub Repository](https://github.com/kedbrant/Saas-scaffold)
201
+ - [Documentation](https://www.shipd.dev/docs)
202
+
203
+ ---
204
+
205
+ Made with ❤️ by the Shipd team
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node