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; self::$tokens = new Token;
} }
/**
public function refresh() { public function refresh() {
$token = self::$tokens->refresh( self::$authToken->ID ); $token = self::$tokens->refresh( self::$authToken->ID );
if ( empty( $token ) ) { if ( empty( $token ) ) {
@ -35,4 +36,5 @@ class Auth extends ApiController {
} }
Views::view( 'api.response', ['response' => json_encode( [ $responseType => $response ], true )]); 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' ); Template::addHeader( 'Content-Type: application/json; charset=utf-8' );
} }
/**
public function index() { public function index() {
if ( ! Forms::check( 'apiLogin' ) ) { if ( ! Forms::check( 'apiLogin' ) ) {
$responseType = 'error'; $responseType = 'error';
@ -47,4 +48,5 @@ class Login extends ApiController {
$token = self::$tokens->findOrCreateUserToken( $user->ID, true ); $token = self::$tokens->findOrCreateUserToken( $user->ID, true );
return Views::view( 'api.response', ['response' => json_encode( [ $responseType => $token ], 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; 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 ) { public function find( $id = null ) {
$user = self::$user->get( $id ); $user = self::$user->get( $id );
if ( ! $user ) { if ( ! $user ) {
@ -34,4 +41,5 @@ class Users extends ApiController {
} }
Views::view( 'api.response', ['response' => json_encode( [ $responseType => $response ], true )]); 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() { public function index() {
self::$title = '{SITENAME}'; 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.'; 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() { 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.' ; 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' ); 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' );
}
}

View File

@ -1,7 +1,14 @@
<div class="col-8 mx-auto p-4 rounded shadow-sm context-main-bg my-4"> <div class="col-8 mx-auto p-4 rounded shadow-sm context-main-bg my-4">
<h2 class="text-center mb-4">Welcome to {SITENAME}</h2> <h2 class="text-center mb-4">Welcome to {SITENAME}</h2>
<p class="lead"> <p class="lead">
{SITENAME} was built out of a need to create and manage my own web applications. {SITENAME} was built out of a need to create and manage web applications.
At the time, I had used wordpress but I didn't want or even need any of the blog functionality.
No matter what plugins you add, no matter how you customize layout, wordpress is still a blog at its core.
There is nothing inherently wrong with a blog, but when you start from a blog, everything is a post, or a plugin.
Under the hood, wordpress is going to run how wordpress wants, as a web interface for accessing text records.
</p>
<p>
The Tempus Project was always intended to be a web application, not a blog.
</p> </p>
<p class="text-muted"> <p class="text-muted">
Right now, this entire system was built and managed by myself. As stated, I have used my own version of this for years, but translating it to a publicly available product is not a 1-to-1 job. There may be bugs or issues encountered while you use the product. I can't guarantee a fix for every need in every case immediately, but I do actively keep track of bugs and work hard to ensure everyone has a great experience using the app. Right now, this entire system was built and managed by myself. As stated, I have used my own version of this for years, but translating it to a publicly available product is not a 1-to-1 job. There may be bugs or issues encountered while you use the product. I can't guarantee a fix for every need in every case immediately, but I do actively keep track of bugs and work hard to ensure everyone has a great experience using the app.

View File

@ -0,0 +1,9 @@
<div class="col-8 mx-auto p-4 rounded shadow-sm context-main-bg my-4">
<h2 class="text-center mb-4">Bedrock Changes</h2>
<p class="lead">
Here you can find a simple list of the important changes made to the Bedrock library.
</p>
<p class="text-muted">
Not all changes may be addressed individually on this page.
</p>
</div>

View File

@ -0,0 +1,9 @@
<div class="col-8 mx-auto p-4 rounded shadow-sm context-main-bg my-4">
<h2 class="text-center mb-4">Canary Changes</h2>
<p class="lead">
Here you can find a simple list of the important changes made to the Canary library.
</p>
<p class="text-muted">
Not all changes may be addressed individually on this page.
</p>
</div>

View File

@ -0,0 +1,9 @@
<div class="col-8 mx-auto p-4 rounded shadow-sm context-main-bg my-4">
<h2 class="text-center mb-4">Hermes Changes</h2>
<p class="lead">
Here you can find a simple list of the important changes made to the Hermes library.
</p>
<p class="text-muted">
Not all changes may be addressed individually on this page.
</p>
</div>

View File

@ -0,0 +1,9 @@
<div class="col-8 mx-auto p-4 rounded shadow-sm context-main-bg my-4">
<h2 class="text-center mb-4">Houdini Changes</h2>
<p class="lead">
Here you can find a simple list of the important changes made to the Houdini library.
</p>
<p class="text-muted">
Not all changes may be addressed individually on this page.
</p>
</div>

View File

@ -0,0 +1,27 @@
<div class="col-8 mx-auto p-4 rounded shadow-sm context-main-bg my-4">
<div class="container col-xxl-8">
<div class="row flex-lg-row-reverse align-items-center g-5 py-5">
<div class="col-10 col-sm-8 col-lg-6">
<img src="{ROOT_URL}images/bedrock.jpg" class="d-block mx-lg-auto img-fluid" alt="Bootstrap Themes" width="700" height="500" loading="lazy">
</div>
<div class="col-lg-6">
<h1 class="display-5 fw-bold lh-1 mb-3">Bedrock</h1>
<p class="lead">
Bedrock, as the name may suggest, is the core functionality the project is built on.
From Basic text checks to the core functionality behind models and controllers, bedrock handles it all.
</p>
<div class="d-grid gap-2 d-md-flex justify-content-md-start">
<a href="/bedrock/git" class="btn btn-primary btn-lg px-4 me-sm-3">
Git
</a>
<a href="/bedrock/packagist" class="btn btn-outline-primary btn-lg px-4">
Packagist
</a>
</div>
</div>
</div>
</div>
<p class="text-muted">
For a list of recent changes, please check <a href="/bedrock/changes">here</a>.
</p>
</div>

View File

@ -0,0 +1,27 @@
<div class="col-8 mx-auto p-4 rounded shadow-sm context-main-bg my-4">
<div class="container col-xxl-8">
<div class="row flex-lg-row-reverse align-items-center g-5 py-5">
<div class="col-10 col-sm-8 col-lg-6">
<img src="{ROOT_URL}images/canary.jpg" class="d-block mx-lg-auto img-fluid" alt="Bootstrap Themes" width="700" height="500" loading="lazy">
</div>
<div class="col-lg-6">
<h1 class="display-5 fw-bold lh-1 mb-3">Canary</h1>
<p class="lead">
Canary is a library that allows {SITENAME} to add logs during execution.
The resulting logs can be printed to the browser console in real-time, saved to a log file, or even used on-page for debugging.
</p>
<div class="d-grid gap-2 d-md-flex justify-content-md-start">
<a href="/canary/git" class="btn btn-primary btn-lg px-4 me-sm-3">
Git
</a>
<a href="/canary/packagist" class="btn btn-outline-primary btn-lg px-4">
Packagist
</a>
</div>
</div>
</div>
</div>
<p class="text-muted">
For a list of recent changes, please check <a href="/canary/changes">here</a>.
</p>
</div>

View File

@ -0,0 +1,27 @@
<div class="col-8 mx-auto p-4 rounded shadow-sm context-main-bg my-4">
<div class="container col-xxl-8">
<div class="row flex-lg-row-reverse align-items-center g-5 py-5">
<div class="col-10 col-sm-8 col-lg-6">
<img src="{ROOT_URL}images/hermes.jpg" class="d-block mx-lg-auto img-fluid" alt="Bootstrap Themes" width="700" height="500" loading="lazy">
</div>
<div class="col-lg-6">
<h1 class="display-5 fw-bold lh-1 mb-3">Hermes</h1>
<p class="lead">
Hermes is a simple library that provides a small set of commonly used helper functions.
These functions primarily help with navigating the url or file systems in a consistent way across several libraries and projects.
</p>
<div class="d-grid gap-2 d-md-flex justify-content-md-start">
<a href="/hermes/git" class="btn btn-primary btn-lg px-4 me-sm-3">
Git
</a>
<a href="/hermes/packagist" class="btn btn-outline-primary btn-lg px-4">
Packagist
</a>
</div>
</div>
</div>
</div>
<p class="text-muted">
For a list of recent changes, please check <a href="/hermes/changes">here</a>.
</p>
</div>

View File

@ -0,0 +1,27 @@
<div class="col-8 mx-auto p-4 rounded shadow-sm context-main-bg my-4">
<div class="container col-xxl-8">
<div class="row flex-lg-row-reverse align-items-center g-5 py-5">
<div class="col-10 col-sm-8 col-lg-6">
<img src="{ROOT_URL}images/houdini.jpg" class="d-block mx-lg-auto img-fluid" alt="Bootstrap Themes" width="700" height="500" loading="lazy">
</div>
<div class="col-lg-6">
<h1 class="display-5 fw-bold lh-1 mb-3">Houdini</h1>
<p class="lead">
Houdini is where the front-end magic happens and it serves as the primary front-end html generator.
It handles the storage and applications of frontend components, all the views, templates, and several other critical features of the front-end.
</p>
<div class="d-grid gap-2 d-md-flex justify-content-md-start">
<a href="/houdini/git" class="btn btn-primary btn-lg px-4 me-sm-3">
Git
</a>
<a href="/houdini/packagist" class="btn btn-outline-primary btn-lg px-4">
Packagist
</a>
</div>
</div>
</div>
</div>
<p class="text-muted">
For a list of recent changes, please check <a href="/houdini/changes">here</a>.
</p>
</div>

47
app/views/deps/index.html Normal file
View File

@ -0,0 +1,47 @@
<div class="col-8 mx-auto p-4 rounded shadow-sm context-main-bg my-4">
<h2 class="text-center mb-4">{SITENAME} Libraries</h2>
<p class="lead">
{SITENAME} uses a number of libraries developed in conjunction with the main project. Here you can find a list of these libraries with more information on each.
</p>
<hr>
<div class="container px-4 py-5" id="custom-cards">
<div class="row row-cols-1 row-cols-lg-3 align-items-stretch g-4 py-5">
<div class="col">
<a href="/bedrock" class="text-decoration-none">
<div class="card card-cover h-100 overflow-hidden text-bg-dark rounded-4 shadow-lg" style="background-image: url('{ROOT_URL}images/bedrock.jpg');">
<div class="d-flex flex-column h-100 p-5 pb-3 text-white text-shadow-1">
<h3 class="pt-5 mt-5 mb-4 display-6 lh-1 fw-bold">Bedrock</h3>
</div>
</div>
</a>
</div>
<div class="col">
<a href="/canary" class="text-decoration-none">
<div class="card card-cover h-100 overflow-hidden text-bg-dark rounded-4 shadow-lg" style="background-image: url('{ROOT_URL}images/canary.jpg');">
<div class="d-flex flex-column h-100 p-5 pb-3 text-white text-shadow-1">
<h3 class="pt-5 mt-5 mb-4 display-6 lh-1 fw-bold">Canary</h3>
</div>
</div>
</a>
</div>
<div class="col">
<a href="/hermes" class="text-decoration-none">
<div class="card card-cover h-100 overflow-hidden text-bg-dark rounded-4 shadow-lg" style="background-image: url('{ROOT_URL}images/hermes.jpg');">
<div class="d-flex flex-column h-100 p-5 pb-3 text-shadow-1">
<h3 class="pt-5 mt-5 mb-4 display-6 lh-1 fw-bold">Hermes</h3>
</div>
</div>
</a>
</div>
<div class="col">
<a href="/houdini" class="text-decoration-none">
<div class="card card-cover h-100 overflow-hidden text-bg-dark rounded-4 shadow-lg" style="background-image: url('{ROOT_URL}images/houdini.jpg');">
<div class="d-flex flex-column h-100 p-5 pb-3 text-white text-shadow-1">
<h3 class="pt-5 mt-5 mb-4 display-6 lh-1 fw-bold">Houdini</h3>
</div>
</div>
</a>
</div>
</div>
</div>
</div>

145
app/views/landing.html Normal file
View File

@ -0,0 +1,145 @@
<div class="px-4 py-5 my-5 text-center">
<img class="d-block mx-auto mb-4" src="{root_URL}images/logoWhite.png" alt="" width="72" height="57">
<h1 class="display-5 fw-bold">The Tempus Project</h1>
<div class="col-lg-6 mx-auto">
<p class="lead mb-4">
{SITENAME} allows you to quickly develop, design, and customize responsive mobile-first web applications.
</p>
</div>
<div class="b-example-divider"></div>
<div class="py-5">
<p>
Utilizing our in-house <a href="/home/libraries" class="text-decoration-none">libraries</a>, {SITENAME} provides a very basic PHP web application utilizing the MVC (Model View Controller) pattern, paired with Bootstrap for a robust front-end experience. {SITENAME} can be deployed on most server architecture in seconds and can be installed and customized within minutes. Paired with Bootstrap, the world's most popular front-end open source toolkit, you have a great platform to build just about anything.
</p>
</div>
<div class="b-example-divider"></div>
<div class="container px-4 py-5" id="hanging-icons">
<h2 class="pb-2 border-bottom">Includes many systems right oout of the box</h2>
<div class="row g-4 py-5 row-cols-1 row-cols-lg-3">
<div class="col d-flex align-items-start">
<div
class="icon-square text-bg-light d-inline-flex align-items-center justify-content-center fs-4 flex-shrink-0 me-3">
<i class="fa-solid fa-user"></i>
</div>
<div>
<h3 class="fs-2">User Management</h3>
<p>From new user registrations to forgotten password recovery and everything in-between, the included authentication and authorization controls can handle all your needs and include groups with highly customizable permissions systems.</p>
</div>
</div>
<div class="col d-flex align-items-start">
<div
class="icon-square text-bg-light d-inline-flex align-items-center justify-content-center fs-4 flex-shrink-0 me-3">
<i class="fa-solid fa-screwdriver-wrench"></i>
</div>
<div>
<h3 class="fs-2">Administration</h3>
<p>
Everything from your sitename and timezone to notifications and emails are a breeze with the included Admin panel. Out of the box you will have direct control over most of your application and you can easily expand or add new controls as you need.
</p>
</div>
</div>
<div class="col d-flex align-items-start">
<div
class="icon-square text-bg-light d-inline-flex align-items-center justify-content-center fs-4 flex-shrink-0 me-3">
<i class="fa-regular fa-folder-open"></i>
</div>
<div>
<h3 class="fs-2">Plugins</h3>
<p>
One of the best features of {SITENAME} is the plugin functionality. Much of the system has been modeled to work as self-contained applications that work together. Many of the features available here are plugins aty their core.
</p>
</div>
</div>
</div>
</div>
<div class="b-example-divider"></div>
<div class="container px-4 py-5" id="icon-grid">
<h2 class="pb-2 border-bottom">Plugins</h2>
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 row-cols-lg-4 g-4 py-5">
<div class="col d-flex align-items-start">
<i class="fa-solid fa-pen-nib fa-3x"></i>
<div>
<h3 class="fw-bold mb-0 fs-4">Blog</h3>
<p>Whether its the companies transparency or your own need to share, our blog plugin makes it simple.</p>
</div>
</div>
<div class="col d-flex align-items-start">
<i class="fa-solid fa-bug fa-3x"></i>
<div>
<h3 class="fw-bold mb-0 fs-4">Bug Reports</h3>
<p>An unfortunate reality iis that every application has bugs, never leave your users without the ability to report them to you.</p>
</div>
</div>
<div class="col d-flex align-items-start">
<i class="fa-solid fa-comment fa-3x"></i>
<div>
<h3 class="fw-bold mb-0 fs-4">Comments</h3>
<p>Allowing users the opportunity to share feedback is crucial. Our comments plugin not only integrates with the blog, but many other plugins to enable users to comment on any content you want.</p>
</div>
</div>
<div class="col d-flex align-items-start">
<i class="fa-solid fa-envelope fa-3x"></i>
<div>
<h3 class="fw-bold mb-0 fs-4">Contact</h3>
<p>A contact form is another simple but essential tool for your business or website.</p>
</div>
</div>
<div class="col d-flex align-items-start">
<i class="fa-solid fa-file fa-3x"></i>
<div>
<h3 class="fw-bold mb-0 fs-4">Resume</h3>
<p>Whether you're looking for a new gig or just want an easy way for others to see your work, our resume plugin might be the key.</p>
</div>
</div>
<div class="col d-flex align-items-start">
<i class="fa-solid fa-inbox fa-3x"></i>
<div>
<h3 class="fw-bold mb-0 fs-4">Subscribe</h3>
<p>Building your list should always be a part of your application and services and it made as simple as can be with this plugin.</p>
</div>
</div>
<div class="col d-flex align-items-start">
<i class="fa-solid fa-list fa-3x"></i>
<div>
<h3 class="fw-bold mb-0 fs-4">WIP (Work in Progress)</h3>
<p>A light-weight and simple plugin that allows you to keep a running list of works in progress to share with site visitors..</p>
</div>
</div>
<div class="col d-flex align-items-start">
<i class="fa-brands fa-stripe fa-3x"></i>
<div>
<h3 class="fw-bold mb-0 fs-4">Memberships / Payments</h3>
<p>Our membership plugin integrates with Stripe to allow incredibly simple membership setup and can be easily expanded to sell any of your products.</p>
</div>
</div>
</div>
</div>
<div class="b-example-divider"></div>
<h2 class="pb-2 border-bottom py-5">Light / Dark Modes</h2>
<div class="d-md-flex flex-md-equal my-md-3 ps-md-3">
<div class="text-bg-dark text-white col-6 text-center overflow-hidden">
<div class="my-3 py-3">
<h2 class="display-5">When you stick with the light</h2>
<p class="lead">everything looks great.</p>
</div>
<div class="bg-light shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;">
</div>
</div>
<div class="bg-light text-dark col-6 text-center overflow-hidden">
<div class="my-3 py-3">
<h2 class="display-5">But when you go to the dark side</h2>
<p class="lead">everything is just a bit better.</p>
</div>
<div class="bg-dark shadow-sm mx-auto" style="width: 80%; height: 300px; border-radius: 21px 21px 0 0;">
</div>
</div>
</div>
</div>

23
app/views/start.html Normal file
View File

@ -0,0 +1,23 @@
<div class="col-8 mx-auto p-4 rounded shadow-sm context-main-bg my-4">
<h2 class="text-center mb-4">Getting Started with {SITENAME}</h2>
<p class="lead">
{SITENAME} has been open source for many years now. The hopes and intentions for it were always to give others a leg-up to get started building web-apps like i wish i had as a kid.
There were so many tutorials and ideas, expansions and plans for the project.
Unfortunately no person is given unlimited time to accomplish their dreams and over the years the idea for a huge repository for learning and education has taken a back seat.
</p>
<p>
At this time, the best recommendation available is to contact us for more information.
The site here is actively maintained so feel free to utilize any of our available resources for contact.
In addition to the site here, you can contact the lead developer (me) directly through <a href="https://joeykimsey.com">JoeyKimsey.com</a>.
</p>
<p class="text-muted">
Right now, this entire system was built and managed by myself. As stated, I have used my own version of this for years, but translating it to a publicly available product is not a 1-to-1 job. There may be bugs or issues encountered while you use the product. I can't guarantee a fix for every need in every case immediately, but I do actively keep track of bugs and work hard to ensure everyone has a great experience using the app.
</p>
<p>
If you encounter any bugs, feel free to report them <a href="/bugreport" class="text-decoration-none">here</a>. Likewise, there are forms for feedback, reviews, suggestions, and a general contact form. Thanks for taking the time to check out the product!
</p>
<div class="text-center mt-4 pb-4">
{loggedin}<a href="/bugreport" class="btn btn-primary btn-lg px-5">Report a Bug</a>{/loggedin}
<a href="/contact" class="btn btn-outline-secondary btn-lg px-5 ms-3">Contact Us</a>
</div>
</div>

View File

@ -140,6 +140,14 @@ class TheTempusProject extends Bedrock {
'text' => 'Home', 'text' => 'Home',
'url' => '{ROOT_URL}home/index', 'url' => '{ROOT_URL}home/index',
], ],
[
'text' => 'Libraries',
'url' => '{ROOT_URL}home/libraries',
],
[
'text' => 'Get Started',
'url' => '{ROOT_URL}home/getstarted',
],
[ [
'text' => 'Admin', 'text' => 'Admin',
'url' => '{ROOT_URL}admin/index', 'url' => '{ROOT_URL}admin/index',

BIN
images/bedrock.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

BIN
images/canary.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
images/hermes.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
images/houdini.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

25
server/nginx.conf Normal file
View File

@ -0,0 +1,25 @@
user www-data;
worker_processes auto;
pid /run/nginx.pid;
error_log /var/log/nginx/error.log;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
}
http {
tcp_nopush on;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/access.log;
gzip on;
include /etc/nginx/sites-enabled/*;
include /etc/nginx/conf.d/*.conf;
}

119
server/setup.md Normal file
View File

@ -0,0 +1,119 @@
apt-get update
sudo add-apt-repository ppa:ondrej/php
apt-get update
sudo apt-get install php8.2-cli php8.2-fpm
sudo apt install php8.2-common php8.2-mysql php8.2-xml php8.2-xmlrpc php8.2-curl php8.2-gd php8.2-imagick php8.2-cli php8.2-dev php8.2-imap php8.2-mbstring php8.2-opcache php8.2-soap php8.2-zip php8.2-redis php8.2-intl unzip -y
mkdir /etc/nginx/ssl/
chmod -R 655 /etc/nginx/ssl
chown -R www-data:www-data /etc/nginx/ssl
<copy paste the key and pem files from cloudflare ssl setup>
mkdir /etc/nginx/sites-available/old/
sudo mv /etc/nginx/sites-available/* /etc/nginx/sites-available/old/
sudo touch /etc/nginx/sites-available/thetempusproject.com.conf
<updated the main site conf>
<uploaded the ttp snippet>
<updated the nginx.conf>
sudo rm -rf /etc/nginx/sites-enabled/*
sudo ln -s /etc/nginx/sites-available/thetempusproject.com.conf /etc/nginx/sites-enabled/thetempusproject.com.conf
sudo systemctl restart nginx.service
cd ~
curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php
HASH=`curl -sS https://composer.github.io/installer.sig`
php -r "if (hash_file('SHA384', '/tmp/composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
sudo php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer
cd /var/www/
composer create-project thetempusproject/thetempusproject thetempusproject.com
sudo ln -s /etc/nginx/sites-available/black-airplane /etc/nginx/sites-enabled/
1Ag5calIO8xXwS
mysql
CREATE USER 'ttp'@'localhost' IDENTIFIED BY '1Ag5calIO8xXwS';
GRANT ALL PRIVILEGES ON * . * TO 'ttp'@'localhost';
FLUSH PRIVILEGES;
CREATE DATABASE ttp;

View File

@ -1,36 +1,24 @@
# upstream to abstract backend connection(s) for php upstream php {
upstream php { server unix:/run/php/php8.2-fpm.sock;
server unix:/run/php/php8.1-fpm.sock;
} }
server {
listen 80;
listen [::]:80;
server_name thetempusproject.com;
include snippets/well-known;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
server_name thetempusproject.com;
include snippets/ssl-params.conf;
root /var/www/thetempusproject.com;
index index.php;
# max php upload size server {
client_max_body_size 100M; listen 80 default_server;
index index.php;
# disable direcory indexing server_name thetempusproject.com;
autoindex off; root /var/www/thetempusproject.com;
charset utf-8;
sendfile off;
client_max_body_size 100m;
# custom TTP code # custom TTP code
include snippets/ttp.conf; include snippets/ttp.conf;
location ~* \.php$ { location ~* \.php$ {
fastcgi_pass php; fastcgi_pass php;
include fastcgi_params; include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params; include fastcgi_params;
fastcgi_intercept_errors on; fastcgi_intercept_errors on;
} }
} }

View File

@ -6,8 +6,6 @@ error_log /var/log/nginx/error.log;
index index.php; index index.php;
charset utf-8;
error_page 404 /index.php; error_page 404 /index.php;
ssl_certificate /etc/nginx/ssl/thetempusproject.com.pem; ssl_certificate /etc/nginx/ssl/thetempusproject.com.pem;
@ -17,7 +15,7 @@ location = /favicon.ico {
log_not_found off; log_not_found off;
access_log off; access_log off;
} }
location = /robots.txt { location = /robots.txt {
allow all; allow all;
log_not_found off; log_not_found off;
@ -40,7 +38,7 @@ location ~ /\. {
deny all; deny all;
} }
location ~* \.(?:js|css|png|jpg|gif|ico|woff|ttf|woff2)$ { location ~* \.(?:js|css|png|jpg|gif|ico|woff|tff|woff2|min.css.map)$ {
access_log off; access_log off;
log_not_found off; log_not_found off;
} }
@ -69,6 +67,27 @@ location /errors/ {
try_files $uri /index.php?error=$uri; try_files $uri /index.php?error=$uri;
} }
location /api/ {
# Handle CORS for all requests
if ($request_method = 'POST') {
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'Authorization, DNT, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Range' always;
add_header 'Access-Control-Expose-Headers' 'Content-Length, Content-Range' always;
}
# Handle preflight requests
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Headers' 'Authorization, DNT, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Range' always;
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain; charset=utf-8' always;
return 204; # Return no content for preflight
}
rewrite ^/(.+)$ /index.php?url=$1&$args;
}
location / { location / {
rewrite ^/(.+)$ /index.php?url=$1&$args; rewrite ^/(.+)$ /index.php?url=$1&$args;
} }