Getting Started

Get Bytedocs running in under 5 minutes

Get Bytedocs up and running in your project in less than 5 minutes. Choose your language below:

Quick Start by Language

Select your backend language to get started:

  • Go - Gin, Echo, Fiber, Gorilla, net/http
  • PHP/Laravel - Laravel framework
  • Node.js - Express, Fastify, NestJS, and more
  • Python - FastAPI, Flask, Django
  • Rust - Axum framework

Universal Quick Start

Regardless of your language, the Bytedocs integration follows the same pattern:

1. Install

# Go
go get github.com/aibnuhibban/bytedocs-go

# Laravel
composer require idnexacloud/laravel-bytedocs

# Node.js (Express)
npm install @bytedocs/express

# Python (FastAPI)
pip install bytedocs-fastapi

# Rust
cargo add bytedocs-rs

2. Add One Line

// Go (Gin)
parser.SetupGinDocs(router, &core.Config{
    Title:   "My API",
    Version: "1.0.0",
})
// Laravel
Bytedocs::setup([
    'title' => 'My API',
    'version' => '1.0.0',
]);
// Node.js (Express)
setupByteDocs(app, {
    title: 'My API',
    version: '1.0.0',
});
# Python (FastAPI)
setup_bytedocs(app, {
    "title": "My API",
    "version": "1.0.0",
})
// Rust (Axum)
let docs_router = create_docs_router(config);
app.merge(docs_router)

3. Run & Visit

Start your application and navigate to:

http://localhost:8080/docs

🎉 That's it! Your API documentation is now live.

What You Get

After setup, you automatically get:

Full Documentation

  • All routes detected
  • Request/response schemas
  • Parameters and validation rules
  • Example values

Interactive Testing

  • Test endpoints directly
  • Customize requests
  • See real responses
  • Export as cURL

OpenAPI Export

  • /docs/openapi.json
  • /docs/openapi.yaml
  • OpenAPI 3.0.3 compliant

Modern UI

  • Beautiful, responsive design
  • Dark/light mode
  • Mobile-friendly
  • Fast and intuitive

Next Steps

Now that you have basic documentation running:

  1. Configure - Customize title, URLs, auth
  2. Enable AI - Add intelligent API assistant
  3. Add Scenarios - Create reusable test flows
  4. Setup Auth - Protect your docs
  5. Performance Test - Run K6 tests (Laravel)

Troubleshooting

Documentation Not Showing

If you don't see any routes:

  1. Check the docs path: Default is /docs, ensure no conflicts
  2. Auto-detect enabled: Make sure auto_detect: true in config
  3. Routes registered: Ensure routes are registered before Bytedocs setup
  4. Framework support: Verify your framework version is supported

Routes Missing

If some routes don't appear:

  1. Excluded paths: Check if paths are in exclude list
  2. AST parsing: Ensure handler files are in the same module
  3. Complex routing: Manual registration may be needed for dynamic routes

Need Help?

Example Projects

See complete working examples: