Giter Site home page Giter Site logo

oishikatta's Introduction

Oishikatta Documentation

Welcome to the Oishikatta. Version number : 1.0.0 The purpose of this documentation is just to explain quickly what technologies are used, how to use and compile them.

I wanted to create an app that helps me saving my recipes and at the same time learn more about some technologies (mostly Php and Js)

If you happen to stumble on this project, it's a work in progress. I'll update this documentation when it's more advanced.

If you want to understand more about Symfony and its structure, go check symfony.com or their github

Each part of the project has comments and hopefully will be useful (Controllers, Repositories, Js, ...).

What's inside?

The Symfony Standard Edition is configured with the following defaults:

  • An AppBundle you can use to start coding;

  • Twig as the only configured template engine;

  • Doctrine ORM/DBAL;

  • Swiftmailer;

  • Annotations enabled for everything.

Different bundles and technologies have been installed to add more features :

  • Composer - Manages PHP dependencies

  • Doctrine Migrations - Helps migrating database easily with keeping migration diff (in app/doctrineMigrations). See Migrations Usage

  • VichUploader - Manages image upload

  • Sass - Stylesheets were created in SASS (Scss format), Check documentation online to install it if you don't have it.

  • Webpack - JavaScript task runner to automate different things (minify css, js, images among others) See package.json for grunt dependencies and Gruntfile.js for configuration. Each tasks are explained inside. We use Symphony's environments to know if we should use dev files or distribution ones. web/dist directory hosts the distribution files (Minified css, images and js. Fonts)

  • Vue.js 2 - Vue is a progressive framework for building user interfaces. I'm still learning it so this part of the documentation will evolve when I know more about it. I will use both Twig and Vuejs for templating

  • Git - For now everything is on master branch but I will separate master and develop if I set up a test website. Usually I follow this

  • When possible, keep Entity queries in their respective repositories and query data with ArrayResults, it's way way faster than Object queries. Be careful that limit (Doctrine's maxresults) has a weird (and broken) behaviour with ArrayResult. See Doctrine Documentation.

Installation

PHP

After pulling the website from git and installing the different technologies (php, ruby, sass, ...), you should :

    php composer install

If you add new php dependencies or bundles :

    php composer update

Configure parameter.yml with your database and smtp settings Install database :

    php bin/console doctrine:database:create
    php bin/console doctrine:schema:update --force

When making changes to database, use database migration, not schema update

doctrine:migrations
  :diff     Generate a migration by comparing your current database to your mapping information.
  :execute  Execute a single migration version up or down manually.
  :generate Generate a blank migration class.
  :migrate  Execute a migration to a specified version or the latest available version.
  :status   View the status of a set of migrations.
  :version  Manually add and delete migration versions from the version table.

For cleaning cache in Symfony use :

    php bin/console cache:clear

And for dist environment :

    php bin/console cache:clear --env=prod

It usually fixes many problems to clear the cache (add translations, ...)

Npm and Webpack

For modules and task running, Webpack is installed with different modules and loader

First you need to install node, npm and then dependencies :

    npm install

For dev environment, you can just use :

    npm run dev

It will watch for changes in scss and files In dev environment, it injects the css directly in the page

On production, you need to run :

    npm run prod

It will run each steps needed by the prod environment, check js and compile everything

I still need to add some loaders and modules.

Dist folder is ignored by git

If you add new features, dependencies or stuffs :), document and comment it please. you can refer to Symfony's documentation anytime you get lost.

Enjoy!

oishikatta's People

Contributors

thomasprost avatar

Stargazers

Jason Stelzer avatar

Watchers

James Cloos avatar  avatar Alexey Pyltsyn avatar  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.