Skip to content
One picture a day in your web browser
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
bootstrap
database
public
resources
routes
storage
tests
.codeclimate.json
.env.example
.gitignore
.phpcs.xml
.phpmd.xml
artisan
composer.json
composer.lock
helpers.php
package-lock.json
package.json
phpunit.xml
readme.md
screenshot.jpg
webpack.mix.js

readme.md

One picture a day in your web browser.

Demo available at https://photos-demo.dubandubois.com/

Status

Maintainability

This application is now considered as stable. No more features are planned, but feel free to suggest some if you need. Feature, fix, UX, logo, translation... any help is welcome !

Features...

....for end users

  • large daily photo page with navigation per day.
  • full page monthly photo grid with navigation per month.
  • full page yearly photo grid (one random photo per month) with navigation per year.
  • on the daily view, show photos taken every year at the same date.
  • slideshow page with random photos.
  • keyboard arrows and touch screen swipe navigation.
  • responsive design.

...for administrator

Requirements

  • a web server (tested with Apache).
  • PHP >= 7.1.3.
  • GD Library >=2.0 or Imagick PHP extension >=6.5.7.
  • composer

Delpoyment

  1. Download the code to an empty folder:
git clone git@github.com:simondubois/photos.git /var/www/photos
  1. Create the configuration file:
cd /var/www/photos && cp .env.example .env
  1. Set APP_KEY in .env (for example APP_KEY=5YPcB9vVuxWf1YyjJgKhEVSg7ggvL+fD).
  2. Set PHOTOS_ROOT in .env (for example PHOTOS_ROOT="/home/user/Pictures/Daily Album").
  3. Install the dependencies:
composer install --optimize-autoloader --no-dev
  1. Point the web server to /var/www/photos/public.

FAQ

How to upload photos?

This feature is not implemented, and there is no plan to implement it in the future. This is a KISS project focusing on displaying photos, not managing files.

To upload photos, you have several options:

  • (S)FTP or any file manager provided by your hosting.
  • sync a server folder with a local folder.
  • sync a server folder with a file hosting service.
  • sync a server folder with a personal cloud service.
  • fork the project and implement the feature.

Why are some photos so slow?

The core idea of this app is to render photos without altering the original files. Thus all photos are optimised at request time. One option would be to cache the operations on files. Unfortunatelly, intervention/imagecache has known issue about slow cache. Another option would be to store a copy of the optimized image and serve this file instead. But cache invalidation is impossible because we do not manage the original files.

To improve perfomances, two trade-offs have been implemented:

  1. The APi asks the client to cache the photo for one week. So the client cache the files.
  2. The client request all photos to have the same maximum resolution. So each photo is requested once, no matter how large is the container.

What about authentication?

Authentication either requires a database or an external service. Also, authentication require additional features like lost passwords and account activation. This is a KISS project focusing on displaying photos, avoiding any complexity.

If you want authentication, I recommend you to setup Basic access authentication at the server level.

How to change the theme?

You can easily switch to any other Bootswatch theme:

  1. Run npm install to install all frontend dependencies.
  2. Open resources/app.scss
  3. Replace the two occurences to sketchy with the template namce of your choice.
  4. Run npm run dev to compile the assets with the new theme. Voilà!
You can’t perform that action at this time.