initial: bootstrap from BukidBountyApp base

This commit is contained in:
Jonathan Sykes
2026-06-06 18:43:00 +08:00
commit eb4a5731fb
5674 changed files with 160857 additions and 0 deletions

View File

@@ -0,0 +1,282 @@
<?php
declare(strict_types=1);
/*
|--------------------------------------------------------------------------
| Accounting Themes
|--------------------------------------------------------------------------
|
| Each theme defines a starter Chart of Accounts hierarchy. The active
| theme is stored as a system setting (`accounting_theme`). Accounts are
| stamped with the theme key + a stable code when seeded so drift can be
| compared later. User-created accounts leave those fields null.
|
| There is no default theme — fresh deployments start on `blank` and an
| operator picks a theme from the Ultimate Console.
|
*/
return [
'blank' => [
'label' => 'Blank',
'description' => 'Empty chart. Build the hierarchy from scratch through the admin UI.',
'version' => 1,
'tree' => [],
],
'general_business' => [
'label' => 'General Business',
'description' => 'Conventional small-business chart of accounts: revenue, COGS, operating expenses, assets, liabilities, equity.',
'version' => 1,
'tree' => [
[
'name' => 'Revenue',
'type' => 'REVENUE',
'children' => [
['name' => 'Sales', 'type' => 'REVENUE'],
['name' => 'Service Income', 'type' => 'REVENUE'],
['name' => 'Other Income', 'type' => 'REVENUE'],
],
],
[
'name' => 'Cost of Goods Sold',
'type' => 'EXPENSE',
'children' => [
['name' => 'Purchases', 'type' => 'EXPENSE'],
['name' => 'Freight In', 'type' => 'EXPENSE'],
],
],
[
'name' => 'Operating Expenses',
'type' => 'EXPENSE',
'children' => [
['name' => 'Salaries & Wages', 'type' => 'EXPENSE'],
['name' => 'Rent', 'type' => 'EXPENSE'],
['name' => 'Utilities', 'type' => 'EXPENSE'],
['name' => 'Office Supplies', 'type' => 'EXPENSE'],
['name' => 'Marketing', 'type' => 'EXPENSE'],
['name' => 'Professional Fees', 'type' => 'EXPENSE'],
],
],
[
'name' => 'Assets',
'type' => 'ASSET',
'children' => [
['name' => 'Cash on Hand', 'type' => 'ASSET'],
['name' => 'Bank Accounts', 'type' => 'ASSET'],
['name' => 'Accounts Receivable', 'type' => 'ASSET'],
['name' => 'Inventory', 'type' => 'ASSET'],
],
],
[
'name' => 'Liabilities',
'type' => 'LIABILITY',
'children' => [
['name' => 'Accounts Payable', 'type' => 'LIABILITY'],
['name' => 'Loans Payable', 'type' => 'LIABILITY'],
['name' => 'Taxes Payable', 'type' => 'LIABILITY'],
],
],
[
'name' => 'Equity',
'type' => 'EQUITY',
'children' => [
['name' => "Owner's Capital", 'type' => 'EQUITY'],
['name' => 'Retained Earnings', 'type' => 'EQUITY'],
],
],
],
],
'retail_pos' => [
'label' => 'Retail / POS',
'description' => 'Storefront and POS-driven business: sales channels, COGS, inventory shrinkage, store operating costs.',
'version' => 1,
'tree' => [
[
'name' => 'Sales',
'type' => 'REVENUE',
'children' => [
['name' => 'Walk-in Sales', 'type' => 'REVENUE'],
['name' => 'Online Sales', 'type' => 'REVENUE'],
['name' => 'Wholesale', 'type' => 'REVENUE'],
['name' => 'Returns & Refunds', 'type' => 'REVENUE'],
],
],
[
'name' => 'Cost of Sales',
'type' => 'EXPENSE',
'children' => [
['name' => 'Inventory Purchases', 'type' => 'EXPENSE'],
['name' => 'Shrinkage & Spoilage', 'type' => 'EXPENSE'],
['name' => 'Packaging', 'type' => 'EXPENSE'],
],
],
[
'name' => 'Store Operations',
'type' => 'EXPENSE',
'children' => [
['name' => 'Store Rent', 'type' => 'EXPENSE'],
['name' => 'Store Utilities', 'type' => 'EXPENSE'],
['name' => 'Cashier Wages', 'type' => 'EXPENSE'],
['name' => 'Payment Processing Fees', 'type' => 'EXPENSE'],
],
],
[
'name' => 'Cash & Equivalents',
'type' => 'ASSET',
'children' => [
['name' => 'Register Cash', 'type' => 'ASSET'],
['name' => 'Bank Deposits', 'type' => 'ASSET'],
],
],
],
],
'service_business' => [
'label' => 'Service Business',
'description' => 'Service-first business: billable income, contractor and labor costs, lean operating overhead.',
'version' => 1,
'tree' => [
[
'name' => 'Service Revenue',
'type' => 'REVENUE',
'children' => [
['name' => 'Consulting Fees', 'type' => 'REVENUE'],
['name' => 'Project Income', 'type' => 'REVENUE'],
['name' => 'Recurring Retainers', 'type' => 'REVENUE'],
],
],
[
'name' => 'Direct Costs',
'type' => 'EXPENSE',
'children' => [
['name' => 'Subcontractors', 'type' => 'EXPENSE'],
['name' => 'Billable Labor', 'type' => 'EXPENSE'],
['name' => 'Software & Tools', 'type' => 'EXPENSE'],
],
],
[
'name' => 'Overhead',
'type' => 'EXPENSE',
'children' => [
['name' => 'Office Rent', 'type' => 'EXPENSE'],
['name' => 'Internet & Phone', 'type' => 'EXPENSE'],
['name' => 'Admin Salaries', 'type' => 'EXPENSE'],
['name' => 'Travel', 'type' => 'EXPENSE'],
],
],
],
],
'agri_coop' => [
'label' => 'Agricultural Cooperative',
'description' => 'Farm-gate cooperative: produce sales, supplier capital, logistics, warehouse and member operations.',
'version' => 1,
'tree' => [
[
'name' => 'Produce Sales',
'type' => 'REVENUE',
'children' => [
['name' => 'Direct Buyers', 'type' => 'REVENUE'],
['name' => 'Wholesale Channel', 'type' => 'REVENUE'],
['name' => 'Consignment', 'type' => 'REVENUE'],
],
],
[
'name' => 'Capital & Procurement',
'type' => 'EXPENSE',
'children' => [
['name' => 'Supplier Advances', 'type' => 'EXPENSE'],
['name' => 'Member Payouts', 'type' => 'EXPENSE'],
['name' => 'Farm Inputs', 'type' => 'EXPENSE'],
],
],
[
'name' => 'Logistics',
'type' => 'EXPENSE',
'children' => [
['name' => 'Hauling & Freight', 'type' => 'EXPENSE'],
['name' => 'Loading / Unloading', 'type' => 'EXPENSE'],
['name' => 'Fuel', 'type' => 'EXPENSE'],
],
],
[
'name' => 'Warehouse',
'type' => 'EXPENSE',
'children' => [
['name' => 'Warehouse Rent', 'type' => 'EXPENSE'],
['name' => 'Warehouse Labor', 'type' => 'EXPENSE'],
['name' => 'Cold Storage', 'type' => 'EXPENSE'],
['name' => 'Spoilage', 'type' => 'EXPENSE'],
],
],
[
'name' => 'Member Equity',
'type' => 'EQUITY',
'children' => [
['name' => 'Share Capital', 'type' => 'EQUITY'],
['name' => 'Patronage Refunds', 'type' => 'EQUITY'],
],
],
],
],
'banana_trading' => [
'label' => 'Banana Trading / Supplier',
'description' => 'Buy-and-sell banana trading: sales by variety, supplier purchases, delivery and logistics, operating costs.',
'version' => 1,
'tree' => [
[
'name' => 'Sales',
'type' => 'REVENUE',
'default_flow' => 'INCOME',
'children' => [
['name' => 'Banana Sales', 'type' => 'REVENUE', 'default_flow' => 'INCOME'],
['name' => 'Lakatan', 'type' => 'REVENUE', 'default_flow' => 'INCOME'],
['name' => 'Latundan', 'type' => 'REVENUE', 'default_flow' => 'INCOME'],
['name' => 'Saba', 'type' => 'REVENUE', 'default_flow' => 'INCOME'],
['name' => 'Cavendish', 'type' => 'REVENUE', 'default_flow' => 'INCOME'],
['name' => 'Other Varieties', 'type' => 'REVENUE', 'default_flow' => 'INCOME'],
],
],
[
'name' => 'Supplier Purchases',
'type' => 'EXPENSE',
'default_flow' => 'EXPENSE',
'children' => [
['name' => 'Banana Purchases', 'type' => 'EXPENSE', 'default_flow' => 'EXPENSE'],
['name' => 'Supplier Advances', 'type' => 'EXPENSE', 'default_flow' => 'EXPENSE'],
['name' => 'Packaging Materials', 'type' => 'EXPENSE', 'default_flow' => 'EXPENSE'],
],
],
[
'name' => 'Delivery & Logistics',
'type' => 'EXPENSE',
'default_flow' => 'EXPENSE',
'children' => [
['name' => 'Delivery Fee', 'type' => 'EXPENSE', 'default_flow' => 'EXPENSE'],
['name' => 'Hauling', 'type' => 'EXPENSE', 'default_flow' => 'EXPENSE'],
['name' => 'Fuel', 'type' => 'EXPENSE', 'default_flow' => 'EXPENSE'],
['name' => 'Loading / Unloading', 'type' => 'EXPENSE', 'default_flow' => 'EXPENSE'],
['name' => 'Toll Fees', 'type' => 'EXPENSE', 'default_flow' => 'EXPENSE'],
],
],
[
'name' => 'Operating Expenses',
'type' => 'EXPENSE',
'default_flow' => 'EXPENSE',
'children' => [
['name' => 'Labor / Arrastrador', 'type' => 'EXPENSE', 'default_flow' => 'EXPENSE'],
['name' => 'Spoilage & Losses', 'type' => 'EXPENSE', 'default_flow' => 'EXPENSE'],
['name' => 'Market Fees', 'type' => 'EXPENSE', 'default_flow' => 'EXPENSE'],
['name' => 'Communication', 'type' => 'EXPENSE', 'default_flow' => 'EXPENSE'],
['name' => 'Miscellaneous', 'type' => 'EXPENSE', 'default_flow' => 'EXPENSE'],
],
],
],
],
];

13
config/annotations.php Normal file
View File

@@ -0,0 +1,13 @@
<?php
declare(strict_types=1);
return [
'scan' => [
'paths' => [
],
'ignore_annotations' => [
'mixin',
],
],
];

171
config/app.php Normal file
View File

@@ -0,0 +1,171 @@
<?php
declare(strict_types=1);
use Hypervel\Support\Facades\Facade;
use Hypervel\Support\ServiceProvider;
use Psr\Log\LogLevel;
return [
/*
|--------------------------------------------------------------------------
| Application Name
|--------------------------------------------------------------------------
|
| This value is the name of your application. This value is used when the
| framework needs to place the application's name in a notification or
| any other location as required by the application or its packages.
|
*/
'name' => env('APP_NAME', 'BukidBountyApp'),
/*
|--------------------------------------------------------------------------
| Application Environment
|--------------------------------------------------------------------------
|
| This value determines the "environment" your application is currently
| running in. This may determine how you prefer to configure various
| services the application utilizes. Set "APP_ENV" in your ".env" file.
|
*/
'env' => env('APP_ENV', 'production'),
/*
|--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
| When your application is in debug mode, detailed error messages with
| stack traces will be shown on every error that occurs within your
| application. If disabled, a simple generic error page is shown.
| Set "APP_DEBUG" in your ".env" file.
|
*/
'debug' => (bool) env('APP_DEBUG', true),
/*
|--------------------------------------------------------------------------
| Cacheable Flag for Annotations Scanning
|--------------------------------------------------------------------------
|
| Enabling this option will cache the annotations scanning result. It
| can boost the performance of the framework initialization.
| Please disable it in the development environment.
|
*/
'scan_cacheable' => env('SCAN_CACHEABLE', false),
/*
|--------------------------------------------------------------------------
| Log Levels for StdoutLogger
|--------------------------------------------------------------------------
|
| This value only determines the log levels that are written to the stdout logger.
| It does not affect the log levels that are written to the other loggers.
|
*/
'stdout_log_level' => [
LogLevel::ALERT,
LogLevel::CRITICAL,
// LogLevel::DEBUG,
LogLevel::EMERGENCY,
LogLevel::ERROR,
LogLevel::INFO,
LogLevel::NOTICE,
LogLevel::WARNING,
],
/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| This URL is used by the console to properly generate URLs when using
| the Artisan command line tool. You should set this to the root of
| your application so that it is used when running Artisan tasks.
|
*/
'url' => env('APP_URL', 'http://localhost'),
/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| Here you may specify the default timezone for your application, which
| will be used by the PHP date and date-time functions. We have gone
| ahead and set this to a sensible default for you out of the box.
|
*/
'timezone' => env('APP_TIMEZONE', 'UTC'),
/*
|--------------------------------------------------------------------------
| Application Locale Configuration
|--------------------------------------------------------------------------
|
| The application locale determines the default locale that will be used
| by the translation service provider. You are free to set this value
| to any of the locales which will be supported by the application.
|
*/
'locale' => env('APP_LOCALE', 'en'),
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is utilized by Laravel's encryption services and should be set
| to a random, 32 character string to ensure that all encrypted values
| are secure. You should do this prior to deploying the application.
|
*/
'cipher' => 'AES-256-CBC',
'key' => env('APP_KEY'),
'previous_keys' => [
...array_filter(
explode(',', env('APP_PREVIOUS_KEYS', ''))
),
],
'providers' => ServiceProvider::defaultProviders()->merge([
/*
* Package Service Providers...
*/
/*
* Application Service Providers...
*/
App\Providers\AppServiceProvider::class,
// App\Providers\BroadcastServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
])->toArray(),
/*
|--------------------------------------------------------------------------
| Class Aliases
|--------------------------------------------------------------------------
|
| This array of class aliases will be registered when this application
| is started.
|
*/
'aliases' => Facade::defaultAliases()->merge([
// 'Example' => App\Facades\Example::class,
])->toArray(),
];

6
config/aspects.php Normal file
View File

@@ -0,0 +1,6 @@
<?php
declare(strict_types=1);
return [
];

30
config/auth.php Normal file
View File

@@ -0,0 +1,30 @@
<?php
declare(strict_types=1);
return [
'defaults' => [
'guard' => 'session',
'provider' => 'users',
],
'guards' => [
'session' => [
'driver' => 'session',
'provider' => 'users',
],
'jwt' => [
'driver' => 'jwt',
'provider' => 'users',
],
'bearer' => [
'driver' => 'bearer',
'provider' => 'users',
],
],
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\Models\User::class,
],
],
];

23
config/autoload/redis.php Normal file
View File

@@ -0,0 +1,23 @@
<?php
declare(strict_types=1);
return [
'default' => [
'host' => env('REDIS_HOST', 'host.docker.internal'),
'auth' => (env('REDIS_AUTH') ?: env('REDIS_PASSWORD')) ?: null,
'port' => (int) env('REDIS_PORT', 5433),
'db' => (int) env('REDIS_DB', 0),
'pool' => [
'min_connections' => 1,
'max_connections' => 10,
'connect_timeout' => 10.0,
'wait_timeout' => 3.0,
'heartbeat' => -1,
'max_idle_time' => (float) env('REDIS_MAX_IDLE_TIME', 60),
],
],
];

97
config/broadcasting.php Normal file
View File

@@ -0,0 +1,97 @@
<?php
declare(strict_types=1);
return [
/*
|--------------------------------------------------------------------------
| Default Broadcaster
|--------------------------------------------------------------------------
|
| This option controls the default broadcaster that will be used by the
| framework when an event needs to be broadcast. You may set this to
| any of the connections defined in the "connections" array below.
|
| Supported: "reverb", "pusher", "ably", "redis", "log", "null"
|
*/
'default' => env('BROADCAST_CONNECTION', 'null'),
/*
|--------------------------------------------------------------------------
| Broadcast Connections
|--------------------------------------------------------------------------
|
| Here you may define all of the broadcast connections that will be used
| to broadcast events to other systems or over WebSockets. Samples of
| each available type of connection are provided inside this array.
|
*/
'connections' => [
'reverb' => [
'driver' => 'reverb',
'key' => env('REVERB_APP_KEY'),
'secret' => env('REVERB_APP_SECRET'),
'app_id' => env('REVERB_APP_ID'),
'options' => [
'host' => env('REVERB_HOST'),
'port' => env('REVERB_PORT', 443),
'scheme' => env('REVERB_SCHEME', 'https'),
'useTLS' => env('REVERB_SCHEME', 'https') === 'https',
],
'client_options' => [
// Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
],
],
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'host' => env('PUSHER_HOST') ?: 'api-' . env('PUSHER_APP_CLUSTER', 'mt1') . '.pusher.com',
'port' => env('PUSHER_PORT', 443),
'scheme' => env('PUSHER_SCHEME', 'https'),
'encrypted' => true,
'useTLS' => env('PUSHER_SCHEME', 'https') === 'https',
],
'client_options' => [
// Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
],
'pool' => [
'min_objects' => 1,
'max_objects' => 10,
'wait_timeout' => 3.0,
'max_lifetime' => 60.0,
],
],
'ably' => [
'driver' => 'ably',
'key' => env('ABLY_KEY'),
'pool' => [
'min_objects' => 1,
'max_objects' => 10,
'wait_timeout' => 3.0,
'max_lifetime' => 60.0,
],
],
'redis' => [
'driver' => 'redis',
'connection' => env('REDIS_BROADCAST_CONNECTION', 'default'),
],
'log' => [
'driver' => 'log',
],
'null' => [
'driver' => 'null',
],
],
];

93
config/cache.php Normal file
View File

@@ -0,0 +1,93 @@
<?php
declare(strict_types=1);
use Hypervel\Cache\SwooleStore;
use Hypervel\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Cache Store
|--------------------------------------------------------------------------
|
| This option controls the default cache connection that gets used while
| using this caching library. This connection is used when another is
| not explicitly specified when executing a given caching function.
|
*/
'default' => env('CACHE_DRIVER', 'redis'),
/*
|--------------------------------------------------------------------------
| Cache Stores
|--------------------------------------------------------------------------
|
| Here you may define all of the cache "stores" for your application as
| well as their drivers. You may even define multiple stores for the
| same cache driver to group types of items stored in your caches.
|
| Supported drivers: "array", "file", "redis", "swoole", "stack", "null"
|
*/
'stores' => [
'array' => [
'driver' => 'array',
'serialize' => false,
],
'file' => [
'driver' => 'file',
'path' => storage_path('cache/data'),
'lock_path' => storage_path('cache/data'),
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
'lock_connection' => 'default',
],
'swoole' => [
'driver' => 'swoole',
'table' => 'default',
'memory_limit_buffer' => 0.05,
'eviction_policy' => SwooleStore::EVICTION_POLICY_LRU,
'eviction_proportion' => 0.05,
'eviction_interval' => 10000, // milliseconds
],
'stack' => [
'driver' => 'stack',
'stores' => [
'swoole' => [
'ttl' => 3, // seconds
],
'redis',
],
],
],
'swoole_tables' => [
'default' => [
'rows' => 1024,
'bytes' => 10240,
'conflict_proportion' => 0.2,
],
],
/*
|--------------------------------------------------------------------------
| Cache Key Prefix
|--------------------------------------------------------------------------
|
| When utilizing a RAM based store such as APC or Memcached, there might
| be other applications utilizing the same cache. So, we'll specify a
| value to get prefixed to all our keys so we can avoid collisions.
|
*/
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'BukidBountyApp'), '_') . ':cache'),
];

9
config/cdn.php Normal file
View File

@@ -0,0 +1,9 @@
<?php
declare(strict_types=1);
return [
'repo' => 'telemagnadon/obj-vault-3a',
'sha' => '75a5d4f202f55d7a5fc5d7eb5a6037776dc865ef',
'base' => 'https://cdn.jsdelivr.net/gh/telemagnadon/obj-vault-3a@v2026.05.14-vendor-2',
];

6
config/commands.php Normal file
View File

@@ -0,0 +1,6 @@
<?php
declare(strict_types=1);
return [
];

161
config/database.php Normal file
View File

@@ -0,0 +1,161 @@
<?php
declare(strict_types=1);
use Hypervel\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Database Connection Name
|--------------------------------------------------------------------------
|
| Here you may specify which of the database connections below you wish
| to use as your default connection for database operations. This is
| the connection which will be utilized unless another connection
| is explicitly specified when you execute a query / statement.
|
*/
'default' => env('DB_CONNECTION', 'mysql'),
'connections' => [
'postgres' => [
'driver' => 'pgsql',
'host' => env('DB_PG_HOST', 'host.docker.internal'),
'port' => env('DB_PG_PORT', default: 5555),
'database' => env('DB_PG_DATABASE', 'bukid'),
'username' => env('DB_PG_USERNAME', 'postgres'),
'password' => env('DB_PG_PASSWORD', 'UMX0aCpOvcAeDA6fWPznWlAdKrtTUBjVWznCYDnYSJ6NsRV5WqT2CB9KWRkYRrF1'),
'charset' => env('DB_PG_CHARSET', 'utf8'),
'prefix' => env('DB_PG_PREFIX', ''),
'schema' => env('DB_PG_SCHEMA', 'bukidbounty'),
'sslmode' => env('DB_PG_SSLMODE', 'prefer'),
'pool' => [
'min_connections' => 1,
'max_connections' => 25,
'connect_timeout' => 10.0,
'wait_timeout' => 3.0,
'heartbeat' => -1,
'max_idle_time' => 60.0,
],
],
'mysql' => [
'driver' => env('DB_DRIVER', 'mysql'),
'host' => env('DB_HOST', 'og4wkgsokkscgswssoswk08s'),
'database' => env('DB_DATABASE', 'bukid'),
'port' => env('DB_PORT', 3306),
'username' => env('DB_USERNAME', 'bukid'),
'password' => env('DB_PASSWORD', 'aPAS62RYKwfg4Ddjifn2idIUDNoSQTUIjcFMMOK6CcNCp0devK9ODBiv3KpGwWu'), //TODO Change this password and Update Server coolify and also dbeaver
'charset' => env('DB_CHARSET', 'utf8mb4'),
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
'prefix' => env('DB_PREFIX', ''),
'pool' => [
'min_connections' => 1,
'max_connections' => 20,
'connect_timeout' => 10.0,
'wait_timeout' => 3.0,
'heartbeat' => -1,
'max_idle_time' => (float) env('DB_MAX_IDLE_TIME', 60),
],
],
'mysql_testing' => [
'driver' => env('DB_DRIVER', 'mysql'),
'host' => env('DB_HOST','ywskgowos4w4484og4k0s0os'),
'database' => env('DB_DATABASE', 'bukid'),
'port' => env('DB_PORT', 3306),
'username' => env('DB_USERNAME', 'bukid'),
'password' => env('DB_PASSWORD', 'FhhEImM9dKc4O9U7dIu7d5Ga2DcxMHA2ZvUqrg8Y6Ga60Lq3C7ji9GiqJ464nszh'), //TODO Change this password and Update Server coolify and also dbeaver
'charset' => env('DB_CHARSET', 'utf8mb4'),
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
'prefix' => env('DB_PREFIX', ''),
'pool' => [
'min_connections' => 1,
'max_connections' => 20,
'connect_timeout' => 10.0,
'wait_timeout' => 3.0,
'heartbeat' => -1,
'max_idle_time' => (float) env('DB_MAX_IDLE_TIME', 60),
],
],
'sqlite' => [
'driver' => 'sqlite',
'url' => env('DATABASE_URL'),
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
],
'sqlite_testing' => [
'driver' => 'sqlite',
'database' => ':memory:',
'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
],
],
/*
|--------------------------------------------------------------------------
| Migration Repository Table
|--------------------------------------------------------------------------
|
| This table keeps track of all the migrations that have already run for
| your application. Using this information, we can determine which of
| the migrations on disk haven't actually been run on the database.
|
*/
'migrations' => 'migrations',
/*
|--------------------------------------------------------------------------
| Redis Databases
|--------------------------------------------------------------------------
|
| Redis is an open source, fast, and advanced key-value store that also
| provides a richer body of commands than a typical key-value system
| such as Memcached. You may define your connection settings here.
|
*/
'redis' => [
'options' => [
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'BukidBountyApp'), '_') . '_database_'),
],
'default' => [
'host' => env('REDIS_HOST', 'host.docker.internal'),
'auth' => (env('REDIS_AUTH') ?: env('REDIS_PASSWORD')) ?: null,
'port' => (int) env('REDIS_PORT', 5433),
'db' => (int) env('REDIS_DB', 0),
'pool' => [
'min_connections' => 1,
'max_connections' => 10,
'connect_timeout' => 10.0,
'wait_timeout' => 3.0,
'heartbeat' => -1,
'max_idle_time' => (float) env('REDIS_MAX_IDLE_TIME', 60),
],
],
'queue' => [
'host' => env('REDIS_HOST', 'host.docker.internal'),
'auth' => (env('REDIS_AUTH') ?: env('REDIS_PASSWORD')) ?: null,
'port' => (int) env('REDIS_PORT', 5433),
'db' => (int) env('REDIS_DB', 0),
'pool' => [
'min_connections' => 1,
'max_connections' => 10,
'connect_timeout' => 10.0,
'wait_timeout' => 3.0,
'heartbeat' => -1,
'max_idle_time' => (float) env('REDIS_MAX_IDLE_TIME', 60),
],
],
],
];

6
config/dependencies.php Normal file
View File

@@ -0,0 +1,6 @@
<?php
declare(strict_types=1);
return [
];

83
config/devtool.php Normal file
View File

@@ -0,0 +1,83 @@
<?php
declare(strict_types=1);
return [
'generator' => [
'amqp' => [
'consumer' => [
'namespace' => 'App\Amqp\Consumers',
],
'producer' => [
'namespace' => 'App\Amqp\Producers',
],
],
'aspect' => [
'namespace' => 'App\Aspects',
],
'command' => [
'namespace' => 'App\Console\Commands',
],
'controller' => [
'namespace' => 'App\Http\Controllers',
],
'job' => [
'namespace' => 'App\Jobs',
],
'listener' => [
'namespace' => 'App\Listeners',
],
'middleware' => [
'namespace' => 'App\Http\Middleware',
],
'process' => [
'namespace' => 'App\Processes',
],
'request' => [
'namespace' => 'App\Http\Requests',
],
'model' => [
'namespace' => 'App\Models',
'uses' => App\Models\Model::class,
],
'factory' => [
'path' => 'database/factories',
],
'seeder' => [
'path' => 'database/seeders',
],
'event' => [
'namespace' => 'App\Events',
],
'provider' => [
'namespace' => 'App\Providers',
],
'component' => [
'namespace' => 'App\View\Component',
],
'channel' => [
'namespace' => 'App\Broadcasting',
'uses' => App\Models\User::class,
],
'observer' => [
'namespace' => 'App\Observers',
'model_namespace' => 'App\Models',
],
'mail' => [
'namespace' => 'App\Mail',
],
'notification' => [
'namespace' => 'App\Notifications',
],
'policy' => [
'namespace' => 'App\Policies',
'model_namespace' => 'App\Models',
],
'rule' => [
'namespace' => 'App\Rules',
],
'resource' => [
'namespace' => 'App\Http\Resources',
],
],
];

87
config/filesystems.php Normal file
View File

@@ -0,0 +1,87 @@
<?php
declare(strict_types=1);
return [
/*
|--------------------------------------------------------------------------
| Default Filesystem Disk
|--------------------------------------------------------------------------
|
| Here you may specify the default filesystem disk that should be used
| by the framework. The "local" disk, as well as a variety of cloud
| based disks are available to your application for file storage.
|
*/
'default' => env('FILESYSTEM_DISK', 'local'),
/*
|--------------------------------------------------------------------------
| Filesystem Disks
|--------------------------------------------------------------------------
|
| Below you may configure as many filesystem disks as necessary, and you
| may even configure multiple disks for the same driver. Examples for
| most supported storage drivers are configured here for reference.
|
| Supported drivers: "local", "ftp", "sftp", "s3"
|
*/
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app/private'),
'throw' => false,
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL') . '/storage',
'visibility' => 'public',
'throw' => false,
],
's3' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
'throw' => false,
'pool' => [
'min_objects' => 1,
'max_objects' => 10,
'wait_timeout' => 3.0,
'max_lifetime' => 60.0,
],
],
'gcs' => [
'driver' => 'gcs',
'key_file_path' => env('GOOGLE_CLOUD_KEY_FILE', null), // optional: /path/to/service-account.json
'key_file' => [], // optional: Array of data that substitutes the .json file (see below)
'project_id' => env('GOOGLE_CLOUD_PROJECT_ID', 'your-project-id'), // optional: is included in key file
'bucket' => env('GOOGLE_CLOUD_STORAGE_BUCKET', 'your-bucket'),
'path_prefix' => env('GOOGLE_CLOUD_STORAGE_PATH_PREFIX', ''), // optional: /default/path/to/apply/in/bucket
'storage_api_uri' => env('GOOGLE_CLOUD_STORAGE_API_URI', null), // see: Public URLs below
'api_endpoint' => env('GOOGLE_CLOUD_STORAGE_API_ENDPOINT', null), // set storageClient apiEndpoint
'visibility' => 'public', // optional: public|private
'visibility_handler' => null, // optional: set to \League\Flysystem\GoogleCloudStorage\UniformBucketLevelAccessVisibility::class to enable uniform bucket level access
'metadata' => ['cacheControl' => 'public,max-age=86400'], // optional: default metadata
'throw' => false,
'stream_reads' => false,
'pool' => [
'min_objects' => 1,
'max_objects' => 10,
'wait_timeout' => 3.0,
'max_lifetime' => 60.0,
],
],
],
];

52
config/hashing.php Normal file
View File

@@ -0,0 +1,52 @@
<?php
declare(strict_types=1);
return [
/*
|--------------------------------------------------------------------------
| Default Hash Driver
|--------------------------------------------------------------------------
|
| This option controls the default hash driver that will be used to hash
| passwords for your application. By default, the bcrypt algorithm is
| used; however, you remain free to modify this option if you wish.
|
| Supported: "bcrypt", "argon", "argon2id"
|
*/
'driver' => 'bcrypt',
/*
|--------------------------------------------------------------------------
| Bcrypt Options
|--------------------------------------------------------------------------
|
| Here you may specify the configuration options that should be used when
| passwords are hashed using the Bcrypt algorithm. This will allow you
| to control the amount of time it takes to hash the given password.
|
*/
'bcrypt' => [
'rounds' => env('BCRYPT_ROUNDS', 10),
],
/*
|--------------------------------------------------------------------------
| Argon Options
|--------------------------------------------------------------------------
|
| Here you may specify the configuration options that should be used when
| passwords are hashed using the Argon algorithm. These will allow you
| to control the amount of time it takes to hash the given password.
|
*/
'argon' => [
'memory' => 65536,
'threads' => 1,
'time' => 4,
],
];

11
config/hyperf.php Normal file
View File

@@ -0,0 +1,11 @@
<?php
declare(strict_types=1);
/*
* This file functions as config/config.php in original Hyperf framework.
* All the configs here will not include any prefixes.
* And all the configs in config/config.php are moved to config/app.php
* This file is only kept for the compatibility for root config design in Hyperf framework.
*/
return [
];

278
config/jwt.php Normal file
View File

@@ -0,0 +1,278 @@
<?php
declare(strict_types=1);
return [
/*
|--------------------------------------------------------------------------
| JWT Driver
|--------------------------------------------------------------------------
|
| The driver you are using to encode, decode and sign your
| JWT token, all the drivers must implement:
| Hypervel\JWT\Contracts\ProviderContract::class
|
*/
'driver' => env('JWT_DRIVER', 'lcobucci'),
/*
|--------------------------------------------------------------------------
| JWT Authentication Secret
|--------------------------------------------------------------------------
|
| Don't forget to set this in your .env file, as it will be used to sign
| your tokens.
|
| Note: This will be used for Symmetric algorithms only (HMAC),
| since RSA and ECDSA use a private/public key combo (See below).
|
*/
'secret' => env('JWT_SECRET'),
/*
|--------------------------------------------------------------------------
| JWT Authentication Keys
|--------------------------------------------------------------------------
|
| The algorithm you are using, will determine whether your tokens are
| signed with a random string (defined in `JWT_SECRET`) or using the
| following public & private keys.
|
| Symmetric Algorithms:
| HS256, HS384 & HS512 will use `JWT_SECRET`.
|
| Asymmetric Algorithms:
| RS256, RS384 & RS512 / ES256, ES384 & ES512 will use the keys below.
|
*/
'keys' => [
/*
|--------------------------------------------------------------------------
| Public Key
|--------------------------------------------------------------------------
|
| A path or resource to your public key.
|
| E.g. 'file://path/to/public/key'
|
*/
'public' => env('JWT_PUBLIC_KEY'),
/*
|--------------------------------------------------------------------------
| Private Key
|--------------------------------------------------------------------------
|
| A path or resource to your private key.
|
| E.g. 'file://path/to/private/key'
|
*/
'private' => env('JWT_PRIVATE_KEY'),
/*
|--------------------------------------------------------------------------
| Passphrase
|--------------------------------------------------------------------------
|
| The passphrase for your private key. Can be null if none set.
|
*/
'passphrase' => env('JWT_PASSPHRASE'),
],
/*
|--------------------------------------------------------------------------
| JWT time to live
|--------------------------------------------------------------------------
|
| Specify the length of time (in minutes) that the token will be valid for.
| Defaults to 1 hour.
|
| You can also set this to null, to yield a never expiring token.
| Some people may want this behaviour for e.g. a mobile app.
| This is not particularly recommended, so make sure you have appropriate
| systems in place to revoke the token if necessary.
| Notice: If you set this to null you should remove 'exp' element from 'required_claims' list.
|
*/
'ttl' => env('JWT_TTL', 120),
/*
|--------------------------------------------------------------------------
| Refresh time to live
|--------------------------------------------------------------------------
|
| Specify the length of time (in minutes) that the token can be refreshed
| within. I.E. The user can refresh their token within a 2 week window of
| the original token being created until they must re-authenticate.
| Defaults to 2 weeks.
|
| You can also set this to null, to yield an infinite refresh time.
| Some may want this instead of never expiring tokens for e.g. a mobile app.
| This is not particularly recommended, so make sure you have appropriate
| systems in place to revoke the token if necessary.
|
*/
'refresh_ttl' => env('JWT_REFRESH_TTL', 20160),
/*
|--------------------------------------------------------------------------
| JWT hashing algorithm
|--------------------------------------------------------------------------
|
| Specify the hashing algorithm that will be used to sign the token.
|
*/
'algo' => env('JWT_ALGO', Hypervel\JWT\Providers\Provider::ALGO_HS256),
/*
|--------------------------------------------------------------------------
| Validations
|--------------------------------------------------------------------------
|
| Sepcify default validations that jwt tokens.
|
*/
'validations' => [
\Hypervel\JWT\Validations\RequiredClaims::class ,
\Hypervel\JWT\Validations\ExpiredClaim::class ,
// \Hypervel\JWT\Validations\IssuedAtClaim::class,
// \Hypervel\JWT\Validations\NotBeforeCliam::class,
],
/*
|--------------------------------------------------------------------------
| Required Claims
|--------------------------------------------------------------------------
|
| Specify the required claims that must exist in any token.
| A TokenInvalidException will be thrown if any of these claims are not
| present in the payload.
|
*/
'required_claims' => [
// 'iss',
'iat',
// 'exp',
// 'nbf',
'sub',
// 'jti',
],
/*
|--------------------------------------------------------------------------
| Persistent Claims
|--------------------------------------------------------------------------
|
| Specify the claim keys to be persisted when refreshing a token.
| `sub` and `iat` will automatically be persisted, in
| addition to the these claims.
|
| Note: If a claim does not exist then it will be ignored.
|
*/
'persistent_claims' => [
// 'foo',
// 'bar',
],
/*
|--------------------------------------------------------------------------
| Leeway
|--------------------------------------------------------------------------
|
| This property gives the jwt timestamp claims some "leeway".
| Meaning that if you have any unavoidable slight clock skew on
| any of your servers then this will afford you some level of cushioning.
|
| This applies to the claims `iat`, `nbf` and `exp`.
|
| Specify in seconds - only if you know you need it.
|
*/
'leeway' => env('JWT_LEEWAY', 0),
/*
|--------------------------------------------------------------------------
| Blacklist Enabled
|--------------------------------------------------------------------------
|
| In order to invalidate tokens, you must have the blacklist enabled.
| If you do not want or need this functionality, then set this to false.
|
*/
'blacklist_enabled' => env('JWT_BLACKLIST_ENABLED', true),
/*
| -------------------------------------------------------------------------
| Blacklist Grace Period
| -------------------------------------------------------------------------
|
| When multiple concurrent requests are made with the same JWT,
| it is possible that some of them fail, due to token regeneration
| on every request.
|
| Set grace period in seconds to prevent parallel request failure.
|
*/
'blacklist_grace_period' => env('JWT_BLACKLIST_GRACE_PERIOD', 0),
/*
| -------------------------------------------------------------------------
| Refresh time to live of blacklist
| -------------------------------------------------------------------------
|
| Number of minutes from issue date in which a JWT can be refreshed.
|
*/
'blacklist_refresh_ttl' => env('JWT_BLACKLIST_REFRESH_TTL', 20160),
/*
|--------------------------------------------------------------------------
| Providers
|--------------------------------------------------------------------------
|
| Specify the various providers used throughout the package.
|
*/
'providers' => [
/*
|--------------------------------------------------------------------------
| JWT Provider
|--------------------------------------------------------------------------
|
| Specify the provider that is used to create and decode the tokens.
|
*/
'jwt' => Hypervel\JWT\Providers\Lcobucci::class ,
/*
|--------------------------------------------------------------------------
| Storage Provider
|--------------------------------------------------------------------------
|
| Specify the provider that is used to store tokens in the blacklist.
|
*/
'storage' => Hypervel\JWT\Storage\TaggedCache::class ,
],
];

7
config/listeners.php Normal file
View File

@@ -0,0 +1,7 @@
<?php
declare(strict_types=1);
return [
App\Listeners\ModelSavingListener::class,
];

140
config/logging.php Normal file
View File

@@ -0,0 +1,140 @@
<?php
declare(strict_types=1);
use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;
use Monolog\Processor\PsrLogMessageProcessor;
return [
/*
|--------------------------------------------------------------------------
| Default Log Channel
|--------------------------------------------------------------------------
|
| This option defines the default log channel that gets used when writing
| messages to the logs. The name specified in this option should match
| one of the channels defined in the "channels" configuration array.
|
*/
'default' => env('LOG_CHANNEL', 'stack'),
/*
|--------------------------------------------------------------------------
| Deprecations Log Channel
|--------------------------------------------------------------------------
|
| This option controls the log channel that should be used to log warnings
| regarding deprecated PHP and library features. This allows you to get
| your application ready for upcoming major versions of dependencies.
|
*/
'deprecations' => [
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
'trace' => false,
],
/*
|--------------------------------------------------------------------------
| Log Channels
|--------------------------------------------------------------------------
|
| Here you may configure the log channels for your application. Out of
| the box, Laravel uses the Monolog PHP logging library. This gives
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Drivers: "single", "daily", "slack", "syslog",
| "errorlog", "monolog",
| "custom", "stack"
|
*/
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => ['single'],
'ignore_exceptions' => false,
],
'single' => [
'driver' => 'single',
'path' => storage_path('logs/hypervel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'replace_placeholders' => true,
],
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/hypervel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'days' => 14,
'replace_placeholders' => true,
],
'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => 'Laravel Log',
'emoji' => ':boom:',
'level' => env('LOG_LEVEL', 'critical'),
'replace_placeholders' => true,
],
'papertrail' => [
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'),
'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
'connectionString' => 'tls://' . env('PAPERTRAIL_URL') . ':' . env('PAPERTRAIL_PORT'),
],
'processors' => [PsrLogMessageProcessor::class],
],
'stdout' => [
'driver' => 'monolog',
'handler' => StreamHandler::class,
'formatter' => env('LOG_STDOUT_FORMATTER'),
'with' => [
'stream' => 'php://stdout',
],
],
'stderr' => [
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'),
'handler' => StreamHandler::class,
'formatter' => env('LOG_STDERR_FORMATTER'),
'with' => [
'stream' => 'php://stderr',
],
'processors' => [PsrLogMessageProcessor::class],
],
'syslog' => [
'driver' => 'syslog',
'level' => env('LOG_LEVEL', 'debug'),
'facility' => LOG_USER,
'replace_placeholders' => true,
],
'errorlog' => [
'driver' => 'errorlog',
'level' => env('LOG_LEVEL', 'debug'),
'replace_placeholders' => true,
],
'null' => [
'driver' => 'monolog',
'handler' => NullHandler::class,
],
'emergency' => [
'path' => storage_path('logs/hypervel.log'),
],
],
];

133
config/mail.php Normal file
View File

@@ -0,0 +1,133 @@
<?php
declare(strict_types=1);
return [
/*
|--------------------------------------------------------------------------
| Default Mailer
|--------------------------------------------------------------------------
|
| This option controls the default mailer that is used to send all email
| messages unless another mailer is explicitly specified when sending
| the message. All additional mailers can be configured within the
| "mailers" array. Examples of each type of mailer are provided.
|
*/
'default' => env('MAIL_MAILER', 'log'),
/*
|--------------------------------------------------------------------------
| Mailer Configurations
|--------------------------------------------------------------------------
|
| Here you may configure all of the mailers used by your application plus
| their respective settings. Several examples have been configured for
| you and you are free to add your own as your application requires.
|
| Hypervel supports a variety of mail "transport" drivers that can be used
| when delivering an email. You may specify which one you're using for
| your mailers below. You may also add additional mailers if needed.
|
| Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2",
| "postmark", "resend", "log", "array",
| "failover", "roundrobin"
|
*/
'mailers' => [
'smtp' => [
'transport' => 'smtp',
'url' => env('MAIL_URL'),
'host' => env('MAIL_HOST', '127.0.0.1'),
'port' => env('MAIL_PORT', 2525),
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'timeout' => null,
'local_domain' => env('MAIL_EHLO_DOMAIN', parse_url(env('APP_URL', 'http://localhost'), PHP_URL_HOST)),
],
'ses' => [
'transport' => 'ses',
],
'postmark' => [
'transport' => 'postmark',
// 'message_stream_id' => env('POSTMARK_MESSAGE_STREAM_ID'),
// 'client' => [
// 'timeout' => 5,
// ],
],
'resend' => [
'transport' => 'resend',
],
'sendmail' => [
'transport' => 'sendmail',
'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'),
],
'log' => [
'transport' => 'log',
'channel' => env('MAIL_LOG_CHANNEL'),
],
'array' => [
'transport' => 'array',
],
'failover' => [
'transport' => 'failover',
'mailers' => [
'smtp',
'log',
],
],
'roundrobin' => [
'transport' => 'roundrobin',
'mailers' => [
'ses',
'postmark',
],
],
],
/*
|--------------------------------------------------------------------------
| Global "From" Address
|--------------------------------------------------------------------------
|
| You may wish for all emails sent by your application to be sent from
| the same address. Here you may specify a name and address that is
| used globally for all emails that are sent by your application.
|
*/
'from' => [
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
'name' => env('MAIL_FROM_NAME', 'Example'),
],
/*
|--------------------------------------------------------------------------
| Markdown Mail Settings
|--------------------------------------------------------------------------
|
| If you are using Markdown based email rendering, you may configure your
| theme and component paths here, allowing you to customize the design
| of the emails. Or, you may simply stick with the Laravel defaults!
|
*/
'markdown' => [
'theme' => 'default',
'paths' => [
resource_path('views/vendor/mail'),
],
],
];

View File

@@ -0,0 +1,103 @@
<?php
declare(strict_types=1);
$CategoryAndSubCategoryList = [
"Food & Beverage" => [
"Grains",
"Oilseeds",
"Sugar",
"Coffee",
"Cocoa",
"Livestock",
"Dairy Products",
],
"Packaged Foods" => [
"Canned goods",
"Snacks",
"Frozen meals",
"Breakfast cereals",
"Sauces",
"Condiments",
],
"Beverages" => [
"Soft drinks",
"Juices",
"Bottled water",
"Alcoholic beverages",
"Tea",
"Coffee",
],
"Produce" => ["Fruits", "Vegetables", "Herbs"],
"Personal Care & Cosmetics" => [
"Skincare",
"Haircare",
"Makeup",
"Fragrances",
"Toiletries",
],
"Household Goods" => [
"Cleaning supplies",
"Laundry detergents",
"Paper products",
"Kitchenware",
"Home décor",
"Furniture",
],
"Apparel & Footwear" => [
"Clothing",
"Shoes",
"Accessories",
],
"Electronics" => [
"Smartphones",
"Computers",
"Televisions",
"Cameras",
"Audio equipment",
"Appliances",
],
"Toys & Games" => [
"Board games",
"Video games",
"Dolls",
"Action figures",
"Puzzles",
],
"Books & Stationery" => [
"Novels",
"Textbooks",
"Notebooks",
"Pens",
"Pencils",
],
"Health & Wellness" => [
"Vitamins",
"Supplements",
"Over-the-counter medications",
"Fitness equipment",
],
"Industrial Goods" => [
"Raw Materials",
'Components & Parts',
'Machinery & Equipment',
'Chemicals'
],
"Services" => [
"Financial Services",
"Telecommunications",
"Transportation",
"Healthcare",
"Education",
"Software & Technology Services",
],
"Agricultural Products" => ["Flowers", "Nursery stock", "Animal feed"],
];
return $CategoryAndSubCategoryList;

View File

@@ -0,0 +1,39 @@
<?php
declare(strict_types=1);
return [
"Agriculture" => [
"Livestock",
"Grains & Seeds",
"Produce",
"Agricultural Machinery",
"Fertilizers & Pesticides",
],
"Retail" => [
"Groceries",
"Apparel",
"Electronics",
"Household Items",
"Personal Care",
],
"Services" => [
"Consultancy",
"Maintenance & Repair",
"Logistics",
"Marketing",
],
"Technology" => [
"Software Development",
"IT Support",
"Electronics Manufacturing",
],
"Education" => [
"Online Courses",
"Training Centers",
"Educational Materials",
],
"General" => [
"Miscellaneous",
],
];

210
config/modules.php Normal file
View File

@@ -0,0 +1,210 @@
<?php
declare(strict_types=1);
/**
* Module Configuration
*
* Each module can be enabled or disabled via environment variables.
* All modules default to true (enabled) when the env variable is not set.
*
* Usage:
* - Set MODULE_<NAME>_ENABLED=false in .env to disable a module.
* - The middleware 'module:<key>' can be applied to route groups.
* - Use App\Support\ModuleHelper::isEnabled('key') in code.
*/
return [
/*
|--------------------------------------------------------------------------
| Master System Toggle
|--------------------------------------------------------------------------
| If set to false, all module-specific middleware checks will be bypassed.
| Useful for development or full-feature environments.
*/
'system_enabled' => (bool) env('MODULES_SYSTEM_ENABLED', true),
/*
|--------------------------------------------------------------------------
| POS (Point of Sale)
|--------------------------------------------------------------------------
| Includes: POS terminal, sessions, item management, stats, access keys
*/
'pos' => [
'enabled' => (bool) env('MODULE_POS_ENABLED', true),
'label' => 'Point of Sale (POS)',
'description' => 'POS terminal operations, sessions, sales, and access keys.',
],
/*
|--------------------------------------------------------------------------
| Products
|--------------------------------------------------------------------------
| Includes: Product CRUD, categories, store assignments, batch add
*/
'products' => [
'enabled' => (bool) env('MODULE_PRODUCTS_ENABLED', true),
'label' => 'Product Management',
'description' => 'Product creation, editing, categories, and store assignments.',
],
/*
|--------------------------------------------------------------------------
| Stores
|--------------------------------------------------------------------------
| Includes: Store CRUD, management, product removal from store
*/
'stores' => [
'enabled' => (bool) env('MODULE_STORES_ENABLED', true),
'label' => 'Store Management',
'description' => 'Store creation, editing, and product-store relationships.',
],
/*
|--------------------------------------------------------------------------
| Shipments
|--------------------------------------------------------------------------
| Includes: Shipment tracking, couriers, status updates
*/
'shipments' => [
'enabled' => (bool) env('MODULE_SHIPMENTS_ENABLED', true),
'label' => 'Shipments & Logistics',
'description' => 'Shipment tracking, courier management, and delivery status.',
],
/*
|--------------------------------------------------------------------------
| Farmers
|--------------------------------------------------------------------------
| Includes: Farmer registration, listing, verification, organizations
*/
'farmers' => [
'enabled' => (bool) env('MODULE_FARMERS_ENABLED', true),
'label' => 'Farmer Management',
'description' => 'Farmer registration, profile management, and verification.',
],
/*
|--------------------------------------------------------------------------
| Cooperatives
|--------------------------------------------------------------------------
| Includes: Cooperative CRUD, members, documents, governance, chapters
*/
'cooperatives' => [
'enabled' => (bool) env('MODULE_COOPERATIVES_ENABLED', true),
'label' => 'Cooperatives & Organizations',
'description' => 'Cooperative management, membership, documents, and governance.',
],
/*
|--------------------------------------------------------------------------
| Accounting
|--------------------------------------------------------------------------
| Includes: Account trees, transactions, daily entries, reports
*/
'accounting' => [
'enabled' => (bool) env('MODULE_ACCOUNTING_ENABLED', true),
'label' => 'Accounting & Finance',
'description' => 'Chart of accounts, transaction records, and financial reports.',
],
/*
|--------------------------------------------------------------------------
| Store-Level Accounting
|--------------------------------------------------------------------------
| Controls whether Store Owner / Store Manager can access the Accounting
| Dashboard and Manage Accounts pages. Big 3 are never affected by this.
| Toggle via UltimateConsole → Module Controls at runtime.
*/
'accounting_store' => [
'enabled' => (bool) env('MODULE_ACCOUNTING_STORE_ENABLED', true),
'label' => 'Store Accounting Access',
'description' => 'Grants Store Owner and Store Manager access to the Accounting Dashboard and their store\'s Chart of Accounts. Disable to hide accounting from store-level users.',
],
/*
|--------------------------------------------------------------------------
| Transactions
|--------------------------------------------------------------------------
| Includes: Global transaction listing, creation, types
*/
'transactions' => [
'enabled' => (bool) env('MODULE_TRANSACTIONS_ENABLED', true),
'label' => 'Global Transactions',
'description' => 'System-wide transaction recording and listing.',
],
/*
|--------------------------------------------------------------------------
| Properties
|--------------------------------------------------------------------------
| Includes: Property listing, referrals
*/
'properties' => [
'enabled' => (bool) env('MODULE_PROPERTIES_ENABLED', true),
'label' => 'Property Management',
'description' => 'Property listings, referrals, and lead management.',
],
/*
|--------------------------------------------------------------------------
| Cart
|--------------------------------------------------------------------------
| Includes: Shopping cart operations
*/
'cart' => [
'enabled' => (bool) env('MODULE_CART_ENABLED', true),
'label' => 'Shopping Cart',
'description' => 'Cart operations for the marketplace.',
],
/*
|--------------------------------------------------------------------------
| Credits / Wallet
|--------------------------------------------------------------------------
| Includes: Top-up, transfer credit, wallet data
*/
'credits' => [
'enabled' => (bool) env('MODULE_CREDITS_ENABLED', true),
'label' => 'Credits & Wallet',
'description' => 'Credit top-up, transfers, and wallet management.',
],
/*
|--------------------------------------------------------------------------
| Landing Pages
|--------------------------------------------------------------------------
| Includes: Landing page editor, public rendering
*/
'landing_pages' => [
'enabled' => (bool) env('MODULE_LANDING_PAGES_ENABLED', true),
'label' => 'Landing Pages',
'description' => 'Custom landing page creation and management.',
],
/*
|--------------------------------------------------------------------------
| Announcements
|--------------------------------------------------------------------------
| Includes: Announcement CRUD, latest public announcements
*/
'announcements' => [
'enabled' => (bool) env('MODULE_ANNOUNCEMENTS_ENABLED', true),
'label' => 'Announcements',
'description' => 'System-wide announcements and notifications.',
],
/*
|--------------------------------------------------------------------------
| Batch Operations
|--------------------------------------------------------------------------
| Includes: Batch creation of products, stores, users
*/
'batch' => [
'enabled' => (bool) env('MODULE_BATCH_ENABLED', true),
'label' => 'Batch Operations',
'description' => 'Bulk creation of products, stores, and user accounts.',
],
];

6
config/processes.php Normal file
View File

@@ -0,0 +1,6 @@
<?php
declare(strict_types=1);
return [
];

137
config/queue.php Normal file
View File

@@ -0,0 +1,137 @@
<?php
declare(strict_types=1);
return [
/*
|--------------------------------------------------------------------------
| Default Queue Connection Name
|--------------------------------------------------------------------------
|
| Hypervel's queue supports a variety of backends via a single, unified
| API, giving you convenient access to each backend using identical
| syntax for each. The default queue connection is defined below.
|
*/
'default' => env('QUEUE_CONNECTION', 'database'),
/*
|--------------------------------------------------------------------------
| Concurrency Number
|--------------------------------------------------------------------------
|
| This value determines the number of jobs that will be processed at once
| by every worker.
|
*/
'concurrency_number' => env('QUEUE_CONCURRENCY_NUMBER', 1),
/*
|--------------------------------------------------------------------------
| Queue Connections
|--------------------------------------------------------------------------
|
| Here you may configure the connection options for every queue backend
| used by your application. An example configuration is provided for
| each backend supported by Hypervel. You're also free to add more.
|
| Drivers: "sync", "defer", "database", "beanstalkd", "sqs", "redis", "null"
|
*/
'connections' => [
'sync' => [
'driver' => 'sync',
],
'defer' => [
'driver' => 'defer',
],
'database' => [
'driver' => 'database',
'connection' => env('DB_QUEUE_CONNECTION'),
'table' => env('DB_QUEUE_TABLE', 'jobs'),
'queue' => env('DB_QUEUE', 'default'),
'retry_after' => (int) env('DB_QUEUE_RETRY_AFTER', 90),
'after_commit' => false,
],
'beanstalkd' => [
'driver' => 'beanstalkd',
'host' => env('BEANSTALKD_QUEUE_HOST', 'localhost'),
'queue' => env('BEANSTALKD_QUEUE', 'default'),
'retry_after' => (int) env('BEANSTALKD_QUEUE_RETRY_AFTER', 90),
'block_for' => 0,
'after_commit' => false,
'pool' => [
'min_objects' => 1,
'max_objects' => 10,
'wait_timeout' => 3.0,
'max_lifetime' => 60.0,
],
],
'sqs' => [
'driver' => 'sqs',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
'queue' => env('SQS_QUEUE', 'default'),
'suffix' => env('SQS_SUFFIX'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'after_commit' => false,
'pool' => [
'min_objects' => 1,
'max_objects' => 10,
'wait_timeout' => 3.0,
'max_lifetime' => 60.0,
],
],
'redis' => [
'driver' => 'redis',
'connection' => env('REDIS_QUEUE_CONNECTION', 'default'),
'queue' => env('REDIS_QUEUE', 'default'),
'retry_after' => (int) env('REDIS_QUEUE_RETRY_AFTER', 90),
'block_for' => null,
'after_commit' => false,
],
],
/*
|--------------------------------------------------------------------------
| Job Batching
|--------------------------------------------------------------------------
|
| The following options configure the database and table that store job
| batching information. These options can be updated to any database
| connection and table which has been defined by your application.
|
*/
'batching' => [
'database' => env('DB_CONNECTION', 'sqlite'),
'table' => 'job_batches',
],
/*
|--------------------------------------------------------------------------
| Failed Queue Jobs
|--------------------------------------------------------------------------
|
| These options configure the behavior of failed queue job logging so you
| can control how and where failed jobs are stored. Hypervel ships with
| support for storing failed jobs in a simple file or in a database.
|
| Supported drivers: "database-uuids", "dynamodb", "file", "null"
|
*/
'failed' => [
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
'database' => env('DB_CONNECTION', 'sqlite'),
'table' => 'failed_jobs',
],
];

46
config/server.php Normal file
View File

@@ -0,0 +1,46 @@
<?php
declare(strict_types=1);
use App\Http\Kernel as HttpKernel;
use Hyperf\Server\Event;
use Hyperf\Server\Server;
use Swoole\Constant;
return [
'mode' => SWOOLE_PROCESS,
'servers' => [
[
'name' => 'http',
'type' => Server::SERVER_HTTP,
'host' => env('HTTP_SERVER_HOST', '0.0.0.0'),
'port' => (int) env('HTTP_SERVER_PORT', 9501),
'sock_type' => SWOOLE_SOCK_TCP,
'callbacks' => [
Event::ON_REQUEST => [HttpKernel::class, 'onRequest'],
],
],
],
'kernels' => [
'http' => HttpKernel::class,
],
'settings' => [
'document_root' => base_path('public'),
'enable_static_handler' => true,
Constant::OPTION_ENABLE_COROUTINE => true,
Constant::OPTION_WORKER_NUM => env('SERVER_WORKERS_NUMBER', swoole_cpu_num()),
Constant::OPTION_PID_FILE => base_path('runtime/hypervel.pid'),
Constant::OPTION_OPEN_TCP_NODELAY => true,
Constant::OPTION_MAX_COROUTINE => 100000,
Constant::OPTION_OPEN_HTTP2_PROTOCOL => true,
Constant::OPTION_MAX_REQUEST => 100000,
Constant::OPTION_SOCKET_BUFFER_SIZE => 20 * 1024 * 1024,
Constant::OPTION_BUFFER_OUTPUT_SIZE => 20 * 1024 * 1024,
Constant::OPTION_PACKAGE_MAX_LENGTH => 50 * 1024 * 1024
],
'callbacks' => [
Event::ON_WORKER_START => [Hyperf\Framework\Bootstrap\WorkerStartCallback::class, 'onWorkerStart'],
Event::ON_PIPE_MESSAGE => [Hyperf\Framework\Bootstrap\PipeMessageCallback::class, 'onPipeMessage'],
Event::ON_WORKER_EXIT => [Hyperf\Framework\Bootstrap\WorkerExitCallback::class, 'onWorkerExit'],
],
];

38
config/services.php Normal file
View File

@@ -0,0 +1,38 @@
<?php
declare(strict_types=1);
return [
/*
|--------------------------------------------------------------------------
| Third Party Services
|--------------------------------------------------------------------------
|
| This file is for storing the credentials for third party services such
| as Mailgun, Postmark, AWS and more. This file provides the de facto
| location for this type of information, allowing packages to have
| a conventional file to locate the various service credentials.
|
*/
'postmark' => [
'token' => env('POSTMARK_TOKEN'),
],
'ses' => [
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],
'resend' => [
'key' => env('RESEND_KEY'),
],
'slack' => [
'notifications' => [
'bot_user_oauth_token' => env('SLACK_BOT_USER_OAUTH_TOKEN'),
'channel' => env('SLACK_BOT_USER_DEFAULT_CHANNEL'),
],
],
];

216
config/session.php Normal file
View File

@@ -0,0 +1,216 @@
<?php
declare(strict_types=1);
use Hypervel\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Session Driver
|--------------------------------------------------------------------------
|
| This option determines the default session driver that is utilized for
| incoming requests. Laravel supports a variety of storage options to
| persist session data. Database storage is a great default choice.
|
| Supported: "file", "cookie", "database", "redis", "array"
|
*/
'driver' => env('SESSION_DRIVER', 'redis'),
/*
|--------------------------------------------------------------------------
| Session Lifetime
|--------------------------------------------------------------------------
|
| Here you may specify the number of minutes that you wish the session
| to be allowed to remain idle before it expires. If you want them
| to expire immediately when the browser is closed then you may
| indicate that via the expire_on_close configuration option.
|
*/
'lifetime' => (int) env('SESSION_LIFETIME', 120),
'expire_on_close' => env('SESSION_EXPIRE_ON_CLOSE', false),
/*
|--------------------------------------------------------------------------
| Session Encryption
|--------------------------------------------------------------------------
|
| This option allows you to easily specify that all of your session data
| should be encrypted before it's stored. All encryption is performed
| automatically by Hypervel and you may use the session like normal.
|
*/
'encrypt' => env('SESSION_ENCRYPT', false),
/*
|--------------------------------------------------------------------------
| Session File Location
|--------------------------------------------------------------------------
|
| When utilizing the "file" session driver, the session files are placed
| on disk. The default storage location is defined here; however, you
| are free to provide another location where they should be stored.
|
*/
'files' => storage_path('framework/sessions'),
/*
|--------------------------------------------------------------------------
| Session Database Connection
|--------------------------------------------------------------------------
|
| When using the "database" or "redis" session drivers, you may specify a
| connection that should be used to manage these sessions. This should
| correspond to a connection in your database configuration options.
|
*/
'connection' => env('SESSION_CONNECTION','default'),
/*
|--------------------------------------------------------------------------
| Session Database Table
|--------------------------------------------------------------------------
|
| When using the "database" session driver, you may specify the table to
| be used to store sessions. Of course, a sensible default is defined
| for you; however, you're welcome to change this to another table.
|
*/
'table' => env('SESSION_TABLE', 'sessions'),
/*
|--------------------------------------------------------------------------
| Session Cache Store
|--------------------------------------------------------------------------
|
| When using one of the framework's cache driven session backends, you may
| define the cache store which should be used to store the session data
| between requests. This must match one of your defined cache stores.
|
| Affects: "redis"
|
*/
'store' => env('SESSION_STORE'),
/*
|--------------------------------------------------------------------------
| Session Sweeping Lottery
|--------------------------------------------------------------------------
|
| Some session drivers must manually sweep their storage location to get
| rid of old sessions from storage. Here are the chances that it will
| happen on a given request. By default, the odds are 2 out of 100.
|
*/
'lottery' => [2, 100],
/*
|--------------------------------------------------------------------------
| Session Cookie Name
|--------------------------------------------------------------------------
|
| Here you may change the name of the session cookie that is created by
| the framework. Typically, you should not need to change this value
| since doing so does not grant a meaningful security improvement.
|
*/
'cookie' => env(
'SESSION_COOKIE',
Str::slug(env('APP_NAME', 'BukidBountyApp'), '_') . ':session'
),
/*
|--------------------------------------------------------------------------
| Session Cookie Path
|--------------------------------------------------------------------------
|
| The session cookie path determines the path for which the cookie will
| be regarded as available. Typically, this will be the root path of
| your application, but you're free to change this when necessary.
|
*/
'path' => env('SESSION_PATH', '/'),
/*
|--------------------------------------------------------------------------
| Session Cookie Domain
|--------------------------------------------------------------------------
|
| This value determines the domain and subdomains the session cookie is
| available to. By default, the cookie will be available to the root
| domain and all subdomains. Typically, this shouldn't be changed.
|
*/
'domain' => env('SESSION_DOMAIN'),
/*
|--------------------------------------------------------------------------
| HTTPS Only Cookies
|--------------------------------------------------------------------------
|
| By setting this option to true, session cookies will only be sent back
| to the server if the browser has a HTTPS connection. This will keep
| the cookie from being sent to you when it can't be done securely.
|
*/
'secure' => env('SESSION_SECURE_COOKIE'),
/*
|--------------------------------------------------------------------------
| HTTP Access Only
|--------------------------------------------------------------------------
|
| Setting this value to true will prevent JavaScript from accessing the
| value of the cookie and the cookie will only be accessible through
| the HTTP protocol. It's unlikely you should disable this option.
|
*/
'http_only' => env('SESSION_HTTP_ONLY', true),
/*
|--------------------------------------------------------------------------
| Same-Site Cookies
|--------------------------------------------------------------------------
|
| This option determines how your cookies behave when cross-site requests
| take place, and can be used to mitigate CSRF attacks. By default, we
| will set this value to "lax" to permit secure cross-site requests.
|
| See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value
|
| Supported: "lax", "strict", "none", null
|
*/
'same_site' => env('SESSION_SAME_SITE', 'lax'),
/*
|--------------------------------------------------------------------------
| Partitioned Cookies
|--------------------------------------------------------------------------
|
| Setting this value to true will tie the cookie to the top-level site for
| a cross-site context. Partitioned cookies are accepted by the browser
| when flagged "secure" and the Same-Site attribute is set to "none".
|
*/
'partitioned' => env('SESSION_PARTITIONED_COOKIE', false),
];

11
config/signal.php Normal file
View File

@@ -0,0 +1,11 @@
<?php
declare(strict_types=1);
return [
'handlers' => [
// \Hypervel\Foundation\Signal\WorkerStopHandler::class,
// \Hyperf\Process\Handler\ProcessStopHandler::class,
],
'timeout' => 5.0,
];

20
config/view.php Normal file
View File

@@ -0,0 +1,20 @@
<?php
declare(strict_types=1);
use Hyperf\View\Mode;
use Hyperf\ViewEngine\HyperfViewEngine;
return [
'engine' => HyperfViewEngine::class,
'mode' => Mode::SYNC,
'config' => [
'view_path' => base_path('resources/views'),
'cache_path' => storage_path('framework/views'),
],
'event' => [
'enable' => false,
],
'components' => [
],
];

17
config/watcher.php Normal file
View File

@@ -0,0 +1,17 @@
<?php
declare(strict_types=1);
use Hyperf\Watcher\Driver\ScanFileDriver;
return [
'driver' => ScanFileDriver::class,
'bin' => PHP_BINARY,
'command' => 'artisan serve',
'watch' => [
'dir' => ['app', 'config', 'routes', 'resources'],
'file' => ['.env'],
'scan_interval' => 2000,
],
'ext' => ['.php', '.env'],
];