Git Product home page Git Product logo

bloc-3's Introduction

PHP MVC Framework Boilerplate

License

Your PHP MVC (Model-View-Controller) Framework Boilerplate is designed to kickstart your web development projects with a clean, organized, and scalable structure.

Features

  • MVC Architecture: Organize your code into Models, Views, and Controllers for maintainability and separation of concerns.
  • Routing: Implement flexible routing to map URLs to controller actions.
  • Template System: Easily create and render views using a template engine of your choice.
  • Database Integration: Configure and interact with your database using a PDO or your preferred database library.
  • Error Handling: Handle errors gracefully with customizable error pages and logging.
  • Modular and Extensible: Add new features and modules to your framework with ease.

Getting Started

Prerequisites

Installation

  1. Clone this repository to your local machine:

    git clone https://github.com/nicolasbalao/PHP-MVC-boilerplate/blob/main/public/index.php
  2. Configure docker-compose.yml (replace all #EDIT)

    version: "3"
    
    services:
    web:
      build:
      context: .
      dockerfile: Dockerfile
      ports:
        - 80:80
      volumes:
        - .:/var/www/html
        - ./vhost/site.conf:/etc/apache2/sites-available/000-default.conf
    db:
      image: mariadb:10.4
      container_name: your_db_container_name #EDIT
      environment:
      MYSQL_ROOT_PASSWORD: your_root_password #EDIT
      MYSQL_DATABASE: your_database_name #EDIT
      MYSQL_USER: your_mysql_user #EDIT
      MYSQL_PASSWORD: your_mysql_password #EDIT
      ports:
        - "3306:3306"
      volumes:
        - your_db_volume_name:/var/lib/mysql #EDIT
    phpmyadmin:
      image: phpmyadmin/phpmyadmin
      container_name: your_phpmyadmin_container_name #EDIT
      links:
        - db
      environment:
      PMA_HOST: your_db_container_name #EDIT
      PMA_PORT: 3306
      PMA_ARBITRARY: 1
      ports:
        - 8081:80
    
    volumes:
    your_db_volume_name: #EDIT
  3. Configure the vhost

        <VirtualHost *:80>
        ServerName your_domain_name #EDIT
        DocumentRoot /var/www/html/public
    
        <Directory /var/www/html/public>
            Require all granted
        </Directory>
    
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
    
        </VirtualHost>
  4. Run the project

    docker compose up --build -d

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

Nicolas balao Email: [email protected]

bloc-3's People

Contributors

nicolasbalao avatar

Watchers

 avatar

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.