* feat(routes): make relay base url configurable fixes #17 * chore(routes): update wiki to incorporate `routes.apiBaseUrl` config
User Guide
Nimbus - An integrated, in-browser API client for Laravel with automatic schema discovery.
This guide covers everything you need to know about using Nimbus to test and explore your Laravel APIs.
Table of Contents
- Getting Started
- Using Nimbus
- Authentication
- Advanced Features
- Configuration
- Troubleshooting
- Getting Help
Getting Started
Installation
Requirements
- PHP 8.2 or higher.
- Laravel 10.x, 11.x, or 12.x.
Install via Composer
composer require sunchayn/nimbus
Publish Configuration and Assets
php artisan vendor:publish --tag=nimbus-assets --tag=nimbus-config
This publishes:
config/nimbus.php- Configuration file- Frontend assets required for the interface
Accessing Nimbus
Once installed, start your Laravel application using a real web server (Herd, Sail, Docker, Nginx, etc.) and navigate to:
http://your-app.test/nimbus
Important: Do not use PHP's built-in server (php artisan serve). The relay endpoint requires a web server that can handle concurrent requests.
Interface Overview
The Nimbus interface consists of three main panels:
- Route Explorer (left) - Browse and select API routes.
- Request Builder (center) - Configure and send requests.
- Response Viewer (right) - View responses and details.
Using Nimbus
Route Explorer
The Route Explorer automatically discovers your Laravel API routes and organizes them by resource.
Features:
- Routes are grouped by resource (e.g., all user-related endpoints together).
- Each route shows its HTTP methods.
- Click any route to load it in the Request Builder.
- Routes are extracted based on your configured API prefix.
Request Builder
The Request Builder provides an intuitive interface for configuring API requests.
Components
Method Selection
- HTTP method is automatically set from the route.
- The methods supported by the route are groupped together in the list.
URL Parameters
- Add query string parameters.
- Real-time URL preview.
Headers
- Add custom headers.
- Global headers automatically included.
Request Body
- JSON editor with syntax highlighting.
- Schema validation based on Laravel validation rules.
- Real-time validation feedback.
Authorization
- Multiple authentication methods.
- See Authentication section for details.
Schema-Aware Editing
Nimbus analyzes your Laravel validation rules to provide intelligent editing:
Validation Features:
- Required fields are highlighted.
- Field types are enforced (string, number, boolean, etc.).
- Validation errors shown in real-time.
- Nested object and array support.
Auto-Fill Payloads
Populate entire request payloads with realistic test data.
How it works:
- Click the "Auto Fill" button.
- Nimbus generates values based on validation rules and field names.
- Review and modify generated values as needed.
Smart Generation: Field names are cross-checked against a pre-defined set of patterns, common names will get an adequate generated value that cannot normally be inferred from a validation rule (e.g., the address fields from the example above):
emailfields → realistic email addressespasswordfields → secure random passwordsuuidfields → valid UUIDsdatefields → properly formatted dates- Numeric fields → values within min/max constraints
Response Viewer
The Response Viewer displays detailed information about API responses.
Displayed Information:
- HTTP status code with description.
- Response time in milliseconds.
- Complete response headers.
- Formatted response body with syntax highlighting.
- Cookie information (see Cookie Inspection).
Features:
- Collapsible sections for better organization.
- Copy response body to clipboard.
- Pretty-printed JSON for readability.
Cookie Inspection
View and decrypt Laravel session cookies with ease.
Raw Cookies:
The raw values as observed in the Set-Cookie headers from the response.
Decrypted Cookies: Automatic decryption of Laravel encrypted cookies.
Authentication
Nimbus supports multiple authentication methods for testing protected endpoints.
Session-Based Authentication
Current User Session allows you to make requests as the currently logged-in user from your main application.
How it works:
- Log into your Laravel application in another tab.
- Select "Current User Session" in Nimbus.
- Requests will include your session cookies.
Bearer Tokens
Standard Bearer token authentication for API endpoints.
Use case: Testing JWT or Sanctum token-protected endpoints.
How to use:
- Select "Bearer" from authentication options.
- Enter your access token.
- Token is sent in
Authorization: Bearer {token}header.
Basic Auth
HTTP Basic Authentication with username and password.
Use case: Testing endpoints protected with Basic Auth.
How to use:
- Select "Basic" from authentication options.
- Enter username and password.
- Credentials are base64-encoded and sent in
Authorizationheader.
User Impersonation
Make requests as any user in your system using their user ID.
Use case: Testing how endpoints behave for different users without logging in as them.
How it works:
- Select "Impersonate" from authentication options.
- Enter the user ID.
- Nimbus authenticates the request as that user.
Advanced Features
Global Headers
Configure headers that are automatically included in every request.
Configuration:
Edit config/nimbus.php:
'headers' => [
'x-api-version' => '1.0',
'x-request-id' => \Sunchayn\Nimbus\Modules\Config\GlobalHeaderGeneratorTypeEnum::Uuid,
'x-session-id' => \Sunchayn\Nimbus\Modules\Config\GlobalHeaderGeneratorTypeEnum::Uuid,
'host' => 'example.com',
],
Dynamic Values:
Use GlobalHeaderGeneratorTypeEnum for randomly generated values, for example:
Uuid- Generate a UUID for each request- Additional generators available in the enum
Use cases:
- API versioning headers.
- Request tracking IDs.
- Custom authentication keys.
- Host headers for multi-tenant apps.
Value Generators
Generate realistic values for headers and parameters on-demand.
How to use:
- Focus on a value input field.
- Click the generator icon (or press Shift twice).
- Select the type of value to generate.
- Press Enter or click on the generator to insert.
Available generators:
- UUIDs.
- Email addresses.
- Names (first, last, full).
- Dates (various formats).
- Phone numbers.
- URLs.
- And more...
Export to cURL
Export configured requests as cURL commands for use in terminals or scripts.
How to export:
- Configure your request completely
- Click the export button
- Copy the generated cURL command
What's included:
- Full URL with parameters
- All headers (including global headers)
- Authentication credentials
- Request body
- HTTP method
Configuration
The config/nimbus.php file provides customization options:
return [
'prefix' => 'nimbus',
'allowed_envs' => ['local', 'staging'],
'routes' => [
'prefix' => 'api',
'versioned' => false,
],
'auth' => [
'guard' => 'web',
'special' => [
'injector' => \Sunchayn\Nimbus\Modules\Relay\Authorization\Injectors\RememberMeCookieInjector::class,
],
],
'headers' => [],
];
Configuration Options
| Option | Description | Default | Example |
|---|---|---|---|
prefix |
The URI segment under which Nimbus is accessible. | 'nimbus' |
'api-client' |
allowed_envs |
Environments where Nimbus is enabled. Avoid production for security reasons. | ['local', 'staging'] |
['testing', 'local'] |
routes.prefix |
The base path used to detect application routes. Only routes starting with this prefix are analyzed. | 'api' |
'api/v1' |
routes.versioned |
Enables version parsing for routes like /api/v1/.... |
false |
true |
routes.apiBaseUrl |
The base URL used when Nimbus relays API requests from the UI. Useful when the API runs on a different domain or port. If set to null, Nimbus will default to the same host and scheme as the incoming request. | null | http://127.0.0.1:8001 |
auth.guard |
The Laravel guard used for the API requests authentication. | 'api' |
'web' |
auth.special.injector |
Injector class used to attach authentication credentials to outgoing requests. Must implement SpecialAuthenticationInjectorContract. |
RememberMeCookieInjector::class |
TymonJwtTokenInjector::class |
headers |
Global headers applied to all outgoing requests. Supports static values or enum generators. | [] |
['x-request-id' => GlobalHeaderGeneratorTypeEnum::UUID] |
Special Authentication Modes
Nimbus comes with two authentication injection strategies:
| Mode | Injector Class | Description |
|---|---|---|
| RememberMe Cookie | RememberMeCookieInjector::class |
Authenticates using Laravel's remember-me cookie for the current session. |
| JWT Token | TymonJwtTokenInjector::class |
Injects a bearer token for JWT-authenticated APIs. |
Custom injectors can be implemented by extending:
Sunchayn\Nimbus\Modules\Relay\Authorization\Contracts\SpecialAuthenticationInjectorContract
Versioned Routes
If your routes are versioned (e.g. /api/v1/users), set routes.versioned to true.
Nimbus will automatically extract and display version segments when generating schema representations.
Troubleshooting
Routes Not Appearing
Problem: Your API routes don't show up in the Route Explorer.
Solutions:
-
Check route prefix configuration
- Verify
routes.prefixinconfig/nimbus.phpmatches your API routes. - Default is
api, so routes should start with/api/.
- Verify
-
Clear route cache
php artisan route:clear -
Verify route registration
- Ensure routes are in
routes/api.php. - Check
RouteServiceProvider(Laravel 10-11) orbootstrap/app.php(Laravel 12+).
- Ensure routes are in
Interface Not Loading
Problem: The Nimbus interface shows errors or doesn't load.
Solutions:
-
Re-publish assets
php artisan vendor:publish --tag=nimbus-assets --force -
Clear all caches
php artisan cache:clear php artisan config:clear php artisan view:clear -
Check browser console
- Open developer tools.
- Look for JavaScript errors.
- Check for failed asset requests.
Relay Endpoint Not Working
Problem: Requests hang or fail when sent from Nimbus.
Solutions:
-
Use a proper web server
- Do NOT use
php artisan serve. - Use Herd, Sail, Docker, Nginx, or Apache.
- The built-in PHP server cannot handle concurrent requests.
- Do NOT use
-
Check application URL
- Verify
APP_URLin.envis correct. - Ensure it matches your actual domain.
- Verify
Authentication Issues
Problem: Authenticated requests fail or return unauthorized errors.
Solutions:
-
Session authentication
- Ensure you're logged into the main app.
- Check that session cookies are being sent.
- Verify session driver configuration.
-
Bearer tokens
- Verify token is valid and not expired.
- Check token format (no extra spaces).
- Ensure API expects Bearer authentication.
-
User impersonation
- Verify the user ID exists in your database.
- Check that user model is correctly configured.
Schema Validation Errors
Problem: Valid payloads show validation errors in the editor.
Solutions:
-
Check validation rules
- Ensure Form Request rules are correct
- Verify inline validation syntax
-
Nested structures
- Use proper dot notation (
user.profile.name) - Arrays should use
*notation (items.*.name)
- Use proper dot notation (
-
Re-publish config
php artisan vendor:publish --tag=nimbus-config --force
Getting Help
Documentation
- GitHub Repository: https://github.com/sunchayn/nimbus
- Contributor Guide: Architecture and development details.
Support Channels
- Bug Reports: Open an issue
- Feature Requests: Share your ideas
- Questions: Ask in discussions
Before Asking for Help
- Check this troubleshooting section.
- Search existing GitHub issues.
- Verify your Laravel and PHP versions meet requirements.
- Try clearing all caches.
- Check the browser console for JavaScript errors.
When reporting issues, include:
- Laravel version.
- PHP version.
- Nimbus version.
- Error messages or screenshots.
- Steps to reproduce the problem (you can fork the dev repository if needed).











