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.
- package/LICENSE +21 -0
- package/README.md +205 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1366 -0
- package/docs-template/README.md +255 -0
- package/docs-template/[slug]/[subslug]/page.tsx +1242 -0
- package/docs-template/[slug]/page.tsx +422 -0
- package/docs-template/api/page.tsx +47 -0
- package/docs-template/components/docs/docs-category-page.tsx +162 -0
- package/docs-template/components/docs/docs-code-card.tsx +135 -0
- package/docs-template/components/docs/docs-header.tsx +69 -0
- package/docs-template/components/docs/docs-nav.ts +95 -0
- package/docs-template/components/docs/docs-sidebar.tsx +112 -0
- package/docs-template/components/docs/docs-toc.tsx +38 -0
- package/docs-template/components/ui/badge.tsx +47 -0
- package/docs-template/components/ui/button.tsx +60 -0
- package/docs-template/components/ui/card.tsx +93 -0
- package/docs-template/components/ui/sheet.tsx +140 -0
- package/docs-template/documentation/page.tsx +80 -0
- package/docs-template/layout.tsx +27 -0
- package/docs-template/lib/utils.ts +7 -0
- package/docs-template/page.tsx +360 -0
- package/package.json +66 -0
- package/template/.env.example +45 -0
- package/template/README.md +239 -0
- package/template/app/api/auth/[...all]/route.ts +4 -0
- package/template/app/api/chat/route.ts +16 -0
- package/template/app/api/subscription/route.ts +25 -0
- package/template/app/api/upload-image/route.ts +64 -0
- package/template/app/blog/[slug]/page.tsx +314 -0
- package/template/app/blog/page.tsx +107 -0
- package/template/app/dashboard/_components/chart-interactive.tsx +289 -0
- package/template/app/dashboard/_components/chatbot.tsx +39 -0
- package/template/app/dashboard/_components/mode-toggle.tsx +46 -0
- package/template/app/dashboard/_components/navbar.tsx +84 -0
- package/template/app/dashboard/_components/section-cards.tsx +102 -0
- package/template/app/dashboard/_components/sidebar.tsx +90 -0
- package/template/app/dashboard/_components/subscribe-button.tsx +49 -0
- package/template/app/dashboard/billing/page.tsx +277 -0
- package/template/app/dashboard/chat/page.tsx +73 -0
- package/template/app/dashboard/cli/page.tsx +260 -0
- package/template/app/dashboard/layout.tsx +24 -0
- package/template/app/dashboard/page.tsx +216 -0
- package/template/app/dashboard/payment/_components/manage-subscription.tsx +22 -0
- package/template/app/dashboard/payment/page.tsx +126 -0
- package/template/app/dashboard/settings/page.tsx +613 -0
- package/template/app/dashboard/upload/page.tsx +324 -0
- package/template/app/error.tsx +78 -0
- package/template/app/favicon.ico +0 -0
- package/template/app/globals.css +126 -0
- package/template/app/layout.tsx +135 -0
- package/template/app/not-found.tsx +45 -0
- package/template/app/page.tsx +28 -0
- package/template/app/pricing/_component/pricing-table.tsx +276 -0
- package/template/app/pricing/page.tsx +23 -0
- package/template/app/privacy-policy/page.tsx +280 -0
- package/template/app/robots.txt +12 -0
- package/template/app/sign-in/page.tsx +228 -0
- package/template/app/sign-up/page.tsx +243 -0
- package/template/app/sitemap.ts +62 -0
- package/template/app/success/page.tsx +123 -0
- package/template/app/terms-of-service/page.tsx +212 -0
- package/template/auth-schema.ts +47 -0
- package/template/components/homepage/cli-workflow-section.tsx +138 -0
- package/template/components/homepage/features-section.tsx +150 -0
- package/template/components/homepage/footer.tsx +53 -0
- package/template/components/homepage/hero-section.tsx +112 -0
- package/template/components/homepage/integrations.tsx +124 -0
- package/template/components/homepage/navigation.tsx +116 -0
- package/template/components/homepage/news-section.tsx +82 -0
- package/template/components/homepage/testimonials-section.tsx +34 -0
- package/template/components/logos/BetterAuth.tsx +21 -0
- package/template/components/logos/NeonPostgres.tsx +41 -0
- package/template/components/logos/Nextjs.tsx +72 -0
- package/template/components/logos/Polar.tsx +7 -0
- package/template/components/logos/TailwindCSS.tsx +27 -0
- package/template/components/logos/index.ts +6 -0
- package/template/components/logos/shadcnui.tsx +8 -0
- package/template/components/provider.tsx +8 -0
- package/template/components/ui/avatar.tsx +53 -0
- package/template/components/ui/badge.tsx +46 -0
- package/template/components/ui/button.tsx +59 -0
- package/template/components/ui/card.tsx +92 -0
- package/template/components/ui/chart.tsx +353 -0
- package/template/components/ui/checkbox.tsx +32 -0
- package/template/components/ui/dialog.tsx +135 -0
- package/template/components/ui/dropdown-menu.tsx +257 -0
- package/template/components/ui/form.tsx +167 -0
- package/template/components/ui/input.tsx +21 -0
- package/template/components/ui/label.tsx +24 -0
- package/template/components/ui/progress.tsx +31 -0
- package/template/components/ui/resizable.tsx +56 -0
- package/template/components/ui/select.tsx +185 -0
- package/template/components/ui/separator.tsx +28 -0
- package/template/components/ui/sheet.tsx +139 -0
- package/template/components/ui/skeleton.tsx +13 -0
- package/template/components/ui/sonner.tsx +25 -0
- package/template/components/ui/switch.tsx +31 -0
- package/template/components/ui/tabs.tsx +66 -0
- package/template/components/ui/textarea.tsx +18 -0
- package/template/components/ui/toggle-group.tsx +73 -0
- package/template/components/ui/toggle.tsx +47 -0
- package/template/components/ui/tooltip.tsx +61 -0
- package/template/components/user-profile.tsx +139 -0
- package/template/components.json +21 -0
- package/template/db/drizzle.ts +14 -0
- package/template/db/migrations/0000_worried_rawhide_kid.sql +77 -0
- package/template/db/migrations/meta/0000_snapshot.json +494 -0
- package/template/db/migrations/meta/_journal.json +13 -0
- package/template/db/schema.ts +85 -0
- package/template/drizzle.config.ts +13 -0
- package/template/emails/components/layout.tsx +181 -0
- package/template/emails/password-reset.tsx +67 -0
- package/template/emails/payment-failed.tsx +167 -0
- package/template/emails/subscription-confirmation.tsx +129 -0
- package/template/emails/welcome.tsx +100 -0
- package/template/eslint.config.mjs +16 -0
- package/template/hooks/use-mobile.ts +21 -0
- package/template/lib/auth-client.ts +8 -0
- package/template/lib/auth.ts +276 -0
- package/template/lib/email.ts +118 -0
- package/template/lib/polar-products.ts +49 -0
- package/template/lib/subscription.ts +148 -0
- package/template/lib/upload-image.ts +28 -0
- package/template/lib/utils.ts +6 -0
- package/template/middleware.ts +30 -0
- package/template/next-env.d.ts +5 -0
- package/template/next.config.ts +27 -0
- package/template/package.json +99 -0
- package/template/postcss.config.mjs +5 -0
- package/template/public/add.png +0 -0
- package/template/public/favicon.svg +4 -0
- package/template/public/file.svg +1 -0
- package/template/public/globe.svg +1 -0
- package/template/public/iphone.png +0 -0
- package/template/public/logo.png +0 -0
- package/template/public/next.svg +1 -0
- package/template/public/polar-sh.svg +1 -0
- package/template/public/shadcn-ui.svg +1 -0
- package/template/public/site.webmanifest +21 -0
- package/template/public/vercel.svg +1 -0
- package/template/public/window.svg +1 -0
- package/template/tailwind.config.ts +89 -0
- package/template/template.config.json +138 -0
- package/template/tsconfig.json +27 -0
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
# Documentation Pages Module - Integration Guide
|
|
2
|
+
|
|
3
|
+
**Module Version:** 1.0.0
|
|
4
|
+
**Last Updated:** 2025-01-19
|
|
5
|
+
**Standalone:** ✅ Yes (includes all dependencies)
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
This module adds a complete, standalone documentation section to your Next.js application. It includes a beautiful docs layout with navigation, search, and all the components needed to display documentation pages.
|
|
12
|
+
|
|
13
|
+
**Key Features:**
|
|
14
|
+
- Complete docs layout with header and sidebar navigation
|
|
15
|
+
- Dynamic routing for docs pages (`/docs/[slug]`)
|
|
16
|
+
- Table of contents component
|
|
17
|
+
- Code snippet display with copy functionality
|
|
18
|
+
- Category pages with quickstart guides
|
|
19
|
+
- Fully responsive design
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Files Added
|
|
24
|
+
|
|
25
|
+
### Pages/Routes
|
|
26
|
+
- `app/docs/page.tsx` - Docs landing page with feature overview
|
|
27
|
+
- `app/docs/layout.tsx` - Docs layout with header and sidebar
|
|
28
|
+
- `app/docs/[slug]/page.tsx` - Dynamic doc pages
|
|
29
|
+
- `app/docs/[slug]/[subslug]/page.tsx` - Nested doc pages
|
|
30
|
+
- `app/docs/api/page.tsx` - API documentation page
|
|
31
|
+
- `app/docs/documentation/page.tsx` - Main documentation page
|
|
32
|
+
|
|
33
|
+
### Components
|
|
34
|
+
- `components/docs/docs-header.tsx` - Docs header with navigation and search
|
|
35
|
+
- `components/docs/docs-sidebar.tsx` - Sidebar navigation with expandable sections
|
|
36
|
+
- `components/docs/docs-toc.tsx` - Table of contents component
|
|
37
|
+
- `components/docs/docs-category-page.tsx` - Category page layout component
|
|
38
|
+
- `components/docs/docs-code-card.tsx` - Code snippet display with copy button
|
|
39
|
+
- `components/docs/docs-nav.ts` - Navigation data structure
|
|
40
|
+
|
|
41
|
+
### Included UI Components
|
|
42
|
+
- `components/ui/button.tsx` - Button component (if not exists)
|
|
43
|
+
- `components/ui/card.tsx` - Card component (if not exists)
|
|
44
|
+
- `components/ui/badge.tsx` - Badge component (if not exists)
|
|
45
|
+
- `components/ui/sheet.tsx` - Sheet/modal component (if not exists)
|
|
46
|
+
- `lib/utils.ts` - Utility functions for className merging (if not exists)
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Dependencies
|
|
51
|
+
|
|
52
|
+
### Package Dependencies
|
|
53
|
+
The following packages will be added to `package.json` if missing:
|
|
54
|
+
- `@radix-ui/react-slot@^1.1.0` - For Button component
|
|
55
|
+
- `@radix-ui/react-dialog@^1.1.0` - For Sheet component
|
|
56
|
+
- `class-variance-authority@^0.7.0` - For component variants
|
|
57
|
+
- `clsx@^2.1.1` - For className utilities
|
|
58
|
+
- `tailwind-merge@^2.5.4` - For merging Tailwind classes
|
|
59
|
+
- `lucide-react@^0.469.0` - For icons
|
|
60
|
+
|
|
61
|
+
**Smart Deduplication:** If UI components already exist in your project, they won't be overwritten.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Environment Variables
|
|
66
|
+
|
|
67
|
+
No environment variables required for this module.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Manual Integration Steps
|
|
72
|
+
|
|
73
|
+
If you're appending this module to an existing project, follow these steps:
|
|
74
|
+
|
|
75
|
+
### Step 1: Install Dependencies
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
npm install
|
|
79
|
+
# or
|
|
80
|
+
pnpm install
|
|
81
|
+
# or
|
|
82
|
+
yarn install
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
The append command automatically adds missing dependencies to `package.json`, but you need to install them.
|
|
86
|
+
|
|
87
|
+
### Step 2: Verify Files Were Added
|
|
88
|
+
|
|
89
|
+
Check that the following directories exist:
|
|
90
|
+
- `app/docs/` - Should contain all docs pages
|
|
91
|
+
- `components/docs/` - Should contain all docs components
|
|
92
|
+
- `components/ui/` - Should contain UI components (if they didn't exist)
|
|
93
|
+
|
|
94
|
+
### Step 3: Access the Docs
|
|
95
|
+
|
|
96
|
+
1. Start your dev server: `npm run dev`
|
|
97
|
+
2. Visit `http://localhost:3000/docs` in your browser
|
|
98
|
+
3. You should see the docs landing page with navigation
|
|
99
|
+
|
|
100
|
+
### Step 4: Customize Navigation
|
|
101
|
+
|
|
102
|
+
Edit `components/docs/docs-nav.ts` to customize the sidebar navigation:
|
|
103
|
+
|
|
104
|
+
```typescript
|
|
105
|
+
export const docsNav: DocsNavItem[] = [
|
|
106
|
+
{
|
|
107
|
+
title: "Docs",
|
|
108
|
+
items: [
|
|
109
|
+
{ title: "Introduction", href: "/docs" },
|
|
110
|
+
{ title: "Documentation", href: "/docs/documentation" },
|
|
111
|
+
// Add your own pages here
|
|
112
|
+
],
|
|
113
|
+
},
|
|
114
|
+
// Add more sections
|
|
115
|
+
];
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Step 5: Add Your Own Documentation Pages
|
|
119
|
+
|
|
120
|
+
1. Create new pages in `app/docs/`:
|
|
121
|
+
```bash
|
|
122
|
+
app/docs/my-page/page.tsx
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
2. Add entry to navigation in `components/docs/docs-nav.ts`
|
|
126
|
+
|
|
127
|
+
3. Follow the existing page structure for consistency
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Usage Examples
|
|
132
|
+
|
|
133
|
+
### Basic Docs Page
|
|
134
|
+
|
|
135
|
+
```typescript
|
|
136
|
+
// app/docs/my-page/page.tsx
|
|
137
|
+
export default function MyPage() {
|
|
138
|
+
return (
|
|
139
|
+
<div className="py-10">
|
|
140
|
+
<h1 className="text-3xl font-semibold">My Page</h1>
|
|
141
|
+
<p className="mt-4 text-white/70">Content goes here</p>
|
|
142
|
+
</div>
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Category Page with Quickstart
|
|
148
|
+
|
|
149
|
+
```typescript
|
|
150
|
+
// app/docs/my-feature/page.tsx
|
|
151
|
+
import DocsCategoryPage, { type CategoryPageModel } from "@/components/docs/docs-category-page";
|
|
152
|
+
|
|
153
|
+
const categoryData: CategoryPageModel = {
|
|
154
|
+
title: "My Feature",
|
|
155
|
+
subtitle: "Description of my feature",
|
|
156
|
+
updated: "January 19, 2025",
|
|
157
|
+
atAGlance: {
|
|
158
|
+
whatYouGet: ["Feature 1", "Feature 2"],
|
|
159
|
+
youConfigure: ["Setting 1", "Setting 2"],
|
|
160
|
+
},
|
|
161
|
+
quickStart: [
|
|
162
|
+
{ title: "Step 1", description: "Do this first" },
|
|
163
|
+
{ title: "Step 2", description: "Then do this" },
|
|
164
|
+
],
|
|
165
|
+
variants: [
|
|
166
|
+
{
|
|
167
|
+
title: "Option A",
|
|
168
|
+
href: "/docs/my-feature/option-a",
|
|
169
|
+
summary: "Description",
|
|
170
|
+
status: "available",
|
|
171
|
+
},
|
|
172
|
+
],
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
export default function MyFeaturePage() {
|
|
176
|
+
return <DocsCategoryPage model={categoryData} />;
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Customization
|
|
183
|
+
|
|
184
|
+
### Styling
|
|
185
|
+
The docs use Tailwind CSS with a dark theme. To customize:
|
|
186
|
+
- Edit component files in `components/docs/`
|
|
187
|
+
- Modify Tailwind classes directly
|
|
188
|
+
- Update `app/docs/layout.tsx` for layout changes
|
|
189
|
+
|
|
190
|
+
### Navigation
|
|
191
|
+
- Edit `components/docs/docs-nav.ts` to change sidebar structure
|
|
192
|
+
- Modify `components/docs/docs-sidebar.tsx` for sidebar behavior
|
|
193
|
+
- Update `components/docs/docs-header.tsx` for header changes
|
|
194
|
+
|
|
195
|
+
### Content
|
|
196
|
+
- Edit pages in `app/docs/` to customize content
|
|
197
|
+
- Follow existing page patterns for consistency
|
|
198
|
+
- Use `DocsCategoryPage` for feature overviews
|
|
199
|
+
- Use `DocsCodeCard` for code examples
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## Troubleshooting
|
|
204
|
+
|
|
205
|
+
### Common Issues
|
|
206
|
+
|
|
207
|
+
**Issue:** Docs pages show 404 errors
|
|
208
|
+
**Solution:**
|
|
209
|
+
- Verify `app/docs/` directory exists
|
|
210
|
+
- Check that page files are named correctly (`page.tsx`)
|
|
211
|
+
- Restart dev server
|
|
212
|
+
|
|
213
|
+
**Issue:** UI components not found
|
|
214
|
+
**Solution:**
|
|
215
|
+
- Check that `components/ui/` directory exists
|
|
216
|
+
- Verify dependencies are installed: `npm install`
|
|
217
|
+
- Check that `lib/utils.ts` exists
|
|
218
|
+
|
|
219
|
+
**Issue:** Navigation not showing
|
|
220
|
+
**Solution:**
|
|
221
|
+
- Verify `components/docs/docs-nav.ts` exists
|
|
222
|
+
- Check that navigation data structure is correct
|
|
223
|
+
- Ensure `components/docs/docs-sidebar.tsx` is importing `docsNav`
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## Next Steps
|
|
228
|
+
|
|
229
|
+
After installing this module:
|
|
230
|
+
|
|
231
|
+
1. ✅ Visit `/docs` to see your documentation
|
|
232
|
+
2. ✅ Customize navigation in `components/docs/docs-nav.ts`
|
|
233
|
+
3. ✅ Add your own documentation pages
|
|
234
|
+
4. ✅ Update content in existing pages
|
|
235
|
+
5. ✅ Customize styling if needed
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## Related Modules
|
|
240
|
+
|
|
241
|
+
This module works independently and doesn't require other modules. However, it complements:
|
|
242
|
+
- **Authentication Module** - Can document auth setup
|
|
243
|
+
- **Database Module** - Can document database configuration
|
|
244
|
+
- **Payments Module** - Can document payment integration
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## Module Status
|
|
249
|
+
|
|
250
|
+
✅ **Standalone Package** - All components included
|
|
251
|
+
✅ **No Missing Dependencies** - Everything needed is bundled
|
|
252
|
+
✅ **Ready to Use** - Works immediately after append
|
|
253
|
+
✅ **Well Documented** - Comprehensive integration guide
|
|
254
|
+
✅ **Smart Deduplication** - Won't overwrite existing components
|
|
255
|
+
|