planiverse

A minimalist, no-JS front-end for Mastodon.
git clone https://git.stjo.hn/planiverse
Log | Files | Refs | README | LICENSE

README (7122B)


      1 # Planiverse
      2 
      3 Planiverse is a minimalist, no-JS front-end for Mastodon (or Pleroma, or anything supporting the Mastodon API).
      4 
      5 The Web was once a document delivery platform. It's now an application platform, which is great if you want everything to be an application. But what if you don't? What if you use an older computer, or like using a text-only browser, or simply prefer to turn JavaScript off? This is the Mastodon front-end for you.
      6 
      7 ## Target Browsers
      8 
      9 * [Lynx](https://lynx.invisible-island.net/)
     10 
     11 * [surf](http://suckless.org/coding_style/) (with JS switched off)
     12 
     13 ## Features
     14 
     15 Planiverse is under active development and is fairly pre-alpha. That said, it has enough features to use it on a daily basis, which I do. I'm adding features as I need them, but I would love to accept contributions and feature requests from other Fediverse-dwellers.
     16 
     17 Currently implemented features are:
     18 
     19 * public and user timelines
     20 
     21 * pagination
     22 
     23 * posting and deleting statuses
     24 
     25 * favouriting, reblogging, and replying to statuses
     26 
     27 * spoiler/content warnings
     28 
     29 * viewing status threads
     30 
     31 * status visibility
     32 
     33 * following accounts
     34 
     35 * viewing notifications
     36 
     37 * viewing image and video attachments
     38 
     39 * optional timestamps in Swatch Internet time (beats)
     40 
     41 * searching accounts and statuses
     42 
     43 Features still to be implemented include:
     44 
     45 * muting/blocking accounts
     46 
     47 * uploading attachments
     48 
     49 ## Screenshots
     50 
     51 ![Planiverse in surf](/screenshots/surf.png?raw=true "Planiverse in surf")
     52 
     53 ![Planiverse in Lynx](/screenshots/lynx.png?raw=true "Planiverse in Lynx")
     54 
     55 ## Demo
     56 
     57 I run Planiverse off my home server at [jank.town/planiverse](https://jank.town/planiverse). Check out the [Pleroma front-end](https://jank.town) for a more fully-featured and detailed description of my instance.
     58 
     59 As the name implies, jank.town is slow and has no guaranteed uptime because it's hosted on my arse-end home server.
     60 
     61 ## Getting Started
     62 
     63 ### Platform
     64 
     65 Planiverse is a PHP application using the Laravel 5.5 framework. It requires a database to store OAuth client credentials, but supports any database back-end that Laravel does so you can get your choice of SQLite, PostgreSQL, MariaDB, etc.
     66 
     67 ### Minimum Requirements
     68 
     69 * PHP 7.0.0
     70 * A database back-end of your choice (SQLite, PostgreSQL, etc.)
     71 * Composer
     72 * Any hardware at all. Frankly I'd be surprised if there's anything this won't run on. I'm running it quite happily on my 550 MHz Cobalt Qube.
     73 
     74 ### Installation
     75 
     76 1. Clone this repository.
     77 
     78         git clone https://github.com/FuzzJunket/planiverse.git
     79         cd planiverse
     80 
     81 2. Use Composer to install dependencies.
     82 
     83         composer install
     84 
     85 3. Copy .env.example to .env and edit it to configure your application. Be sure to set the following values:
     86 
     87     * APP_ENV: "local" for development, "production" for a live system.
     88 
     89     * APP_KEY: A random 32-digit string.
     90 
     91     * APP_DEBUG: "true" for development, "false" for a live system.
     92 
     93     * APP_URL and MASTODON_REDIRECT: Update these values with the domain and path where you're hosting Planiverse. This may or may not be the same domain as your Mastodon instance.
     94 
     95     * DB_CONNECTION and DB_DATABASE: These use SQLite by default, but you may want something more heavy-duty for bigger installations.
     96 
     97     * MASTODON_DOMAIN: The URL of your Mastodon instance.
     98 
     99 4. If you're using SQLite, create the database file.
    100 
    101         touch database/database.sqlite
    102 
    103 5. Run the database migrations to configure your DB.
    104 
    105         php artisan migrate
    106 
    107 6. When running in development/testing mode you can run `php artisan serve`. For production environments you will want to configure your Web server to serve the application. See below for some example virtual host configurations.
    108 
    109 ### Sample Server Configurations
    110 
    111 #### Nginx
    112 
    113 Planiverse will happily run on the same domain as your Mastodon instance if you want to serve it from a sub-folder:
    114 
    115     server {
    116         listen       443;
    117         server_name  example.com;
    118 
    119         ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
    120         ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
    121 
    122         ssl_session_cache    shared:SSL:50m;
    123         ssl_session_timeout  5m;
    124 
    125         ssl_protocols  TLSv1 TLSv1.1 TLSv1.2;
    126         ssl_ciphers  ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA;
    127         ssl_prefer_server_ciphers  on;
    128 
    129         # Force every request after an initial SSL connection to occur over HTTPS
    130         add_header  Strict-Transport-Security max-age=15768000;
    131 
    132         gzip_vary on;
    133         gzip_proxied any;
    134         gzip_comp_level 6;
    135         gzip_buffers 16 8k;
    136         gzip_http_version 1.1;
    137         gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript application/activity+json application/atom+xml;
    138 
    139         # the nginx default is 1m, not enough for large media uploads
    140         client_max_body_size 16m;
    141 
    142         # Configure anything under /planiverse to point to the Planiverse front-end.
    143         location ^~ /planiverse {
    144             alias /var/www/planiverse/public;
    145             index index.php;
    146             try_files $uri $uri/ @planiverse;
    147 
    148             location ~* \.php {
    149                 fastcgi_split_path_info ^(.+\.php)(/.*)$;
    150                 fastcgi_pass 127.0.0.1:9000;
    151                 include /etc/nginx/fastcgi_params;
    152                 fastcgi_param SCRIPT_FILENAME /var/www/planiverse/public/index.php;
    153             }
    154         }
    155 
    156         location @planiverse {
    157             rewrite /planiverse/(.*)$ /planiverse/index.php?/$1 last;
    158         }
    159 
    160         # Configure the root path to point to Pleroma.
    161         location / {
    162             add_header X-XSS-Protection "1; mode=block";
    163             add_header X-Permitted-Cross-Domain-Policies none;
    164             add_header X-Frame-Options DENY;
    165             add_header X-Content-Type-Options nosniff;
    166             add_header Referrer-Policy same-origin;
    167             add_header X-Download-Options noopen;
    168 
    169             proxy_http_version 1.1;
    170             proxy_set_header Upgrade $http_upgrade;
    171             proxy_set_header Connection "upgrade";
    172             proxy_set_header Host $http_host;
    173 
    174             proxy_pass  http://localhost:4000/;
    175         }
    176 
    177         # We don't need .ht files with nginx.
    178         location ~ /\.ht {
    179             deny all;
    180         }
    181     }
    182 
    183 Or, for a simpler configuration or to point to a remote Mastodon instance, you can host Planiverse on its own domain. Just configure it as a regular PHP application.