w0bm is a not so modern anymore webm archiving software that displays uploaded webms in a accessible web gallery focused on pure randomness and user generated content! https://w0bm.com
Go to file
2024-06-20 04:27:49 +02:00
.idea blah 2024-06-15 04:19:22 +02:00
app hiding users favorites from non logged in 2024-06-15 07:42:20 +02:00
bootstrap njum fix 2021-06-25 08:25:11 +00:00
config fixing login error on local development instance due to secure cookie 2024-06-11 02:34:40 +02:00
database fixing about migration down function 2024-02-24 16:43:38 +01:00
public modified css 2024-06-20 04:27:49 +02:00
resources non logged in QoL 2024-06-15 08:07:50 +02:00
storage Fixing various problems. Search is now positioned in a saner way, designs have been fixed (only layout1) 2023-08-07 22:01:54 +00:00
tests njum fix 2021-06-25 08:25:11 +00:00
_ide_helper.php njum fix 2021-06-25 08:25:11 +00:00
.babelrc njum fix 2021-06-25 08:25:11 +00:00
.gitattributes njum fix 2021-06-25 08:25:11 +00:00
.gitignore outcommenting the re: content banner (2 months of display should be enough) 2024-02-17 23:44:03 +00:00
.phpstorm.meta.php njum fix 2021-06-25 08:25:11 +00:00
artisan njum fix 2021-06-25 08:25:11 +00:00
composer.json njum fix 2021-06-25 08:25:11 +00:00
composer.lock updating readme 2024-02-22 22:38:46 +01:00
composer.phar server ver 2023-03-14 17:31:11 +00:00
gulpfile.js njum fix 2021-06-25 08:25:11 +00:00
installer server ver 2023-03-14 17:31:11 +00:00
package-lock.json njum fix 2021-06-25 08:25:11 +00:00
package.json njum fix 2021-06-25 08:25:11 +00:00
phpspec.yml njum fix 2021-06-25 08:25:11 +00:00
phpunit.xml njum fix 2021-06-25 08:25:11 +00:00
readme.md updating readme accordingly 2024-06-11 02:41:00 +02:00
server.php njum fix 2021-06-25 08:25:11 +00:00
vendor.zip njum fix 2021-06-25 08:25:11 +00:00

w0bm.com

w0bm

IRC Chat License

w0bm.com is a fun modern website featuring many different kind of videos in webm format. It was initially thought as a z0r.de without flash, but already surpassed that in our opinion.

The page is build on top of the Laravel Framework.

Contents

  1. Dependencies
  2. Installation

Dependencies

Our prefered distribution is Arch Linux, so all of the commands will be for Arch Linux and can be modified for the distro of your choice, the names of the packages may be different.

w0bm will run with PHP ≥5.6 - PHP ≤7.1

It is well-tested with PHP 7.1

To get PHP 7.1 you can use the packages provided in the AUR!

To access the AUR you can use a AUR helper such as yay

Before you start to install these packages be warned, you will need to compile those, so it is definetly advised to make the following changes to your /etc/makepkg.conf

Change MAKEFLAGS=-jx to MAKEFLAGS=-j16 (if you have 16 cores for example)

Change BUILDENV=(…check…) to BUILDENV=(…!check…) (ignore the dots, just add the ! to check so you don't waste more time than neccessary.

Finally:

yay -S --noconfirm php71 php71-{cli,ctype,curl,fileinfo,fpm,gd,iconv,mysql,opcache,pdo,phar,tokenizer,zip,json,mbstring,dom} composer mariadb nginx ffmpeg imagemagick npm vim sudo

You need to downgrade composer with sudo composer self-update --2.2

Preparation

This includes recommended settings for w0bm to work!

Database

Before you can get started you need to set up mariadb, nginx and php.

Set up mariadb (assuming you don't already have a database running)

mariadb_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql

After that you can start the database server, you can also directly enable the service so it starts automatically if your system needs a reboot for exmaple.

sudo systemctl start mysqld

sudo systemctl enable mysqld

Now you can log into your freshly installed database, the user root doesn't have a password, so just issue the command below and hit enter when it asks you for a password.

sudo mysql -u root -p

Now create the actual database and the user for it

CREATE DATABASE w0bm;
GRANT ALL ON w0bm.* TO w0bm@localhost IDENTIFIED BY 'w0bm';

PHP/PHP-FPM

Open the php config file

sudo nvim /etc/php71/php.ini

and edit the following settings

post_max_size = 500M
upload_max_filesize = 100M

Then edit the php-fpm config file

sudo nvim /etc/php71/php-fpm.d/www.conf

Change the default user/group to the user who owns the w0bm directory, we run w0bm as w0bm.

user = w0bm
group = w0bm

Next set up php-fpm to use a unix sock.

listen = /run/php71-fpm/php-fpm.sock
listen.owner = w0bm
listen.group = w0bm

sudo systemctl start php-fpm

sudo systemctl enable php-fpm

NGINX

First of all edit the nginx.conf and add the following inside of the http context

include w0bm.conf

Then create the w0bm config file in /etc/nginx/

sudo nvim /etc//w0bm.conf

These are the bare minimum configuration settings for w0bm to work with nginx

server {
    listen 80 default_server;
    server_name _;
    access_log /var/log/nginx/w0bm/w0bm-access.log;
    error_log /var/log/nginx/w0bm/w0bm-error.log;
    root /home/w0bm/w0bm/public;
    index index.php;
    client_max_body_size 500M;
    gzip on;
    large_client_header_buffers 4 32k;
    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_index index.php;
        include fastcgi.conf;
        fastcgi_param PATH_TRANSLATED $document_root$fastcgi_script_name;
        #fastcgi_param GEOIP_ADDR $remote_addr;
        #fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_pass unix:/run/php71-fpm/php-fpm.sock;
    }
    location ~* \.(?:css|js)$ {
        gzip on;
        expires 1y;
        add_header Cache-Control "public";
    }
    location ~* \.(?:jpg|jpeg|gif|png|ico|svg)$ {
        expires 1M;
        access_log off;
        add_header Cache-Control "public";
    }
    location / {
        try_files $uri $uri/ /index.php?$args;
    }
}

Installation

git clone gitea@git.lat:w0bm/w0bm.git

cd w0bm.com

php71 composer dump-autoload

php71 composer install --no-scripts

(You will most likely encounter a issue where 2 packages namely: visitor and captcha require at least php 7.2, to get around this just change the value to 7.1 in the composer.lock file)

For your local development instance make sure that you add SECURE_COOKIE=false to your .env otherwise it will not let you log in!

Create the .env file with the following content

APP_KEY=
APP_ENV=production
APP_DEBUG=false

DB_HOST=localhost
DB_DATABASE=w0bm
DB_USERNAME=w0bm
DB_PASSWORD=w0bm

CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync

RECAPTCHA_PUBLIC=
RECAPTCHA_PRIVATE=

MATRIX_MAUAUTH=
MATRIX_MAUURL=

# if you are developing
SECURE_COOKIE=false

php71 artisan key:generate

mkdir public/b

cd public/b

Now put some random webm in the folder and name it 1.webm

mkdir public/thumbs

mkdir public/thumbs/beta

Modify database/seeds/DatabaseSeeder.php and uncomment all the different seeders. (Initially you'll need all)

Run php71 artisan migrate and then php71 artisan db:seed

Run php71 artisan tags to initially tag all videos

Start the development server with php71 artisan serve

Check your website at http://localhost:8000/1

Log in with Username=admin and Password=password

To transpile and minify your modified w0bmscript.js you need to have this projects dependencies installed (dependencies installable with npm i). Then run npm run build.

Contributing

Make your changes, test them locally (PLEASE!!! preferable write some unit tests aswell) and make a pull request.

Folder structure:

  • Models: app/Models/
  • Routes: app/Http/routes.php
  • Controllers: app/Http/Controllers
  • Views: resources/views
  • JS and CSS: public/{css,js}
  • Database: database/migrations

License

The Laravel framework is open-sourced software licensed under the MIT license

The w0bm.com Logo is copyrighted by w0bm.com and property of w0bm.com