Skip to content

Minimal filesystem based web notepad with versioning, multiple formats and sharing.

Notifications You must be signed in to change notification settings

sushain97/web2fs-notepad

Repository files navigation

web2fs-notepad

CircleCI

Minimal filesystem based web notepad with versioning, multiple formats and sharing. Data is stored directly on the filesystem making backups easy, searching as simple as a grep and limiting runtime dependencies to PHP.

Powered by Symfony on the backend with React, TypeScript, and BlueprintJS on the frontend.

Installation

These are roughly in order of increasing complexity where both the Docker setup and the artifact download produce production builds and require setting APP_ENV=prod.

Docker

  1. Install Docker.
  2. Download/clone source from GitHub.
  3. Copy .env.dist to .env and edit settings.
  4. Run docker build -t web2fs-notepad .
  5. Run docker run -d -p 8080:80 -v note-data:/app/var/data web2fs-notepad to serve on port 8080 and use the persistent note-data volume.

Artifact Download

  1. Install PHP 7.4.3+.
  2. Download and extract a dist.tar.gz from a GitHub release or CircleCI build.
  3. Copy .env.dist to .env and edit settings.
  4. Point your web server with PHP support to /public.

Run ./bin/update release_version|circle_build_number to update your deployment (CircleCI artifact download has a runtime dependency on jq).

Local Build

  1. Install PHP 7.4.3+.
  2. Install yarn and composer.
  3. Download/clone source from GitHub.
  4. Copy .env.dist to .env and edit settings.
  5. Run ./bin/install.
  6. Point your web server with PHP support to /public.

If you're building for production, also run composer dump-autoload --optimize.

N.B. The PHP iconv and ctype extensions are required and are installed by default in most environments.

Development

Use the local build instructions above to install dependencies. Then, start the development web server using ./bin/console server:run.

Run tests and linters using ./bin/test. CircleCI powers CI and mirrors the test script's actions.

Autofix errors from Prettier, ESLint, Stylelint, and PHP_CodeSniffer using ./bin/fix.