@shahadpichen/docpush 1.0.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 (168) hide show
  1. package/README.md +129 -0
  2. package/dist/cli/commands/init.d.ts +2 -0
  3. package/dist/cli/commands/init.d.ts.map +1 -0
  4. package/dist/cli/commands/init.js +116 -0
  5. package/dist/cli/commands/init.js.map +1 -0
  6. package/dist/cli/commands/start.d.ts +4 -0
  7. package/dist/cli/commands/start.d.ts.map +1 -0
  8. package/dist/cli/commands/start.js +58 -0
  9. package/dist/cli/commands/start.js.map +1 -0
  10. package/dist/cli/index.d.ts +3 -0
  11. package/dist/cli/index.d.ts.map +1 -0
  12. package/dist/cli/index.js +22 -0
  13. package/dist/cli/index.js.map +1 -0
  14. package/dist/core/config/index.d.ts +3 -0
  15. package/dist/core/config/index.d.ts.map +1 -0
  16. package/dist/core/config/index.js +9 -0
  17. package/dist/core/config/index.js.map +1 -0
  18. package/dist/core/config/loader.d.ts +6 -0
  19. package/dist/core/config/loader.d.ts.map +1 -0
  20. package/dist/core/config/loader.js +50 -0
  21. package/dist/core/config/loader.js.map +1 -0
  22. package/dist/core/config/schema.d.ts +134 -0
  23. package/dist/core/config/schema.d.ts.map +1 -0
  24. package/dist/core/config/schema.js +106 -0
  25. package/dist/core/config/schema.js.map +1 -0
  26. package/dist/core/errors.d.ts +45 -0
  27. package/dist/core/errors.d.ts.map +1 -0
  28. package/dist/core/errors.js +76 -0
  29. package/dist/core/errors.js.map +1 -0
  30. package/dist/core/github/client.d.ts +47 -0
  31. package/dist/core/github/client.d.ts.map +1 -0
  32. package/dist/core/github/client.js +159 -0
  33. package/dist/core/github/client.js.map +1 -0
  34. package/dist/core/github/index.d.ts +4 -0
  35. package/dist/core/github/index.d.ts.map +1 -0
  36. package/dist/core/github/index.js +9 -0
  37. package/dist/core/github/index.js.map +1 -0
  38. package/dist/core/github/retry.d.ts +15 -0
  39. package/dist/core/github/retry.d.ts.map +1 -0
  40. package/dist/core/github/retry.js +61 -0
  41. package/dist/core/github/retry.js.map +1 -0
  42. package/dist/index.d.ts +9 -0
  43. package/dist/index.d.ts.map +1 -0
  44. package/dist/index.js +40 -0
  45. package/dist/index.js.map +1 -0
  46. package/dist/react/components/comments-panel.d.ts +14 -0
  47. package/dist/react/components/comments-panel.d.ts.map +1 -0
  48. package/dist/react/components/comments-panel.js +62 -0
  49. package/dist/react/components/comments-panel.js.map +1 -0
  50. package/dist/react/components/docs-sidebar.d.ts +13 -0
  51. package/dist/react/components/docs-sidebar.d.ts.map +1 -0
  52. package/dist/react/components/docs-sidebar.js +70 -0
  53. package/dist/react/components/docs-sidebar.js.map +1 -0
  54. package/dist/react/components/drafts-list.d.ts +18 -0
  55. package/dist/react/components/drafts-list.d.ts.map +1 -0
  56. package/dist/react/components/drafts-list.js +38 -0
  57. package/dist/react/components/drafts-list.js.map +1 -0
  58. package/dist/react/components/markdown-editor.d.ts +8 -0
  59. package/dist/react/components/markdown-editor.d.ts.map +1 -0
  60. package/dist/react/components/markdown-editor.js +59 -0
  61. package/dist/react/components/markdown-editor.js.map +1 -0
  62. package/dist/react/components/markdown-viewer.d.ts +7 -0
  63. package/dist/react/components/markdown-viewer.d.ts.map +1 -0
  64. package/dist/react/components/markdown-viewer.js +58 -0
  65. package/dist/react/components/markdown-viewer.js.map +1 -0
  66. package/dist/react/components/search-bar.d.ts +14 -0
  67. package/dist/react/components/search-bar.d.ts.map +1 -0
  68. package/dist/react/components/search-bar.js +80 -0
  69. package/dist/react/components/search-bar.js.map +1 -0
  70. package/dist/react/components/ui/badge.d.ts +10 -0
  71. package/dist/react/components/ui/badge.d.ts.map +1 -0
  72. package/dist/react/components/ui/badge.js +27 -0
  73. package/dist/react/components/ui/badge.js.map +1 -0
  74. package/dist/react/components/ui/button.d.ts +12 -0
  75. package/dist/react/components/ui/button.d.ts.map +1 -0
  76. package/dist/react/components/ui/button.js +71 -0
  77. package/dist/react/components/ui/button.js.map +1 -0
  78. package/dist/react/components/ui/card.d.ts +7 -0
  79. package/dist/react/components/ui/card.d.ts.map +1 -0
  80. package/dist/react/components/ui/card.js +52 -0
  81. package/dist/react/components/ui/card.js.map +1 -0
  82. package/dist/react/components/ui/input.d.ts +6 -0
  83. package/dist/react/components/ui/input.d.ts.map +1 -0
  84. package/dist/react/components/ui/input.js +45 -0
  85. package/dist/react/components/ui/input.js.map +1 -0
  86. package/dist/react/components/ui/scroll-area.d.ts +6 -0
  87. package/dist/react/components/ui/scroll-area.d.ts.map +1 -0
  88. package/dist/react/components/ui/scroll-area.js +48 -0
  89. package/dist/react/components/ui/scroll-area.js.map +1 -0
  90. package/dist/react/components/ui/textarea.d.ts +6 -0
  91. package/dist/react/components/ui/textarea.d.ts.map +1 -0
  92. package/dist/react/components/ui/textarea.js +45 -0
  93. package/dist/react/components/ui/textarea.js.map +1 -0
  94. package/dist/react/context/docpush-provider.d.ts +17 -0
  95. package/dist/react/context/docpush-provider.d.ts.map +1 -0
  96. package/dist/react/context/docpush-provider.js +72 -0
  97. package/dist/react/context/docpush-provider.js.map +1 -0
  98. package/dist/react/hooks/use-auth.d.ts +16 -0
  99. package/dist/react/hooks/use-auth.d.ts.map +1 -0
  100. package/dist/react/hooks/use-auth.js +72 -0
  101. package/dist/react/hooks/use-auth.js.map +1 -0
  102. package/dist/react/hooks/use-comments.d.ts +15 -0
  103. package/dist/react/hooks/use-comments.d.ts.map +1 -0
  104. package/dist/react/hooks/use-comments.js +67 -0
  105. package/dist/react/hooks/use-comments.js.map +1 -0
  106. package/dist/react/hooks/use-docs.d.ts +13 -0
  107. package/dist/react/hooks/use-docs.d.ts.map +1 -0
  108. package/dist/react/hooks/use-docs.js +69 -0
  109. package/dist/react/hooks/use-docs.js.map +1 -0
  110. package/dist/react/hooks/use-drafts.d.ts +25 -0
  111. package/dist/react/hooks/use-drafts.d.ts.map +1 -0
  112. package/dist/react/hooks/use-drafts.js +99 -0
  113. package/dist/react/hooks/use-drafts.js.map +1 -0
  114. package/dist/react/index.d.ts +19 -0
  115. package/dist/react/index.d.ts.map +1 -0
  116. package/dist/react/index.js +52 -0
  117. package/dist/react/index.js.map +1 -0
  118. package/dist/react/lib/utils.d.ts +3 -0
  119. package/dist/react/lib/utils.d.ts.map +1 -0
  120. package/dist/react/lib/utils.js +9 -0
  121. package/dist/react/lib/utils.js.map +1 -0
  122. package/dist/server/auth/index.d.ts +18 -0
  123. package/dist/server/auth/index.d.ts.map +1 -0
  124. package/dist/server/auth/index.js +50 -0
  125. package/dist/server/auth/index.js.map +1 -0
  126. package/dist/server/auth/magic-link.d.ts +10 -0
  127. package/dist/server/auth/magic-link.d.ts.map +1 -0
  128. package/dist/server/auth/magic-link.js +94 -0
  129. package/dist/server/auth/magic-link.js.map +1 -0
  130. package/dist/server/auth/oauth.d.ts +6 -0
  131. package/dist/server/auth/oauth.d.ts.map +1 -0
  132. package/dist/server/auth/oauth.js +90 -0
  133. package/dist/server/auth/oauth.js.map +1 -0
  134. package/dist/server/auth/public.d.ts +7 -0
  135. package/dist/server/auth/public.d.ts.map +1 -0
  136. package/dist/server/auth/public.js +43 -0
  137. package/dist/server/auth/public.js.map +1 -0
  138. package/dist/server/index.d.ts +12 -0
  139. package/dist/server/index.d.ts.map +1 -0
  140. package/dist/server/index.js +107 -0
  141. package/dist/server/index.js.map +1 -0
  142. package/dist/server/middleware/auth.d.ts +20 -0
  143. package/dist/server/middleware/auth.d.ts.map +1 -0
  144. package/dist/server/middleware/auth.js +49 -0
  145. package/dist/server/middleware/auth.js.map +1 -0
  146. package/dist/server/routes/auth.d.ts +3 -0
  147. package/dist/server/routes/auth.d.ts.map +1 -0
  148. package/dist/server/routes/auth.js +105 -0
  149. package/dist/server/routes/auth.js.map +1 -0
  150. package/dist/server/routes/docs.d.ts +3 -0
  151. package/dist/server/routes/docs.d.ts.map +1 -0
  152. package/dist/server/routes/docs.js +58 -0
  153. package/dist/server/routes/docs.js.map +1 -0
  154. package/dist/server/routes/drafts.d.ts +3 -0
  155. package/dist/server/routes/drafts.d.ts.map +1 -0
  156. package/dist/server/routes/drafts.js +264 -0
  157. package/dist/server/routes/drafts.js.map +1 -0
  158. package/dist/server/routes/index.d.ts +4 -0
  159. package/dist/server/routes/index.d.ts.map +1 -0
  160. package/dist/server/routes/index.js +13 -0
  161. package/dist/server/routes/index.js.map +1 -0
  162. package/dist/server/storage/index.d.ts +40 -0
  163. package/dist/server/storage/index.d.ts.map +1 -0
  164. package/dist/server/storage/index.js +199 -0
  165. package/dist/server/storage/index.js.map +1 -0
  166. package/package.json +109 -0
  167. package/templates/.env.example +20 -0
  168. package/templates/docs.config.js +21 -0
@@ -0,0 +1,7 @@
1
+ import type { DocsConfig } from '../../core/config';
2
+ /**
3
+ * Public mode authentication
4
+ * Anyone can edit, but admin actions require password
5
+ */
6
+ export declare function setupPublicAuth(config: DocsConfig): void;
7
+ //# sourceMappingURL=public.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/server/auth/public.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,UAAU,QAuCjD"}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.setupPublicAuth = setupPublicAuth;
7
+ const passport_1 = __importDefault(require("passport"));
8
+ const passport_custom_1 = require("passport-custom");
9
+ /**
10
+ * Public mode authentication
11
+ * Anyone can edit, but admin actions require password
12
+ */
13
+ function setupPublicAuth(config) {
14
+ if (config.auth.mode !== 'public')
15
+ return;
16
+ // Public mode: everyone gets editor access, no login needed
17
+ passport_1.default.use('public-editor', new passport_custom_1.Strategy((req, done) => {
18
+ // Everyone is an editor in public mode
19
+ done(null, {
20
+ id: 'anonymous',
21
+ email: null,
22
+ name: 'Anonymous Editor',
23
+ role: 'editor',
24
+ });
25
+ }));
26
+ // Admin check via password header
27
+ passport_1.default.use('public-admin', new passport_custom_1.Strategy((req, done) => {
28
+ const password = req.headers['x-admin-password'];
29
+ if (!password) {
30
+ return done(null, false);
31
+ }
32
+ if (config.auth.mode === 'public' && password === config.auth.adminPassword) {
33
+ return done(null, {
34
+ id: 'admin',
35
+ email: null,
36
+ name: 'Admin',
37
+ role: 'admin',
38
+ });
39
+ }
40
+ return done(null, false);
41
+ }));
42
+ }
43
+ //# sourceMappingURL=public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public.js","sourceRoot":"","sources":["../../../src/server/auth/public.ts"],"names":[],"mappings":";;;;;AAQA,0CAuCC;AA/CD,wDAAgC;AAChC,qDAA6D;AAG7D;;;GAGG;AACH,SAAgB,eAAe,CAAC,MAAkB;IAChD,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ;QAAE,OAAO;IAE1C,4DAA4D;IAC5D,kBAAQ,CAAC,GAAG,CACV,eAAe,EACf,IAAI,0BAAc,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;QAC/B,uCAAuC;QACvC,IAAI,CAAC,IAAI,EAAE;YACT,EAAE,EAAE,WAAW;YACf,KAAK,EAAE,IAAI;YACX,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE,QAAQ;SACf,CAAC,CAAC;IACL,CAAC,CAAC,CACH,CAAC;IAEF,kCAAkC;IAClC,kBAAQ,CAAC,GAAG,CACV,cAAc,EACd,IAAI,0BAAc,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;QAC/B,MAAM,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAW,CAAC;QAE3D,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,OAAO,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAC3B,CAAC;QAED,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ,IAAI,QAAQ,KAAK,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;YAC5E,OAAO,IAAI,CAAC,IAAI,EAAE;gBAChB,EAAE,EAAE,OAAO;gBACX,KAAK,EAAE,IAAI;gBACX,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,OAAO;aACd,CAAC,CAAC;QACL,CAAC;QAED,OAAO,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC3B,CAAC,CAAC,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,12 @@
1
+ import express from 'express';
2
+ import { type DocsConfig } from '../core/config';
3
+ declare global {
4
+ namespace Express {
5
+ interface Request {
6
+ config?: DocsConfig;
7
+ }
8
+ }
9
+ }
10
+ export declare function createServer(): Promise<express.Application>;
11
+ export declare function startServer(port?: number): Promise<void>;
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,SAAS,CAAC;AAG9B,OAAO,EAAE,KAAK,UAAU,EAA2B,MAAM,gBAAgB,CAAC;AAO1E,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,OAAO,CAAC;QAChB,UAAU,OAAO;YACf,MAAM,CAAC,EAAE,UAAU,CAAC;SACrB;KACF;CACF;AAED,wBAAsB,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAyGjE;AAED,wBAAsB,WAAW,CAAC,IAAI,SAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAQ5D"}
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.createServer = createServer;
7
+ exports.startServer = startServer;
8
+ const cors_1 = __importDefault(require("cors"));
9
+ const express_1 = __importDefault(require("express"));
10
+ const express_session_1 = __importDefault(require("express-session"));
11
+ const passport_1 = __importDefault(require("passport"));
12
+ const config_1 = require("../core/config");
13
+ const auth_1 = require("./auth");
14
+ const auth_2 = __importDefault(require("./routes/auth"));
15
+ const docs_1 = __importDefault(require("./routes/docs"));
16
+ const drafts_1 = __importDefault(require("./routes/drafts"));
17
+ async function createServer() {
18
+ // Validate environment
19
+ (0, config_1.validateEnv)();
20
+ // Load config
21
+ const config = await (0, config_1.loadConfig)();
22
+ // Create Express app
23
+ const app = (0, express_1.default)();
24
+ // Middleware
25
+ app.use((0, cors_1.default)({
26
+ origin: process.env.APP_URL,
27
+ credentials: true,
28
+ }));
29
+ app.use(express_1.default.json({ limit: '10mb' }));
30
+ app.use(express_1.default.urlencoded({ extended: true }));
31
+ // Session
32
+ app.use((0, express_session_1.default)({
33
+ secret: process.env.SESSION_SECRET || 'fallback-secret-change-me',
34
+ resave: false,
35
+ saveUninitialized: false,
36
+ cookie: {
37
+ httpOnly: true,
38
+ secure: process.env.NODE_ENV === 'production',
39
+ maxAge: 24 * 60 * 60 * 1000, // 24 hours
40
+ sameSite: 'lax',
41
+ },
42
+ }));
43
+ // Passport
44
+ app.use(passport_1.default.initialize());
45
+ app.use(passport_1.default.session());
46
+ // Setup auth strategies based on config
47
+ (0, auth_1.setupAuth)(config);
48
+ // Store config in request
49
+ app.use((req, res, next) => {
50
+ req.config = config;
51
+ next();
52
+ });
53
+ // Routes
54
+ app.use('/api/auth', auth_2.default);
55
+ app.use('/api/drafts', drafts_1.default);
56
+ app.use('/api/docs', docs_1.default);
57
+ // Health check
58
+ app.get('/api/health', (req, res) => {
59
+ res.json({
60
+ status: 'ok',
61
+ timestamp: new Date().toISOString(),
62
+ version: '1.0.0',
63
+ authMode: config.auth.mode,
64
+ });
65
+ });
66
+ // API info
67
+ app.get('/api', (req, res) => {
68
+ res.json({
69
+ name: 'DocPush API',
70
+ version: '1.0.0',
71
+ authMode: config.auth.mode,
72
+ endpoints: [
73
+ 'GET /api/health',
74
+ 'GET /api/auth/me',
75
+ 'POST /api/auth/logout',
76
+ 'POST /api/auth/magic-link',
77
+ 'POST /api/auth/verify',
78
+ 'GET /api/auth/github',
79
+ 'GET /api/auth/google',
80
+ 'GET /api/docs/tree',
81
+ 'GET /api/docs/content',
82
+ 'GET /api/drafts',
83
+ 'POST /api/drafts',
84
+ 'PUT /api/drafts/:id',
85
+ 'POST /api/drafts/:id/approve',
86
+ 'POST /api/drafts/:id/reject',
87
+ ],
88
+ });
89
+ });
90
+ // Error handler
91
+ app.use((err, req, res, _next) => {
92
+ console.error('Server error:', err);
93
+ res.status(err.status || 500).json({
94
+ error: err.message || 'Internal server error',
95
+ });
96
+ });
97
+ return app;
98
+ }
99
+ async function startServer(port = 3000) {
100
+ const app = await createServer();
101
+ app.listen(port, () => {
102
+ console.log(`🚀 DocPush server running on http://localhost:${port}`);
103
+ console.log(`📝 API available at http://localhost:${port}/api`);
104
+ console.log(`❤️ Health check at http://localhost:${port}/api/health`);
105
+ });
106
+ }
107
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":";;;;;AAmBA,oCAyGC;AAED,kCAQC;AAtID,gDAAwB;AACxB,sDAA8B;AAC9B,sEAAsC;AACtC,wDAAgC;AAChC,2CAA0E;AAC1E,iCAAmC;AACnC,yDAAuC;AACvC,yDAAuC;AACvC,6DAA2C;AAWpC,KAAK,UAAU,YAAY;IAChC,uBAAuB;IACvB,IAAA,oBAAW,GAAE,CAAC;IAEd,cAAc;IACd,MAAM,MAAM,GAAG,MAAM,IAAA,mBAAU,GAAE,CAAC;IAElC,qBAAqB;IACrB,MAAM,GAAG,GAAG,IAAA,iBAAO,GAAE,CAAC;IAEtB,aAAa;IACb,GAAG,CAAC,GAAG,CACL,IAAA,cAAI,EAAC;QACH,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,OA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C,IAAI,GAAG,IAAI;IAC3C,MAAM,GAAG,GAAG,MAAM,YAAY,EAAE,CAAC;IAEjC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE;QACpB,OAAO,CAAC,GAAG,CAAC,iDAAiD,IAAI,EAAE,CAAC,CAAC;QACrE,OAAO,CAAC,GAAG,CAAC,wCAAwC,IAAI,MAAM,CAAC,CAAC;QAChE,OAAO,CAAC,GAAG,CAAC,wCAAwC,IAAI,aAAa,CAAC,CAAC;IACzE,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { NextFunction, Request, Response } from 'express';
2
+ declare global {
3
+ namespace Express {
4
+ interface User {
5
+ id: string;
6
+ email: string | null;
7
+ name?: string;
8
+ role?: string;
9
+ }
10
+ }
11
+ }
12
+ /**
13
+ * Check if user can edit documents
14
+ */
15
+ export declare function requireEdit(req: Request, res: Response, next: NextFunction): Promise<void>;
16
+ /**
17
+ * Check if user is admin
18
+ */
19
+ export declare function requireAdmin(req: Request, res: Response, next: NextFunction): Promise<void>;
20
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/server/middleware/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAI/D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,OAAO,CAAC;QAChB,UAAU,IAAI;YACZ,EAAE,EAAE,MAAM,CAAC;YACX,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;YACrB,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,IAAI,CAAC,EAAE,MAAM,CAAC;SACf;KACF;CACF;AAED;;GAEG;AACH,wBAAsB,WAAW,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBhG;AAED;;GAEG;AACH,wBAAsB,YAAY,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA4BjG"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.requireEdit = requireEdit;
4
+ exports.requireAdmin = requireAdmin;
5
+ const config_1 = require("../../core/config");
6
+ /**
7
+ * Check if user can edit documents
8
+ */
9
+ async function requireEdit(req, res, next) {
10
+ const config = req.config || (await (0, config_1.loadConfig)());
11
+ // Public mode - anyone can edit
12
+ if (config.auth.mode === 'public') {
13
+ req.user = { id: 'anonymous', email: null, role: 'editor' };
14
+ return next();
15
+ }
16
+ // Domain-restricted or OAuth - must be logged in
17
+ if (!req.user) {
18
+ res.status(401).json({ error: 'Authentication required' });
19
+ return;
20
+ }
21
+ next();
22
+ }
23
+ /**
24
+ * Check if user is admin
25
+ */
26
+ async function requireAdmin(req, res, next) {
27
+ const config = req.config || (await (0, config_1.loadConfig)());
28
+ // Public mode - check password header
29
+ if (config.auth.mode === 'public') {
30
+ const password = req.headers['x-admin-password'];
31
+ if (!password || password !== config.auth.adminPassword) {
32
+ res.status(403).json({ error: 'Invalid admin password' });
33
+ return;
34
+ }
35
+ req.user = { id: 'admin', email: null, role: 'admin' };
36
+ return next();
37
+ }
38
+ // Domain-restricted or OAuth - check email against admin list
39
+ if (!req.user?.email) {
40
+ res.status(401).json({ error: 'Authentication required' });
41
+ return;
42
+ }
43
+ if (!config.admins.emails.includes(req.user.email)) {
44
+ res.status(403).json({ error: 'Admin access required' });
45
+ return;
46
+ }
47
+ next();
48
+ }
49
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/server/middleware/auth.ts"],"names":[],"mappings":";;AAkBA,kCAgBC;AAKD,oCA4BC;AAlED,8CAA+C;AAc/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I,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;QACvD,OAAO,IAAI,EAAE,CAAC;IAChB,CAAC;IAED,8DAA8D;IAC9D,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC;QACrB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,yBAAyB,EAAE,CAAC,CAAC;QAC3D,OAAO;IACT,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACnD,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,uBAAuB,EAAE,CAAC,CAAC;QACzD,OAAO;IACT,CAAC;IAED,IAAI,EAAE,CAAC;AACT,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const router: import("express-serve-static-core").Router;
2
+ export default router;
3
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/server/routes/auth.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,MAAM,4CAAmB,CAAC;AAoHhC,eAAe,MAAM,CAAC"}
@@ -0,0 +1,105 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const express_1 = __importDefault(require("express"));
7
+ const passport_1 = __importDefault(require("passport"));
8
+ const magic_link_1 = require("../auth/magic-link");
9
+ const router = express_1.default.Router();
10
+ /**
11
+ * GET /api/auth/me
12
+ * Get current user info
13
+ */
14
+ router.get('/me', (req, res) => {
15
+ if (req.user) {
16
+ return res.json({
17
+ authenticated: true,
18
+ user: req.user,
19
+ });
20
+ }
21
+ // Check if public mode - everyone is effectively logged in
22
+ const config = req.config;
23
+ if (config.auth.mode === 'public') {
24
+ return res.json({
25
+ authenticated: true,
26
+ user: {
27
+ id: 'anonymous',
28
+ email: null,
29
+ name: 'Anonymous Editor',
30
+ role: 'editor',
31
+ },
32
+ });
33
+ }
34
+ res.json({ authenticated: false });
35
+ });
36
+ /**
37
+ * POST /api/auth/logout
38
+ * Log out current user
39
+ */
40
+ router.post('/logout', (req, res) => {
41
+ req.logout((err) => {
42
+ if (err) {
43
+ return res.status(500).json({ error: 'Logout failed' });
44
+ }
45
+ res.json({ success: true });
46
+ });
47
+ });
48
+ /**
49
+ * POST /api/auth/magic-link
50
+ * Send magic link email (domain-restricted mode)
51
+ */
52
+ router.post('/magic-link', async (req, res, next) => {
53
+ try {
54
+ const config = req.config;
55
+ const { email } = req.body;
56
+ if (!email) {
57
+ return res.status(400).json({ error: 'Email required' });
58
+ }
59
+ if (config.auth.mode !== 'domain-restricted') {
60
+ return res.status(400).json({ error: 'Magic link not available in this mode' });
61
+ }
62
+ await (0, magic_link_1.sendMagicLink)(email, config);
63
+ res.json({ success: true, message: 'Check your email for the login link' });
64
+ }
65
+ catch (error) {
66
+ const message = error instanceof Error ? error.message : 'Unknown error';
67
+ res.status(400).json({ error: message });
68
+ }
69
+ });
70
+ /**
71
+ * POST /api/auth/verify
72
+ * Verify magic link token
73
+ */
74
+ router.post('/verify', passport_1.default.authenticate('magic-link'), (req, res) => {
75
+ res.json({
76
+ success: true,
77
+ user: req.user,
78
+ });
79
+ });
80
+ /**
81
+ * GET /api/auth/github
82
+ * Start GitHub OAuth flow
83
+ */
84
+ router.get('/github', passport_1.default.authenticate('github'));
85
+ /**
86
+ * GET /api/auth/github/callback
87
+ * GitHub OAuth callback
88
+ */
89
+ router.get('/github/callback', passport_1.default.authenticate('github', { failureRedirect: '/login?error=github' }), (req, res) => {
90
+ res.redirect('/');
91
+ });
92
+ /**
93
+ * GET /api/auth/google
94
+ * Start Google OAuth flow
95
+ */
96
+ router.get('/google', passport_1.default.authenticate('google'));
97
+ /**
98
+ * GET /api/auth/google/callback
99
+ * Google OAuth callback
100
+ */
101
+ router.get('/google/callback', passport_1.default.authenticate('google', { failureRedirect: '/login?error=google' }), (req, res) => {
102
+ res.redirect('/');
103
+ });
104
+ exports.default = router;
105
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/server/routes/auth.ts"],"names":[],"mappings":";;;;;AAAA,sDAA8B;AAC9B,wDAAgC;AAEhC,mDAAmD;AAGnD,MAAM,MAAM,GAAG,iBAAO,CAAC,MAAM,EAAE,CAAC;AAEhC;;;GAGG;AACH,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;IAC7B,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;QACb,OAAO,GAAG,CAAC,IAAI,CAAC;YACd,aAAa,EAAE,IAAI;YACnB,IAAI,EAAE,GAAG,CAAC,IAAI;SACf,CAAC,CAAC;IACL,CAAC;IAED,2DAA2D;IAC3D,MAAM,MAAM,GAAG,GAAG,CAAC,MAAoB,CAAC;IACxC,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QAClC,OAAO,GAAG,CAAC,IAAI,CAAC;YACd,aAAa,EAAE,IAAI;YACnB,IAAI,EAAE;gBACJ,EAAE,EAAE,WAAW;gBACf,KAAK,EAAE,IAAI;gBACX,IAAI,EAAE,kBAAkB;gBACxB,IAAI,EAAE,QAAQ;aACf;SACF,CAAC,CAAC;IACL,CAAC;IAED,GAAG,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,CAAC;AACrC,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;IAClC,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE;QACjB,IA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AAE,OAAO,EAAE,CAAC,CAAC;IAC3C,CAAC;AACH,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,kBAAQ,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;IACvE,GAAG,CAAC,IAAI,CAAC;QACP,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,GAAG,CAAC,IAAI;KACf,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,kBAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC;AAEvD;;;GAGG;AACH,MAAM,CAAC,GAAG,CACR,kBAAkB,EAClB,kBAAQ,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAE,eAAe,EAAE,qBAAqB,EAAE,CAAC,EAC3E,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;IACX,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AACpB,CAAC,CACF,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,kBAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC;AAEvD;;;GAGG;AACH,MAAM,CAAC,GAAG,CACR,kBAAkB,EAClB,kBAAQ,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAE,eAAe,EAAE,qBAAqB,EAAE,CAAC,EAC3E,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;IACX,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AACpB,CAAC,CACF,CAAC;AAEF,kBAAe,MAAM,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const router: import("express-serve-static-core").Router;
2
+ export default router;
3
+ //# sourceMappingURL=docs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../../src/server/routes/docs.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,MAAM,4CAAmB,CAAC;AAsDhC,eAAe,MAAM,CAAC"}
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const express_1 = __importDefault(require("express"));
7
+ const github_1 = require("../../core/github");
8
+ const router = express_1.default.Router();
9
+ /**
10
+ * GET /api/docs/tree
11
+ * Get file tree of published docs from main branch
12
+ */
13
+ router.get('/tree', async (req, res, next) => {
14
+ try {
15
+ const config = req.config;
16
+ const github = new github_1.GitHubClient(process.env.GITHUB_TOKEN || '', config.github);
17
+ const tree = await github.getDocsTree();
18
+ res.json({ tree });
19
+ }
20
+ catch (error) {
21
+ next(error);
22
+ }
23
+ });
24
+ /**
25
+ * GET /api/docs/*
26
+ * Get content of a specific doc file
27
+ * Also supports /api/docs/path/to/file.md/history for commit history
28
+ */
29
+ router.get('/:path(*)', async (req, res, next) => {
30
+ try {
31
+ const config = req.config;
32
+ const fullPath = req.params.path;
33
+ // Check if requesting history
34
+ if (fullPath.endsWith('/history')) {
35
+ const docPath = fullPath.replace(/\/history$/, '');
36
+ const github = new github_1.GitHubClient(process.env.GITHUB_TOKEN || '', config.github);
37
+ const history = await github.getFileHistory(docPath);
38
+ return res.json({ history });
39
+ }
40
+ // Get file content
41
+ const github = new github_1.GitHubClient(process.env.GITHUB_TOKEN || '', config.github);
42
+ const content = await github.getFileContent(fullPath);
43
+ // Parse frontmatter if needed (using gray-matter would be added here)
44
+ res.json({
45
+ path: fullPath,
46
+ content,
47
+ });
48
+ }
49
+ catch (error) {
50
+ const err = error;
51
+ if (err.status === 404) {
52
+ return res.status(404).json({ error: 'Document not found' });
53
+ }
54
+ next(error);
55
+ }
56
+ });
57
+ exports.default = router;
58
+ //# sourceMappingURL=docs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file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MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;YACrD,OAAO,GAAG,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;QAC/B,CAAC;QAED,mBAAmB;QACnB,MAAM,MAAM,GAAG,IAAI,qBAAY,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,EAAE,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;QAC/E,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;QAEtD,sEAAsE;QACtE,GAAG,CAAC,IAAI,CAAC;YACP,IAAI,EAAE,QAAQ;YACd,OAAO;SACR,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACxB,MAAM,GAAG,GAAG,KAA4B,CAAC;QACzC,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;YACvB,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,CAAC,CAAC;QAC/D,CAAC;QACD,IAAI,CAAC,KAAK,CAAC,CAAC;IACd,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,kBAAe,MAAM,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const router: import("express-serve-static-core").Router;
2
+ export default router;
3
+ //# sourceMappingURL=drafts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drafts.d.ts","sourceRoot":"","sources":["../../../src/server/routes/drafts.ts"],"names":[],"mappings":"AAeA,QAAA,MAAM,MAAM,4CAAmB,CAAC;AA4ShC,eAAe,MAAM,CAAC"}