{"id":49923998,"url":"https://github.com/defipy-devs/defipy-org","last_synced_at":"2026-05-16T22:17:12.709Z","repository":{"id":354097943,"uuid":"1222004750","full_name":"defipy-devs/defipy-org","owner":"defipy-devs","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-12T19:12:34.000Z","size":12657,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"port-bulk-content","last_synced_at":"2026-05-12T20:11:44.282Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://defipy-org.vercel.app","language":"MDX","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/defipy-devs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-27T00:24:25.000Z","updated_at":"2026-04-27T03:53:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/defipy-devs/defipy-org","commit_stats":null,"previous_names":["defipy-devs/defipy-org"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/defipy-devs/defipy-org","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defipy-devs%2Fdefipy-org","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defipy-devs%2Fdefipy-org/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defipy-devs%2Fdefipy-org/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defipy-devs%2Fdefipy-org/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/defipy-devs","download_url":"https://codeload.github.com/defipy-devs/defipy-org/tar.gz/refs/heads/port-bulk-content","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defipy-devs%2Fdefipy-org/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33120699,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T18:38:32.183Z","status":"ssl_error","status_checked_at":"2026-05-16T18:38:29.903Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-16T22:17:11.983Z","updated_at":"2026-05-16T22:17:12.701Z","avatar_url":"https://github.com/defipy-devs.png","language":"MDX","funding_links":[],"categories":[],"sub_categories":[],"readme":"# defipy-org\n\nThe source for [**defipy.org**](https://defipy.org), the documentation and project site for [DeFiPy](https://github.com/defipy-devs/defipy) — the Python SDK for agentic DeFi.\n\nThis repo is the **site**, not the library. For the SDK itself, see [defipy-devs/defipy](https://github.com/defipy-devs/defipy). For the original Sphinx-based docs (still live at [defipy.readthedocs.io](https://defipy.readthedocs.io/en/latest/) during the migration), see [defipy-devs/defipy-docs](https://github.com/defipy-devs/defipy-docs).\n\nBuilt with [Astro](https://astro.build) and [Starlight](https://starlight.astro.build). Deployed to Vercel.\n\n---\n\n## Quick start\n\n```bash\ngit clone https://github.com/defipy-devs/defipy-org\ncd defipy-org\nnpm install\nnpm run dev\n```\n\nDev server runs at `http://localhost:4321` (or the next free port). Most edits hot-reload; changes to `astro.config.mjs` need a full restart (`Ctrl+C`, then `npm run dev` again).\n\n## Commands\n\n| Command           | What it does                                       |\n| :---------------- | :------------------------------------------------- |\n| `npm install`     | Install dependencies                               |\n| `npm run dev`     | Local dev server with hot-reload                   |\n| `npm run build`   | Production build to `./dist/`                      |\n| `npm run preview` | Serve the production build locally for inspection  |\n\nAlways run `npm run build` before pushing — the production build is stricter than dev mode and catches MDX issues that Vite tolerates.\n\n## Repo layout\n\n```\ndefipy-org/\n├── astro.config.mjs       Sidebar, integrations, Starlight config\n├── public/                Static assets (favicons, /img/)\n├── src/\n│   ├── assets/            Logo, hero images (imported by components)\n│   ├── content/docs/      All page content (MDX)\n│   │   ├── index.mdx      Home page\n│   │   ├── api/           Class-reference pages\n│   │   ├── tutorials/     Notebook-derived walkthroughs\n│   │   ├── math/          Hand-derived AMM math\n│   │   ├── ecosystem/     Book, courses, hackathons, presentations\n│   │   └── ...            Concepts, getting-started, etc.\n│   └── styles/custom.css  Wine palette, header band, notebook-output styling\n├── tools/\n│   ├── nb_to_mdx.py       Jupyter notebook → MDX converter\n│   ├── rst_to_mdx.py      Sphinx RST → MDX converter (uses pandoc)\n│   └── port_all.sh        Batch driver for both\n└── CLAUDE_CODE_SPEC.md    Spec used during the initial bulk port from RTD\n```\n\n## Authoring\n\nPages are MDX under `src/content/docs/`. Frontmatter sets the page title and meta description; the body is normal Markdown plus optional Starlight components (`\u003cCard\u003e`, `\u003cCardGrid\u003e`, `\u003cTabs\u003e`, etc.).\n\n### Sidebar\n\nSidebar structure lives in `astro.config.mjs`. Adding a page generally means:\n\n1.  Create the MDX file under the right subdirectory of `src/content/docs/`.\n2.  Add an entry to the matching sidebar group in `astro.config.mjs`. (Some groups use `autogenerate` and pick up new files automatically — check the existing config before adding manual entries.)\n3.  Restart the dev server.\n\n### Math\n\nKaTeX is wired via `remark-math` + `rehype-katex`. Inline math: `$x = 1$`. Display math: `$$ ... $$`. The blockquote-LaTeX style from Sphinx (`\u003e $...$`) is **not** supported — use `$$...$$` instead.\n\n### Code outputs in notebook pages\n\nWhen a notebook cell's output contains characters MDX would otherwise interpret (curly braces in dict reprs, angle brackets, etc.), wrap the output in the JSX template-literal pattern:\n\n```mdx\n\u003cdiv class=\"nb-output\"\u003e{`Exchange ETH-DAI (LP)\nReserves: ETH = 1000.0, DAI = 100000.0`}\u003c/div\u003e\n```\n\n`tools/nb_to_mdx.py` produces this shape automatically. If you're hand-writing notebook output, follow the same pattern.\n\n## Conversion tooling\n\nThe site was bulk-ported from the Sphinx source. The two converter scripts under `tools/` exist for re-runs and incremental ports:\n\n- **`tools/nb_to_mdx.py`** — `.ipynb` → `.mdx`. Uses `nbformat`. Handles markdown cells, code fences, stream/execute_result outputs (text, images, tracebacks), frontmatter derivation from the first H1 + paragraph.\n- **`tools/rst_to_mdx.py`** — `.rst` → `.mdx`. Shells out to `pandoc -f rst -t gfm`, then post-processes: `:ref:` cross-refs via `REF_TO_SLUG`, Sphinx admonitions → Starlight directives, toctree stripping.\n- **`tools/port_all.sh`** — batch driver running both converters over the file map from the original port.\n\nRe-running individual files:\n\n```bash\n# Notebook\npython tools/nb_to_mdx.py \\\n  --input  ../defipy-docs/docs/math/univ2_math.ipynb \\\n  --output src/content/docs/math/univ2-math.mdx\n\n# RST (requires pandoc on PATH)\npython tools/rst_to_mdx.py \\\n  --input  ../defipy-docs/docs/installation.rst \\\n  --output src/content/docs/installation.mdx\n```\n\n`CLAUDE_CODE_SPEC.md` documents the original bulk port — the file mapping, the MDX gotchas, and the workflow used. Useful context if you're picking up where that work left off.\n\n## Theming\n\nWine palette comes from `src/styles/custom.css`. Two variables drive the palette in light vs. dark mode:\n\n- `--sl-color-accent` — link color, sidebar highlight\n- `--sl-color-bg-nav` — header band background\n\nThe header band is sized via `--sl-nav-height` so the logo (`src/assets/defipy_logo.png`, configured as `replacesTitle: true` in `astro.config.mjs`) sits cleanly with even padding above and below.\n\n## Deploy\n\nProduction is deployed to Vercel from `main`. The `vercel.json` file (when added) handles the 301 redirects from RTD URLs:\n\n- `defipy.readthedocs.io/en/latest/\u003cpath\u003e.html` → `defipy.org/\u003cslug\u003e/`\n\nThe `_` to `-` slug transformation matters here — RTD's `binding_to_claude.html` becomes defipy.org's `binding-to-claude/`.\n\n## Migration status\n\nThe site is content-complete relative to the RTD source. ReadTheDocs remains live indefinitely as a redirect target so accumulated SEO equity isn't lost. See the home page's \"Looking for the older docs?\" line and the upper-right header link for visitor-facing wayfinding during the transition.\n\nPer-class API pages for the 21 agentic primitives and the four protocols are in progress — the current Primitive API → Agentic and Protocol API sections ship as overview pages plus a \"details coming\" note. The plan is to autogenerate those from numpydoc-style docstrings in the live SDK rather than hand-writing them.\n\n## License\n\nThe site content is published under the same Apache 2.0 license as DeFiPy. See [defipy/LICENSE](https://github.com/defipy-devs/defipy/blob/main/LICENSE) for the full terms.\n\nBuilt with [Astro](https://astro.build) + [Starlight](https://starlight.astro.build). [![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefipy-devs%2Fdefipy-org","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdefipy-devs%2Fdefipy-org","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefipy-devs%2Fdefipy-org/lists"}