lamberski / premiefier

Online tool that notifies via email about upcoming movie premieres.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Premiefier

Premiefier helps you to keep up to date with movie premieres. It will notify you about the upcoming premiere via email three days before.

Directories

  • /application—Back-end of the application powered by Silex framework. Eloquent is used as ORM of choice, 'cause it's lighter and simpler to set up than Doctrine.
  • /gulpfile.js—Gulp workflow extracted from Frontkit (Scaffolding & Gulp workflow for web projects.)
  • /source—Front-end source files. Check out Frontkit documentation to learn more about structure and files.
  • /public—Public folder where all requests go. Also all static assets are put there during compilation.

Front-End

Gulp is used to compile, minify & optimize front-end assets. Whole workflow is extracted from Frontkit (scaffolding & Gulp workflow for web projects). To compile the assets run:

gulp watch # This task will watch for changes in files and recompile them as needed.
gulp build # Recreate whole project.
gulp # Equivalent of 'gulp build && gulp watch'.

Keep in mind that in order to run above commands you need to have npm, gulp and bower installed. Also, run npm install && bower install first to install all dependencies.

Background Jobs

To notify subscribed users about upcoming premieres, background job for checking dates ands send emails needs to be set up. Premiefier is using ConsoleServiceProvider to run console tasks. Set up crontab -e to run below command at least once a day.

php application/console.php notify

Configuration

Configuration of the app—including database path, API keys, SMTP setup—is based on environment variables to remove all confidential data from the repository. config.php file is located in /application directory. Below is list of all required variables:

Key Description
DEBUG Whether application should be run in debug mode.
API_KEY Rotten Tomatoes API key. You can get one by registering the app on their site.
DB_PATH Path to *.sqlite file with the database.
MAIL_* SMTP-related configuration to set Swift Mailer up. You can find more information in Silex documentation.

Database

Site is using SQLite to store data. Schema of the database is located in schema.sql.

Deployment

Premiefier has deployment mechanism already set up. It's using simple yet powerful Deployer. Servers configuration is loaded from external YAML file deploy.yml (which is not included to the repository). Learn more about serverList() in Deployer documentation. To deploy files to the server run:

dep deploy

License

(MIT License)

Copyright (C) 2016 Maciej Lamberski

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Online tool that notifies via email about upcoming movie premieres.


Languages

Language:PHP 32.8%Language:CSS 29.2%Language:HTML 24.9%Language:JavaScript 13.1%