Skip to content

clemissile/symfony-vue-starter

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Symfony Logo Vue Logo

symfony-vue-starter

Symfony 4 skeleton with VueJs, Vuex, Vue-router and Webpack !

Report Bug · Request Feature

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

About The Project

I wanted a skeleton with an API made with Symfony and a front with VueJs but I didn't find one that really suited my needs on Github so I created this enhanced one.

Built With

Getting Started

Prerequisites

Installation

  1. Install composer and node dependencies
     $ composer install
     $ yarn install #recommended
    
     or
    
     $ npm install
  2. Migrate database and fixtures
    $ php bin/console make:migration
    $ php bin/console doctrine:migrations:migrate 
    $ php bin/console doctrine:fixtures:load
  3. Compile JS and CSS files
    $ ./node_modules/.bin/encore dev 
  4. Execute built in Symfony web server
    $ php bin/console server:run

or

  1. If you use Docker
    $ docker-compose up

Vue development

Vue files are located at /assets/js folder. Just modify these files as a regular Vue project.

I suggest you using hot-reload encore server. When a file is updated webpack will be launched automatically. Start it with this command

$ ./node_modules/.bin/encore dev --watch

Files app.js and app.css will be compiled at /public/build folder.

Default controller contains just one root route that renders this necessary files.

SassLoader is activated, so all changes on /assets/js/app.scss will be compiled too.

Axios are prototyped as $http. This service will be available at the whole Vue app.

Vuex and Vue-router are included too. Be free to add as routes and stores as you want.

Test account

Thanks to fixtures, a test account can be create :

admin@exemple.com
1234

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

License

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

Contact

Clemissile - @clemissile - ganivetclement@gmail.com

Project Link: https://github.com/clemissile/symfony-vue-starter

Acknowledgments

About

Symfony 4 skeleton with Vue, Vuex, Vue-router and Webpack

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published