Skip to content

Commit 1610d78

Browse files
committed
feat: introduce comprehensive documentation for CLI tools and project architecture, including a new docs generation component.
1 parent b57f2a4 commit 1610d78

20 files changed

Lines changed: 1095 additions & 41 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ ts-debug.log*
3535
.env
3636
my-secure-bridge/.env.example
3737
test.html
38-
test.html
38+
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2025-12-28T03:31:50.908803Z WARN daemon_server: turborepo_lib::commands::daemon: daemon already running
2+
2025-12-28T05:09:27.876364Z WARN daemon_server: turborepo_lib::commands::daemon: daemon already running

README.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
# PostPipe 2.0 Lab 🧪
22

33
Welcome to the development and testing ground for PostPipe 2.0.
4-
This repository contains the CLI tools, the API simulation, and the "Dynamic Lab" for testing integrations.
4+
5+
**[📚 Full Documentation is available here](./documentation/README.md)**
6+
7+
## What is this?
8+
9+
This repository contains:
10+
11+
1. **Apps**: The SaaS Dashboard and "Dynamic Lab" simulation (`apps/web`).
12+
2. **CLI**: The suite of tools for scaffolding Auth, Connectors, and more (`cli/`).
13+
3. **Packages**: Shared UI components (`packages/ui`).
514

615
## 🚀 Quick Start (Connector Demo)
716

@@ -10,12 +19,11 @@ We have a fully simulated environment to test the **Zero Trust Connector** flow
1019
### Prerequisites
1120

1221
- Node.js 18+
13-
- Docker (Optional, if testing container deployment)
1422
- MongoDB / Postgres (Local or Cloud)
1523

1624
### Step 1: Start the SaaS Simulation
1725

18-
Run the "Dynamic Lab" (Next.js App) which hosts the Dashboard and Mock Ingest API.
26+
Run the "Dynamic Lab" (Next.js App) which hosts the Dashboard.
1927

2028
```bash
2129
npm run dev:lab
@@ -33,45 +41,37 @@ node cli/create-postpipe-connector/dist/index.js my-test-connector
3341
# 2. Install & Configure
3442
cd my-test-connector
3543
npm install
44+
```
3645

37-
# 3. CRITICAL: Change Port to 3001
38-
# Open .env and set:
39-
# PORT=3001
46+
**CRITICAL**: Open `.env` in `my-test-connector` and set `PORT=3001` (to avoid conflict with the Lab).
4047

41-
# 4. Start Connector
48+
```bash
49+
# 3. Start Connector
4250
npm run dev
4351
```
4452

4553
### Step 3: Test the Flow
4654

4755
1. Open [http://localhost:3000/connector-demo](http://localhost:3000/connector-demo).
4856
2. Enter your Connector URL: `http://localhost:3001/postpipe/ingest`
49-
3. Click **Generate Credentials**.
50-
4. Copy the `POSTPIPE_CONNECTOR_ID` and `SECRET` to your connector's `.env`.
51-
5. Restart the connector terminal.
52-
6. Submit the form on the Demo Page!
57+
3. Click **Generate Credentials** and add them to your connector's `.env`.
58+
4. Restart connector, then Submit the form on the Demo Page!
5359

5460
---
5561

56-
## 📂 Project Structure
57-
58-
- `cli/` - Source code for all CLI tools (`create-postpipe-auth`, `create-postpipe-connector`, etc).
59-
- `src/dynamic-lab/` - The Next.js application simulating the SaaS Dashboard.
60-
- `src/static-server/` - Legacy logic (moved to dynamic-lab).
62+
## 📂 Documentation
6163

62-
## 🛠️ CLI Tools
64+
- [**Getting Started Guide**](./documentation/getting-started.md)
65+
- [**CLI Tools Reference**](./documentation/cli/index.md)
66+
- [**Architecture Overview**](./documentation/architecture.md)
6367

64-
| Command | Description |
65-
| :-------------------------- | :-------------------------------------------- |
66-
| `create-postpipe-connector` | Scaffolds the self-hosted database connector. |
67-
| `create-postpipe-auth` | Scaffolds authentication logic. |
68+
For deep dives, please check the [documentation](./documentation/README.md) folder.
6869

6970
## 🐛 Troubleshooting
7071

7172
**"Connection Refused"**
7273

7374
- Ensure your Connector is running on a _different_ port (3001) than the Lab (3000).
74-
- Check your `.env` config.
7575

7676
**"Invalid Signature"**
7777

apps/web/app/docs/layout.tsx

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
import Link from "next/link";
2+
3+
const categories = [
4+
{ name: "Core", href: "#core" },
5+
{ name: "Auth", href: "#auth" },
6+
{ name: "E-commerce", href: "#ecommerce" },
7+
{ name: "Features", href: "#features" },
8+
{ name: "Admin", href: "#admin" },
9+
{ name: "Utilities", href: "#utils" },
10+
];
11+
12+
export default function DocsLayout({
13+
children,
14+
}: {
15+
children: React.ReactNode;
16+
}) {
17+
return (
18+
<div className="flex min-h-screen bg-black text-slate-200 selection:bg-blue-500/30">
19+
{/* Sidebar */}
20+
<aside className="fixed top-0 left-0 w-72 h-screen border-r border-white/10 bg-black/50 backdrop-blur-xl p-8 overflow-y-auto z-10 hidden md:block">
21+
<div className="mb-10 flex items-center gap-2">
22+
<div className="w-8 h-8 bg-blue-600 rounded-lg flex items-center justify-center font-bold text-white">
23+
P
24+
</div>
25+
<span className="font-bold text-xl tracking-tight text-white">PostPipe Docs</span>
26+
</div>
27+
28+
<nav className="space-y-8">
29+
<div>
30+
<h4 className="text-xs font-semibold text-slate-500 uppercase tracking-wider mb-4">
31+
CLI Ecosystem
32+
</h4>
33+
<ul className="space-y-2">
34+
{categories.map((cat) => (
35+
<li key={cat.name}>
36+
<Link
37+
href={cat.href}
38+
className="block text-sm text-slate-400 hover:text-white transition-colors duration-200 font-medium"
39+
>
40+
{cat.name}
41+
</Link>
42+
</li>
43+
))}
44+
</ul>
45+
</div>
46+
47+
<div>
48+
<h4 className="text-xs font-semibold text-slate-500 uppercase tracking-wider mb-4">
49+
Resources
50+
</h4>
51+
<ul className="space-y-2">
52+
<li>
53+
<a href="https://github.com/Sourodip-1/PostPipe-2.0" target="_blank" className="block text-sm text-slate-400 hover:text-white transition-colors">
54+
GitHub Repo
55+
</a>
56+
</li>
57+
<li>
58+
<a href="/" className="block text-sm text-slate-400 hover:text-white transition-colors">
59+
Back to Lab
60+
</a>
61+
</li>
62+
</ul>
63+
</div>
64+
</nav>
65+
</aside>
66+
67+
{/* Main Content */}
68+
<main className="flex-1 md:ml-72 min-h-screen relative">
69+
<div className="max-w-4xl mx-auto p-12">
70+
{children}
71+
</div>
72+
</main>
73+
</div>
74+
);
75+
}

apps/web/app/docs/page.tsx

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
2+
"use client";
3+
4+
import React from 'react';
5+
import { Terminal, Package, ShoppingCart, User, Database, Mail, BarChart3, Upload, Search, FileText, Bell, CreditCard, Box, LayoutPanelLeft, Wrench } from 'lucide-react';
6+
7+
const tools = [
8+
{
9+
category: "Core",
10+
command: "npx create-postpipe-connector",
11+
description: "The Essential Tool. Scaffolds the self-hosted database connector.",
12+
icon: <Database className="w-5 h-5 text-blue-400" />
13+
},
14+
{
15+
category: "Auth",
16+
command: "npx create-postpipe-auth",
17+
description: "Master Tool. Scaffolds a complete Authentication system (Login, Signup, DB, Email).",
18+
icon: <User className="w-5 h-5 text-emerald-400" />
19+
},
20+
{
21+
category: "E-commerce",
22+
command: "npx create-postpipe-ecommerce",
23+
description: "Full-stack shop backend & frontend logic.",
24+
icon: <ShoppingCart className="w-5 h-5 text-purple-400" />
25+
},
26+
{
27+
category: "E-commerce",
28+
command: "npx create-postpipe-shop",
29+
description: "Scaffolds specific Shop features like Cart and Wishlist.",
30+
icon: <ShoppingCart className="w-5 h-5 text-purple-300" />
31+
},
32+
{
33+
category: "E-commerce",
34+
command: "npx create-postpipe-delivery",
35+
description: "Delivery tracking and management components.",
36+
icon: <Box className="w-5 h-5 text-amber-400" />
37+
},
38+
{
39+
category: "E-commerce",
40+
command: "npx create-postpipe-payment",
41+
description: "Components for payment processing integration.",
42+
icon: <CreditCard className="w-5 h-5 text-indigo-400" />
43+
},
44+
{
45+
category: "Features",
46+
command: "npx create-postpipe-appointment",
47+
description: "Appointment Booking System (Models, APIs).",
48+
icon: <Package className="w-5 h-5 text-orange-400" />
49+
},
50+
{
51+
category: "Features",
52+
command: "npx create-postpipe-form",
53+
description: "Interactive Form APIs (Contact, Feedback, Newsletter).",
54+
icon: <FileText className="w-5 h-5 text-pink-400" />
55+
},
56+
{
57+
category: "Features",
58+
command: "npx create-postpipe-profile",
59+
description: "User Profile management (Update Name, Change Password).",
60+
icon: <User className="w-5 h-5 text-cyan-400" />
61+
},
62+
{
63+
category: "Features",
64+
command: "npx create-postpipe-cms",
65+
description: "Scaffolds simple Content Management System capabilities.",
66+
icon: <LayoutPanelLeft className="w-5 h-5 text-rose-400" />
67+
},
68+
{
69+
category: "Features",
70+
command: "npx create-postpipe-search",
71+
description: "Scaffolds search functionality.",
72+
icon: <Search className="w-5 h-5 text-teal-400" />
73+
},
74+
{
75+
category: "Features",
76+
command: "npx create-postpipe-notify",
77+
description: "Notification system (Emails, Alerts).",
78+
icon: <Bell className="w-5 h-5 text-yellow-400" />
79+
},
80+
{
81+
category: "Features",
82+
command: "npx create-postpipe-analytics",
83+
description: "Analytics tracking components.",
84+
icon: <BarChart3 className="w-5 h-5 text-red-400" />
85+
},
86+
{
87+
category: "Features",
88+
command: "npx create-postpipe-upload",
89+
description: "File upload utilities.",
90+
icon: <Upload className="w-5 h-5 text-sky-400" />
91+
},
92+
{
93+
category: "Admin",
94+
command: "npx create-postpipe-admin",
95+
description: "Scaffolds an Admin Dashboard.",
96+
icon: <LayoutPanelLeft className="w-5 h-5 text-zinc-400" />
97+
},
98+
{
99+
category: "Utilities",
100+
command: "npx create-postpipe-crud",
101+
description: "Basic CRUD template.",
102+
icon: <Terminal className="w-5 h-5 text-gray-400" />
103+
},
104+
{
105+
category: "Utilities",
106+
command: "npx create-postpipe-email",
107+
description: "Sets up Resend email utility.",
108+
icon: <Mail className="w-5 h-5 text-lime-400" />
109+
},
110+
];
111+
112+
// Helper to get ID from category name
113+
const getCatId = (cat: string) => cat.toLowerCase().replace(" ", "-");
114+
115+
export default function DocsPage() {
116+
// Group tools per categories defined in Sidebar
117+
const categoriesOrder = ["Core", "Auth", "E-commerce", "Features", "Admin", "Utilities"];
118+
119+
return (
120+
<div className="space-y-20 pb-20">
121+
122+
<div className="space-y-4">
123+
<h1 className="text-4xl font-bold text-white tracking-tight">PostPipe Tools</h1>
124+
<p className="text-lg text-slate-400 max-w-2xl">
125+
Browse the complete list of generative modules available in the PostPipe CLI.
126+
</p>
127+
</div>
128+
129+
<div className="space-y-24">
130+
{categoriesOrder.map((catName) => {
131+
const catTools = tools.filter(t => t.category === catName || (catName === "Utilities" && (t.category === "Dev" || t.category === "Utils")));
132+
133+
if (catTools.length === 0) return null;
134+
135+
return (
136+
<section key={catName} id={getCatId(catName)} className="scroll-mt-24">
137+
<div className="flex items-center gap-4 mb-8 border-b border-white/10 pb-4">
138+
<h2 className="text-2xl font-semibold text-white">{catName}</h2>
139+
<span className="text-xs font-mono text-slate-600 bg-white/5 px-2 py-1 rounded">
140+
{catTools.length} Modules
141+
</span>
142+
</div>
143+
144+
<div className="grid grid-cols-1 gap-4">
145+
{catTools.map((tool, idx) => (
146+
<div key={idx} className="group relative bg-zinc-900/50 hover:bg-zinc-900/80 border border-white/5 hover:border-white/10 rounded-xl p-6 transition-all duration-200">
147+
<div className="flex flex-col md:flex-row md:items-center justify-between gap-6">
148+
149+
<div className="flex items-start gap-4">
150+
<div className="p-3 bg-black rounded-lg border border-white/10 group-hover:border-blue-500/30 transition-colors">
151+
{tool.icon}
152+
</div>
153+
<div>
154+
<div className="flex items-center gap-2 mb-1">
155+
<code className="text-sm font-mono text-blue-400 px-1.5 py-0.5 rounded bg-blue-500/10">
156+
{tool.command}
157+
</code>
158+
</div>
159+
<p className="text-slate-400 text-sm leading-relaxed">
160+
{tool.description}
161+
</p>
162+
</div>
163+
</div>
164+
165+
<button
166+
className="opacity-0 group-hover:opacity-100 transition-opacity px-4 py-2 bg-white text-black text-sm font-medium rounded-lg hover:bg-slate-200"
167+
onClick={() => navigator.clipboard.writeText(tool.command)}
168+
>
169+
Copy
170+
</button>
171+
</div>
172+
</div>
173+
))}
174+
</div>
175+
</section>
176+
)
177+
})}
178+
</div>
179+
180+
</div>
181+
);
182+
}

apps/web/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,15 @@
1010
},
1111
"dependencies": {
1212
"@postpipe/ui": "*",
13+
"clsx": "^2.1.1",
14+
"framer-motion": "^12.23.26",
15+
"lucide-react": "^0.562.0",
1316
"mongodb": "^7.0.0",
1417
"mongoose": "^9.0.2",
1518
"next": "14.2.0",
1619
"react": "^18",
17-
"react-dom": "^18"
20+
"react-dom": "^18",
21+
"tailwind-merge": "^3.4.0"
1822
},
1923
"devDependencies": {
2024
"@types/node": "^20",

0 commit comments

Comments
 (0)