11# Flare Developer Hub
22
3- Source code and content for the [ Flare Developer Hub] ( https://dev.flare.network ) - Flare’ s documentation site for builders ☀️ .
3+ Source code for the [ Flare Developer Hub] ( https://dev.flare.network ) , Flare' s documentation site built with [ Docusaurus ] ( https://docusaurus.io/ ) .
44
5- Built with [ Docusaurus ] ( https://docusaurus.io/ ) , a modern static site generator .
5+ If you only want to read the docs, use https://dev.flare.network .
66
7- > ** Note:**
8- > This repository is intended for contributors and maintainers.
9- > If you just want to read the docs, visit [ dev.flare.network] ( https://dev.flare.network ) .
7+ ## Quick start
108
11- ## Getting started
12-
13- ### Prerequisites
9+ Prerequisites:
1410
1511- [ Node.js v22] ( https://nodejs.org/en/ ) and npm
16- - Recommended: [ nvm] ( https://github.com/nvm-sh/nvm ) to manage Node versions
17- - (Optional) For language-specific code in [ examples] ( examples/ ) :
18- - Python: [ uv] ( https://docs.astral.sh/uv/ )
19- - Rust: [ Cargo] ( https://doc.rust-lang.org/cargo/ )
20- - Go: [ go] ( https://go.dev/doc/install )
12+ - Optional: [ nvm] ( https://github.com/nvm-sh/nvm ) for Node version management
2113
22- ### Install and run locally
14+ Install and run:
2315
2416``` bash
2517git clone https://github.com/flare-foundation/developer-hub.git
@@ -28,114 +20,37 @@ npm ci
2820npm run start
2921```
3022
31- This starts a local development server with hot reloading and opens the site in your browser.
32-
33- ## Repo structure
34-
35- ``` plaintext
36- flare-foundation/developer-hub/
37- ├── .github/ # GitHub Actions workflows, issue templates, etc.
38- ├── automations/ # Scripts + generated data (feeds, addresses, tables).
39- ├── docgen/ # Tooling for auto-generating Solidity documentation.
40- ├── docs/ # Core documentation content (MD/MDX).
41- ├── examples/ # Multi-language examples (Python/Rust/Go/Solidity).
42- ├── src/ # Docusaurus custom components, pages, styles, overrides.
43- ├── static/ # Static assets (images, PDFs, OpenAPI specs).
44- ├── CONTRIBUTING.md # Contribution guidelines.
45- ├── docusaurus.config.ts # Docusaurus site configuration.
46- └── sidebars.ts # Sidebar structure.
47- ```
48-
49- ## Development workflow
50-
51- ### Build and serve
52-
53- Some features (for example, search and production-only behavior) only work correctly against a production build.
54-
55- ``` bash
56- npm run build && npm run serve
57- ```
58-
59- - ` build ` outputs the static site to ` build/ `
60- - ` serve ` serves the built output locally
61-
62- ### Format
63-
64- Run [ Prettier] ( https://prettier.io/ ) for docs and site code:
23+ For production-like behavior:
6524
6625``` bash
67- npm run format
26+ npm run build
27+ npm run serve
6828```
6929
70- Language-specific examples use their native tooling:
71-
72- - Go → ` gofmt `
73- - Rust → ` cargo fmt `
74- - Python → ` ruff format ` (and/or ` ruff check ` depending on the example)
75-
76- > ** Note:**
77- > Prettier support for MDXv3 is evolving ([ tracking issue] ( https://github.com/prettier/prettier/issues/12209 ) ).
78- > To skip formatting for a section:
79- >
80- > ``` plaintext
81- > {/* prettier-ignore */}
82- > ```
83-
84- ### Run examples
85-
86- The [`examples/`](examples/) directory contains language-specific projects.
87- Each subdirectory includes its own `README.md` with setup and run instructions.
88-
89- **Supported languages:**
30+ ## Common scripts
9031
91- - Python
92- - JavaScript/TypeScript
93- - Rust
94- - Go
32+ - ` npm run start ` : local dev server with hot reload
33+ - ` npm run build ` : production build into ` build/ `
34+ - ` npm run serve ` : serve the production build locally
35+ - ` npm run format ` : format docs and site code
36+ - ` npm run lint ` : run eslint
37+ - ` npm run typecheck ` : run TypeScript checks
38+ - ` npm run automations ` : refresh generated data used by docs/components
39+ - ` npm run update-deps ` : update dependencies across example projects
9540
96- ### Run automations
41+ ## Repository layout
9742
98- Automations update generated content used by tables/components (for example, contract addresses and feed metadata).
99- This will update `ftso_feeds.json` and `solidity_reference.json` in `src/features/DataTables/*`.
100-
101- ```bash
102- npm run automations
103- ```
104-
105- To update dependencies across the language example projects:
106-
107- ``` bash
108- npm run update-deps
109- ```
110-
111- > ** Caution:**
112- > After running update-deps, run the relevant example test/build steps to ensure nothing regressed.
113-
114- ### Generate Solidity documentation
115-
116- The Solidity doc generator currently requires Node 18.
117-
118- ``` bash
119- nvm use 18
120- cd docgen
121- chmod +x generate-solidity-docs.sh
122- ./generate-solidity-docs.sh
123-
124- # Return to the main site toolchain
125- cd ..
126- nvm use 22
127- ```
128-
129- This pulls the latest smart contracts and regenerates the Solidity reference docs.
43+ - ` docs/ ` : documentation content (` .md ` /` .mdx ` )
44+ - ` src/ ` : Docusaurus theme overrides, components, and styles
45+ - ` static/ ` : static assets
46+ - ` examples/ ` : language-specific example projects
47+ - ` automations/ ` : scripts and generated datasets
48+ - ` docgen/ ` : Solidity docs generation tooling
13049
13150## Contributing
13251
133- We welcome contributions of all sizes - from typo fixes to major improvements.
52+ Contributor workflow, pre-PR checks, PR guidelines, diagram standards, and commit conventions are documented in [ CONTRIBUTING.md] ( CONTRIBUTING.md ) .
53+
54+ ## License
13455
135- 1 . Read [ CONTRIBUTING.md] ( CONTRIBUTING.md ) .
136- 2 . Create a feature branch:
137- ``` bash
138- git checkout -b feat/your-feature-name
139- ```
140- 3 . Make your changes and run the [ Pre-PR checks] ( CONTRIBUTING.md#pre-pr-checks ) .
141- 4 . Push and open a PR following the [ pull request guidelines] ( CONTRIBUTING.md#pull-request-guidelines ) .
56+ This project is licensed under the [ MIT License] ( LICENSE ) .
0 commit comments