Skip to content

This template helps you to get started with the modular programming approach within the Symfony framework

License

Notifications You must be signed in to change notification settings

Tim-Koertgen/modular-symfony-template

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn Symfony PHP


Modular Symfony Template


Explore the docs »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

Backend

All your business logic should be located here. The backend layer is split into four layers

  • Business
    • Contains the actual business logic (e.g. reader and writer) and the facade that will be used by other modules
  • Communication
    • Contains backend controller, commands, plugins that will be used by other services
  • Persistence
    • Contains entities and repositories
  • Presentation
    • Contains templates for the backend UI

Client

The client is the bridge between the backend and frontend layer. Clients should not implement any business logic at all

Core

Currently, this is used for base classes.

Frontend

For now, I am using Twig to render my frontend. You could theoretically replace this with any technology you would like to use. I have splitted my frontend into 2 layers:

  • Communication
    • Contains frontend controllers. This could also be a REST API if you need one.
  • Presentation
    • Contains templates for the frontend

Shared

Shared contains classes that are used across the hole application like TransferObjects and Constants.

(back to top)

Built With

(back to top)

Getting Started

Prerequisites

All you need to do is install Docker and Docker Compose.

Installation

  1. Clone the repo
    git clone https://github.com/Tim-Koertgen/modular-symfony-template.git
  2. Start docker
    docker-compose up -d
  3. Install composer packages
    docker-compose exec php-fpm composer install
  4. Run doctrine migrations
    docker-compose exec php-fpm php bin/console d:m:m --no-interaction
  5. Install npm packages
    docker-compose run npm npm install
  6. Build the frontends
    docker-compose run npm npm run build
  7. Import data
    docker-compose exec php-fpm php bin/console data:import

(back to top)

Usage

You should be able to access the following two endpoints after your installation is finished:

Default backend credentials:

Documentation is in progress

(back to top)

Roadmap

  • Nothing specific planned. I keep the template up to date with the experience I gain from developing apps using this template

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Tim Körtgen - @SirPhoeniix - tim.koertgen@outlook.de

Project Link: https://github.com/Tim-Koertgen/modular-symfony-template

(back to top)