This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is the Currents documentation repository - a GitBook-powered documentation site for Currents, a cloud platform and dashboard for test orchestration. Currents specializes in Playwright testing but also supports Cypress, Jest, WebdriverIO, and other testing frameworks.
- GitBook Configuration: Uses
.gitbook.yamlfor GitBook configuration with redirect mappings - Content Organization: Documentation is organized in logical sections:
getting-started/- Onboarding guides for different frameworks (Playwright, Cypress, Jest)guides/- Advanced topics like CI optimization, parallelization, code coveragedashboard/- Dashboard features and administration guidesresources/- API documentation, integrations, and technical referencesci-setup/- CI/CD integration guides for major platforms
SUMMARY.mddefines the GitBook table of contents and navigation structureREADME.mdserves as the main landing page- Content is cross-referenced extensively with GitBook's internal linking system
- Each major section has a
README.mdas an index/overview page - Individual features/topics have dedicated markdown files
- Screenshots and assets are stored in
.gitbook/assets/
- Playwright: Primary focus with comprehensive guides in
getting-started/playwright/ - Cypress: Legacy support with guides in
getting-started/cypress/ - Jest: Mobile testing support in
getting-started/jest/ - CI Providers: Extensive platform-specific guides in
getting-started/ci-setup/
- Reporter packages:
@currents/playwright,@currents/cypress,@currents/jest - Configuration files:
currents.config.ts,playwright.config.ts - CLI tools:
pwcfor Playwright,cypress-cloudfor Cypress
Since this is a documentation repository with no build process:
- Content Updates: Direct markdown editing
- Structure Changes: Update
SUMMARY.mdfor navigation changes - Redirects: Manage URL redirects in
.gitbook.yaml - No Build Commands: GitBook handles rendering automatically
- Use GitBook-flavored markdown with custom frontmatter (description, icon fields)
- Screenshots should be referenced from
.gitbook/assets/ - Cross-references use GitBook's internal linking syntax
- Code examples should be framework-specific and executable
- Maintain consistent structure: Overview → Setup → Configuration → Usage
The API documentation follows a structured pattern in resources/api/. When documenting API resources:
Each API resource should follow this template structure:
- Resource Overview: Brief description of what the resource represents
- Resource Relationships: Explain how it relates to other resources
- Endpoint Documentation: For each endpoint include:
- HTTP method and URL pattern with color-coded method badges:
<mark style="color:blue;">GET</mark>,<mark style="color:orange;">PUT</mark>,<mark style="color:red;">DELETE</mark> - Path parameters table with required fields marked:
<mark style="color:red;">*</mark> - Query parameters table with validation rules (limits, types)
- Response examples using GitBook tabs:
{% tabs %}/{% tab title="200: OK" %}
- HTTP method and URL pattern with color-coded method badges:
Base URL: All API endpoints use https://api.currents.dev/v1
Authentication: Document using bearer token format in curl examples:
curl https://api.currents.dev/v1/resource \
-H "Authorization: Bearer API_KEY_HERE"Response Formats: Use consistent JSON structure:
- Success responses:
{"status": "OK", "data": {...}} - List responses: Include
"has_more": booleanfor pagination - Error responses:
{"status": "FAILED", "error": "message"}
Pagination: Document two types:
- Cursor-based: Use
starting_after,ending_before,cursorfields - Offset-based: Use
page,limit,nextPage,totalfields
Asset URLs: Always include hint about signed URL expiration:
{% hint style="info" %}
Asset URLs (videos, screenshots) are signed URLs valid for 2h.
{% endhint %}
Framework Differences: Use GitBook tabs to show different response structures for Cypress vs Playwright when applicable.
Cross-References: Link related resources using GitBook syntax: [resource.md](../path/resource.md "mention")
resources/api/README.md- API overviewresources/api/introduction.md- Base URL, REST principlesresources/api/authentication.md- API key usageresources/api/api-resources/- Individual resource documentationresources/api/pagination.md- Pagination patternsresources/api/errors.md- HTTP status codes and error handling