Skip to content

aportela/homedocs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2,488 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Homedocs

Homedocs is a simple personal document manager. You can conveniently store your files by classifying them with tags for easy retrieval in the future.

Screenshots (click to preview)

Login page Signin page screenshot
Default home page / Dashboard Dashboard page screenshot
Profile page Profile page screenshot
Document page Document page screenshot
Search (advanced) page Advanced search page screenshot
Fast search dialog Fast search dialog screenshot
Preview attachments page PDF preview dialog screenshot Image preview dialog screenshot
Shared attachment preview dialog Shared attachment preview dialog screenshot
Dark mode Profile page (dark mode)

System requirements

  • PHP v8.4
  • composer
  • 'pdo_sqlite' & 'mbstring' php extensions
  • enough disk space for storing documents

Setup / Installation

The project currently consists of two parts:

phpslim-api/ : Back-end (server API, also includes the latest compiled Quasar web interface/front-end). If you only want to install/use Homedocs, you can copy/use just this part.

quasar-frontend/: Front-end (contains the source code of the Quasar web interface). You won’t need this if you only want to use Homedocs (without developing or making changes).

Install the dependencies (in the phpslim-api/ path).

composer install

Execute the SQLite database creation/update script.

php phpslim-api/tools/setup.php

Check proper permissions: The web server process must have read and write permissions for files, and read, write, and execute permissions for directories.

    Database file
        phpslim-api/data/homedocs3.sqlite3

    Storage paths
        phpslim-api/data/storage/*.*

    Debug files
        phpslim-api/data/logs/*.*

The system should work by default, but if you need to modify any configuration, the settings file is located at:

    phpslim-api/config/settings.php

Web server configuration:

The base path for the web server should be: phpslim-api/public/

Customize the web server settings according to the PHP Slim documentation:

https://www.slimframework.com/docs/v4/start/web-servers.html

Migration from previous (2.x) version

WARNING: Before making any changes, make a backup of the files and database (located at phpslim-api/data/).

The storage data is retained/shared from previous versions (1.x & 2.x), but the database structure has changed. You will need to install a clean database and run a small SQLite script from the command line:

php phpslim-api/tools/setup.php
cd phpslim-api/data
sqlite3 ./homedocs3.sqlite3 < ../tools/migrate-from-v2.sql

Migration from old (1.x) version to previous version (2.x)

WARNING: Before making any changes, make a backup of the files and database (located at phpslim-api/data/).

The storage data is retained/shared from the previous version (1.0), but the database structure has changed. You will need to run a small SQLite script from the command line (located under the phpslim-api/data/ path, where old sqlite3 database is stored):

cat ../tools/migrate-from-v1.sql | sqlite3 ./homedocs2.sqlite3

Once migrated, run the update script to apply the SQL version changes:

php phpslim-api/tools/setup.php

Backup data

It's highly recommended to make periodic backups. All data (excluding source code), including the SQLite database and file storage, is stored under the phpslim-api/data/ path.

Add/recover user credentials from console

You can create or update an account from the command line using the PHP script:

php phpslim-api/tools/set-credential.php --email myuser@myserver.net --password mysecret

If the account already exists, it will be overwritten with the provided data.

Development

Mock / example data

It is possible to generate mock example data for a user with specific credentials using the following command line:

php phpslim-api/tools/generate-demo-data.php --count 512 --email johndoe@localhost --password secret

Backend (php-slim)

Install the dependencies:

cd phpslim-api
composer install

Start the local PHP (backend/API) server, listening on http://127.0.0.1:8081:

composer serve

Frontend (quasar)

Install the dependencies:

cd quasar-frontend
npm i

Start the local front-end (Quasar web app interface), listening on http://127.0.0.1:8080:

quasar dev

Build the Quasar web app release (in /phpslim-api/public):

quasar buid

TODO

  • Docker
  • Document API
  • Android app

PHP Composer