prod setup

This commit is contained in:
Joey Kimsey
2025-01-14 05:09:01 -05:00
parent 9d53ddbd94
commit 58b4ffe3af
29 changed files with 772 additions and 35 deletions

View File

@ -24,6 +24,7 @@ class Auth extends ApiController {
self::$tokens = new Token;
}
/**
public function refresh() {
$token = self::$tokens->refresh( self::$authToken->ID );
if ( empty( $token ) ) {
@ -35,4 +36,5 @@ class Auth extends ApiController {
}
Views::view( 'api.response', ['response' => json_encode( [ $responseType => $response ], true )]);
}
*/
}

View File

@ -31,6 +31,7 @@ class Login extends ApiController {
Template::addHeader( 'Content-Type: application/json; charset=utf-8' );
}
/**
public function index() {
if ( ! Forms::check( 'apiLogin' ) ) {
$responseType = 'error';
@ -47,4 +48,5 @@ class Login extends ApiController {
$token = self::$tokens->findOrCreateUserToken( $user->ID, true );
return Views::view( 'api.response', ['response' => json_encode( [ $responseType => $token ], true )]);
}
*/
}

View File

@ -23,6 +23,13 @@ class Users extends ApiController {
self::$user = new User;
}
/**
* This is actually just for testing. It can provide attack information in the way of user count if not disabled.
*
* @param [type] $id
* @return void
*/
/**
public function find( $id = null ) {
$user = self::$user->get( $id );
if ( ! $user ) {
@ -34,4 +41,5 @@ class Users extends ApiController {
}
Views::view( 'api.response', ['response' => json_encode( [ $responseType => $response ], true )]);
}
*/
}

View File

@ -0,0 +1,47 @@
<?php
/**
* app/controllers/bedrock.php
*
* This is the bedrock controller.
*
* @version 3.0
* @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE]
*/
namespace TheTempusProject\Controllers;
use TheTempusProject\Hermes\Functions\Redirect;
use TheTempusProject\Bedrock\Functions\Session;
use TheTempusProject\Bedrock\Functions\Check;
use TheTempusProject\Bedrock\Functions\Input;
use TheTempusProject\Hermes\Functions\Route as Routes;
use TheTempusProject\Houdini\Classes\Issues;
use TheTempusProject\Houdini\Classes\Views;
use TheTempusProject\Houdini\Classes\Components;
use TheTempusProject\Houdini\Classes\Template;
use TheTempusProject\Classes\Controller;
use TheTempusProject\Classes\Forms;
use TheTempusProject\TheTempusProject as App;
class Bedrock extends Controller {
public function index() {
self::$title = '{SITENAME} - Bedrock';
self::$pageDescription = 'Bedrock is a dependency of {SITENAME} that provides many components used to manipulate database data and many helper functions vital for running the entire application.';
Views::view( 'deps.bedrock' );
}
public function packagist() {
Redirect::external( 'https://packagist.org/packages/thetempusproject/bedrock' );
}
public function git() {
Redirect::external( 'https://git.thetempusproject.com/the-tempus-project/bedrock' );
}
public function changes() {
self::$title = '{SITENAME} - Bedrock Changes';
self::$pageDescription = 'Bedrock is a dependency of {SITENAME} and this pages lists the most recent changes with some details on those changes.';
Views::view( 'changes.bedrock' );
}
}

View File

@ -0,0 +1,47 @@
<?php
/**
* app/controllers/canary.php
*
* This is the canary controller.
*
* @version 3.0
* @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE]
*/
namespace TheTempusProject\Controllers;
use TheTempusProject\Hermes\Functions\Redirect;
use TheTempusProject\Bedrock\Functions\Session;
use TheTempusProject\Bedrock\Functions\Check;
use TheTempusProject\Bedrock\Functions\Input;
use TheTempusProject\Hermes\Functions\Route as Routes;
use TheTempusProject\Houdini\Classes\Issues;
use TheTempusProject\Houdini\Classes\Views;
use TheTempusProject\Houdini\Classes\Components;
use TheTempusProject\Houdini\Classes\Template;
use TheTempusProject\Classes\Controller;
use TheTempusProject\Classes\Forms;
use TheTempusProject\TheTempusProject as App;
class Canary extends Controller {
public function index() {
self::$title = '{SITENAME} - Canary';
self::$pageDescription = 'Canary is a dependency of {SITENAME} that both records and reports logs from various PHP applications.';
Views::view( 'deps.canary' );
}
public function packagist() {
Redirect::external( 'https://packagist.org/packages/thetempusproject/canary' );
}
public function git() {
Redirect::external( 'https://git.thetempusproject.com/the-tempus-project/canary' );
}
public function changes() {
self::$title = '{SITENAME} - Canary Changes';
self::$pageDescription = 'Canary is a dependency of {SITENAME} and this pages lists the most recent changes with some details on those changes.';
Views::view( 'changes.canary' );
}
}

View File

@ -0,0 +1,47 @@
<?php
/**
* app/controllers/hermes.php
*
* This is the hermes controller.
*
* @version 3.0
* @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE]
*/
namespace TheTempusProject\Controllers;
use TheTempusProject\Hermes\Functions\Redirect;
use TheTempusProject\Bedrock\Functions\Session;
use TheTempusProject\Bedrock\Functions\Check;
use TheTempusProject\Bedrock\Functions\Input;
use TheTempusProject\Hermes\Functions\Route as Routes;
use TheTempusProject\Houdini\Classes\Issues;
use TheTempusProject\Houdini\Classes\Views;
use TheTempusProject\Houdini\Classes\Components;
use TheTempusProject\Houdini\Classes\Template;
use TheTempusProject\Classes\Controller;
use TheTempusProject\Classes\Forms;
use TheTempusProject\TheTempusProject as App;
class Hermes extends Controller {
public function index() {
self::$title = '{SITENAME} - Hermes';
self::$pageDescription = 'Hermes is a dependency of {SITENAME} that provides many common helper functions for navigating url components and file systems; designed to work seamlessly regardless of architecture.';
Views::view( 'deps.hermes' );
}
public function packagist() {
Redirect::external( 'https://packagist.org/packages/thetempusproject/hermes' );
}
public function git() {
Redirect::external( 'https://git.thetempusproject.com/the-tempus-project/hermes' );
}
public function changes() {
self::$title = '{SITENAME} - Hermes Changes';
self::$pageDescription = 'Hermes is a dependency of {SITENAME} and this pages lists the most recent changes with some details on those changes.';
Views::view( 'changes.hermes' );
}
}

View File

@ -28,7 +28,7 @@ class Home extends Controller {
public function index() {
self::$title = '{SITENAME}';
self::$pageDescription = '{SITENAME} is here to provide you a better, faster, and easier - way to create and manage your own web applications.';
Views::view( 'index' );
Views::view( 'landing' );
}
public function login() {
@ -113,4 +113,16 @@ class Home extends Controller {
self::$pageDescription = 'Many times, we aren\'t the first to ask why or how something works. Here you will find a list of {SITENAME} commonly asked questions and our best answers.' ;
Views::view( 'faq' );
}
public function libraries() {
self::$title = 'Libraries - {SITENAME}';
self::$pageDescription = '{SITENAME} depends on several very important libraries, some of which are developed exclusively to support the project. Here you can find a list with more information.' ;
Views::view( 'deps.index' );
}
public function getstarted() {
self::$title = 'Get Started - {SITENAME}';
self::$pageDescription = '{SITENAME} is a great tool to bring your ideas to reality. On this page, you can find out how to get started today.' ;
Views::view( 'start' );
}
}

View File

@ -0,0 +1,47 @@
<?php
/**
* app/controllers/houdini.php
*
* This is the houdini controller.
*
* @version 3.0
* @author Joey Kimsey <Joey@thetempusproject.com>
* @link https://TheTempusProject.com
* @license https://opensource.org/licenses/MIT [MIT LICENSE]
*/
namespace TheTempusProject\Controllers;
use TheTempusProject\Hermes\Functions\Redirect;
use TheTempusProject\Bedrock\Functions\Session;
use TheTempusProject\Bedrock\Functions\Check;
use TheTempusProject\Bedrock\Functions\Input;
use TheTempusProject\Hermes\Functions\Route as Routes;
use TheTempusProject\Houdini\Classes\Issues;
use TheTempusProject\Houdini\Classes\Views;
use TheTempusProject\Houdini\Classes\Components;
use TheTempusProject\Houdini\Classes\Template;
use TheTempusProject\Classes\Controller;
use TheTempusProject\Classes\Forms;
use TheTempusProject\TheTempusProject as App;
class Houdini extends Controller {
public function index() {
self::$title = '{SITENAME} - Houdini';
self::$pageDescription = 'Houdini is a dependency of {SITENAME} that allows for the creation and manipulation of objects used in html page creation.';
Views::view( 'deps.houdini' );
}
public function packagist() {
Redirect::external( 'https://packagist.org/packages/thetempusproject/houdini' );
}
public function git() {
Redirect::external( 'https://git.thetempusproject.com/the-tempus-project/houdini' );
}
public function changes() {
self::$title = '{SITENAME} - Houdini Changes';
self::$pageDescription = 'Houdini is a dependency of {SITENAME} and this pages lists the most recent changes with some details on those changes.';
Views::view( 'changes.houdini' );
}
}