No description
Find a file
Gabriel Arakaki Giovanini 29e9fd3136 fix: Rollback to exp slog repository
This is done until go1.21 hits alpine repository.
2023-12-01 00:52:33 +01:00
.builds ref: Move some bin from img to lens 2023-07-31 19:11:42 +02:00
cmd/server fix: Rollback to exp slog repository 2023-12-01 00:52:33 +01:00
pkg fix: Rollback to exp slog repository 2023-12-01 00:52:33 +01:00
scss feat: Simplify mosaic 2023-10-06 18:41:13 +02:00
static ref: Remove static fs on root 2023-07-19 21:13:34 +02:00
templates fix: Adjust post endpoint 2023-12-01 00:26:29 +01:00
.gitignore ref: Remove static fs on root 2023-07-19 21:13:34 +02:00
.gitmodules feat: Inicial commit 2023-06-18 16:30:36 +02:00
go.mod fix: Rollback to exp slog repository 2023-12-01 00:52:33 +01:00
go.sum fix: Rollback to exp slog repository 2023-12-01 00:52:33 +01:00
golangci.yml feat: Remove unecessary param from repo 2023-06-23 21:25:37 +02:00
LICENSE feat: Inicial commit 2023-06-18 16:30:36 +02:00
Makefile fix: Fix initial setup check 2023-09-03 13:08:47 +02:00
README.md chore: Update readme readmap 2023-09-12 19:19:37 +02:00

Lens

A read only file explorer with media capabilities.

Dev

To run the project you simply need to run:

make run

It should run using sqlite with a randon AES key. But if you don't set a AES_KEY a new one will generated every time the project is realead and you will be logged out.

You can also create a .env file which will be read by make to populate the environment variables, e.g.:

# .env
DB_TYPE=psql
DB_CON=host=localhost user=admin password=admin dbname=lens port=5432
LOG_LEVEL=error
SCHEDULER_COUNT=10
CACHE_PATH=/home/myhome/.thumb
AES_KEY=X4Eu3OT/WqUtUJhGLUtQ4xRahwhWYaSs+k2a03Kz1A8=

To generate a new AES_KEY run:

openssl rand -rand /dev/urandom 32 | base64

Obs.: don't quote the value, that will be done automatically.

Throughout the development you can also run make watch for a hot reload experience. It will feedback loop a bit faster.

Build and install

To build you simply run:

make

And a ./bin/lens will be created.

To install run:

make install

Or you can pass a custom target folder.

PREFIX=~/.local/ make install

Requirements

qtc

It is used as template engine for html. To install it:

go install  github.com/valyala/quicktemplate/qtc@latest

libvips

Libvips1 is required by bimp 2 used for image manipulation.

ffmpeg

Used to generate video thumbnail.

sassc

Sassc3 is used to generate the css file from sass.

Bulma

Bulma is the css framework of choice for this project. It is added as sub-module, so don't forget to pull it.

TODO

  • Demo site
  • Single image viewer and show exif info (not sure how yet)
  • Better UI error handling (or error handling at all).
  • Log out option
  • Better pagination
  • Better Testing. Since I still on initial iteration phases I'm not adding as many testing as I'd like to. Once I set on most of the design I'll add more test (is this ever done 🤔).