specra-cli 0.3.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.MD +33 -0
- package/README.md +246 -0
- package/dist/api-client-VHQARPDT.js +15 -0
- package/dist/api-client-VHQARPDT.js.map +1 -0
- package/dist/chunk-5765WX4D.js +192 -0
- package/dist/chunk-5765WX4D.js.map +1 -0
- package/dist/chunk-72RDEJR2.js +94 -0
- package/dist/chunk-72RDEJR2.js.map +1 -0
- package/dist/chunk-SQ2MMFUZ.js +102 -0
- package/dist/chunk-SQ2MMFUZ.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +242 -0
- package/dist/cli.js.map +1 -0
- package/dist/deploy-V4JO2D6B.js +179 -0
- package/dist/deploy-V4JO2D6B.js.map +1 -0
- package/dist/doctor-ICALAJ4N.js +309 -0
- package/dist/doctor-ICALAJ4N.js.map +1 -0
- package/dist/login-UG3WU7DY.js +92 -0
- package/dist/login-UG3WU7DY.js.map +1 -0
- package/dist/logout-WJKHJZT6.js +24 -0
- package/dist/logout-WJKHJZT6.js.map +1 -0
- package/dist/logs-BLUJPWNO.js +77 -0
- package/dist/logs-BLUJPWNO.js.map +1 -0
- package/dist/projects-LJ57GK3D.js +49 -0
- package/dist/projects-LJ57GK3D.js.map +1 -0
- package/package.json +50 -0
- package/templates/book-docs/.env.sample +1 -0
- package/templates/book-docs/docs/v1.0.0/concepts.mdx +89 -0
- package/templates/book-docs/docs/v1.0.0/content/_category_.json +7 -0
- package/templates/book-docs/docs/v1.0.0/content/formatting.mdx +128 -0
- package/templates/book-docs/docs/v1.0.0/content/reusable-content.mdx +116 -0
- package/templates/book-docs/docs/v1.0.0/content/structure.mdx +92 -0
- package/templates/book-docs/docs/v1.0.0/customization/_category_.json +7 -0
- package/templates/book-docs/docs/v1.0.0/customization/branding.mdx +115 -0
- package/templates/book-docs/docs/v1.0.0/customization/themes.mdx +81 -0
- package/templates/book-docs/docs/v1.0.0/introduction.mdx +38 -0
- package/templates/book-docs/docs/v1.0.0/quickstart.mdx +112 -0
- package/templates/book-docs/docs/v2.0.0/concepts.mdx +89 -0
- package/templates/book-docs/docs/v2.0.0/content/_category_.json +7 -0
- package/templates/book-docs/docs/v2.0.0/content/formatting.mdx +128 -0
- package/templates/book-docs/docs/v2.0.0/content/reusable-content.mdx +116 -0
- package/templates/book-docs/docs/v2.0.0/content/structure.mdx +92 -0
- package/templates/book-docs/docs/v2.0.0/customization/_category_.json +7 -0
- package/templates/book-docs/docs/v2.0.0/customization/branding.mdx +115 -0
- package/templates/book-docs/docs/v2.0.0/customization/themes.mdx +81 -0
- package/templates/book-docs/docs/v2.0.0/introduction.mdx +39 -0
- package/templates/book-docs/docs/v2.0.0/quickstart.mdx +112 -0
- package/templates/book-docs/gitignore +7 -0
- package/templates/book-docs/package.json +28 -0
- package/templates/book-docs/postcss.config.mjs +8 -0
- package/templates/book-docs/public/api-specs/openapi-example.json +259 -0
- package/templates/book-docs/public/api-specs/postman-example.json +205 -0
- package/templates/book-docs/public/api-specs/test-api.json +256 -0
- package/templates/book-docs/public/api-specs/users-api.json +264 -0
- package/templates/book-docs/specra.config.json +77 -0
- package/templates/book-docs/src/app.css +86 -0
- package/templates/book-docs/src/app.html +17 -0
- package/templates/book-docs/src/params/product.ts +7 -0
- package/templates/book-docs/src/routes/+layout.server.ts +14 -0
- package/templates/book-docs/src/routes/+layout.svelte +21 -0
- package/templates/book-docs/src/routes/+page.server.ts +9 -0
- package/templates/book-docs/src/routes/docs/[product=product]/[version]/+layout.server.ts +40 -0
- package/templates/book-docs/src/routes/docs/[product=product]/[version]/+page.server.ts +24 -0
- package/templates/book-docs/src/routes/docs/[product=product]/[version]/[...slug]/+page.server.ts +131 -0
- package/templates/book-docs/src/routes/docs/[product=product]/[version]/[...slug]/+page.svelte +180 -0
- package/templates/book-docs/src/routes/docs/[version]/+layout.server.ts +42 -0
- package/templates/book-docs/src/routes/docs/[version]/+page.server.ts +27 -0
- package/templates/book-docs/src/routes/docs/[version]/[...slug]/+page.server.ts +106 -0
- package/templates/book-docs/src/routes/docs/[version]/[...slug]/+page.svelte +172 -0
- package/templates/book-docs/static/favicon.svg +4 -0
- package/templates/book-docs/svelte.config.js +13 -0
- package/templates/book-docs/tsconfig.json +12 -0
- package/templates/book-docs/vite.config.ts +6 -0
- package/templates/jbrains-docs/.env.sample +1 -0
- package/templates/jbrains-docs/docs/v1.0.0/advanced/_category_.json +8 -0
- package/templates/jbrains-docs/docs/v1.0.0/advanced/async.mdx +95 -0
- package/templates/jbrains-docs/docs/v1.0.0/advanced/generics.mdx +126 -0
- package/templates/jbrains-docs/docs/v1.0.0/basics/_category_.json +8 -0
- package/templates/jbrains-docs/docs/v1.0.0/basics/control-flow.mdx +106 -0
- package/templates/jbrains-docs/docs/v1.0.0/basics/syntax.mdx +129 -0
- package/templates/jbrains-docs/docs/v1.0.0/basics/types.mdx +135 -0
- package/templates/jbrains-docs/docs/v1.0.0/getting-started.mdx +111 -0
- package/templates/jbrains-docs/docs/v1.0.0/home.mdx +37 -0
- package/templates/jbrains-docs/docs/v1.0.0/tools/_category_.json +8 -0
- package/templates/jbrains-docs/docs/v1.0.0/tools/build-tools.mdx +165 -0
- package/templates/jbrains-docs/docs/v1.0.0/tools/testing.mdx +112 -0
- package/templates/jbrains-docs/docs/v2.0.0/advanced/_category_.json +8 -0
- package/templates/jbrains-docs/docs/v2.0.0/advanced/async.mdx +95 -0
- package/templates/jbrains-docs/docs/v2.0.0/advanced/generics.mdx +126 -0
- package/templates/jbrains-docs/docs/v2.0.0/basics/_category_.json +8 -0
- package/templates/jbrains-docs/docs/v2.0.0/basics/control-flow.mdx +106 -0
- package/templates/jbrains-docs/docs/v2.0.0/basics/syntax.mdx +129 -0
- package/templates/jbrains-docs/docs/v2.0.0/basics/types.mdx +135 -0
- package/templates/jbrains-docs/docs/v2.0.0/getting-started.mdx +111 -0
- package/templates/jbrains-docs/docs/v2.0.0/home.mdx +37 -0
- package/templates/jbrains-docs/docs/v2.0.0/tools/_category_.json +8 -0
- package/templates/jbrains-docs/docs/v2.0.0/tools/build-tools.mdx +165 -0
- package/templates/jbrains-docs/docs/v2.0.0/tools/testing.mdx +112 -0
- package/templates/jbrains-docs/gitignore +7 -0
- package/templates/jbrains-docs/package.json +28 -0
- package/templates/jbrains-docs/postcss.config.mjs +8 -0
- package/templates/jbrains-docs/public/api-specs/openapi-example.json +259 -0
- package/templates/jbrains-docs/public/api-specs/postman-example.json +205 -0
- package/templates/jbrains-docs/public/api-specs/test-api.json +256 -0
- package/templates/jbrains-docs/public/api-specs/users-api.json +264 -0
- package/templates/jbrains-docs/specra.config.json +80 -0
- package/templates/jbrains-docs/src/app.css +86 -0
- package/templates/jbrains-docs/src/app.html +17 -0
- package/templates/jbrains-docs/src/params/product.ts +7 -0
- package/templates/jbrains-docs/src/routes/+layout.server.ts +14 -0
- package/templates/jbrains-docs/src/routes/+layout.svelte +21 -0
- package/templates/jbrains-docs/src/routes/+page.server.ts +9 -0
- package/templates/jbrains-docs/src/routes/docs/[product=product]/[version]/+layout.server.ts +40 -0
- package/templates/jbrains-docs/src/routes/docs/[product=product]/[version]/+page.server.ts +24 -0
- package/templates/jbrains-docs/src/routes/docs/[product=product]/[version]/[...slug]/+page.server.ts +131 -0
- package/templates/jbrains-docs/src/routes/docs/[product=product]/[version]/[...slug]/+page.svelte +180 -0
- package/templates/jbrains-docs/src/routes/docs/[version]/+layout.server.ts +42 -0
- package/templates/jbrains-docs/src/routes/docs/[version]/+page.server.ts +27 -0
- package/templates/jbrains-docs/src/routes/docs/[version]/[...slug]/+page.server.ts +106 -0
- package/templates/jbrains-docs/src/routes/docs/[version]/[...slug]/+page.svelte +172 -0
- package/templates/jbrains-docs/static/favicon.svg +4 -0
- package/templates/jbrains-docs/svelte.config.js +13 -0
- package/templates/jbrains-docs/tsconfig.json +12 -0
- package/templates/jbrains-docs/vite.config.ts +6 -0
- package/templates/minimal/.env.sample +1 -0
- package/templates/minimal/docs/v1.0.0/about.mdx +57 -0
- package/templates/minimal/docs/v1.0.0/components/_category_.json +8 -0
- package/templates/minimal/docs/v1.0.0/components/callout.mdx +83 -0
- package/templates/minimal/docs/v1.0.0/components/code-block.mdx +103 -0
- package/templates/minimal/docs/v1.0.0/components/index.mdx +8 -0
- package/templates/minimal/docs/v1.0.0/components/tabs.mdx +92 -0
- package/templates/minimal/docs/v1.0.0/configuration.mdx +322 -0
- package/templates/minimal/docs/v1.0.0/features.mdx +197 -0
- package/templates/minimal/docs/v1.0.0/getting-started.mdx +183 -0
- package/templates/minimal/docs/v2.0.0/about.mdx +57 -0
- package/templates/minimal/docs/v2.0.0/components/_category_.json +8 -0
- package/templates/minimal/docs/v2.0.0/components/callout.mdx +83 -0
- package/templates/minimal/docs/v2.0.0/components/code-block.mdx +103 -0
- package/templates/minimal/docs/v2.0.0/components/index.mdx +8 -0
- package/templates/minimal/docs/v2.0.0/components/tabs.mdx +92 -0
- package/templates/minimal/docs/v2.0.0/configuration.mdx +322 -0
- package/templates/minimal/docs/v2.0.0/features.mdx +197 -0
- package/templates/minimal/docs/v2.0.0/getting-started.mdx +183 -0
- package/templates/minimal/gitignore +7 -0
- package/templates/minimal/package.json +29 -0
- package/templates/minimal/postcss.config.mjs +8 -0
- package/templates/minimal/specra.config.json +91 -0
- package/templates/minimal/src/app.css +86 -0
- package/templates/minimal/src/app.html +17 -0
- package/templates/minimal/src/hooks.server.ts +8 -0
- package/templates/minimal/src/params/product.ts +7 -0
- package/templates/minimal/src/routes/+error.svelte +10 -0
- package/templates/minimal/src/routes/+layout.server.ts +14 -0
- package/templates/minimal/src/routes/+layout.svelte +21 -0
- package/templates/minimal/src/routes/+page.server.ts +9 -0
- package/templates/minimal/src/routes/+page.svelte +149 -0
- package/templates/minimal/src/routes/docs/[product=product]/[version]/+layout.server.ts +40 -0
- package/templates/minimal/src/routes/docs/[product=product]/[version]/+page.server.ts +24 -0
- package/templates/minimal/src/routes/docs/[product=product]/[version]/[...slug]/+page.server.ts +131 -0
- package/templates/minimal/src/routes/docs/[product=product]/[version]/[...slug]/+page.svelte +180 -0
- package/templates/minimal/src/routes/docs/[version]/+layout.server.ts +42 -0
- package/templates/minimal/src/routes/docs/[version]/+page.server.ts +27 -0
- package/templates/minimal/src/routes/docs/[version]/[...slug]/+page.server.ts +106 -0
- package/templates/minimal/src/routes/docs/[version]/[...slug]/+page.svelte +172 -0
- package/templates/minimal/static/api-specs/openapi-example.json +259 -0
- package/templates/minimal/static/api-specs/postman-example.json +205 -0
- package/templates/minimal/static/api-specs/test-api.json +256 -0
- package/templates/minimal/static/api-specs/users-api.json +264 -0
- package/templates/minimal/static/favicon.svg +4 -0
- package/templates/minimal/svelte.config.js +13 -0
- package/templates/minimal/tsconfig.json +12 -0
- package/templates/minimal/vite.config.ts +6 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Themes
|
|
3
|
+
description: Configure the look and feel of your documentation site
|
|
4
|
+
sidebar_position: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
The platform supports light and dark themes out of the box, with full control over which mode is used by default.
|
|
8
|
+
|
|
9
|
+
## Theme Modes
|
|
10
|
+
|
|
11
|
+
Three theme modes are available:
|
|
12
|
+
|
|
13
|
+
| Mode | Description |
|
|
14
|
+
|------|-------------|
|
|
15
|
+
| `light` | Always use the light theme |
|
|
16
|
+
| `dark` | Always use the dark theme |
|
|
17
|
+
| `system` | Follow the user's operating system preference |
|
|
18
|
+
|
|
19
|
+
## Configuration
|
|
20
|
+
|
|
21
|
+
Set the default theme in `specra.config.json`:
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"theme": {
|
|
26
|
+
"defaultMode": "dark",
|
|
27
|
+
"respectPrefersColorScheme": true
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
| Option | Type | Default | Description |
|
|
33
|
+
|--------|------|---------|-------------|
|
|
34
|
+
| `defaultMode` | `"light" \| "dark" \| "system"` | `"system"` | Initial theme mode |
|
|
35
|
+
| `respectPrefersColorScheme` | `boolean` | `true` | Whether to detect and follow OS preference |
|
|
36
|
+
|
|
37
|
+
<Callout type="info">
|
|
38
|
+
When `respectPrefersColorScheme` is `true` and `defaultMode` is `"system"`, the site automatically switches themes when the user changes their OS appearance settings.
|
|
39
|
+
</Callout>
|
|
40
|
+
|
|
41
|
+
## Theme Toggle
|
|
42
|
+
|
|
43
|
+
Users can switch themes using the toggle button in the site header. Their preference is saved in local storage and persists across visits.
|
|
44
|
+
|
|
45
|
+
## Customizing Colors
|
|
46
|
+
|
|
47
|
+
All colors are defined as CSS custom properties, making them easy to override:
|
|
48
|
+
|
|
49
|
+
```css
|
|
50
|
+
:root {
|
|
51
|
+
--primary: oklch(0.55 0.22 264.376);
|
|
52
|
+
--background: oklch(1 0 0);
|
|
53
|
+
--foreground: oklch(0.145 0 0);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.dark {
|
|
57
|
+
--primary: oklch(0.65 0.22 264.376);
|
|
58
|
+
--background: oklch(0.145 0 0);
|
|
59
|
+
--foreground: oklch(0.95 0 0);
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
<Callout type="tip">
|
|
64
|
+
Use the OKLCH color space for perceptually uniform color adjustments. This ensures colors look consistent across light and dark themes.
|
|
65
|
+
</Callout>
|
|
66
|
+
|
|
67
|
+
## Best Practices
|
|
68
|
+
|
|
69
|
+
<Steps>
|
|
70
|
+
<Step title="Choose a Default">
|
|
71
|
+
Pick a default theme that matches your brand. For developer documentation, dark mode is often preferred.
|
|
72
|
+
</Step>
|
|
73
|
+
|
|
74
|
+
<Step title="Test Both Themes">
|
|
75
|
+
Always preview your content in both light and dark modes. Ensure images, diagrams, and code blocks are readable in both.
|
|
76
|
+
</Step>
|
|
77
|
+
|
|
78
|
+
<Step title="Respect User Preference">
|
|
79
|
+
Keep `respectPrefersColorScheme` enabled so users get the theme they expect.
|
|
80
|
+
</Step>
|
|
81
|
+
</Steps>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Introduction
|
|
3
|
+
description: Welcome to the documentation
|
|
4
|
+
sidebar_position: 1
|
|
5
|
+
icon: book
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Welcome to the v2 documentation. This knowledge base covers everything you need to get started, create content, and customize your site.
|
|
9
|
+
|
|
10
|
+
## Quick Links
|
|
11
|
+
|
|
12
|
+
<CardGrid cols={2}>
|
|
13
|
+
<Card icon="zap" title="Quick Start" description="Get up and running in under 5 minutes" href="/docs/v2.0.0/quickstart" />
|
|
14
|
+
<Card icon="book-open" title="Core Concepts" description="Understand the key ideas behind the platform" href="/docs/v2.0.0/concepts" />
|
|
15
|
+
<Card icon="file-text" title="Content Guide" description="Learn how to write and organize content" href="/docs/v2.0.0/content/formatting" />
|
|
16
|
+
<Card icon="palette" title="Customization" description="Themes, branding, and design options" href="/docs/v2.0.0/customization/themes" />
|
|
17
|
+
</CardGrid>
|
|
18
|
+
|
|
19
|
+
## Overview
|
|
20
|
+
|
|
21
|
+
This documentation platform gives you a modern, fast, and beautiful docs experience out of the box. In v2 we've improved performance and added new customization options.
|
|
22
|
+
|
|
23
|
+
- **Versioned documentation** — maintain docs for multiple releases
|
|
24
|
+
- **Dark and light themes** — automatic or manual switching
|
|
25
|
+
- **Rich components** — callouts, tabs, code blocks, cards, and more
|
|
26
|
+
- **Sidebar navigation** — auto-generated from your file structure
|
|
27
|
+
- **Full-text search** — find anything instantly
|
|
28
|
+
|
|
29
|
+
<Callout type="tip">
|
|
30
|
+
Use the sidebar to navigate between sections, or use the search bar to find specific topics.
|
|
31
|
+
</Callout>
|
|
32
|
+
|
|
33
|
+
## What's New in v2
|
|
34
|
+
|
|
35
|
+
| Feature | Description |
|
|
36
|
+
|---------|-------------|
|
|
37
|
+
| **Improved Performance** | Faster page loads and smaller bundle sizes |
|
|
38
|
+
| **New Customization** | More control over themes and branding |
|
|
39
|
+
| **Better Navigation** | Enhanced sidebar and breadcrumb experience |
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Quick Start
|
|
3
|
+
description: Get up and running in under 5 minutes
|
|
4
|
+
sidebar_position: 2
|
|
5
|
+
icon: zap
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Follow these steps to set up your documentation site and start writing content.
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
Before you begin, make sure you have:
|
|
13
|
+
|
|
14
|
+
- **Node.js 18+** installed
|
|
15
|
+
- A package manager (**npm**, **yarn**, or **pnpm**)
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
<Steps>
|
|
20
|
+
<Step title="Create a New Project">
|
|
21
|
+
Run the CLI to scaffold a new documentation site:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx create-specra my-docs
|
|
25
|
+
```
|
|
26
|
+
</Step>
|
|
27
|
+
|
|
28
|
+
<Step title="Install Dependencies">
|
|
29
|
+
<Tabs defaultValue="npm">
|
|
30
|
+
<Tab label="npm">
|
|
31
|
+
```bash
|
|
32
|
+
cd my-docs && npm install
|
|
33
|
+
```
|
|
34
|
+
</Tab>
|
|
35
|
+
<Tab label="yarn">
|
|
36
|
+
```bash
|
|
37
|
+
cd my-docs && yarn install
|
|
38
|
+
```
|
|
39
|
+
</Tab>
|
|
40
|
+
<Tab label="pnpm">
|
|
41
|
+
```bash
|
|
42
|
+
cd my-docs && pnpm install
|
|
43
|
+
```
|
|
44
|
+
</Tab>
|
|
45
|
+
</Tabs>
|
|
46
|
+
</Step>
|
|
47
|
+
|
|
48
|
+
<Step title="Start the Dev Server">
|
|
49
|
+
<Tabs defaultValue="npm">
|
|
50
|
+
<Tab label="npm">
|
|
51
|
+
```bash
|
|
52
|
+
npm run dev
|
|
53
|
+
```
|
|
54
|
+
</Tab>
|
|
55
|
+
<Tab label="yarn">
|
|
56
|
+
```bash
|
|
57
|
+
yarn dev
|
|
58
|
+
```
|
|
59
|
+
</Tab>
|
|
60
|
+
<Tab label="pnpm">
|
|
61
|
+
```bash
|
|
62
|
+
pnpm dev
|
|
63
|
+
```
|
|
64
|
+
</Tab>
|
|
65
|
+
</Tabs>
|
|
66
|
+
|
|
67
|
+
Your docs site is now running at `http://localhost:5173`.
|
|
68
|
+
</Step>
|
|
69
|
+
</Steps>
|
|
70
|
+
|
|
71
|
+
## Project Structure
|
|
72
|
+
|
|
73
|
+
After scaffolding, your project looks like this:
|
|
74
|
+
|
|
75
|
+
```txt
|
|
76
|
+
my-docs/
|
|
77
|
+
├── docs/
|
|
78
|
+
│ ├── v1.0.0/ # Previous version docs
|
|
79
|
+
│ └── v2.0.0/ # Current version docs
|
|
80
|
+
├── src/ # SvelteKit application
|
|
81
|
+
├── specra.config.json # Site configuration
|
|
82
|
+
└── package.json
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
<Callout type="info">
|
|
86
|
+
All documentation lives in the `docs/` directory as `.mdx` files. The sidebar is automatically generated from the folder structure.
|
|
87
|
+
</Callout>
|
|
88
|
+
|
|
89
|
+
## Creating Your First Page
|
|
90
|
+
|
|
91
|
+
Create a new file at `docs/v2.0.0/my-page.mdx`:
|
|
92
|
+
|
|
93
|
+
```mdx
|
|
94
|
+
---
|
|
95
|
+
title: My First Page
|
|
96
|
+
description: A page I just created
|
|
97
|
+
sidebar_position: 10
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
# Hello World
|
|
101
|
+
|
|
102
|
+
This is my first documentation page.
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Save the file and it will appear in the sidebar automatically.
|
|
106
|
+
|
|
107
|
+
## Next Steps
|
|
108
|
+
|
|
109
|
+
<CardGrid cols={2}>
|
|
110
|
+
<Card icon="lightbulb" title="Core Concepts" description="Learn the key ideas" href="/docs/v2.0.0/concepts" />
|
|
111
|
+
<Card icon="file-text" title="Formatting" description="Style your content" href="/docs/v2.0.0/content/formatting" />
|
|
112
|
+
</CardGrid>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "my-docs",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite dev",
|
|
8
|
+
"build": "vite build",
|
|
9
|
+
"preview": "vite preview",
|
|
10
|
+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"specra": "^0.2.4"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@sveltejs/adapter-static": "^3.0.0",
|
|
17
|
+
"@sveltejs/kit": "^2.0.0",
|
|
18
|
+
"@sveltejs/vite-plugin-svelte": "^6.0.0",
|
|
19
|
+
"@tailwindcss/postcss": "^4.1.9",
|
|
20
|
+
"@tailwindcss/typography": "^0.5.19",
|
|
21
|
+
"postcss": "^8.5",
|
|
22
|
+
"svelte": "^5.0.0",
|
|
23
|
+
"svelte-check": "^4.0.0",
|
|
24
|
+
"tailwindcss": "^4.1.9",
|
|
25
|
+
"typescript": "^5",
|
|
26
|
+
"vite": "^6.3.0"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.0.0",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "User Management API",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"description": "A simple API for managing users (OpenAPI format example)"
|
|
7
|
+
},
|
|
8
|
+
"servers": [
|
|
9
|
+
{
|
|
10
|
+
"url": "https://api.example.com/v1",
|
|
11
|
+
"description": "Production server"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"components": {
|
|
15
|
+
"securitySchemes": {
|
|
16
|
+
"bearerAuth": {
|
|
17
|
+
"type": "http",
|
|
18
|
+
"scheme": "bearer",
|
|
19
|
+
"description": "JWT Bearer token authentication"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"schemas": {
|
|
23
|
+
"User": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"properties": {
|
|
26
|
+
"id": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"example": "user_123"
|
|
29
|
+
},
|
|
30
|
+
"name": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"example": "John Doe"
|
|
33
|
+
},
|
|
34
|
+
"email": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"format": "email",
|
|
37
|
+
"example": "john@example.com"
|
|
38
|
+
},
|
|
39
|
+
"createdAt": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"format": "date-time",
|
|
42
|
+
"example": "2024-01-15T10:30:00Z"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"Error": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"properties": {
|
|
49
|
+
"error": {
|
|
50
|
+
"type": "string"
|
|
51
|
+
},
|
|
52
|
+
"code": {
|
|
53
|
+
"type": "string"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"security": [
|
|
60
|
+
{
|
|
61
|
+
"bearerAuth": []
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"paths": {
|
|
65
|
+
"/users": {
|
|
66
|
+
"get": {
|
|
67
|
+
"summary": "List all users",
|
|
68
|
+
"description": "Retrieve a paginated list of all users",
|
|
69
|
+
"operationId": "listUsers",
|
|
70
|
+
"parameters": [
|
|
71
|
+
{
|
|
72
|
+
"name": "page",
|
|
73
|
+
"in": "query",
|
|
74
|
+
"description": "Page number for pagination",
|
|
75
|
+
"schema": {
|
|
76
|
+
"type": "integer",
|
|
77
|
+
"default": 1,
|
|
78
|
+
"example": 1
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "limit",
|
|
83
|
+
"in": "query",
|
|
84
|
+
"description": "Number of items per page",
|
|
85
|
+
"schema": {
|
|
86
|
+
"type": "integer",
|
|
87
|
+
"default": 10,
|
|
88
|
+
"example": 10
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"responses": {
|
|
93
|
+
"200": {
|
|
94
|
+
"description": "List of users retrieved successfully",
|
|
95
|
+
"content": {
|
|
96
|
+
"application/json": {
|
|
97
|
+
"schema": {
|
|
98
|
+
"type": "array",
|
|
99
|
+
"items": {
|
|
100
|
+
"$ref": "#/components/schemas/User"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"example": [
|
|
104
|
+
{
|
|
105
|
+
"id": "user_123",
|
|
106
|
+
"name": "John Doe",
|
|
107
|
+
"email": "john@example.com",
|
|
108
|
+
"createdAt": "2024-01-15T10:30:00Z"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"id": "user_456",
|
|
112
|
+
"name": "Jane Smith",
|
|
113
|
+
"email": "jane@example.com",
|
|
114
|
+
"createdAt": "2024-01-16T14:20:00Z"
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"post": {
|
|
123
|
+
"summary": "Create a new user",
|
|
124
|
+
"description": "Create a new user account",
|
|
125
|
+
"operationId": "createUser",
|
|
126
|
+
"requestBody": {
|
|
127
|
+
"description": "User data to create",
|
|
128
|
+
"required": true,
|
|
129
|
+
"content": {
|
|
130
|
+
"application/json": {
|
|
131
|
+
"schema": {
|
|
132
|
+
"type": "object",
|
|
133
|
+
"required": ["name", "email"],
|
|
134
|
+
"properties": {
|
|
135
|
+
"name": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"example": "John Doe"
|
|
138
|
+
},
|
|
139
|
+
"email": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"format": "email",
|
|
142
|
+
"example": "john@example.com"
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"responses": {
|
|
150
|
+
"201": {
|
|
151
|
+
"description": "User created successfully",
|
|
152
|
+
"content": {
|
|
153
|
+
"application/json": {
|
|
154
|
+
"schema": {
|
|
155
|
+
"$ref": "#/components/schemas/User"
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"400": {
|
|
161
|
+
"description": "Invalid request data",
|
|
162
|
+
"content": {
|
|
163
|
+
"application/json": {
|
|
164
|
+
"schema": {
|
|
165
|
+
"$ref": "#/components/schemas/Error"
|
|
166
|
+
},
|
|
167
|
+
"example": {
|
|
168
|
+
"error": "Email already exists",
|
|
169
|
+
"code": "DUPLICATE_EMAIL"
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"/users/{id}": {
|
|
178
|
+
"get": {
|
|
179
|
+
"summary": "Get user by ID",
|
|
180
|
+
"description": "Retrieve a single user by their unique identifier",
|
|
181
|
+
"operationId": "getUserById",
|
|
182
|
+
"parameters": [
|
|
183
|
+
{
|
|
184
|
+
"name": "id",
|
|
185
|
+
"in": "path",
|
|
186
|
+
"required": true,
|
|
187
|
+
"description": "The user's unique identifier",
|
|
188
|
+
"schema": {
|
|
189
|
+
"type": "string",
|
|
190
|
+
"example": "user_123"
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
],
|
|
194
|
+
"responses": {
|
|
195
|
+
"200": {
|
|
196
|
+
"description": "User retrieved successfully",
|
|
197
|
+
"content": {
|
|
198
|
+
"application/json": {
|
|
199
|
+
"schema": {
|
|
200
|
+
"$ref": "#/components/schemas/User"
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"404": {
|
|
206
|
+
"description": "User not found",
|
|
207
|
+
"content": {
|
|
208
|
+
"application/json": {
|
|
209
|
+
"schema": {
|
|
210
|
+
"$ref": "#/components/schemas/Error"
|
|
211
|
+
},
|
|
212
|
+
"example": {
|
|
213
|
+
"error": "User not found",
|
|
214
|
+
"code": "USER_NOT_FOUND"
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"delete": {
|
|
222
|
+
"summary": "Delete a user",
|
|
223
|
+
"description": "Permanently delete a user account",
|
|
224
|
+
"operationId": "deleteUser",
|
|
225
|
+
"parameters": [
|
|
226
|
+
{
|
|
227
|
+
"name": "id",
|
|
228
|
+
"in": "path",
|
|
229
|
+
"required": true,
|
|
230
|
+
"description": "The user's unique identifier",
|
|
231
|
+
"schema": {
|
|
232
|
+
"type": "string",
|
|
233
|
+
"example": "user_123"
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
],
|
|
237
|
+
"responses": {
|
|
238
|
+
"204": {
|
|
239
|
+
"description": "User deleted successfully"
|
|
240
|
+
},
|
|
241
|
+
"404": {
|
|
242
|
+
"description": "User not found",
|
|
243
|
+
"content": {
|
|
244
|
+
"application/json": {
|
|
245
|
+
"schema": {
|
|
246
|
+
"$ref": "#/components/schemas/Error"
|
|
247
|
+
},
|
|
248
|
+
"example": {
|
|
249
|
+
"error": "User not found",
|
|
250
|
+
"code": "USER_NOT_FOUND"
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|