@extends('layouts.app')
@section('htmlheader_title')
	About
@endsection

@section('content')
	<h2>About the FTN Clearing Houz</h2>

	<p>Welcome to the <strong class="highlight">FTN Clearing Houz</strong>.</p>

	<div class="float-end ps-3 pb-3" id="network_traffic"></div>
	<p>FTN is an abbreviation for FidoNet Technology Network, and the most well known FTN is
		"<a href="https://wikipedia.org/wiki/FidoNet">FidoNet</a>" that still exists today.
		There were many other "Othernets" also created around that time and since, and some still in operation today as
		well.</p>
	<p>FidoNet was born in the 1980's (well before the public Internet) when personal computers were being introduced to
		homes, and modems were being invented.
		Some very clever people developed protocols and standards to exchange mail and files with peers, with the
		network growing to around 40,000 systems in the mid 1990's.
		Those systems were called BBSes or <a href="https://wikipedia.org/wiki/Bulletin_board_system">Bulletin Board
			Systems</a>.
		As "the Internet" became more accessible, the usage of FidoNet and BBSes drastically reduced, but there are some
		systems still in operation today.</p>
	<p>The <strong class="highlight">FTN Clearing Houz</strong> is both an FTN Mailer and FTN message tosser, where mail
		is stored internally in a DB, and files in an S3 bucket. It can also hatch and toss files into FTN networks for
		both upstream and downstream nodes.</p>
	<p>It was created as an idea to bring modern technology and capabilities to that legacy computing network that
		existed in the 1980's and 1990's, where many of those programs from the 1980's and 1990's are still in use today
		too.</p>
	<p>Setting up an FTN network is fun, but managing one for the longer term, in amongst our busy lives can involve
		some tedious repetitive tasks.
		In the same vain, maintaining and growing an FTN network also can be time consuming, especially when your effort
		(or lack thereof) can affect the experience of your users.
		So FTN Clearing Houz was created to help address that.</p>
	<p>Building this software is driven by three main goals:</p>
	<ol>
		<li>Self Service - so that users can setup and re-jig their configuration themselves, or new users can join a
			network with the minimum of effort (relieving a dependancy on an admin to set you up, and thus freeing up
			time for those admins).
		</li>
		<li>Automation - so that repetitive tasks can be done with minimal effort.</li>
		<li>High Availability - So if one hub goes down, users can automatically connect to an alternate hub to keep
			mail flowing. Furthermore, as hubs retire, new hubs can assume the role of the retiring hub with minimal
			effort.
		</li>
	</ol>

	<p>...all so that you can spend your time playing on your BBS rather than managing messages, failures or keeping an
		FTN network running.</p>

	<h3>For the BBS Sysop</h3>
	<p>For the BBS sysop, the FTN Clearing Houz has the following features:</p>
	<ul>
		<li>Supports BINKP network transfers</li>
		<li>Supports EMSI network transfers (for legacy "frontend" mailers)</li>
		<li>Supports PING responses (to netmails)</li>
		<li>A consistent reliable echomail/netmail hub for your BBSes, while you reconfigure your BBS.<br>
			If you have more than 1 BBS, then the Clearing Houz can receive all your mail from your uplinks and feed
			them to your BBSes.
		</li>
	</ul>

	<h3>For the FTN network operator</h3>
	<p>For the FTN network operator, the FTN Clearing Houz has the following features (or planned ones):</p>
	<ul>
		<li>Supports BINKP network transfers</li>
		<li>Supports EMSI network transfers</li>
		<li>Automatic route configuration, routing netmail directly where links exist, or to the next uplink/downlink</li>
		<li>Manages ECHO areas and FILE areas</li>
		<li>Supports PING and TRACE responses <sup>(TRACE to be implemented)</sup></li>
		<li>Nodelist Management</li>
		<li>Self service FTN Network Applications <sup>being implemented</sup></li>
		<li>Dynamic mail bundling for upstream and downstream nodes (no more "inbounds" and "outbounds")</li>
		<li>Support for Fidonet Packet formats <a href="http://ftsc.org/docs/fts-0001.016">FTS-0001</a>,
			<a href="http://ftsc.org/docs/fsc-0039.004">FSC-0039</a>,
			<a href="http://ftsc.org/docs/fsc-0045.001">FSC-0045</a>,
			<a href="http://ftsc.org/docs/fsc-0048.002">FSC-0048</a></li>
		<li>Automatic delisting of idle nodes <sup>(to be implemented)</sup></li>
		<li>DNS server, to enable resolving of registered nodes using domain dns names <a href="http://ftsc.org/docs/fts-5004.001">FTS-5004</a>
			with <strong class="highlight">p<em>N</em>.f<em>N</em>.n<em>N</em>.z<em>N</em>.<em>domain</em>.ftn</strong>, or
			<strong class="highlight">p<em>N</em>.f<em>N</em>.n<em>N</em>.z<em>N</em>.<em>[domain dns zone]</em></strong>
			syntax, including TXT and CNAME records</li>
	</ul>

	<h4>Other things</h4>
	<p>Other ideas that may make it into this tool:</p>
	<ul>
		<li>SMTP integration</li>
		<li>PGP signed mail and mail verification</li>
		<li>SQRL simple authentication <small>(so there is 1 less username/password you need to remember)</small></li>
	</ul>

	<p>If you are here to link to BBS, please get started by <a href="{{ url('login') }}">logging in</a>.</p>

	<h2>Open Source</h2>
	<p>FTN Clearing Houz is built with Open Source software. At it's core, PHP drives this web UI and the interaction
		with nodes.</p>
	<p>This web UI has been inspired by the great work at <a href="https://int10h.org">int10h.org</a>. If you have ideas
		to make it even better, please send me a message, or submit your comments in <a
			href="https://dev.dege.au/bbs/clrghouz">gitlab</a></p>

	<h3>Other technology that drives the Clearing Houz</h3>
	<p>FTN Clearing Houz is made available by these technologies:</p>
	<ul>
		<li>Docker - taking the effort out of building, deploying and easing the effort of upgrading.</li>
		<li><strike>CockroachDB - a high available, geodispersable database, that enables accessing configuration and
				data from multiple locations. CockroachDB enables the FTN Clearing Houz to appear as the same hub from
				multiple locations, providing a high available environment for Sysops to drop off and collect
				mail</strike></li>
		<li>PostgreSQL - to store all the data
		<li>Memcached - to take some of the pressure off the database</li>
		<li>PHP/Laravel - the coding framework used to create this UI, and to enable the transfer of mail between systems</li>
		<li>jQuery - to help with the web UI</li>
		<li>Highcharts - to render the graphs</li>
	</ul>

	<p>If you'd like to support enhancing Clearing Houz, <a href="https://buymeacoffee.com/dege">Buy me a coffee!</a></p>
@endsection

@section('page-scripts')
	@js('highcharts')

	<script>
		Highcharts.chart('network_traffic', {
			chart: {
				type: 'spline',
				zoomType: 'x',
				backgroundColor: '#000000',
				resetZoomButton: {
					position: {
						x: 0,
						y: -40,
					}
				}
			},
			credits: {
				enabled: false
			},
			exporting: {
				buttons: false
			},
			title: {
				text: 'FTN Network Traffic'
			},
			xAxis: {
				type: 'datetime',
				title: {
					text: 'Time'
				},
			},
			yAxis: {
				title: {
					text: 'Echomail'
				},
			},
			legend: {
				symbolWidth: 40
			},
			plotOptions: {
				series: {
					point: {
						events: {
							click: function () {
								//window.location.href = this.series.options.website;
							}
						}
					},
					cursor: 'pointer'
				}
			},
			series: [
				@foreach (\App\Models\Domain::active()
					->when(((! $user) || (! $user->isAdmin())),function($query) { return $query->public()->active(); })
					->orderBy('name')
					->with(['echoareas'])->get() as $o)
					@if ($o->managed())
						{
							name: '{{ $o->name }}',
							data: {!! $o->daily_area_stats() !!},
							dashStyle: 'ShortDot',
						},
					@endif
				@endforeach
			],
		});
	</script>
@append