{"id":19299157,"url":"https://github.com/olivierfl/snowtricks","last_synced_at":"2026-04-16T10:02:41.183Z","repository":{"id":40654277,"uuid":"318580501","full_name":"OlivierFL/snowtricks","owner":"OlivierFL","description":"Project 6 - Snowboard website","archived":false,"fork":false,"pushed_at":"2023-02-02T01:13:24.000Z","size":9309,"stargazers_count":0,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-24T01:16:43.148Z","etag":null,"topics":["css","doctrine","html","javascript","mysql","openclassrooms","php","snowtricks","symfony","twig"],"latest_commit_sha":null,"homepage":"","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/OlivierFL.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}},"created_at":"2020-12-04T16:56:44.000Z","updated_at":"2022-02-06T11:27:15.000Z","dependencies_parsed_at":"2023-02-17T13:01:42.286Z","dependency_job_id":null,"html_url":"https://github.com/OlivierFL/snowtricks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/OlivierFL/snowtricks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OlivierFL%2Fsnowtricks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OlivierFL%2Fsnowtricks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OlivierFL%2Fsnowtricks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OlivierFL%2Fsnowtricks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OlivierFL","download_url":"https://codeload.github.com/OlivierFL/snowtricks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OlivierFL%2Fsnowtricks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31880884,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T09:23:21.276Z","status":"ssl_error","status_checked_at":"2026-04-16T09:23:15.028Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["css","doctrine","html","javascript","mysql","openclassrooms","php","snowtricks","symfony","twig"],"created_at":"2024-11-09T23:10:20.528Z","updated_at":"2026-04-16T10:02:41.165Z","avatar_url":"https://github.com/OlivierFL.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Maintainability](https://api.codeclimate.com/v1/badges/d677a13732b368ff06a5/maintainability)](https://codeclimate.com/github/OlivierFL/snowtricks/maintainability)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=OlivierFL_snowtricks\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=OlivierFL_snowtricks)\n\n# SnowTricks\n\nProject 6 - Snowboard site built with Symfony Framework.\n\n## Requirements\n\nMandatory :\n\n- `PHP \u003e= 7.4`\n- `Symfony CLI`\n- `npm` or `yarn`\n\nOptional :\n\n- `Make` to use the [_Makefile_](./Makefile) and custom commands\n- `Docker` and `Docker-compose` for _MySQL_ database and _PhpMyAdmin_ containers\n- `MailDev` to catch emails (registration and lost password), or another mailcatcher\n\nUnit Tests :\n\n- `PHPUnit`\n\n## Installation\n\n1. To get this project on your local machine, simply clone this repository :\n   ```shell\n   git clone git@github.com:OlivierFL/snowtricks.git\n   ```\n\n\n2. Install the dependencies :\n\n- `composer install`\n- `npm install`\n\n  or if _Make_ is installed on your machine :\n\n- `make deps-install` will run the above commands automatically.\n\n\n3. Environment configuration :\n\n   To configure local dev environment, create a `.env.local` file at the root of the project.\n\n   To configure database connection, override the `DATABASE_URL` env variable with your database credentials and database name, for example :\n\n    ```dotenv\n    DATABASE_URL=\"mysql://root:root@127.0.0.1:3306/snowtricks?serverVersion=5.7\"\n    ```\n\n   If you're using the _MySQL_ Docker container, the config is :\n\n    ```dotenv\n    DATABASE_URL=\"mysql://root:admin@127.0.0.1:3306/snowtricks\"\n    ```\n\n   To enable sending registration and lost password emails, add in the `.env.local` file the `MAILER_DSN` env variable, for example with _MailDev_ :\n\n    ```dotenv\n    MAILER_DSN=\"smtp://localhost:1025\"\n    ```\n\n   In the `.env` file, 2 variables are available, to configure the default number of tricks displayed on homepage, and the number of comments displayed on each trick detail page :\n\n    ```dotenv\n    TRICKS_LIST_LIMIT=8\n    COMMENTS_LIST_LIMIT=4\n    ```\n\n4. After configuring the database connection, run `bin/console doctrine:database:create` to create the database.\n\n\n5. Import the [example data set](#sample-data) available in the [dump](./dump/snowtricks.sql) directory in the database. If you're using _Docker_, _PhpMyAdmin_ is available on `localhost:8080` (_user_ : `root`, _password_ : `admin`).\n\n\n6. Build the assets for development with `npm run dev`, or `npm run watch` to recompile every time a file is changed (CSS or Javascript). To build for production, run `npm run build`. The documentation for WebpackEncore is available\n   on [Symfony documentation page](https://symfony.com/doc/current/frontend.html).\n\n\n7. Start the Symfony server with `symfony server:start`.\n\nThe homepage is available on : `localhost:8000`.\n\n## Usage\n\nList of useful commands to use the project :\n\n- `symfony server:start` to start the Symfony server\n- `symfony server:stop` to stop the Symfony server\n- `npm run dev` to build the assets for dev environment\n- `npm run watch` to re-build the assets every time a CSS or Javascript file is modified\n- `npm run build` to build the assets for production\n- `maildev --hide-extensions STARTTLS` to start _MailDev_, if installed, available on `localhost:1080`\n\nCommands to use with _Docker_ and _Make_ (commands are available in _Makefile_ at the root of the project) :\n\n- `make up` to start _Docker_ stack (_MySQL_ and _PhpMyAdmin_) and _Symfony server_\n- `make up-dev` to start _Docker_ stack (_MySQL_ and _PhpMyAdmin_) and _Symfony server_ and build assets for dev environment\n- `make up-watch` to start _Docker_ stack (_MySQL_ and _PhpMyAdmin_) and _Symfony server_, build assets for dev environment and watch files changes\n- `make mail` to start _MailDev_, available on `localhost:1080`\n- `make down` to stop _Docker_ stack (_MySQL_ and _PhpMyAdmin_) and _Symfony server_\n\n## Sample data\n\nIn order to have a fully functional application, the SQL file contains :\n\n- 2 users with different states :\n    - an admin user with __admin@example.com__ _email_, __admin__ _username_ and __Admin1234__ _password_. This user has role admin and can create, edit and delete any snowboard tricks, post comments and moderate comments in admin dashboard.\n\n    - a simple user with __test@example.com__ _email_, __test__ _username_ and __Test1234!__ _password_. This user can create and edit any tricks, delete his own tricks, post comments.\n\n- A default list of Tricks with some example media and comments.\n\n## Third party libraries\n\nPackages and bundles used in this project :\n\n- [FOSJsRoutingBundle](https://github.com/FriendsOfSymfony/FOSJsRoutingBundle)\n- [KnpPaginatorBundle](https://github.com/KnpLabs/KnpPaginatorBundle)\n- [RollerWorks PasswordStrengthBundle](https://github.com/rollerworks/PasswordStrengthBundle)\n- [SymfonyCasts ResetPasswordBundle](https://github.com/SymfonyCasts/reset-password-bundle)\n- [SymfonyCasts VerifyEmailBundle](https://github.com/SymfonyCasts/verify-email-bundle)\n- [WebpackEncore](https://symfony.com/doc/current/frontend.html) for building _assets_ (`CSS` and `Javascript` files)\n- [TailwindCSS](https://tailwindcss.com/) as _CSS framework_\n\n## Docker (optional)\n\nThis project uses Docker for _MySQL_ database and _PhpMyAdmin_.\n\nThe stack is composed of 2 containers :\n\n- mysql\n- phpMyAdmin\n\nThe configuration is available in the [docker-compose.yaml](./docker-compose.yaml).\n\n## Catching emails (optional)\n\nInstead of sending emails to a real email address, a mailcatcher can be used. For this project, I used _MailDev_, installed locally, to catch emails.\n\nThe Symfony `MAILER_DSN` env variable configuration for _MailDev_ is available in the [installation](#installation) part.\n\n## Tests\n\n_PhpUnit_ is used to run the tests.\n\nIn a terminal, at the root of the project, run `vendor/bin/phpunit`.\n\n## Code quality\n\nLinks to code quality tools used for this project:\n\nCodeclimate : https://codeclimate.com/github/OlivierFL/snowtricks\n\nSonarCloud : https://sonarcloud.io/dashboard?id=OlivierFL_snowtricks\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folivierfl%2Fsnowtricks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folivierfl%2Fsnowtricks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folivierfl%2Fsnowtricks/lists"}