Git Product home page Git Product logo

slim4-skeleton's Introduction

Slim4 Skeleton

A Slim 4 Framework skeleton for web applications and APIs.

This skeleton has been developed base on this tutorial.

Features

  • Slim micro framework, powerful and lightweight.
  • Single action controller
  • PHP-DI for dependency injection container and autowiring.
  • ADR pattern
  • Dockerized!
  • Monolog for logging
  • simple php renderer for views
  • Laravel mix for compiling assets
  • Bootstrap
  • Vuejs

Setup using docker

I separated docker compose file for development environment.

In production use docker-compose.yml and for development use docker-compose.dev.yml

Use example file to create docker-compose.dev.yml

cp docker-compose.dev.example.yml docker-compose.dev.yml

Create .env file and update the MYSQL_ROOT_PASSWORD key in the file

cp .env.example .env

Create project settings file in config directory

cp config/env.example.php config/env.php

* Before running containers, you may want to change my-project string in docker compose files.

Build the app image

docker-compose -f docker-compose.dev.yml build app

When the build is finished, run the containers in background mode with:

docker-compose -f docker-compose.dev.yml up -d

Install the application dependencies

docker-compose exec app composer install
docker-compose exec app npm install

Compile your Sass and Js files using the following scripts:

docker-compose exec app npm run dev
or
docker-compose exec app npm run prod

* Also you can enter the app container using the following command and run your project commands as well:

docker exec -it my-project-app bash

Browse to Hello World!

http://127.0.0.1:8001

Useful Links

slim4-skeleton's People

Contributors

hamidinfotech avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

buckster12

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.