@lukoweb/create-apitogo 0.1.24 → 0.1.37
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.md +18 -18
- package/dist/index.js +5 -5
- package/dist/templates/default/js/.env.example +2 -2
- package/dist/templates/default/js/apis/openapi.yaml +806 -806
- package/dist/templates/default/js/eslintrc.json +4 -4
- package/dist/templates/default/js/gitignore +32 -32
- package/dist/templates/default/js/pages/example.mdx +131 -131
- package/dist/templates/default/js/pages/introduction.mdx +20 -20
- package/dist/templates/default/js/public/logo-dark.svg +1 -1
- package/dist/templates/default/js/public/logo-light.svg +1 -1
- package/dist/templates/default/ts/.env.example +2 -2
- package/dist/templates/default/ts/.env.production +1 -0
- package/dist/templates/default/ts/apis/openapi.yaml +806 -806
- package/dist/templates/default/ts/apitogo.config.tsx +23 -1
- package/dist/templates/default/ts/apitogo.local.json +23 -0
- package/dist/templates/default/ts/eslintrc.json +6 -6
- package/dist/templates/default/ts/gitignore +32 -32
- package/dist/templates/default/ts/pages/example.mdx +132 -132
- package/dist/templates/default/ts/pages/introduction.mdx +20 -20
- package/dist/templates/default/ts/public/banner-dark.svg +100 -100
- package/dist/templates/default/ts/public/banner.svg +100 -100
- package/dist/templates/default/ts/public/logo-dark.svg +1 -1
- package/dist/templates/default/ts/public/logo-light.svg +1 -1
- package/dist/templates/default/ts/tsconfig.json +16 -16
- package/dist/templates/index.ts +88 -6
- package/dist/templates/types.ts +22 -22
- package/dist/templates/zuplo/README-template.md +40 -40
- package/dist/templates/zuplo/gitignore +32 -32
- package/dist/templates/zuplo/pages/introduction.mdx +153 -153
- package/dist/templates/zuplo/pages/markdown.mdx +108 -108
- package/dist/templates/zuplo/public/banner-dark.svg +100 -100
- package/dist/templates/zuplo/public/banner.svg +100 -100
- package/dist/templates/zuplo/tsconfig.json +16 -16
- package/package.json +8 -5
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"lib": ["ESNext", "DOM", "DOM.Iterable", "WebWorker"],
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"moduleResolution": "Bundler",
|
|
7
|
-
"useDefineForClassFields": true,
|
|
8
|
-
"skipLibCheck": true,
|
|
9
|
-
"skipDefaultLibCheck": true,
|
|
10
|
-
"resolveJsonModule": true,
|
|
11
|
-
"isolatedModules": true,
|
|
12
|
-
"useUnknownInCatchVariables": false,
|
|
13
|
-
"jsx": "react-jsx"
|
|
14
|
-
},
|
|
15
|
-
"include": ["src", "apitogo.config.tsx"]
|
|
16
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"lib": ["ESNext", "DOM", "DOM.Iterable", "WebWorker"],
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"moduleResolution": "Bundler",
|
|
7
|
+
"useDefineForClassFields": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"skipDefaultLibCheck": true,
|
|
10
|
+
"resolveJsonModule": true,
|
|
11
|
+
"isolatedModules": true,
|
|
12
|
+
"useUnknownInCatchVariables": false,
|
|
13
|
+
"jsx": "react-jsx"
|
|
14
|
+
},
|
|
15
|
+
"include": ["src", "apitogo.config.tsx"]
|
|
16
|
+
}
|
package/dist/templates/index.ts
CHANGED
|
@@ -25,6 +25,62 @@ const formatAppTitle = (appName: string) =>
|
|
|
25
25
|
.map((part) => part.charAt(0).toUpperCase() + part.slice(1))
|
|
26
26
|
.join(" ");
|
|
27
27
|
|
|
28
|
+
const resolveCoreApitogoPackageName = async (): Promise<string> => {
|
|
29
|
+
const createPackageJson = JSON.parse(
|
|
30
|
+
await fs.readFile(path.join(PACKAGE_ROOT, "package.json"), "utf8"),
|
|
31
|
+
) as { name: string };
|
|
32
|
+
return createPackageJson.name.replace("/create-apitogo", "/apitogo");
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** Primary npm scope; split so secondary publish does not rewrite this guard. */
|
|
36
|
+
const PRIMARY_APITOGO_SCOPE = "@lukow" + "eb";
|
|
37
|
+
|
|
38
|
+
const normalizeDependencyVersion = (version: string): string =>
|
|
39
|
+
version.replace(/^[\^~>=<]+/, "");
|
|
40
|
+
|
|
41
|
+
const LUCIDE_REACT_VERSION = "0.577.0";
|
|
42
|
+
|
|
43
|
+
const ensureRequiredApitogoModules = (
|
|
44
|
+
dependencies: Record<string, string>,
|
|
45
|
+
corePackageName: string,
|
|
46
|
+
version: string,
|
|
47
|
+
) => {
|
|
48
|
+
const scope = corePackageName.slice(0, corePackageName.indexOf("/"));
|
|
49
|
+
const landing = `${scope}/apitogo-module-landing`;
|
|
50
|
+
const userPanel = `${scope}/apitogo-module-user-panel`;
|
|
51
|
+
const billing = `${scope}/apitogo-plugin-dev-portal-billing`;
|
|
52
|
+
const moduleVersion = `^${normalizeDependencyVersion(version)}`;
|
|
53
|
+
|
|
54
|
+
dependencies[landing] ??= moduleVersion;
|
|
55
|
+
dependencies[userPanel] ??= moduleVersion;
|
|
56
|
+
dependencies[billing] ??= moduleVersion;
|
|
57
|
+
dependencies["lucide-react"] ??= LUCIDE_REACT_VERSION;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const ensureSecondaryApitogoAliases = (
|
|
61
|
+
dependencies: Record<string, string>,
|
|
62
|
+
corePackageName: string,
|
|
63
|
+
version: string,
|
|
64
|
+
) => {
|
|
65
|
+
if (corePackageName.startsWith(`${PRIMARY_APITOGO_SCOPE}/`)) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const alias = (target: string) =>
|
|
70
|
+
`npm:${target}@${normalizeDependencyVersion(version)}`;
|
|
71
|
+
const scope = corePackageName.slice(0, corePackageName.indexOf("/"));
|
|
72
|
+
|
|
73
|
+
dependencies[`${PRIMARY_APITOGO_SCOPE}/apitogo`] = alias(corePackageName);
|
|
74
|
+
dependencies[`${PRIMARY_APITOGO_SCOPE}/apitogo-module-landing`] = alias(
|
|
75
|
+
`${scope}/apitogo-module-landing`,
|
|
76
|
+
);
|
|
77
|
+
dependencies[`${PRIMARY_APITOGO_SCOPE}/apitogo-module-user-panel`] = alias(
|
|
78
|
+
`${scope}/apitogo-module-user-panel`,
|
|
79
|
+
);
|
|
80
|
+
dependencies[`${PRIMARY_APITOGO_SCOPE}/apitogo-plugin-dev-portal-billing`] =
|
|
81
|
+
alias(`${scope}/apitogo-plugin-dev-portal-billing`);
|
|
82
|
+
};
|
|
83
|
+
|
|
28
84
|
const parseWorkspaceCatalog = async (workspaceFile: string) => {
|
|
29
85
|
const content = await fs.readFile(workspaceFile, "utf8");
|
|
30
86
|
const catalog: Record<string, string> = {};
|
|
@@ -187,15 +243,26 @@ export const installTemplate = async ({
|
|
|
187
243
|
});
|
|
188
244
|
|
|
189
245
|
const appTitle = formatAppTitle(appName);
|
|
246
|
+
const substituteAppTitle = (contents: string) =>
|
|
247
|
+
contents.split("__APP_TITLE__").join(appTitle);
|
|
248
|
+
|
|
190
249
|
const configFilename =
|
|
191
250
|
mode === "ts" ? "apitogo.config.tsx" : "apitogo.config.jsx";
|
|
192
251
|
const configPath = path.join(root, configFilename);
|
|
193
252
|
const configContents = await fs.readFile(configPath, "utf8");
|
|
194
|
-
await fs.writeFile(
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
253
|
+
await fs.writeFile(configPath, substituteAppTitle(configContents), "utf8");
|
|
254
|
+
|
|
255
|
+
const manifestPath = path.join(root, "apitogo.local.json");
|
|
256
|
+
try {
|
|
257
|
+
const manifestContents = await fs.readFile(manifestPath, "utf8");
|
|
258
|
+
await fs.writeFile(
|
|
259
|
+
manifestPath,
|
|
260
|
+
substituteAppTitle(manifestContents),
|
|
261
|
+
"utf8",
|
|
262
|
+
);
|
|
263
|
+
} catch {
|
|
264
|
+
// Optional in customized templates.
|
|
265
|
+
}
|
|
199
266
|
|
|
200
267
|
// update import alias in any files if not using the default
|
|
201
268
|
|
|
@@ -253,6 +320,8 @@ export const installTemplate = async ({
|
|
|
253
320
|
})
|
|
254
321
|
.catch(() => version);
|
|
255
322
|
|
|
323
|
+
const coreApitogoPackageName = await resolveCoreApitogoPackageName();
|
|
324
|
+
|
|
256
325
|
/** Create a package.json for the new project and write it to disk. */
|
|
257
326
|
// biome-ignore lint/suspicious/noExplicitAny: Allow any type
|
|
258
327
|
const packageJson: any = {
|
|
@@ -273,11 +342,24 @@ export const installTemplate = async ({
|
|
|
273
342
|
dependencies: {
|
|
274
343
|
react: ">=19.0.0",
|
|
275
344
|
"react-dom": ">=19.0.0",
|
|
276
|
-
|
|
345
|
+
[coreApitogoPackageName]: resolvedZudokuDependency,
|
|
277
346
|
},
|
|
278
347
|
devDependencies: {},
|
|
279
348
|
};
|
|
280
349
|
|
|
350
|
+
if (!resolvedZudokuDependency.startsWith("file:")) {
|
|
351
|
+
ensureRequiredApitogoModules(
|
|
352
|
+
packageJson.dependencies,
|
|
353
|
+
coreApitogoPackageName,
|
|
354
|
+
resolvedZudokuDependency,
|
|
355
|
+
);
|
|
356
|
+
ensureSecondaryApitogoAliases(
|
|
357
|
+
packageJson.dependencies,
|
|
358
|
+
coreApitogoPackageName,
|
|
359
|
+
resolvedZudokuDependency,
|
|
360
|
+
);
|
|
361
|
+
}
|
|
362
|
+
|
|
281
363
|
/**
|
|
282
364
|
* TypeScript projects will have type definitions and other devDependencies.
|
|
283
365
|
*/
|
package/dist/templates/types.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import type { PackageManager } from "../helpers/get-pkg-manager";
|
|
2
|
-
|
|
3
|
-
export type TemplateType = "default" | "zuplo";
|
|
4
|
-
export type TemplateMode = "js" | "ts";
|
|
5
|
-
|
|
6
|
-
export interface GetTemplateFileArgs {
|
|
7
|
-
template: TemplateType;
|
|
8
|
-
mode: TemplateMode;
|
|
9
|
-
file: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface InstallTemplateArgs {
|
|
13
|
-
appName: string;
|
|
14
|
-
root: string;
|
|
15
|
-
packageManager: PackageManager;
|
|
16
|
-
isOnline: boolean;
|
|
17
|
-
template: TemplateType;
|
|
18
|
-
mode: TemplateMode;
|
|
19
|
-
eslint: boolean;
|
|
20
|
-
skipInstall: boolean;
|
|
21
|
-
zudokuVersion: string;
|
|
22
|
-
}
|
|
1
|
+
import type { PackageManager } from "../helpers/get-pkg-manager";
|
|
2
|
+
|
|
3
|
+
export type TemplateType = "default" | "zuplo";
|
|
4
|
+
export type TemplateMode = "js" | "ts";
|
|
5
|
+
|
|
6
|
+
export interface GetTemplateFileArgs {
|
|
7
|
+
template: TemplateType;
|
|
8
|
+
mode: TemplateMode;
|
|
9
|
+
file: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface InstallTemplateArgs {
|
|
13
|
+
appName: string;
|
|
14
|
+
root: string;
|
|
15
|
+
packageManager: PackageManager;
|
|
16
|
+
isOnline: boolean;
|
|
17
|
+
template: TemplateType;
|
|
18
|
+
mode: TemplateMode;
|
|
19
|
+
eslint: boolean;
|
|
20
|
+
skipInstall: boolean;
|
|
21
|
+
zudokuVersion: string;
|
|
22
|
+
}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
# Developer Portal
|
|
2
|
-
|
|
3
|
-
This is your [Zuplo Developer Portal](https://zuplo.com/docs/dev-portal/introduction). This
|
|
4
|
-
developer portal allows you to ship a beautiful API documentation for your users. You can customize
|
|
5
|
-
this portal to match your brand and style.
|
|
6
|
-
|
|
7
|
-
This developer portal is configured to work with your Zuplo API. When you publish your API, your
|
|
8
|
-
developer portal will be automatically published with the latest API documentation.
|
|
9
|
-
|
|
10
|
-
For more information, visit the [Documentation](https://zuplo.com/docs/dev-portal/introduction).
|
|
11
|
-
|
|
12
|
-
The Zuplo Developer Portal is built on top of the open source [Zudoku](https://zudoku.dev) project,
|
|
13
|
-
a powerful tool for creating and managing API documentation. If you would like to learn more about
|
|
14
|
-
the project, open a feature request, or contribute to the codebase, visit the
|
|
15
|
-
[Zudoku GitHub repository](https://github.com/zuplo/zudoku).
|
|
16
|
-
|
|
17
|
-
## Local Development
|
|
18
|
-
|
|
19
|
-
After you have connected your Zuplo project to
|
|
20
|
-
[source control](https://zuplo.com/docs/articles/source-control) you can clone your project locally.
|
|
21
|
-
Running the Developer Portal locally allows you to see changes in real-time with live-reload.
|
|
22
|
-
|
|
23
|
-
1. Clone the repository
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
git clone https://github.com/my-org/my-repo
|
|
27
|
-
cd my-repo
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
2. Install dependencies
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
npm install
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
3. Start the development server
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
npm run docs
|
|
40
|
-
```
|
|
1
|
+
# Developer Portal
|
|
2
|
+
|
|
3
|
+
This is your [Zuplo Developer Portal](https://zuplo.com/docs/dev-portal/introduction). This
|
|
4
|
+
developer portal allows you to ship a beautiful API documentation for your users. You can customize
|
|
5
|
+
this portal to match your brand and style.
|
|
6
|
+
|
|
7
|
+
This developer portal is configured to work with your Zuplo API. When you publish your API, your
|
|
8
|
+
developer portal will be automatically published with the latest API documentation.
|
|
9
|
+
|
|
10
|
+
For more information, visit the [Documentation](https://zuplo.com/docs/dev-portal/introduction).
|
|
11
|
+
|
|
12
|
+
The Zuplo Developer Portal is built on top of the open source [Zudoku](https://zudoku.dev) project,
|
|
13
|
+
a powerful tool for creating and managing API documentation. If you would like to learn more about
|
|
14
|
+
the project, open a feature request, or contribute to the codebase, visit the
|
|
15
|
+
[Zudoku GitHub repository](https://github.com/zuplo/zudoku).
|
|
16
|
+
|
|
17
|
+
## Local Development
|
|
18
|
+
|
|
19
|
+
After you have connected your Zuplo project to
|
|
20
|
+
[source control](https://zuplo.com/docs/articles/source-control) you can clone your project locally.
|
|
21
|
+
Running the Developer Portal locally allows you to see changes in real-time with live-reload.
|
|
22
|
+
|
|
23
|
+
1. Clone the repository
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
git clone https://github.com/my-org/my-repo
|
|
27
|
+
cd my-repo
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
2. Install dependencies
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm install
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
3. Start the development server
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npm run docs
|
|
40
|
+
```
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
2
|
-
|
|
3
|
-
# dependencies
|
|
4
|
-
/node_modules
|
|
5
|
-
/.pnp
|
|
6
|
-
.pnp.*
|
|
7
|
-
.yarn/*
|
|
8
|
-
!.yarn/patches
|
|
9
|
-
!.yarn/plugins
|
|
10
|
-
!.yarn/releases
|
|
11
|
-
!.yarn/versions
|
|
12
|
-
|
|
13
|
-
# testing
|
|
14
|
-
/coverage
|
|
15
|
-
|
|
16
|
-
# zudoku
|
|
17
|
-
/dist/
|
|
18
|
-
|
|
19
|
-
# misc
|
|
20
|
-
.DS_Store
|
|
21
|
-
*.pem
|
|
22
|
-
|
|
23
|
-
# debug
|
|
24
|
-
npm-debug.log*
|
|
25
|
-
yarn-debug.log*
|
|
26
|
-
yarn-error.log*
|
|
27
|
-
|
|
28
|
-
# env files (can opt-in for commiting if needed)
|
|
29
|
-
.env*
|
|
30
|
-
|
|
31
|
-
# typescript
|
|
32
|
-
*.tsbuildinfo
|
|
1
|
+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
2
|
+
|
|
3
|
+
# dependencies
|
|
4
|
+
/node_modules
|
|
5
|
+
/.pnp
|
|
6
|
+
.pnp.*
|
|
7
|
+
.yarn/*
|
|
8
|
+
!.yarn/patches
|
|
9
|
+
!.yarn/plugins
|
|
10
|
+
!.yarn/releases
|
|
11
|
+
!.yarn/versions
|
|
12
|
+
|
|
13
|
+
# testing
|
|
14
|
+
/coverage
|
|
15
|
+
|
|
16
|
+
# zudoku
|
|
17
|
+
/dist/
|
|
18
|
+
|
|
19
|
+
# misc
|
|
20
|
+
.DS_Store
|
|
21
|
+
*.pem
|
|
22
|
+
|
|
23
|
+
# debug
|
|
24
|
+
npm-debug.log*
|
|
25
|
+
yarn-debug.log*
|
|
26
|
+
yarn-error.log*
|
|
27
|
+
|
|
28
|
+
# env files (can opt-in for commiting if needed)
|
|
29
|
+
.env*
|
|
30
|
+
|
|
31
|
+
# typescript
|
|
32
|
+
*.tsbuildinfo
|
|
@@ -1,153 +1,153 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Welcome to your new Zudoku documentation site.
|
|
3
|
-
sidebar_label: My Developer Portal
|
|
4
|
-
sidebar_icon: panel-top
|
|
5
|
-
category: ""
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
<div>
|
|
9
|
-
<img src="/banner.svg" className="dark:hidden" />
|
|
10
|
-
<img src="/banner-dark.svg" className="hidden dark:block" />
|
|
11
|
-
</div>
|
|
12
|
-
|
|
13
|
-
# Welcome to Better API Documentation
|
|
14
|
-
|
|
15
|
-
Welcome to your new developer portal that makes sense. 🎉
|
|
16
|
-
|
|
17
|
-
This is your new developer portal, built with ["Zudoku by Zuplo"](https://github.com/zuplo/zudoku)
|
|
18
|
-
and designed to elevate your API documentation experience. We've streamlined the setup process so
|
|
19
|
-
you can focus on what matters most: creating exceptional developer experiences.
|
|
20
|
-
|
|
21
|
-
Think of this as your API's professional showcase—presenting your endpoints and documentation in the
|
|
22
|
-
best possible light. Whether you're launching innovative new features or improving existing
|
|
23
|
-
services, this portal provides the foundation for clear, accessible, and engaging developer
|
|
24
|
-
documentation.
|
|
25
|
-
|
|
26
|
-
Let's explore what we've configured for you and how you can customize it to perfectly match your
|
|
27
|
-
needs.
|
|
28
|
-
|
|
29
|
-
## Let's Review Your Configuration
|
|
30
|
-
|
|
31
|
-
The developer portal is configured in the `apitogo.config.tsx` file. We've created a starter
|
|
32
|
-
configuration to get you up and running quickly. Let's walk you through everything we've set up so
|
|
33
|
-
you know how to customize it:
|
|
34
|
-
|
|
35
|
-
<Stepper>
|
|
36
|
-
|
|
37
|
-
1. **Change the Basics**
|
|
38
|
-
|
|
39
|
-
First, you may want to change the title and banner we've put in place. These are part of the
|
|
40
|
-
`page` section in your configuration.
|
|
41
|
-
|
|
42
|
-
:::tip
|
|
43
|
-
|
|
44
|
-
**Have a company logo?** Learn how you can
|
|
45
|
-
[add your logo](https://zuplo.com/docs/dev-portal/zudoku/configuration/site#logo) in our
|
|
46
|
-
documentation.
|
|
47
|
-
|
|
48
|
-
:::
|
|
49
|
-
|
|
50
|
-
```jsx
|
|
51
|
-
{
|
|
52
|
-
// ...
|
|
53
|
-
"page": {
|
|
54
|
-
"title": "My Developer Portal",
|
|
55
|
-
"banner": {
|
|
56
|
-
"message": (
|
|
57
|
-
<div className="w-full text-center">
|
|
58
|
-
<strong>Congrats!</strong> 🙌 You just created your first developer
|
|
59
|
-
portal.
|
|
60
|
-
</div>
|
|
61
|
-
),
|
|
62
|
-
"color": "info",
|
|
63
|
-
"dismissible": true,
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
1. **API Reference**
|
|
69
|
-
|
|
70
|
-
Your [API Reference](/api) is generated from your Zuplo OpenAPI file in `../routes.oas.json`—you
|
|
71
|
-
can add other APIs whenever you need them. Improve your documentation by adding more details to
|
|
72
|
-
the OpenAPI file.
|
|
73
|
-
|
|
74
|
-
```json
|
|
75
|
-
{
|
|
76
|
-
// ...
|
|
77
|
-
"apis": {
|
|
78
|
-
"type": "file",
|
|
79
|
-
"input": "../config/routes.oas.json",
|
|
80
|
-
"navigationId": "api"
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
1. **Authentication & Login**
|
|
86
|
-
|
|
87
|
-
We've configured your project to use [Auth0](https://auth0.com) as an authentication provider
|
|
88
|
-
with our demo account. We support many authentication providers—check the
|
|
89
|
-
[documentation on how to configure](https://zuplo.com/docs/dev-portal/zudoku/configuration/authentication#authentication-providers)
|
|
90
|
-
each one.
|
|
91
|
-
|
|
92
|
-
:::caution
|
|
93
|
-
|
|
94
|
-
You must change the authentication provider before taking this to **production**. Using our demo
|
|
95
|
-
provider is not secure for production use.
|
|
96
|
-
|
|
97
|
-
:::
|
|
98
|
-
|
|
99
|
-
```json
|
|
100
|
-
{
|
|
101
|
-
// ...
|
|
102
|
-
"authentication": {
|
|
103
|
-
"type": "auth0",
|
|
104
|
-
"domain": "auth.zuplo.io",
|
|
105
|
-
"clientId": "kWQs12Q9Og4w6zzI82qJSa3klN1sMtvz",
|
|
106
|
-
"audience": "https://api.example.com/"
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
1. **API Keys**
|
|
112
|
-
|
|
113
|
-
We've enabled API Keys on your developer portal. This connects to the API Key Service in Zuplo.
|
|
114
|
-
To add API Keys for your users, create a consumer with the matching email address in **Services
|
|
115
|
-
=> API Key Service** in Zuplo, or
|
|
116
|
-
[create a Consumer using the Zuplo API](https://zuplo.com/docs/api/api-keys-consumers#creates-a-consumer).
|
|
117
|
-
|
|
118
|
-
```json
|
|
119
|
-
{
|
|
120
|
-
// ...
|
|
121
|
-
"apiKeys": {
|
|
122
|
-
"enabled": true
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
</Stepper>
|
|
128
|
-
|
|
129
|
-
## Make It Yours
|
|
130
|
-
|
|
131
|
-
You can customize the look and feel of your documentation site by modifying the `theme` section in
|
|
132
|
-
`apitogo.config.tsx`. Why not try changing the primary color of your site?
|
|
133
|
-
|
|
134
|
-
```json
|
|
135
|
-
{
|
|
136
|
-
// ...
|
|
137
|
-
"theme": {
|
|
138
|
-
"light": {
|
|
139
|
-
"primary": "316 100% 50%",
|
|
140
|
-
"primaryForeground": "360 100% 100%"
|
|
141
|
-
},
|
|
142
|
-
"dark": {
|
|
143
|
-
"primary": "316 100% 50%",
|
|
144
|
-
"primaryForeground": "360 100% 100%"
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
// ...
|
|
148
|
-
}
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
We have extensive customization options available. From colors to fonts and borders, find the
|
|
152
|
-
[full list of options](https://zuplo.com/docs/dev-portal/zudoku/customization/colors-theme) in our
|
|
153
|
-
documentation.
|
|
1
|
+
---
|
|
2
|
+
description: Welcome to your new Zudoku documentation site.
|
|
3
|
+
sidebar_label: My Developer Portal
|
|
4
|
+
sidebar_icon: panel-top
|
|
5
|
+
category: ""
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<div>
|
|
9
|
+
<img src="/banner.svg" className="dark:hidden" />
|
|
10
|
+
<img src="/banner-dark.svg" className="hidden dark:block" />
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
# Welcome to Better API Documentation
|
|
14
|
+
|
|
15
|
+
Welcome to your new developer portal that makes sense. 🎉
|
|
16
|
+
|
|
17
|
+
This is your new developer portal, built with ["Zudoku by Zuplo"](https://github.com/zuplo/zudoku)
|
|
18
|
+
and designed to elevate your API documentation experience. We've streamlined the setup process so
|
|
19
|
+
you can focus on what matters most: creating exceptional developer experiences.
|
|
20
|
+
|
|
21
|
+
Think of this as your API's professional showcase—presenting your endpoints and documentation in the
|
|
22
|
+
best possible light. Whether you're launching innovative new features or improving existing
|
|
23
|
+
services, this portal provides the foundation for clear, accessible, and engaging developer
|
|
24
|
+
documentation.
|
|
25
|
+
|
|
26
|
+
Let's explore what we've configured for you and how you can customize it to perfectly match your
|
|
27
|
+
needs.
|
|
28
|
+
|
|
29
|
+
## Let's Review Your Configuration
|
|
30
|
+
|
|
31
|
+
The developer portal is configured in the `apitogo.config.tsx` file. We've created a starter
|
|
32
|
+
configuration to get you up and running quickly. Let's walk you through everything we've set up so
|
|
33
|
+
you know how to customize it:
|
|
34
|
+
|
|
35
|
+
<Stepper>
|
|
36
|
+
|
|
37
|
+
1. **Change the Basics**
|
|
38
|
+
|
|
39
|
+
First, you may want to change the title and banner we've put in place. These are part of the
|
|
40
|
+
`page` section in your configuration.
|
|
41
|
+
|
|
42
|
+
:::tip
|
|
43
|
+
|
|
44
|
+
**Have a company logo?** Learn how you can
|
|
45
|
+
[add your logo](https://zuplo.com/docs/dev-portal/zudoku/configuration/site#logo) in our
|
|
46
|
+
documentation.
|
|
47
|
+
|
|
48
|
+
:::
|
|
49
|
+
|
|
50
|
+
```jsx
|
|
51
|
+
{
|
|
52
|
+
// ...
|
|
53
|
+
"page": {
|
|
54
|
+
"title": "My Developer Portal",
|
|
55
|
+
"banner": {
|
|
56
|
+
"message": (
|
|
57
|
+
<div className="w-full text-center">
|
|
58
|
+
<strong>Congrats!</strong> 🙌 You just created your first developer
|
|
59
|
+
portal.
|
|
60
|
+
</div>
|
|
61
|
+
),
|
|
62
|
+
"color": "info",
|
|
63
|
+
"dismissible": true,
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
1. **API Reference**
|
|
69
|
+
|
|
70
|
+
Your [API Reference](/api) is generated from your Zuplo OpenAPI file in `../routes.oas.json`—you
|
|
71
|
+
can add other APIs whenever you need them. Improve your documentation by adding more details to
|
|
72
|
+
the OpenAPI file.
|
|
73
|
+
|
|
74
|
+
```json
|
|
75
|
+
{
|
|
76
|
+
// ...
|
|
77
|
+
"apis": {
|
|
78
|
+
"type": "file",
|
|
79
|
+
"input": "../config/routes.oas.json",
|
|
80
|
+
"navigationId": "api"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
1. **Authentication & Login**
|
|
86
|
+
|
|
87
|
+
We've configured your project to use [Auth0](https://auth0.com) as an authentication provider
|
|
88
|
+
with our demo account. We support many authentication providers—check the
|
|
89
|
+
[documentation on how to configure](https://zuplo.com/docs/dev-portal/zudoku/configuration/authentication#authentication-providers)
|
|
90
|
+
each one.
|
|
91
|
+
|
|
92
|
+
:::caution
|
|
93
|
+
|
|
94
|
+
You must change the authentication provider before taking this to **production**. Using our demo
|
|
95
|
+
provider is not secure for production use.
|
|
96
|
+
|
|
97
|
+
:::
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
// ...
|
|
102
|
+
"authentication": {
|
|
103
|
+
"type": "auth0",
|
|
104
|
+
"domain": "auth.zuplo.io",
|
|
105
|
+
"clientId": "kWQs12Q9Og4w6zzI82qJSa3klN1sMtvz",
|
|
106
|
+
"audience": "https://api.example.com/"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
1. **API Keys**
|
|
112
|
+
|
|
113
|
+
We've enabled API Keys on your developer portal. This connects to the API Key Service in Zuplo.
|
|
114
|
+
To add API Keys for your users, create a consumer with the matching email address in **Services
|
|
115
|
+
=> API Key Service** in Zuplo, or
|
|
116
|
+
[create a Consumer using the Zuplo API](https://zuplo.com/docs/api/api-keys-consumers#creates-a-consumer).
|
|
117
|
+
|
|
118
|
+
```json
|
|
119
|
+
{
|
|
120
|
+
// ...
|
|
121
|
+
"apiKeys": {
|
|
122
|
+
"enabled": true
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
</Stepper>
|
|
128
|
+
|
|
129
|
+
## Make It Yours
|
|
130
|
+
|
|
131
|
+
You can customize the look and feel of your documentation site by modifying the `theme` section in
|
|
132
|
+
`apitogo.config.tsx`. Why not try changing the primary color of your site?
|
|
133
|
+
|
|
134
|
+
```json
|
|
135
|
+
{
|
|
136
|
+
// ...
|
|
137
|
+
"theme": {
|
|
138
|
+
"light": {
|
|
139
|
+
"primary": "316 100% 50%",
|
|
140
|
+
"primaryForeground": "360 100% 100%"
|
|
141
|
+
},
|
|
142
|
+
"dark": {
|
|
143
|
+
"primary": "316 100% 50%",
|
|
144
|
+
"primaryForeground": "360 100% 100%"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
// ...
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
We have extensive customization options available. From colors to fonts and borders, find the
|
|
152
|
+
[full list of options](https://zuplo.com/docs/dev-portal/zudoku/customization/colors-theme) in our
|
|
153
|
+
documentation.
|