Skip to content

Commit bc01da4

Browse files
committed
rearrange diagrams
1 parent 732aaba commit bc01da4

File tree

1 file changed

+65
-69
lines changed

1 file changed

+65
-69
lines changed

fern/products/docs/pages/getting-started/how-it-works.mdx

Lines changed: 65 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -7,74 +7,6 @@ Fern combines your API specifications, static Markdown files (like how-to guides
77

88
This process is built around two major workflows: **editing** and **deploying** your documentation.
99

10-
## Content workflows
11-
12-
You can update your documentation in two ways:
13-
14-
- **Direct editing**: Open a pull request directly in the [GitHub repository that contains your docs](/learn/docs/getting-started/project-structure) (including your `docs.yml` configuration and Markdown files).
15-
- **Visual Editor**: Use Fern's [Visual Editor](/learn/docs/writing-content/visual-editor) to modify your docs without touching code. The Fern GitHub App fetches the current state from your docs repository and passes it to the Visual Editor. When you submit changes, the Fern GitHub App automatically opens a pull request for review.
16-
17-
After the update goes through your review process, an approver can merge it.
18-
19-
## Deployment workflows
20-
21-
When a pull request is merged into your docs repository, an automated pipeline transforms your content into a live documentation site and syncs it with your API changes in three main stages:
22-
23-
<Steps>
24-
25-
### Trigger GitHub Action and fetch API specs
26-
27-
The merged PR triggers a Fern GitHub Action. The action retrieves your API specification from a separate repository using secure token authentication. The GitHub Action only has access to the specific docs repository from which it's running.
28-
29-
### Generate and process content
30-
[The Fern CLI](/learn/cli-api-reference/cli-reference/overview) runs `fern generate --docs` to merge your API specs with documentation content. Behind the scenes, this process involves several key components:
31-
32-
- **Input processing**: The system combines your API specification files, `docs.yml` configuration file, `.mdx` files, and media content.
33-
- **Core infrastructure**: The generation process runs on Fern's AWS VPC infrastructure, where the Fern Docs microservice acts as the central orchestrator. This microservice coordinates content processing while connecting to a database for storing indexed content and S3 for asset storage.
34-
- **Content indexing**: During generation, Fern automatically indexes your documentation content to enable search functionality across your entire site. This indexing integrates with external services: [Algolia](/learn/docs/customization/search) for advanced search capabilities, UpStash for caching, PostHog for analytics, TurboPuffer for vector storage, and AI inference services (Bedrock, Claude) for intelligent content processing.
35-
36-
### Deploy to hosting platform
37-
38-
The processed content is deployed to Vercel as a documentation site with an embedded [API explorer](/learn/docs/api-references/api-explorer/overview) that allows users to test endpoints directly within the documentation.
39-
40-
Vercel Edge middleware handles the underlying routing, authentication, and performance optimization.
41-
42-
The deployed documentation site integrates with external systems like Cloudflare for CORS management and WorkOS for enterprise authentication.
43-
44-
45-
</Steps>
46-
47-
## Diagrams
48-
49-
<AccordionGroup>
50-
<Accordion title="Editing and deployment workflows">
51-
52-
This diagram shows how content flows from editing to deployment.
53-
54-
```mermaid
55-
flowchart TD
56-
FVE[Fern Visual Editor]
57-
U[User]
58-
DR[Docs Repo]
59-
CLI[Fern CLI]
60-
Decision{Make a PR or edit in Visual Editor?}
61-
Spec((API Spec Repo))
62-
GA[GitHub Actions]
63-
64-
U ==> Decision
65-
Decision == Make edit ==> FVE
66-
Decision == Open and Merge PR ==> DR
67-
68-
FVE <== Fetches state and opens PR ==> DR
69-
DR == ① Merged PR triggers deployment flow ==> GA
70-
71-
Spec <-. ② Fetches and merges API spec .-> GA
72-
73-
GA == ③ Triggers doc regeneration ==> CLI
74-
CLI == ④ Deploys updated docs ==> Server[Fern Docs Server]
75-
```
76-
</Accordion>
77-
7810
<Accordion title="System architecture">
7911

8012
This diagram shows the technical infrastructure that powers the documentation generation process.
@@ -140,4 +72,68 @@ flowchart TD
14072
MICROSERVICE -.-> S3
14173
```
14274
</Accordion>
143-
</AccordionGroup>
75+
76+
## Content workflows
77+
78+
You can update your documentation in two ways:
79+
80+
- **Direct editing**: Open a pull request directly in the [GitHub repository that contains your docs](/learn/docs/getting-started/project-structure) (including your `docs.yml` configuration and Markdown files).
81+
- **Visual Editor**: Use Fern's [Visual Editor](/learn/docs/writing-content/visual-editor) to modify your docs without touching code. The Fern GitHub App fetches the current state from your docs repository and passes it to the Visual Editor. When you submit changes, the Fern GitHub App automatically opens a pull request for review.
82+
83+
After the update goes through your review process, an approver can merge it.
84+
85+
## Deployment workflows
86+
87+
When a pull request is merged into your docs repository, an automated pipeline transforms your content into a live documentation site and syncs it with your API changes in three main stages:
88+
89+
<Steps>
90+
91+
### Trigger GitHub Action and fetch API specs
92+
93+
The merged PR triggers a Fern GitHub Action. The action retrieves your API specification from a separate repository using secure token authentication. The GitHub Action only has access to the specific docs repository from which it's running.
94+
95+
### Generate and process content
96+
[The Fern CLI](/learn/cli-api-reference/cli-reference/overview) runs `fern generate --docs` to merge your API specs with documentation content. Behind the scenes, this process involves several key components:
97+
98+
- **Input processing**: The system combines your API specification files, `docs.yml` configuration file, `.mdx` files, and media content.
99+
- **Core infrastructure**: The generation process runs on Fern's AWS VPC infrastructure, where the Fern Docs microservice acts as the central orchestrator. This microservice coordinates content processing while connecting to a database for storing indexed content and S3 for asset storage.
100+
- **Content indexing**: During generation, Fern automatically indexes your documentation content to enable search functionality across your entire site. This indexing integrates with external services: [Algolia](/learn/docs/customization/search) for advanced search capabilities, UpStash for caching, PostHog for analytics, TurboPuffer for vector storage, and AI inference services (Bedrock, Claude) for intelligent content processing.
101+
102+
### Deploy to hosting platform
103+
104+
The processed content is deployed to Vercel as a documentation site with an embedded [API explorer](/learn/docs/api-references/api-explorer/overview) that allows users to test endpoints directly within the documentation.
105+
106+
Vercel Edge middleware handles the underlying routing, authentication, and performance optimization.
107+
108+
The deployed documentation site integrates with external systems like Cloudflare for CORS management and WorkOS for enterprise authentication.
109+
110+
111+
</Steps>
112+
113+
<Accordion title="Editing and deployment workflows">
114+
115+
This diagram shows how content flows from editing to deployment.
116+
117+
```mermaid
118+
flowchart TD
119+
FVE[Fern Visual Editor]
120+
U[User]
121+
DR[Docs Repo]
122+
CLI[Fern CLI]
123+
Decision{Make a PR or edit in Visual Editor?}
124+
Spec((API Spec Repo))
125+
GA[GitHub Actions]
126+
127+
U ==> Decision
128+
Decision == Make edit ==> FVE
129+
Decision == Open and Merge PR ==> DR
130+
131+
FVE <== Fetches state and opens PR ==> DR
132+
DR == ① Merged PR triggers deployment flow ==> GA
133+
134+
Spec <-. ② Fetches and merges API spec .-> GA
135+
136+
GA == ③ Triggers doc regeneration ==> CLI
137+
CLI == ④ Deploys updated docs ==> Server[Fern Docs Server]
138+
```
139+
</Accordion>

0 commit comments

Comments
 (0)