Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,10 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Nix
.direnv/
.envrc
.tmp/
.npm-global/
.yarn-global/
95 changes: 95 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Project Overview

This is the documentation website for Obsrvr, a Web3 development platform providing gateway services for Stellar and Soroban blockchain networks. Built with Docusaurus 3.1.1.

**Live Site**: https://docs.withobsrvr.com

## Essential Commands

```bash
# Install dependencies
yarn install

# Start development server (port 3000)
yarn start

# Build production site
yarn build

# Test production build locally
yarn serve

# Deploy to GitHub Pages (CI/CD only)
yarn deploy
```

## Architecture Overview

### Technology Stack
- **Framework**: Docusaurus 3.1.1 (React-based static site generator)
- **Node**: Version 18+ required (CI uses 18.17)
- **Package Manager**: Yarn (preferred) or npm
- **Deployment**: GitHub Pages via GitHub Actions

### Content Structure
- `/docs/` - Main documentation content (auto-generates sidebar)
- `intro.md` - Landing page for documentation
- `products/` - Product-specific documentation
- `tutorial-*/` - Tutorial sections
- `/src/pages/` - Custom React pages (index.js, overview.md)
- `/src/components/` - Reusable React components
- `/static/` - Static assets (images, CNAME for custom domain)

### Key Configuration Files
- `docusaurus.config.js` - Main site configuration (title, theme, navbar, footer)
- `sidebars.js` - Navigation structure (uses autogenerated + custom sidebars)
- `package.json` - Dependencies and scripts

## Development Workflow

### Adding Documentation
1. Create `.md` or `.mdx` files in `/docs/` directory
2. Files are automatically added to sidebar based on filesystem structure
3. Use frontmatter for custom titles and ordering:
```markdown
---
sidebar_position: 1
title: Custom Title
---
```

### Deployment Process
- **Production**: Pushes to `main` branch trigger automatic deployment via GitHub Actions
- **Testing**: PRs run build validation
- **Target Repository**: Deploys to `withObsrvr/obsrvr-docs` (external repo)
- **Required Secret**: `PAT_TOKEN` for cross-repository deployment

### Styling and Theming
- Global styles: `/src/css/custom.css`
- Dark mode is default (configured in docusaurus.config.js)
- Custom logos for light/dark themes in `/static/img/`

## Important Context

### API Endpoints Documented
The documentation covers these Obsrvr gateway endpoints:
- Stellar Mainnet: `https://stellar.nodeswithobsrvr.co/`
- Stellar Testnet: `https://stellar-testnet.nodeswithobsrvr.co/`
- Soroban RPC Mainnet: `https://rpc.nodeswithobsrvr.co/`
- Soroban RPC Testnet: `https://rpc-testnet.nodeswithobsrvr.co/`
- Console: `https://console.withobsrvr.com`

### MDX Support
Documentation files support MDX, allowing React components in Markdown:
```jsx
import MyComponent from '@site/src/components/MyComponent';

<MyComponent />
```

### No Testing or Linting
This repository has no configured testing framework or linting rules. Focus on maintaining consistency with existing code patterns.
Loading