๐Ÿš€ Getting Started

April 9, 2026 ยท View on GitHub

AsteriosPHP scaffold

This repository contains the default scaffold for AsteriosPHP.
The source code for the framework itself can be found at asteriosframework/core.

composer create-project asterios/app

๐Ÿš€ Getting Started

composer create-project asterios/app my-asterios-app
cd my-asterios-app
php -S localhost:8000

๐Ÿ‘‰ That's it.
All frontend assets (Tailwind CSS) are automatically installed and built during composer install.


โš™๏ธ Environment Configuration

On first install, Asterios automatically creates a .env file.

.env
.env.example
  • .env.example โ†’ template committed to the repository
  • .env โ†’ your local configuration (generated automatically)

๐Ÿ‘‰ The .env file is created during:

php asterios install

You can safely modify your .env file for:

  • database credentials
  • app environment
  • custom configuration

๐Ÿ“ Project Structure

app/                     # Application logic (Controllers, Services, etc.)
assets/css/              # Tailwind source files
cache/                   # Cache directory
config/                  # Configuration files
database/                # Migrations and seeders
logs/                    # Log files
public/                  # Public files
templates/               # Email templates
views/                   # Twig templates

๐Ÿง  App Layer

app/
โ”œโ”€โ”€ Contracts/          
โ”œโ”€โ”€ Controller/         
โ”œโ”€โ”€ Data/               
โ”œโ”€โ”€ Enums/              
โ”œโ”€โ”€ Exceptions/         
โ”œโ”€โ”€ Middleware/         
โ”œโ”€โ”€ Models/             
โ”œโ”€โ”€ Repositories/       
โ”œโ”€โ”€ Service/            
โ”œโ”€โ”€ Support/            
โ”œโ”€โ”€ Traits/             

๐Ÿงฐ Asterios CLI

AsteriosPHP ships with a built-in CLI tool.

From the project root, you can run commands directly.

Make sure the file is executable:

chmod +x asterios

Run commands via:

asterios <command>

No php prefix is required.

๐Ÿ“Š System

asterios about
asterios list

๐Ÿ—„ Database

asterios migrate
asterios migrate:status
asterios db:seed

๐Ÿงช Test Data

asterios fake:bank
asterios fake:uuid

โš™๏ธ Setup

asterios install

๐Ÿ— Code Generation

asterios make:model
asterios make:migration
asterios make:seeder

๐Ÿ–ผ View / Twig

php asterios view:cache
php asterios view:clear

๐ŸŽจ Frontend (Tailwind CSS)

This project uses Tailwind CSS only.

๐Ÿ“ Structure

assets/css/asterios-app.css
public/assets/css/asterios-app.css
tailwind.config.js

โš™๏ธ Build Commands

Development (watch mode)

npm run dev

Production build

npm run build

๐Ÿ” Via Composer

composer dev-assets
composer build-assets

๐Ÿค– Automatic Setup

On install/update:

  • npm install
  • npm run build

๐Ÿงฑ Twig Components

views/components/

Example:

{% include "components/button.twig" with { label: "Click me" } %}

๐ŸŽจ Design System

Defined in:

assets/css/asterios-app.css

Example:

@layer components {
  .btn-primary {
    @apply inline-block px-8 py-3 rounded-full font-medium text-white 
           bg-gradient-to-br from-primary to-secondary 
           hover:opacity-90 transition;
  }
}

โš™๏ธ Tailwind Config

tailwind.config.js

Example:

extend: {
  colors: {
    primary: "#0d6efd",
    secondary: "#20c997"
  }
}

๐Ÿ’ก Customize

Edit:

tailwind.config.js
assets/css/asterios-app.css

Add components:

views/components/*.twig

๐Ÿง  Philosophy

  • No Bootstrap
  • Tailwind only
  • Twig components
  • Clean architecture
  • Built-in CLI
  • Environment-based configuration
  • Zero-config setup via Composer

๐Ÿ“ฆ Requirements

  • PHP 8.3+
  • Node.js

โค๏ธ AsteriosPHP

https://asteriosphp.de