docs.selfprivacy.org/src/en/en/book/arch.html

220 lines
16 KiB
HTML

<!DOCTYPE HTML>
<html lang="en" class="sidebar-visible no-js light">
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Architecture</title>
<!-- Custom HTML head -->
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="favicon.svg">
<link rel="shortcut icon" href="favicon.png">
<link rel="stylesheet" href="css/variables.css">
<link rel="stylesheet" href="css/general.css">
<link rel="stylesheet" href="css/chrome.css">
<link rel="stylesheet" href="css/print.css" media="print">
<!-- Fonts -->
<link rel="stylesheet" href="FontAwesome/css/font-awesome.css">
<link rel="stylesheet" href="fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="highlight.css">
<link rel="stylesheet" href="tomorrow-night.css">
<link rel="stylesheet" href="ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<!-- Provide site root to javascript -->
<script type="text/javascript">
var path_to_root = "";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
if (theme.startsWith('"') && theme.endsWith('"')) {
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
}
if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
}
} catch (e) { }
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
var html = document.querySelector('html');
html.classList.remove('no-js')
html.classList.remove('light')
html.classList.add(theme);
html.classList.add('js');
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
}
html.classList.remove('sidebar-visible');
html.classList.add("sidebar-" + sidebar);
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="intro.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li class="chapter-item expanded affix "><li class="part-title">About us</li><li class="chapter-item expanded "><a href="motivation.html"><strong aria-hidden="true">2.</strong> Motivation</a></li><li class="chapter-item expanded "><a href="team.html"><strong aria-hidden="true">3.</strong> Team</a></li><li class="chapter-item expanded "><a href="policy.html"><strong aria-hidden="true">4.</strong> Policy</a></li><li class="chapter-item expanded affix "><li class="part-title">About project</li><li class="chapter-item expanded "><a href="features.html"><strong aria-hidden="true">5.</strong> Features</a></li><li class="chapter-item expanded "><a href="arch.html" class="active"><strong aria-hidden="true">6.</strong> Architecture</a></li><li class="chapter-item expanded "><a href="roadmap.html"><strong aria-hidden="true">7.</strong> Roadmap</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="privacy.html"><strong aria-hidden="true">7.1.</strong> Privacy</a></li><li class="chapter-item expanded "><a href="security.html"><strong aria-hidden="true">7.2.</strong> Security</a></li><li class="chapter-item expanded "><a href="autonomy.html"><strong aria-hidden="true">7.3.</strong> autonomy</a></li><li class="chapter-item expanded "><a href="accessibility.html"><strong aria-hidden="true">7.4.</strong> Accessibility to all</a></li><li class="chapter-item expanded "><a href="anon.html"><strong aria-hidden="true">7.5.</strong> Anonymity</a></li><li class="chapter-item expanded "><a href="marketing.html"><strong aria-hidden="true">7.6.</strong> Marketing</a></li><li class="chapter-item expanded "><a href="deploy.html"><strong aria-hidden="true">7.7.</strong> DevOps</a></li></ol></li><li class="chapter-item expanded "><li class="part-title">to the user</li><li class="chapter-item expanded "><a href="pre-install.html"><strong aria-hidden="true">8.</strong> Pre-install</a></li><li class="chapter-item expanded "><a href="install.html"><strong aria-hidden="true">9.</strong> Install</a></li><li class="chapter-item expanded "><a href="services.html"><strong aria-hidden="true">10.</strong> Services</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="email.html"><strong aria-hidden="true">10.1.</strong> E-mail</a></li><li class="chapter-item expanded "><a href="messenger.html"><strong aria-hidden="true">10.2.</strong> Messenger - Delta.Chat</a></li><li class="chapter-item expanded "><a href="social.html"><strong aria-hidden="true">10.3.</strong> Social network - Pleroma</a></li><li class="chapter-item expanded "><a href="git.html"><strong aria-hidden="true">10.4.</strong> Code repository - gitea</a></li><li class="chapter-item expanded "><a href="cloud.html"><strong aria-hidden="true">10.5.</strong> File cloud - Nextcloud</a></li><li class="chapter-item expanded "><a href="vpn.html"><strong aria-hidden="true">10.6.</strong> VPN - openConnect</a></li><li class="chapter-item expanded "><a href="pass.html"><strong aria-hidden="true">10.7.</strong> Password manager - bitwarden</a></li></ol></li><li class="chapter-item expanded "><li class="part-title">Support the project</li><li class="chapter-item expanded "><a href="donation.html"><strong aria-hidden="true">11.</strong> Donation</a></li><li class="chapter-item expanded "><a href="volunteers.html"><strong aria-hidden="true">12.</strong> Volunteers</a></li><li class="chapter-item expanded "><a href="fonds.html"><strong aria-hidden="true">13.</strong> Foundations</a></li><li class="chapter-item expanded "><a href="dev.html"><strong aria-hidden="true">14.</strong> Developers</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="deploy.html"><strong aria-hidden="true">14.1.</strong> DevOps Release Management</a></li><li class="chapter-item expanded "><a href="CONTRIBUTING.html"><strong aria-hidden="true">14.2.</strong> Contrib</a></li><li class="chapter-item expanded "><a href="test-plan.html"><strong aria-hidden="true">14.3.</strong> Test Plan</a></li></ol></li></ol>
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title"></h1>
<div class="right-buttons">
<a href="print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
<ul id="searchresults">
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
});
</script>
<div id="content" class="content">
<main>
<h1 id="-project-architecture"><a class="header" href="#-project-architecture">🧬 Project architecture</a></h1>
<p>Yes, you could use kuburnetis. But why when immutability is ensured by NixOS?</p>
<p><strong>Stack</strong>: <a href="https://nixos.org/">NixOS</a>, python, flutter</p>
<h2 id="mobile-app"><a class="header" href="#mobile-app">Mobile app</a></h2>
<p>Flutter/Dart was chosen because of the speed and smoothness of the UI and cross-platform.</p>
<h2 id="backend"><a class="header" href="#backend">Backend</a></h2>
<p>NixOS + Python. NixOS was chosen because of its reproducibility, python because of its versatility and popularity.</p>
<h2 id="service-providers"><a class="header" href="#service-providers">Service providers</a></h2>
<p>We do not get paid by any service providers! We are not affiliated with them in any way. We chose them purely for professional reasons. But we do not exclude partnership in the future.</p>
<h3 id="hosting"><a class="header" href="#hosting">Hosting</a></h3>
<p><a href="https://www.hetzner.com/">Hetzer</a> was chosen because of low price and acceptable level of service, quality REST API. Wasn't noticed any privacy or data collection issues.</p>
<p>Candidates:</p>
<ul>
<li>Own personal iron server. Our main priority right now.</li>
<li>A service provider that will provide an API to deploy an iron server. Outside <a href="https://en.wikipedia.org/wiki/Five_Eyes">FVEY</a></li>
<li>OVH</li>
<li>Scaleway</li>
<li>DigitalOcean</li>
</ul>
<p>There's also free <a href="https://docs.oracle.com/en-us/iaas/Content/FreeTier/freetier_topic-Always_Free_Resources.htm">Oracle Cloud</a>, but where you don't pay, you're usually a commodity.</p>
<h3 id="dns"><a class="header" href="#dns">DNS</a></h3>
<p><a href="https://cloudflare.com">Cloudlare</a> reliable, free. Probably collects data, otherwise it's hard to explain why proxy other people's traffic for free. In our case we use it only as a DNS-server and do not proxy anything. In the future we will replace it with self-hosted DNS, as soon as we solve the reliability problem.</p>
<h3 id="backup-repository"><a class="header" href="#backup-repository">Backup repository</a></h3>
<p><a href="https://www.backblaze.com/">Backblaze</a> is free or times cheaper than AWS. Not seen in data collection. <a href="https://www.backblaze.com/blog/open-source-data-storage-server/">Publishes</a> in open source the hardware it runs on. And also <a href="https://www.backblaze.com/b2/hard-drive-test-data.html">shares</a> very useful statistics about disk failures, on the basis of which you can choose the most reliable and tested one. In the future, perhaps, we will replace it with a self-hosted or p2p solution. Now it is not the main priority, because the data is encrypted, and the service provider sees only the ip of your server, but not the home one.</p>
</main>
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="features.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="roadmap.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
</div>
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a rel="prev" href="features.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="roadmap.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playground_copyable = true;
</script>
<script src="elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="book.js" type="text/javascript" charset="utf-8"></script>
<!-- Custom JS scripts -->
</body>
</html>