Infinity Next is an imageboard suite utilizing the Laravel framework. 🍆 https://16chan.nl
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Josh 211daaf243
Merge pull request #321 from lilyachan/instructions
1 month ago
app Moved hamming distance to a native psql func 4 months ago
bootstrap Laravel 7 + WebSocket thread updates 5 months ago
config Websocket fixes. 4 months ago
database Baking permissions into the stylesheet; cyclical column 4 months ago
docs Here's new setup instructions, enjoy. 1 month ago
public Moved more SCSS into variables. 4 months ago
resources Board owners can now see reports/appeals on navigation. 4 months ago
routes Baking permissions into the stylesheet; cyclical column 4 months ago
storage Public key signing. 4 months ago
tests Moved hamming distance to a native psql func 4 months ago
.env.example Serious optimization of new reply flow. 5 months ago
.gitattributes #1 - Rebased Laravel. #3 - Added board migration. 5 years ago
.gitignore Fixed webpack ?. undefined builds 4 months ago
README.md Adjust the chronology to match security contexts 1 month ago
Resource Fixed video thumbnailing. 5 months ago
artisan #1 - Rebased Laravel. #3 - Added board migration. 5 years ago
composer.json Public key signing. 4 months ago
composer.lock Public key signing. 4 months ago
composer.phar Impartial commit: Continuing upgrade to 5.3 6 months ago
license #19 Rebranding. 5 years ago
package.json Moved HLJS to package management. 4 months ago
phpunit.xml Fixed unit tests for auth. 5 months ago
server.php #1 - Rebased Laravel. #3 - Added board migration. 5 years ago
webpack.mix.js Dropzone 5.7 & Paste Uploads 4 months ago

README.md

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 is an imageboard using the Laravel Framework. 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 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.

Phase 1:

  1. Add oldstable main and buster-backports main to /etc/apt/sources.list
    1. apt update
  2. 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
  3. apt install postgresql
    1. sudo -u postgres psql or runuser -u postgres psql
    2. create user chan;
    3. create database chan owner chan;
    4. \c chan
    5. CREATE EXTENSION fuzzystrmatch;
    6. \password chan
    7. \q
  4. apt install redis git
  5. At your discretion:
    1. apt autoremove apache2
    2. apt install nginx-full
    3. apt install php-fpm
  6. Install Node.js (https://github.com/nodesource/distributions/blob/master/README.md#debinstall)
    1. curl -sL https://deb.nodesource.com/setup_14.x | bash -
    2. apt-get install -y nodejs
  7. adduser --system infinitynext --home /var/www/infinity-next
  8. git clone https://github.com/infinity-next/infinity-next.git /var/www/infinity-next
  9. chown -hR infinitynext /var/www/infinity-next

Phase 2:

  1. sudo -u infinitynext /bin/bash or runuser -u infinitynext /bin/bash
  2. cp .env.example .env
  3. Edit .env, set:
    1. A unqiue 32 character value for APP_KEY.
    2. DB_DATABASE,DB_USERNAME,DB_PASSWORD as configured.
  4. php composer.phar update and wait as 3rd party libraries are installed.
  5. php artisan migrate
  6. php artisan db:seed
    • Take note of the Admin account password that will be created for you.
  7. Add the Laravel crontab service provided in crontab.txt
    1. cat ./docs/crontab.txt
    2. crontab -e
    3. Do the needful.
  8. exit

Phase 3:

  1. Add the virtual host configuration for nginx.
    1. cp /var/www/infinity-next/docs/nginx.txt /etc/nginx/sites-available/infinity-next
    2. Adjust /etc/nginx/sites-available/infinity-next as required.
    3. ln -s /etc/nginx/sites-available/infinity-next /etc/nginx/sites-enabled/infinity-next
    4. nginx -t
      1. systemctl restart nginx
  2. Give www-data read/write access to application storage:
    1. chown -hR infinitynext:www-data /var/www/infinity-next/storage/
    2. chmod -R g+rw /var/www/infinity-next/storage/

Phase 4:

  1. sudo -u infinitynext /bin/bash or runuser -u infinitynext /bin/bash
  2. npm install
  3. npm run prod
    1. Check package.json for npm script definitions.
  4. CONGRATULATIONS!!! U HAVE SUCCESSED 🎉🎉🎉
    1. You should now have a /test/ board.
    2. The admin account will be named Admin.

To accommodate upstream reverse proxies:

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

Additional reminders:

  1. Set your SMTP server in .env - you need this for password resets.
  2. Adjust your maximum file upload size in nginx and php!
  3. 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.

  1. Install Supervisor to run artisan queue:work redis. Example in docs/supervisor.txt.
  2. Install Laravel Echo Server by running npm install -g laravel-echo-server or yarn global add laravel-echo-server.
  3. Run laravel-echo-server config and generate a laravel-echo-server.json.
    • You must be using Redis and you must make sure the Redis configuration matches exactly.
    • Ensure the hostname matches exactly or events will not be sent to connected users.
    • I suggest using the docs/nginx.txt configuration with a /socket.io proxy pass to the server instead of exposing it directly.
  4. Run laravel-echo-server start. This does not launch as a daemon, so consider using a program like screen to keep it running without a terminal attached.

Further documentation about Laravel Queues and Laravel Broadcasting can be found in the official Laravel documentation.

License

Infinity Next is distributed under the AGPL 3.0.

In short:

  • You may use Infinity Next for any reason you please.
  • You may modify Infinity Next as you see fit.
  • You may profit with Infinity Next.

However, you also agree that:

  • Infinity Next & Contributors are not liable for this software and any damage it may do.
  • Infinity Next & Contributors are not liable if this software is used to break the law.
  • You will not sell copies or modifications of this source code (no sublicensing).
  • You must distribute the source code for any publicly hosted modifications of Infinity Next under the AGPL 3.0 license in a conventional format.

The AGPL3 license is designed to protect the end user by keeping modified copies of the source open and free.

While not binding, I do ask that users link back to this git repository on their website. Sharing is caring. ♥

Contributing

Everyone is welcome to contribute, but please follow repository etiquette.

  • Fork the repository.
  • Raise a separate issue for everything you intend to fix.
  • Plan your fix and allow for discussion.
  • Tie your commits to issues.
  • Keep pull requests concise, list issues addressed, and make it easy to pull them.

It would benefit you to make sure your solution has the OK before writing any code.

Coding Standards

In the name of preventing conflict and keeping the codebase clean, I am implementing the exact same standards of Laravel contributors.

Laravel follows the PSR-0 and PSR-1 coding standards. In addition to these standards, the following coding standards should be followed:

  • The class namespace declaration must be on the same line as <?php.
  • A class’s opening { must be on the same line as the class name.
  • Functions and control structures must use Allman style braces. Indent with tabs, align with spaces.

“Allman style braces” refer to having a curly-brace on a new line at the same level of indentation as the conditional itself.

if (condition)
{
	// Code here.
}