<commit_before>
Infinity Next was never completed and is currently in an unusable state. I am currently working on refactoring it to Laravel 6 and modernizing some backend work, but it is just something I am doing for myself. For some reason, I just can't stand to see it unfinished.

Use at your own risk: I can't help you.

---

**[Infinity Next](https://16chan.nl)** is an imageboard using the [Laravel Framework](https://github.com/laravel/laravel). It was conceived as a way to replace existing free imageboard software that have aged poorly. Infinity Next is completely free to use, but modifications to the source code must be made open source as well.

# Submitting Issues
If you are submitting an [issue](https://github.com/infinity-next/infinity-next/issues) to developers, please supply the following:

- A concise description of your problem.
- An _exact case_ of the error. If the problem is code related, reference the file and line number.
- Additional details of articles if applicable.

Please don't assume we'll understand exactly what you're talking about. If I can read an error, copy+paste something, or upload a file and reproduce an error in 30 seconds after opening your message, I can fix it without having to ask you for more information. If you do not provide an error case or details on how to recreate what you're experiencing, the first response to your issue will be "please provide an example".

# Requirements
Larachan runs on Laravel 5 and has the same requirements.

* `PHP 7.2` or greater.
  * `php-bcmath` for dealing with IP addresses.
  * `php-mcrypt` for bcrypt functions.
  * `php-gd` for captcha codes and other image manipulation.

You may also need the following because not all PHP packages include them:
  * `mbstring` for Lavarel.
  * `fileinfo` for Composer requirement.

When installing from source,
  * `composer`

You can also pass `--prefer-source` to `composer` to forego the Github OAuth requirement.

# Installation
Infinity Next is currently below its first release version. When it is finished, a compiled archive will be available with an installation process. Right now, however, you must build it yourself and have access to a command line interface.

* These instructions are based on a clean Debian 10 installation.
  * If you don't know how to deal with `sudo: command not found`, you probably shouldn't be doing this.

1. Add `oldstable main` and `buster-backports main` to `/etc/apt/sources.list`
  1. `apt update`
1. `apt install php7.3 php7.3-common php-bcmath php-mcrypt php-gd php-mbstring php-xml php-curl php-redis php-pgsql php-zip php-gmp`
1. `apt install postgresql`
  1. `sudo -u postgres psql` or `runuser -u postgres psql`
  1. `create user chan;`
  1. `create database chan owner chan;`
  1. `\c chan`
  1. `CREATE EXTENSION fuzzystrmatch;`
  1. `\password chan`
  1. `\q`
1. `apt install redis`
1. `apt install git`
1. At your discretion: 
  1. `apt autoremove apache2`
  1. `apt install nginx-full`
  1. `apt isntall php-fpm`
1. `adduser --system infinitynext --home /var/www/infinity-next`
1. `git clone https://github.com/infinity-next/infinity-next.git /var/www/infinity-next`
1. `chown -hR infinitynext /var/www/infinity-next`
1. `sudo -u infinitynext /bin/bash` or `runuser -u infinitynext /bin/bash`
1. `cp .env.example .env`
1. Edit `.env`, set:
  1. A unqiue 32 character value for `APP_KEY`.
  1. `DB_DATABASE`,`DB_USERNAME`,`DB_PASSWORD` as configured.
1. `php composer.phar update` and wait as 3rd party libraries are installed.
1. `php artisan migrate`
1. `php artisan db:seed`
    * Take note of the Admin account password that will be created for you.
1. Add the Laravel crontab service provided in `crontab.txt`
  1. `cat ./docs/crontab.txt`
  1. `crontab -e`
  1. Do the needful.
1. `exit`
1. Add the virtual host configuration for nginx.
  1. `cp /var/www/infinity-next/docs/nginx.txt /etc/nginx/sites-available/infinity-next`
  1. Adjust `/etc/nginx/sites-available/infinity-next` as required.
  1. `ln -s /etc/nginx/sites-available/infinity-next /etc/nginx/sites-enabled/infinity-next`
  1. `nginx -t`
    1. `systemctl restart nginx`
1. Give `www-data` read/write access to application storage:
	1. `chown -hR infinitynext:www-data /var/www/infinity-next/storage/`
	1. `chmod -R g+rw /var/www/infinity-next/storage/`
1. Install Node.js (https://github.com/nodesource/distributions/blob/master/README.md#debinstall)
  1. `curl -sL https://deb.nodesource.com/setup_14.x | bash -` (I used version 14 - not sure what version 9ch is using)
  1. `apt-get install -y nodejs`
1. `npm install`
1. `npm run prod`
  1. Check `package.json` for npm script definitions.
1. CONGRATULATIONS!!! U HAVE SUCCESSED 🎉🎉🎉
  1. You should now have a `/test/` board.
  1. The admin account will be named `Admin`.

To accomodate upstream reverse proxies:

1. `sudo -u infinitynext /bin/bash` or `runuser -u infinitynext /bin/bash`
1. `php artisan vendor:publish`
1. Edit `config/trustedproxy.php` as required.

Additional reminders:

1. Set your SMTP server in `.env` - you need this for password resets.
1. Adjust your maximum file upload size in nginx and php!
1. Install `ffmpeg` for multimedia assets to work!

## Adding WebSockets
WebSockets will play an increasingly important part of the software as they increase the responsiveness of the entire application. It is suggested to set it up, though it is somewhat complicated.<commit_msg>Correct indentation<commit_after>
Infinity Next was never completed and is currently in an unusable state. I am currently working on refactoring it to Laravel 6 and modernizing some backend work, but it is just something I am doing for myself. For some reason, I just can't stand to see it unfinished.

Use at your own risk: I can't help you.

---

**[Infinity Next](https://16chan.nl)** is an imageboard using the [Laravel Framework](https://github.com/laravel/laravel). It was conceived as a way to replace existing free imageboard software that have aged poorly. Infinity Next is completely free to use, but modifications to the source code must be made open source as well.

# Submitting Issues
If you are submitting an [issue](https://github.com/infinity-next/infinity-next/issues) to developers, please supply the following:

- A concise description of your problem.
- An _exact case_ of the error. If the problem is code related, reference the file and line number.
- Additional details of articles if applicable.

Please don't assume we'll understand exactly what you're talking about. If I can read an error, copy+paste something, or upload a file and reproduce an error in 30 seconds after opening your message, I can fix it without having to ask you for more information. If you do not provide an error case or details on how to recreate what you're experiencing, the first response to your issue will be "please provide an example".

# Requirements
Larachan runs on Laravel 5 and has the same requirements.

* `PHP 7.2` or greater.
  * `php-bcmath` for dealing with IP addresses.
  * `php-mcrypt` for bcrypt functions.
  * `php-gd` for captcha codes and other image manipulation.

You may also need the following because not all PHP packages include them:
  * `mbstring` for Lavarel.
  * `fileinfo` for Composer requirement.

When installing from source,
  * `composer`

You can also pass `--prefer-source` to `composer` to forego the Github OAuth requirement.

# Installation
Infinity Next is currently below its first release version. When it is finished, a compiled archive will be available with an installation process. Right now, however, you must build it yourself and have access to a command line interface.

* These instructions are based on a clean Debian 10 installation.
  * If you don't know how to deal with `sudo: command not found`, you probably shouldn't be doing this.

1. Add `oldstable main` and `buster-backports main` to `/etc/apt/sources.list`
   1. `apt update`
1. `apt install php7.3 php7.3-common php-bcmath php-mcrypt php-gd php-mbstring php-xml php-curl php-redis php-pgsql php-zip php-gmp`
1. `apt install postgresql`
   1. `sudo -u postgres psql` or `runuser -u postgres psql`
   1. `create user chan;`
   1. `create database chan owner chan;`
   1. `\c chan`
   1. `CREATE EXTENSION fuzzystrmatch;`
   1. `\password chan`
   1. `\q`
1. `apt install redis`
1. `apt install git`
1. At your discretion: 
   1. `apt autoremove apache2`
   1. `apt install nginx-full`
   1. `apt isntall php-fpm`
1. `adduser --system infinitynext --home /var/www/infinity-next`
1. `git clone https://github.com/infinity-next/infinity-next.git /var/www/infinity-next`
1. `chown -hR infinitynext /var/www/infinity-next`
1. `sudo -u infinitynext /bin/bash` or `runuser -u infinitynext /bin/bash`
1. `cp .env.example .env`
1. Edit `.env`, set:
   1. A unqiue 32 character value for `APP_KEY`.
   1. `DB_DATABASE`,`DB_USERNAME`,`DB_PASSWORD` as configured.
1. `php composer.phar update` and wait as 3rd party libraries are installed.
1. `php artisan migrate`
1. `php artisan db:seed`
    * Take note of the Admin account password that will be created for you.
1. Add the Laravel crontab service provided in `crontab.txt`
   1. `cat ./docs/crontab.txt`
   1. `crontab -e`
   1. Do the needful.
1. `exit`
1. Add the virtual host configuration for nginx.
   1. `cp /var/www/infinity-next/docs/nginx.txt /etc/nginx/sites-available/infinity-next`
   1. Adjust `/etc/nginx/sites-available/infinity-next` as required.
   1. `ln -s /etc/nginx/sites-available/infinity-next /etc/nginx/sites-enabled/infinity-next`
   1. `nginx -t`
      1. `systemctl restart nginx`
1. Give `www-data` read/write access to application storage:
   1. `chown -hR infinitynext:www-data /var/www/infinity-next/storage/`
   1. `chmod -R g+rw /var/www/infinity-next/storage/`
1. Install Node.js (https://github.com/nodesource/distributions/blob/master/README.md#debinstall)
   1. `curl -sL https://deb.nodesource.com/setup_14.x | bash -` (I used version 14 - not sure what version 9ch is using)
   1. `apt-get install -y nodejs`
1. `npm install`
1. `npm run prod`
   1. Check `package.json` for npm script definitions.
1. CONGRATULATIONS!!! U HAVE SUCCESSED 🎉🎉🎉
   1. You should now have a `/test/` board.
   1. The admin account will be named `Admin`.

To accomodate upstream reverse proxies:

1. `sudo -u infinitynext /bin/bash` or `runuser -u infinitynext /bin/bash`
1. `php artisan vendor:publish`
1. Edit `config/trustedproxy.php` as required.

Additional reminders:

1. Set your SMTP server in `.env` - you need this for password resets.
1. Adjust your maximum file upload size in nginx and php!
1. Install `ffmpeg` for multimedia assets to work!

## Adding WebSockets
WebSockets will play an increasingly important part of the software as they increase the responsiveness of the entire application. It is suggested to set it up, though it is somewhat complicated.
{'fraction_non_alphanumeric': 0.09436218155063, 'fraction_numerical': 0.014715349949415984, 'mean_word_length': 3.7053223712678496, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 12, 'lorem ipsum': 0, 'www.': 16, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1606467', 'n_tokens_mistral': 3549, 'n_tokens_neox': 3317, 'n_words': 1492}