Skip to content

Quickstart

Technomantus Corvi edited this page Sep 5, 2026 · 1 revision

Quickstart

1. Install PHP and a database

If your machine has nothing installed yet, see the full Prerequisites steps. Short version for Ubuntu/Mint:

sudo apt update
sudo apt install php8.1 php8.1-cli php8.1-mysql php8.1-xml php8.1-mbstring php8.1-curl php8.1-zip unzip
sudo apt install mariadb-server
sudo systemctl enable --now mariadb
sudo mysql_secure_installation

Create a database and a dedicated user:

sudo mysql -u root -p
CREATE DATABASE my_database CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'my_app_user'@'localhost' IDENTIFIED BY 'a_strong_password';
GRANT ALL PRIVILEGES ON my_database.* TO 'my_app_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

2. Clone and configure

git clone <repo-url> my-project
cd my-project
cp .env-example .env
nano .env

Set at minimum: DB_NAME, DB_USER, DB_PASS, APP_URL.

3. Run it

php -S localhost:8050 -t public public/index.php

Visit http://localhost:8050. You should see the home page.

4. Try the example CRUD

Visit http://localhost:8050/todo — this is a complete working example (model, controller, routes, views). See Models and Controllers & Requests to understand how it's built, then use it as a template for your own resources.

5. Build your first page

  1. Route — add to routes.php:
   'GET /hello' => 'HelloController@index',
  1. Controller — create controllers/HelloController.php:
   <?php
   class HelloController extends Controller
   {
       public function index(): void
       {
           $this->view('hello/index', ['title' => 'Hello']);
       }
   }
  1. View — create views/hello/index.php:
   <h1>Hello, Tanuki!</h1>
  1. Visit http://localhost:8050/hello.

No configuration, no code generation — the autoloader finds HelloController by its class name automatically.

What's next

  • Project Structure — understand where everything lives
  • Routing — route parameters, method override
  • Models — the Active Record API
  • Security — what's handled for you, what you still need to do
  • Want login and an admin panel? See Authentication and Admin Panel — both are optional extras you can add whenever you need them.

Clone this wiki locally