Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

225 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mssdocs

A web-based internal proofing system for organizing, uploading, and browsing manuscript images. Built with PHP and MySQL, featuring a file browser with gallery view, zip folder download with progress tracking, and a multi-user admin interface.

Features

  • File upload with per-user directories
  • Hierarchical file browser with folder management
  • Image gallery viewer with rotate support (blueimp Gallery)
  • Zip folder download with real-time progress bar
  • User management (admin/non-admin roles)
  • TEI/XML editor view
  • Backup file download utility

Requirements

  • PHP 8.x with extensions: mysqli, zip, session
  • MySQL 5.7+ or MariaDB 10.3+
  • nginx (for zip download via X-Accel-Redirect)
  • Sufficient disk space for uploads and temporary zip files

Installation

1. Clone the repository

git clone git@github.com:RyanEiri/mssdocs.git

Place the repository root so that the ips/ directory is accessible under your web root, e.g. /var/www/myproject/.

2. Configure the database

Create a MySQL database and user:

CREATE DATABASE your_db_name CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'your_db_user'@'localhost' IDENTIFIED BY 'your_db_password';
GRANT ALL PRIVILEGES ON your_db_name.* TO 'your_db_user'@'localhost';

Import the schema:

mysql -u your_db_user -p your_db_name < ips/schema.sql

3. Configure the application

Copy the example config and fill in your values:

cp ips/php/classes/config.example.php ips/php/classes/config.php

Edit config.php:

define("DB_HOST", "localhost");
define("DB_USER", "your_db_user");
define("DB_PASS", "your_db_password");
define("DB_NAME", "your_db_name");

define("SITE_NAME",        "Your Project Name");
define("SITE_ABBR",        "YPN");
define("SITE_DESCRIPTION", "A brief description of your project.");
define("COPYRIGHT_HOLDER", "Your Name or Organization");
define("COPYRIGHT_YEARS",  "2024");

4. Set directory permissions

The web server needs write access to the upload directories:

chown -R www-data:www-data ips/upload/files ips/upload/tmp ips/upload/archives ips/backups

5. Configure nginx

The zip download feature uses nginx's X-Accel-Redirect to serve files without loading them into PHP memory. Add the following to your nginx server block, adjusting the path to match your installation:

# Internal location for zip download — served by nginx, not PHP
location /ips/upload/tmp/ {
    internal;
    alias /var/www/myproject/ips/upload/tmp/;
}

6. Create the first admin user

Insert an initial admin user directly into the database. Passwords are stored as SHA-512 hashes. Generate one:

echo -n "yourpassword" | sha512sum
INSERT INTO users (username, email, password, secretword, admin)
VALUES ('admin', 'admin@example.com', '<sha512-hash>', '<random-60-char-string>', 1);

The secretword is a random token used for session cookies — generate any 60-character random string.

Upgrade / update

When pulling updates from the repository, re-check config.example.php for any newly added constants and add them to your live config.php.

License

GPL-3.0. See LICENSE.

Third-party libraries included in ips/js/ and ips/css/ are MIT or Apache 2.0 licensed and retain their original copyright headers.

About

Web front-end for the organisation of manuscript images and their respective descriptive documents.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages