🍸A Slim Web Application Template

Related tags

Frameworks gracili
Overview

Gracili

Scrutinizer Code Quality Build Status Code Coverage


What is Gracili?

Gracili is a PHP Application Template to quickly create a new Project. Using this template can save you a lot of time. With the Slim PHP Framework is a fast and simple base provided to easily extend your application to grow with the required workload.

Installation

Download the latest version of Gracili and extract it to the XAMPP htdocs-folder. You need to run the composer installation command once after the extraction to install all required libraries

$ composer install

There are usually many environments that your application is installed (you should not develop on the productive server ;) ). There is a environment configuration file to solve the problem with different configurations and password per environment. You have to rename the config/env.example.php file to config/env.php and fill in your data. If the config/env.php file is not found, the application will look for it in the parent directory (most probably the htdocs folder in your xampp environment). If the env.php file is not found there, the application will throw an Error. You can also define a APP_ENV environment variable and add a <APP_ENV>.php file in the config/ folder to specify public configurations for e.g. your CI Service (NOT PASSWORD OR ANY SECRETS)

Gracili is now successfully installed and ready to work on.

Afterwards you can start your local Apache Server with XAMPP. To visit your Website you have to open http://localhost/<project_directory>/.

Structure

The Gracili Application Template is build on the MVC Design Pattern. All source code should be in the src/ directory.

Folder Content
config/ All files required for the configuration of your application
public/ Static accessible web files (images, css, fonts, etc.)
resources/ Other resources, that should not be public (migrations or translations)
src/ All PHP source code (The App namespace)
src/Controller/ Directory for all Controllers (one per 'page')
src/Datarow/ Classes for the Database sets that are returend and hydrated (one per 'select')
src/Service/ All services for the businesslogic are here. It is recommended to structure it modular
src/Table/ The classes for the database queries (one per 'table')
src/Util/ Helper classes like a validation context.
templates/ The Twig template files
tests/ Directory for tests
temp/ Temporary files (logfiles, cache)

Afterwards you can start your local Apache Server with XAMPP. To visit your Website you have to open http://localhost/<project_directory>/.

Running the tests

Supposing, that you have Apache Ant installed, just run the following command to run all PHPUnit tests

$ ant phpunit

Running the tests with coverage

Run the following command to generate a coverage file in the generated build folder build/logs/clover.xml

$ ant phpunit-coverage

Running single test files

To run just a few tests, not the whole test suite, you can run the following command after you added the @group actual annotation to the test class docblock

$ ant phpunit-actual

The test class doc block to run the test in the actual group must look like this

/**
 * My test class
 * @group actual
 */
class MyTest
{
  // PHPUnit Test here ...
}

Built with

License

Copyright 2018

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

You might also like...
Slim 3 skeleton working with Google App Engine include cron configuration.

Slim3 GAE Skeleton Slim 3 skeleton working with Google App Engine include cron configuration. Demo https://slim3-gae-skeleton.appspot.com/health_check

A curated list of awesome tutorials and other resources for the Slim micro framework

Awesome Slim A curated list of awesome tutorials and other resources for the Slim micro framework Table of Contents Essentials Tutorials Packages and

My personal blog developed on the Slim Framework

nesbot.com I am making the source code of my personal site available publicly in case it helps anybody. It's developed using the Slim Framework. I am

Slim 3 MVC Skeleton With Swoole

Slim 3 MVC Skeleton With Swoole ##Features Quickly setup and start working on a new Slim Framework 3 . Use the latest Slim 3 with the PHP-View templat

Juliangut Slim Framework Doctrine handler middleware

Juliangut Slim Framework Doctrine handler middleware Doctrine handler middleware for Slim Framework. Slim3 version Doctrine integration service for Sl

This Slim Framework middleware will compile LESS CSS files on-the-fly using the Assetic library

This Slim Framework middleware will compile LESS CSS files on-the-fly using the Assetic library. It supports minification and caching, also via Asseti

Strict PSR-7 implementation used by the Slim Framework

Strict PSR-7 implementation used by the Slim Framework, but you may use it separately with any framework compatible with the PSR-7 standard.

Slim Framework custom views

Slim Views This repository contains custom View classes for the template frameworks listed below. You can use any of these custom View classes by eith

Slim PHP static proxy library

#SlimStatic Slim PHP static proxy library. Contents About Usage API Customizing License About SlimStatic provides a simple static interface to various

Comments
  • ⚠ Deprecation notice

    ⚠ Deprecation notice

    Dear D4rkMindz,

    Everyone is deprecating PHP since the language isn't that good. Please consider the use of Spring or other non deprecated technologies. The inconsistency and poor design has been proven several times, and the time has come to deprecate PHP.

    Thanks in advance,

    opened by michaelbeutler 0
Releases(0.1.0)
Owner
Björn Pfoster
Application developer in switzerland Consultant, Coder, Thinker, ICT-Scout. Always looking for the most fun-efficiency-balanced way to handle a challenge
Björn Pfoster
Pug template engine adapter for Slim

Pug for Slim For details about the template engine see phug-lang.com Installation Install with Composer: composer require pug/slim Usage with Slim 3 u

Pug PHP 5 May 18, 2022
Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs.

Slim Framework Slim is a PHP micro-framework that helps you quickly write simple yet powerful web applications and APIs. Installation It's recommended

Slim Framework 11.5k Jan 4, 2023
Slim Framework skeleton application with MVC Schema

Slim Framework skeleton application with MVC Schema

JingwenTian 9 Apr 29, 2021
This repository contains a library of optional middleware for your Slim Framework application

Slim Framework Middleware This repository contains a library of optional middleware for your Slim Framework application. How to Install Update your co

Slim Framework 47 Nov 7, 2022
Slim Framework 3 Skeleton Application + PagSeguro Lib

Slim Framework 3 Skeleton Application + PagSeguro Lib Aplicação simples para geração do Token para pagamentos no PagSeguro (método transparente) e env

Raí Siqueira 1 Feb 26, 2018
Parses YAML files and adds them to Slim's config application instance method.

Slim Config - YAML Parses YAML files and adds them into Slim's config singleton. Uses Symfony's YAML Component to parse files (http://github.com/symfo

Bill Rex 4 Mar 10, 2022
Gracili is a PHP Application Template to quickly create a new Project

Gracili What is Gracili? Gracili is a PHP Application Template to quickly create a new Project. Using this template can save you a lot of time. With t

Björn Pfoster 1 May 12, 2021
Slim Framework - Prerequisite Checker

Slim Framework - Server Configuration Checker Upload the file check.php to your webserver Browse to the file: https://example.com/check.php Check the

Daniel Opitz 6 Aug 30, 2022
REST APIs using Slim framework. Implemented all CRUD operations on the MySql database

PHP REST API using slim framework and CRUD operations ?? Hi there, this is a simple REST API built using the Slim framework. And this is for the folks

Hanoak 2 Jun 1, 2022
A Slim PHP MVC framework built just for fun!

Aura Framework A Slim PHP MVC framework built just for fun! en: Note: This repository only contains the core code of the Aura framework. If you want t

Murilo Magalhães Barreto 2 Dec 16, 2021