{"id":15076671,"url":"https://github.com/maumasi/local_art","last_synced_at":"2026-01-02T20:50:22.520Z","repository":{"id":222765804,"uuid":"80459833","full_name":"Maumasi/local_art","owner":"Maumasi","description":null,"archived":false,"fork":false,"pushed_at":"2017-02-25T21:10:14.000Z","size":4879,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T12:15:40.621Z","etag":null,"topics":["annotations","database-queries","fixtures","flow","gulp","gulp-tasks","mvc","php","php7","sass-files","symfony","symfony2","twig"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Maumasi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-01-30T20:22:22.000Z","updated_at":"2022-02-12T09:07:09.000Z","dependencies_parsed_at":"2024-02-16T05:24:34.922Z","dependency_job_id":"de6aba1f-079d-4d7a-97f4-9e4fdf83c0fe","html_url":"https://github.com/Maumasi/local_art","commit_stats":null,"previous_names":["maumasi/local_art"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maumasi%2Flocal_art","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maumasi%2Flocal_art/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maumasi%2Flocal_art/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maumasi%2Flocal_art/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Maumasi","download_url":"https://codeload.github.com/Maumasi/local_art/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243864824,"owners_count":20360360,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["annotations","database-queries","fixtures","flow","gulp","gulp-tasks","mvc","php","php7","sass-files","symfony","symfony2","twig"],"created_at":"2024-09-25T04:02:17.792Z","updated_at":"2026-01-02T20:50:22.483Z","avatar_url":"https://github.com/Maumasi.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Local Art\n\n###### A Symfony project created on January 26, 2017, 8:23 pm. \u003cbr\u003e\n A place to discover art markets in your area or an area you're looking to visit.\n\n\n\n\u003cbr\u003e\n\n## Index\n\n- [Project Notes](#user-content-project-notes)\n\n- [Getting Started](#user-content-getting-started)\n\n- [Use: Important Directories](#user-content-use-important-directories)\n\n- [MVC](#user-content-mvc)\n\n- [Development](#user-content-development)\n\n- [Resources](#user-content-resources)\n\n---\n\u003cbr\u003e\n\n## Project Notes\n\nThis project makes us of several global installations. The instructions for each global dependency is a link at the bottom of this README file.\n\nThis project's work flow uses **feature branch work flow** by utilizing `git`.\n\n---\n\u003cbr\u003e\n\n## Getting Started\n### Initializing Project\n\nIn a new directory preform a `git init` and a `git pull` request:\n```bash\n$ cd path/to/new/root/directory\n$ git init\n$ git pull https://github.com/Maumasi/local_art.git\n```\n\u003cbr\u003e\n\nAfter pulling down the project the dependencies need to be installed and configured. \u003cbr\u003e\n\n### Install dependencies:\n```bash\n$ npm install\n$ composer install\n```\nAfter these lines are executed you will be promoted with `Creating the \"app/config/parameters.yml\" file` where you will configure the project credentials. All the credentials requested have defaults, you will have to provide the credentials you intend to use. The only default parameter that should not be changed is `image_upload_directory`. Also, the `mailer_*` parameters are not being used in this project but have been left in for future expansion.\n\u003cbr\u003e\n\n### Create the Database and Tables\nUsing the parameters provided from the installation enter the following commands to build the database and configure tables:\n```bash\n$ app/console doctrine:database:create\n$ app/console doctrine:schema:update --force\n```\n**Note:**\u003cbr\u003e\nIf there are errors creating a database, carefully read the error message(s), make sure your database port is running, and check your parameters you provided during installation in `ROOT/app/config/parameters.yml`\n\u003cbr\u003e\n\n### Starting the Built in Server\nTo start the built in server execute the following command:\n```bash\n$ app/console server:run\n```\n\u003cbr\u003e\nYou can run the server on any IP:port of your choosing by declaring it with the `server:run` command like so:\n```bash\n# run on localhost with port: 8908\n$ app/console server:run 127.0.0.1:8908\n```\n\u003cbr\u003e\nAt this point the project should be up and running without any errors.\n\n---\n\u003cbr\u003e\n\n## Use: Important Directories\n\nThe directories that are going to be worked in the most, in the order your IDE will likely order them, are:\n\n- `ROOT/app`\n\n- `ROOT/devAssests`\n\n- `ROOT/src`\n\n- `ROOT/web`\n\n---\n\u003cbr\u003e\n\n## MVC\n\n### Models\nModels are known as **Entities** in Symfony. All entity classes are defined in **`ROOT/src/AppBundle/Entity/`** \u003cbr\u003e\nEvery entity class makes efficient use of *Annotations*. If you're not familiar with Annotations and how to use them check out Annotations in the [Resources](#user-content-resources) section.\n\u003cbr\u003e\n\nSome entities have custom database query methods. These methods are located in `ROOT/src/AppBundle/Repository`\u003cbr\u003e\nIf there is a need to create complex database queries make a class for the query methods that extends a base class of `EntityRepository` if one does not already exist. If you are not familiar with Symfony's Doctrine/ORM queries, check it out in the [Resources](#user-content-resources).\n\u003cbr\u003e\n\n### The Form Builder\nSymfony's form classes are located in `ROOT/src/AppBundle/Form`\u003cbr\u003e\nForms can be mapped to an entity class for processing using the configureOptions() method in the form class:\n```java\nclass ArtistRegitration extends AbstractType\n{\n    public function buildForm(FormBuilderInterface $builder, array $options)\n    {\n        $builder\n            -\u003eadd('firstName')\n            -\u003eadd('lastName')\n            -\u003eadd('profileImage', FileType::class, [\n                'required' =\u003e true,\n            ])\n            -\u003eadd('email', EmailType::class)\n            -\u003eadd('nakedPassword', RepeatedType::class, [\n                'type' =\u003e PasswordType::class,\n\n            ])\n            -\u003eadd('businessName', TextType::class, [\n                'empty_data' =\u003e null,\n                'required' =\u003e false,\n            ])\n\n            -\u003eadd('website', UrlType::class, [\n                'empty_data' =\u003e null,\n                'required' =\u003e false,\n            ])\n            -\u003eadd('bio', TextType::class, [\n                'empty_data' =\u003e null,\n                'required' =\u003e false,\n            ]);\n    }\n\n    public function configureOptions(OptionsResolver $resolver)\n    {\n        $resolver-\u003esetDefaults([\n            'data_class' =\u003e Artist::class,// \u003c-- form mapped to the Artist entity\n            'validation_groups' =\u003e ['Default', 'registration'],\n        ]);\n    }\n}\n```\n**Note:**\u003cbr\u003e\nIf you're not familiar with Symfony's form builder check it out in the [Resources](#user-content-resources) section.\n\n---\n\u003cbr\u003e\n\n### Views\nViews are found in **`ROOT/app/Resources/views/`**\u003cbr\u003e\nIn this directory there are a few subdirectories that help organize the Twig components.\nViews are build in components using Twig as the front-end framework. If you're not familiar with Twig check it out in the [Resources](#user-content-resources) section.\u003cbr\u003e\n\n`base.html.twig`\u003cbr\u003e\nThis file holds the base HTML wrapper for every view.\n\u003cbr\u003e\n\n`common/`\u003cbr\u003e\nThis directory holds all the components that will be used across multiple pages such as the `\u003cheader\u003e` or the `\u003cfooter\u003e`.\n\n`main/`\u003cbr\u003e\nThis directory holds all the views that a site visitor can see\n\n`secure/`\u003cbr\u003e\nThis directory holds all the components that will require an `HTTPS` protocol. These are the views that deal with user credentials.\n\u003cbr\u003e\n\n---\n\n### Controllers\nControllers are found in **`ROOT/src/AppBundle/Controller/`**\u003cbr\u003e\nThe `MainController.php` manages all the routes and data the site visitor uses.\u003cbr\u003e\n\nSecure controllers are in the subdirectory `Secure/`\u003cbr\u003e\nThese controllers manage the routes and data for the account holders.\n\n---\n\u003cbr\u003e\n\n\n## Development\n\n### Fixtures\nFixtures provide fake data to the database to aid with development and testing.\u003cbr\u003e\nTo add or edit the fixtures go to `ROOT/src/AppBundle/DataFixtures/ORM/fixtures.yml`\u003cbr\u003e\nWhen creating a fixture or editing a fixture, only parameters defined in the entity can be used.\u003cbr\u003e\nYAML uses a tab deliniated scope, so be carefule with white space.\u003cbr\u003e\n```yml\nAppBundle\\Entity\\User:    # Entity\n  user_{1..10}:   # number of instances (10 users)\n    email (unique): \u003cfreeEmail()\u003e   \n    nakedPassword: '123qwe'\n    createdAt: \u003cdateTime()\u003e\n    # roles: 'ROLE_USER' \u003c-- commented out\n```\n\n**Note:**\u003cbr\u003e\nIf your note familiar with fixtures check it out in the [Resources](#user-content-resources) section.\n\u003cbr\u003e\n\n### SASS\nSASS provides a way for CSS to be dynamic and DRY (Don't Repeat Yourself)\u003cbr\u003e\nSASS files are located in `ROOT/devAssets/sass`\u003cbr\u003e\nThere are several subdirectory in this path to help keep the styles organized but all SASS files are imported into one single SASS file.\u003cbr\u003e\n\n```SASS\n// styles.sass\n\n// Google fonts\n// =================================================\n@import url('https://fonts.googleapis.com/css?family=Lato|Open+Sans|Raleway|Roboto|Slabo+27px')\n\n\n// base settings\n// =================================================\n@import \"util/reset\"\n@import \"util/base\"\n@import \"util/mixin\"\n@import \"util/var\"\n```\nAny new SASS files need to be imported to the `styles.sass` file.\u003cbr\u003e\nIf you're not familiar with SASS, check it out in the [Resources](#user-content-resources) section.\n\u003cbr\u003e\n\n### ES6\nIn this project the one of the main jobs of Javascript is to handle the Google Maps API\u003cbr\u003e\nES6 scripts are located in `ROOT/devAssets/Javascript/ES6`.\u003cbr\u003e\nThe main scripts are located at the directory, all supporting scripts are in the subdirectory `lib`. Inside `lib` are several more subdirectories to help organize scripts by what they are or what they do.\nExample:\n\n```bash\nES6/\n  - app.js\n  - lib/\n      - classes/\n        - Map.js\n      - functions/\n        - mapOptions.js\n      - types/\n        - constants.js\n```\nthese scripts do not have to be written in ES6, but if you would like to get up to date with what you can do with ES6 check it out in the [Resources](#user-content-resources) section.\n\u003cbr\u003e\n\n### Gulp\nGulp is a great and easy to use productivity tool.\u003cbr\u003e\nThe grunt script is located at `ROOT/gulpfile.js`\u003cbr\u003e\nIn this project Gulp is being used to trans-pile SASS into CSS and sends it to the `ROOT/web/css` public directory. It also trans-piles ES6 into legacy Javascript, concatenating all trans-piled Javascript files and then *uglifing* Javascript and creating a file in the `ROOT/web/js` public directory.\n\u003cbr\u003e\n\nExample:\n```Javascript\nconst gulp = require('gulp'),\n    sass = require('gulp-sass'),\n    babel = require('gulp-babel'),\n    uglify = require('gulp-uglify'),\n    concat = require('gulp-concat');\n\n// compile SASS files\ngulp.task('sass', () =\u003e {\n  // ... some gulp logic ...\n});\n\n// compile ES6 to legacy Javascript\ngulp.task('compileES6', () =\u003e {\n  // ... some gulp logic ...\n});\n\n// compress all js files into one file\ngulp.task('compressAllJS', ['compileES6'], () =\u003e {\n  // ... some gulp logic ...\n});\n\n// uglify the compiled ES6\n// This gives us a chance to make changes to the compiled ES6 if we need to\ngulp.task('uglyJS', ['compressAllJS'], () =\u003e {\n  // ... some gulp logic ...\n});\n\n// watch for sass file changes on save\ngulp.task('watch', () =\u003e {\n  gulp.watch(['./devAssets/sass/**/*.sass', './devAssets/Javascript/ES6/**/**/*.js'], ['sass', 'uglyJS']);\n});\n\ngulp.task('default', ['sass', 'uglyJS', 'watch']);\n```\nSome of the gulp tasks have a dependency on another task finishing first, so those dependent tasks are called in an array before the self-evoking anonymous function. The `watch` task monitors an array of file paths for changes when they are saved.The `default` task calls the tasks that end up running all the defined tasks.\u003cbr\u003e\nTo run the default gulp task execute the following command:\u003cbr\u003e\n```bash\n# yup, that's it\n$ gulp\n```\n**Note:**\nIf you're not familiar with Gulp.js, check it out in the [Resources](#user-content-resources) section.\n\n---\n\u003cbr\u003e\n\n## Resources\n\n### Installations\n- [Install Git globally](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)\n\n- [Install Symfony 2.8.x](https://symfony.com/download)\n\n- [Install Composer](https://getcomposer.org/download/)\n\n- [Install Node.js / NPM](https://nodejs.org/en/)\n\n- [Install Gulp.js globally](https://gulp.readme.io/docs)\n\n### Miscellaneous\n\n- [Twig: HTML templating](http://twig.sensiolabs.org)\n\n- [Twig: Form Widgets](https://symfony.com/doc/current/form/form_customization.html)\n\n- [Annotations: Routes](https://www.sitepoint.com/getting-started-symfony2-route-annotations/)\n\n- [Annotations: Models](http://symfony.com/doc/2.8/doctrine/reverse_engineering.html)\n\n- [Symfony's Form Builder](http://symfony.com/doc/current/forms.html)\n\n- [Doctrine ORM: Models and Database Queries](http://symfony.com/doc/current/doctrine.html)\n\n- [Fixture Methods](https://github.com/fzaninotto/Faker)\n\n- [Gulp.js: Productivity Automation](https://gulp.readme.io/docs)\n\n- [NPM Modules For Gulp.js](https://www.npmjs.com/search?q=gulp\u0026page=1\u0026ranking=optimal)\n\n- [ES6 features](http://es6-features.org/#Constants)\n\n- [SASS: A Better Work Flow For CSS](http://sass-lang.com/documentation/file.SASS_REFERENCE.html)\n\n---\n\u003cbr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaumasi%2Flocal_art","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaumasi%2Flocal_art","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaumasi%2Flocal_art/lists"}