@shahadpichen/docpush 1.0.7 → 1.0.8
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 +18 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ Self-hosted, Git-backed collaborative documentation platform.
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
7
|
- 📝 **Git-backed** - All docs stored in your GitHub repo
|
|
8
|
-
- 🔐 **Flexible Auth** - Public
|
|
8
|
+
- 🔐 **Flexible Auth** - Public or OAuth with domain restriction
|
|
9
9
|
- ✏️ **Draft System** - Branch-based editing with approval workflow
|
|
10
10
|
- 💬 **Comments** - Collaborative review process
|
|
11
11
|
- ⚛️ **React Components** - Headless UI components for your app
|
|
@@ -70,25 +70,21 @@ auth: {
|
|
|
70
70
|
|
|
71
71
|
### Domain-Restricted Mode
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
OAuth login (Google/GitHub) with email domain verification.
|
|
74
74
|
|
|
75
75
|
```javascript
|
|
76
76
|
auth: {
|
|
77
77
|
mode: 'domain-restricted',
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
providers: ['google'], // or ['github']
|
|
79
|
+
allowedDomains: ['yourcompany.com'],
|
|
80
80
|
}
|
|
81
81
|
```
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
**Required env vars for domain-restricted:**
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
auth: {
|
|
89
|
-
mode: 'oauth',
|
|
90
|
-
providers: ['github', 'google'],
|
|
91
|
-
}
|
|
85
|
+
```
|
|
86
|
+
GOOGLE_CLIENT_ID=your_client_id
|
|
87
|
+
GOOGLE_CLIENT_SECRET=your_client_secret
|
|
92
88
|
```
|
|
93
89
|
|
|
94
90
|
## React Components
|
|
@@ -103,7 +99,7 @@ import {
|
|
|
103
99
|
MarkdownEditor,
|
|
104
100
|
useDocs,
|
|
105
101
|
useDrafts,
|
|
106
|
-
} from "docpush/react";
|
|
102
|
+
} from "@shahadpichen/docpush/react";
|
|
107
103
|
|
|
108
104
|
function App() {
|
|
109
105
|
return (
|
|
@@ -114,6 +110,15 @@ function App() {
|
|
|
114
110
|
}
|
|
115
111
|
```
|
|
116
112
|
|
|
113
|
+
## Add Components (shadcn-style)
|
|
114
|
+
|
|
115
|
+
Copy components to your project for customization:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
npx @shahadpichen/docpush add button input textarea
|
|
119
|
+
npx @shahadpichen/docpush add all
|
|
120
|
+
```
|
|
121
|
+
|
|
117
122
|
## API Endpoints
|
|
118
123
|
|
|
119
124
|
| Endpoint | Description |
|