Skip to content

Commit

Permalink
feat : bootstrap app
Browse files Browse the repository at this point in the history
  • Loading branch information
bxel07 committed Apr 22, 2024
1 parent dfac79d commit f420144
Show file tree
Hide file tree
Showing 39 changed files with 2,232 additions and 479 deletions.
5 changes: 4 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
NAME=yogi
BUILD=dev
BUILD=dev
CSRF_SECRET_KEY="dara"
GEMSTONE_SECRET=c6ee9e3efac2a6b4a47fdfa4a4dbef77ca3e45aa8dab8ca07c181373dea2f90e
GEMSTONE_ALGO=HS256
13 changes: 10 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
},
"files": [
"setup/Dock/DockEntry.php",
"devise/Service/AppClassBinder/ServiceRegister.php"
"devise/AppClassBinder/ServiceRegister.php",
"devise/Service/Gemstone/Csrf_Token_Producer.php"
]
},
"require": {
Expand All @@ -25,7 +26,13 @@
"xel/logger": "dev-main",
"symfony/console": "7.1.x-dev",
"vlucas/phpdotenv": "^5.6@dev",
"ext-pdo": "*"
"ext-pdo": "*",
"ext-memcached": "*",
"firebase/php-jwt": "dev-main",
"swoole/ide-helper": "@dev"
},
"minimum-stability": "dev"
"minimum-stability": "dev",
"scripts": {
"watcher-css": "./tailwindcss -i ./public/css/input.css -o ./public/css/output.css --watch"
}
}
17 changes: 17 additions & 0 deletions devise/AbstractService.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace Xel\Devise;

use DI\Container;
use Swoole\Http\Request;
use Xel\Async\CentralManager\CentralManagerRunner;
use Xel\Devise\Service\Gemstone\DataProcessor;
use Xel\Devise\Service\Gemstone\FileProcessor;

abstract class AbstractService
{
use DataProcessor, FileProcessor;
public Request $serverRequest;
public Container $container;
public CentralManagerRunner $return;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

namespace Xel\Devise\Service\AppClassBinder;
use Xel\Devise\BaseData\Projects;
use Xel\Devise\Service\Console\CreateConsole;
use Xel\Devise\Service\Console\CreateMigration;
use Xel\Devise\Service\Console\MiddlewareGenerator;
Expand All @@ -15,28 +16,30 @@
use Xel\Devise\Service\Console\RouterList;
use Xel\Devise\Service\Console\RouterRegenerate;
use Xel\Devise\Service\Console\ServerCommand;
use Xel\Devise\Service\Middleware\CorsMiddleware;
use Xel\Devise\Service\Console\TokenGeneratorConsole;
use Xel\Devise\Service\RestApi\Authentication;
use Xel\Devise\Service\RestApi\sample;
use Xel\Devise\Service\RestApi\Service;


function serviceRegister(): array
{
return [
Service::class,
Authentication::class,
sample::class
];
}

function serviceModelRegister(): array
{
return [

"projects" => Projects::class
];
}

function serviceMiddlewareGlobals(): array
{
return [
CorsMiddleware::class
];
}

Expand All @@ -56,6 +59,7 @@ function serviceConsoleRegister():array
MigrationMigrateFresh::class,
MigrationRollback::class,
MigrationDrop::class,
CreateMigration::class
CreateMigration::class,
TokenGeneratorConsole::class
];
}
34 changes: 34 additions & 0 deletions devise/BaseData/Projects.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

namespace Xel\Devise\BaseData;
use Exception;
use Xel\DB\QueryBuilder\QueryDML;

class Projects
{
public string $table = 'projects';
public array $permitted = [
'user_id',
'project_title',
'deadline',
'description',
'reward_point',
'file',
'status',
];
public function __construct(private readonly QueryDML $queryDML)
{}

/**
* @throws Exception
*/
public function selectAll(): array
{
return $this
->queryDML
->select($this->permitted)
->from($this->table)
->get();
}

}
143 changes: 0 additions & 143 deletions devise/BaseData/QueryHelper/ORM.php

This file was deleted.

11 changes: 0 additions & 11 deletions devise/BaseData/Users.php

This file was deleted.

Loading

0 comments on commit f420144

Please sign in to comment.