-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
Everything in BOUNDLY can be customized. The configuration file config/boundly.php is the bridge between your domain and the infrastructure layer.
All values support .env overrides for clean environment separation.
The default language for CLI output and system messages.
| Value | Default | Description |
|---|---|---|
'en' |
✅ | English |
'es' |
Spanish |
BOUNDLY_LOCALE=esThe URL segment for all auto-generated endpoints.
| Default | Description |
|---|---|
'api' |
Generates routes like /api/users, /api/posts, etc. |
BOUNDLY_API_PREFIX=v1Where BOUNDLY's discovery engine scans for your code.
| Key | Default | Description |
|---|---|---|
domain |
base_path('Domain') |
Path scanned for #[Entity] attributes. |
application |
base_path('Application') |
Path scanned for #[Action] attributes. |
Controls whether the framework uses the static metadata cache.
| Value | Behavior |
|---|---|
false (default in production) |
Reads from bootstrap/cache/boundly.php — zero overhead. |
true (default in local) |
Scans and reflects on every request — always fresh. |
# Force disable cache during development
BOUNDLY_DISABLE_CACHE=true
⚠️ Note: Runphp artisan core:cachebefore deploying to production. The cache is automatically disabled onAPP_ENV=local.
The Laravel auth guard used by the #[Authorize] middleware when no explicit guard is specified.
| Default | Description |
|---|---|
'sanctum' |
Works with Laravel Sanctum tokens out of the box. |
BOUNDLY_AUTH_GUARD=apiControls the default page size for the generic CRUD list endpoint.
| Key | Default | Description |
|---|---|---|
default_per_page |
15 |
Items returned when per_page is not specified. |
max_per_page |
100 |
Hard cap to prevent clients from requesting millions of rows. |
BOUNDLY_PER_PAGE=20
BOUNDLY_MAX_PER_PAGE=200Controls API rate limiting to prevent abuse and ensure fair usage.
| Key | Default | Description |
|---|---|---|
enabled |
true |
Enable or disable rate limiting globally. |
max_attempts |
60 |
Maximum requests allowed per time window. |
decay_minutes |
1 |
Time window in minutes before attempts reset. |
prefix |
'api' |
Cache key prefix for rate limit counters. |
# Disable rate limiting (not recommended for production)
BOUNDLY_RATE_LIMIT_ENABLED=false
# Stricter limits for sensitive endpoints
BOUNDLY_RATE_LIMIT_MAX_ATTEMPTS=30
BOUNDLY_RATE_LIMIT_DECAY_MINUTES=1You can also set rate limits directly on entities using the #[RateLimit] attribute:
#[Entity(table: 'payments')]
#[RateLimit(maxAttempts: 10, decayMinutes: 1)]
class Payment extends AggregateRoot { ... }See Behavioral-Traits#rate-limit for more details.
// config/boundly.php
return [
'locale' => env('BOUNDLY_LOCALE', 'en'),
'api_prefix' => env('BOUNDLY_API_PREFIX', 'api'),
'paths' => [
'domain' => base_path('Domain'),
'application' => base_path('Application'),
],
'disable_cache' => env('BOUNDLY_DISABLE_CACHE', app()->environment('local')),
'auth' => [
'default_guard' => env('BOUNDLY_AUTH_GUARD', 'sanctum'),
],
'pagination' => [
'default_per_page' => env('BOUNDLY_PER_PAGE', 15),
'max_per_page' => env('BOUNDLY_MAX_PER_PAGE', 100),
],
'rate_limit' => [
'enabled' => env('BOUNDLY_RATE_LIMIT_ENABLED', true),
'max_attempts' => env('BOUNDLY_RATE_LIMIT_MAX_ATTEMPTS', 60),
'decay_minutes' => env('BOUNDLY_RATE_LIMIT_DECAY_MINUTES', 1),
'prefix' => env('BOUNDLY_RATE_LIMIT_PREFIX', 'api'),
],
];-
Environment Aware: All keys support
env()— use.envto separate local, staging, and production configs. -
CLI Override:
--langin anycore:*command takes precedence overlocale. -
Publish Config: Run
php artisan vendor:publish --tag=boundly-configto copy the default config toconfig/boundly.php.
Next Step: Roadmap 🚀