Skip to content

Commit 366b1ad

Browse files
devalogtjb9dc
andauthored
(sdks) Add new How it works page (#1031)
Co-authored-by: Thomas Baker <[email protected]>
1 parent c820917 commit 366b1ad

File tree

3 files changed

+58
-1
lines changed

3 files changed

+58
-1
lines changed

fern/products/sdks/guides/self-hosted.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: Fern supports self-hosting SDK generation so that you can run SDK g
66

77
<Markdown src="/snippets/enterprise-plan.mdx" />
88

9-
Fern SDK generation runs on Fern's infrastructure by default. Self-hosting allows you to run SDK generation on your own infrastructure to meet specific security or compliance requirements.
9+
Fern SDK generation [runs on Fern's infrastructure by default](/sdks/overview/how-it-works). Self-hosting allows you to run SDK generation on your own infrastructure to meet specific security or compliance requirements.
1010

1111
## When to use self-hosting
1212

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: How SDKs work
3+
description: Learn how Fern generates SDKs using cloud infrastructure
4+
---
5+
6+
Fern combines your API specifications with generator configurations and custom code to produce SDKs in multiple languages. By default, SDK generation runs on Fern's managed cloud infrastructure.
7+
8+
<Info>
9+
Alternatively, [you can run SDK generation on your own infrastructure](/sdks/deep-dives/self-hosted) to meet specific security or compliance requirements.
10+
</Info>
11+
12+
## Generation workflow
13+
14+
Before generating SDKs, you'll configure your `fern/` folder with SDK generators specified in `generators.yml` and connect your API specification. You can also add custom code, tests, and other configuration as needed.
15+
16+
Running `fern generate` kicks off the cloud generation process and involves a few key steps:
17+
18+
<Steps>
19+
<Step title="Cloud execution">
20+
Fern allocates compute resources and pulls the appropriate Docker image for your specified generator version.
21+
</Step>
22+
<Step title="Generate core SDK">
23+
The Docker container executes the generation logic and produces your SDK's core files (models, client code, API methods).
24+
</Step>
25+
<Step title="Verify organization">
26+
Fern verifies your organization registration to ensure the complete SDK can be generated. Without organization verification, only partial SDK files (core code without package metadata) are produced.
27+
</Step>
28+
<Step title="Add package metadata">
29+
Fern completes the SDK by adding package distribution files such as `pyproject.toml`, `package.json`, README, and any dependencies.
30+
</Step>
31+
<Step title="Output to destination">
32+
Fern publishes or saves the complete SDK to your configured location (local filesystem, GitHub repository, package registry). After publication, developers can use your SDKs to integrate with your APIs.
33+
</Step>
34+
</Steps>
35+
36+
<Accordion title="Architecture diagram" toc={true}>
37+
38+
```mermaid
39+
sequenceDiagram
40+
autonumber
41+
participant Dev as Developer
42+
participant Fern as Fern
43+
participant Docker as Docker Container
44+
participant Dest as Output Destination
45+
46+
Dev->>Fern: fern generate
47+
Fern->>Fern: Allocate cloud compute
48+
Fern->>Docker: Pull & run generator image
49+
Docker->>Docker: Generate core SDK files
50+
Docker->>Fern: Return partial SDK
51+
Fern->>Fern: Verify organization
52+
Fern->>Fern: Add package metadata
53+
Fern->>Dest: Output complete SDK
54+
```
55+
</Accordion>

fern/products/sdks/sdks.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ navigation:
44
- page: Introduction
55
path: ./introduction.mdx
66
slug: introduction
7+
- page: How it works
8+
path: ./how-it-works.mdx
79
- page: Quickstart
810
path: ./fern-folder.mdx
911
slug: quickstart

0 commit comments

Comments
 (0)