|
| 1 | +# AGENTS.md |
| 2 | + |
| 3 | +This file provides guidance to Claude Code (claude.ai/code) when working with |
| 4 | +code in this repository. |
| 5 | + |
| 6 | +## Project Overview |
| 7 | + |
| 8 | +This is the documentation website for Tigris Object Storage, built with |
| 9 | +Docusaurus 3. The site contains comprehensive documentation for Tigris' |
| 10 | +S3-compatible object storage platform, including API documentation, quickstarts, |
| 11 | +guides, and integration examples. |
| 12 | + |
| 13 | +## Architecture |
| 14 | + |
| 15 | +- **Framework**: Docusaurus 3 static site generator |
| 16 | +- **Content**: MDX files in `docs/` directory with frontmatter |
| 17 | +- **API Documentation**: Auto-generated from OpenAPI/Swagger specs in |
| 18 | + `static/api/` |
| 19 | +- **Configuration**: Main config in `docusaurus.config.js`, sidebar structure in |
| 20 | + `sidebars.js` |
| 21 | +- **Styling**: Custom CSS in `src/css/custom.css` |
| 22 | +- **Build Output**: Static files generated to `build/` directory |
| 23 | + |
| 24 | +## Development Commands |
| 25 | + |
| 26 | +### Setup |
| 27 | + |
| 28 | +```bash |
| 29 | +# Install dependencies |
| 30 | +npm install |
| 31 | + |
| 32 | +# Set up local environment configuration |
| 33 | +cp .env.local.example .env.local |
| 34 | +``` |
| 35 | + |
| 36 | +### Development |
| 37 | + |
| 38 | +```bash |
| 39 | +# Start development server (includes API docs generation) |
| 40 | +npm run dev |
| 41 | + |
| 42 | +# Start development server without API rebuild |
| 43 | +npm start |
| 44 | +``` |
| 45 | + |
| 46 | +### Build & Deploy |
| 47 | + |
| 48 | +```bash |
| 49 | +# Build for production (includes API docs generation) |
| 50 | +npm run build |
| 51 | + |
| 52 | +# Build API documentation only |
| 53 | +npm run build:apidocs |
| 54 | + |
| 55 | +# Serve built site locally |
| 56 | +npm run serve |
| 57 | + |
| 58 | +# Clean build cache |
| 59 | +npm run clear |
| 60 | +``` |
| 61 | + |
| 62 | +### Code Quality |
| 63 | + |
| 64 | +```bash |
| 65 | +# Lint API documentation, code, and formatting |
| 66 | +npm run lint |
| 67 | +``` |
| 68 | + |
| 69 | +## Content Guidelines |
| 70 | + |
| 71 | +### File Formats |
| 72 | + |
| 73 | +- Use MDX format for all documentation content |
| 74 | +- Add `{/* truncate */}` after the first paragraph in blog posts |
| 75 | +- Import required components at the top of MDX files when needed |
| 76 | + |
| 77 | +### Interactive Components |
| 78 | + |
| 79 | +- **Tabs**: Use Docusaurus `<Tabs>` and `<TabItem>` components with imports |
| 80 | +- **Expandos**: Convert "Begin expando...End expando" patterns to |
| 81 | + `<details><summary>` blocks |
| 82 | +- **Code Blocks**: Standard Markdown code blocks with language specifiers |
| 83 | + |
| 84 | +### Commit Message Convention |
| 85 | + |
| 86 | +Follow conventional commit format: |
| 87 | + |
| 88 | +- Use lowercase for commit body text |
| 89 | +- Examples: `fix: correct header title`, `docs: add new guide`, |
| 90 | + `feat: implement feature` |
| 91 | + |
| 92 | +### Attribution Requirements |
| 93 | + |
| 94 | +AI agents must disclose what tool and model they are using in the "Assisted-by" |
| 95 | +commit footer with a structure like this: |
| 96 | + |
| 97 | +```text |
| 98 | +Assisted-by: [Model Name] via [Tool Name] |
| 99 | +``` |
| 100 | + |
| 101 | +Example: |
| 102 | + |
| 103 | +```text |
| 104 | +Assisted-by: GLM 4.6 via Claude Code |
| 105 | +``` |
| 106 | + |
| 107 | +```text |
| 108 | +Assisted-by: GPT-5-Codex via OpenAI Codex |
| 109 | +``` |
| 110 | + |
| 111 | +If you don't know which model you are using, make a best guess and at least note |
| 112 | +which agent you are using: |
| 113 | + |
| 114 | +```text |
| 115 | +Assisted-by: Cursor |
| 116 | +``` |
| 117 | + |
| 118 | +## Key Directories |
| 119 | + |
| 120 | +- `docs/`: Main documentation content organized by topic |
| 121 | +- `static/api/`: OpenAPI specifications for auto-generated API docs |
| 122 | +- `src/`: Custom React components and styling |
| 123 | +- `blog/`: Blog posts (if present) |
| 124 | +- `static/`: Static assets (images, etc.) |
| 125 | + |
| 126 | +## API Documentation |
| 127 | + |
| 128 | +The site includes auto-generated API documentation from YAML specs. The build |
| 129 | +process automatically generates these docs before each build and deploy. API |
| 130 | +docs are configured through the `docusaurus-plugin-openapi-docs` plugin. |
| 131 | + |
| 132 | +## Environment Configuration |
| 133 | + |
| 134 | +Local development requires copying `.env.local.example` to `.env.local` and |
| 135 | +configuring any necessary environment variables. |
0 commit comments