Skip to content

Oneago/arcturus-project

Repository files navigation

Imgur

GitHub repo size GitHub code size in bytes Packagist Downloads Packagist License Packagist Version Packagist PHP Version Support GitHub issues GitHub commit activity

Arcturus Project

PHP framework developed by Oneago

See this project in packagist.org

System requirements

  • PHP 7.4 or latest
  • Composer
  • docker-compose (Optional for docker server run)
  • npm (Optional for Typescript and Sass compile)
  • git (Optional for version control)

Getting started

Composer installer

composer create-project oneago/arcturus-project <project-name>

Arcturus CLI installer

  • See installation gide here

  • After install Arcturus CLI installer run in command line arcturus <project name> inside installation project

Libraries

Arcturus implements 4 libraries that need previous documentation for the best benefit

Library Description Documentation
Twig Template engine for PHP with .twig extension inspired in Django templates with XSS attack protection twig 3.x docs
Phinx DPhinx makes it ridiculously easy to manage the database migrations for your PHP app. Phinx is just about migrations without all the bloat of a database ORM system or framework. Phinx 0.12 docs
phpunit PHPUnit is a programmer-oriented testing framework for PHP. It is an instance of the xUnit architecture for unit testing frameworks. PHPUnit docs

Ada CLI available commands

in project folder run ./ada (Linux) or php ada for script help

docker

Manage project containers. require docker-compose and docker installed in your system

  • docker:run

    Run docker-compose.yml file and up containers

      php ada docker:run
    
  • docker:pull

    Pull docker-compose.yml containers from docker hub

      php ada docker:run  
    
  • docker:kill

    Kill docker-compose.yml containers

      php ada docker:kill
    

make

Create new project files

  • make:api

    Create a new api for this app

      php ada make:api [options] [--] <api name>
    
  • make:view

    Create a new view passing a name

      php ada make:view [options] [--] <view name>
    

    Arguments

    • view name: Name for use in new view file and/or model file

    Options

    • --dir (-d): If need create view in a new or existing directory, use this option with directory name. Save view in a folder for pretty viewer
    • --no-controller: Only create a twig file in views directory and controller isn't create
  • make:model

    Create a new model for this app

      php ada make:model <model name>  
    

    Arguments

    • model name: Name for use in new model
  • make:middleware

    Create a new middleware passing a name

      php ada make:middleware <middleware name>
    

    Arguments

    • middleware name: Name for use in new middleware

run

  • run:release

    Make a zip with production project files

      php ada run:release [<name>]
    

    Arguments

    • name: Name for zip file [default: "release"]
  • run:server

    Launch a php server

      php ada run:server <address> 
    

    Arguments

    • address: Address for run php host. E.g:localhost:8090

sass

Manage sass files. require sass installed in your system

  • sass:compile

    Compile all sass files in app/sass

      php ada sass:compile
    
  • sass:new

    Compile a sass file in app/sass

      php ada sass:new [options] [--] <name>
    

    Arguments

    • name: Name for a new sass file. If name no have extension, the .sass extension is added automatically

    Options

    • --component (-c): If option is set, create a component y components directory otherwise create in css directory
    • --dir (-d): Will be create sass file in directory, no use --component or -c options because no will be create folder
    • --parent (-p): sass parent to add component import on css directory [default: "style.scss"]
  • sass:watch

    This command autocompile a sass file in app/sass

      php ada sass:watch <name>
    

    Arguments

    • name: Name for sass file

tsc

Manage Typescript files. require npm installed in your system

  • tsc:compile

    Compile all ts files in app/typescript

      php ada tsc:compile