Files
gancio/docs/_site/dev/structure.html

303 lines
9.8 KiB
HTML
Raw Normal View History

2019-07-26 23:53:02 +02:00
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
2019-07-30 15:39:25 +02:00
<title>Project Structure - Gancio</title>
2019-07-26 23:53:02 +02:00
<link rel="shortcut icon" href="http://localhost:4000/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="http://localhost:4000/assets/css/just-the-docs.css">
2019-07-26 23:53:02 +02:00
<script type="text/javascript" src="http://localhost:4000/assets/js/vendor/lunr.min.js"></script>
2019-07-26 23:53:02 +02:00
2019-07-30 15:39:25 +02:00
<script type="text/javascript" src="http://localhost:4000/assets/js/just-the-docs.js"></script>
2019-07-26 23:53:02 +02:00
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="http://localhost:4000/assets/js/jquery-3.3.1.min.js"></script>
<link rel="stylesheet" href="http://localhost:4000/assets/css/jquery.fancybox.min.css"/>
<script src="http://localhost:4000/assets/js/jquery.fancybox.min.js"></script>
2019-07-30 15:39:25 +02:00
<!-- Begin Jekyll SEO tag v2.6.1 -->
2019-07-26 23:53:02 +02:00
<title>Project Structure | Gancio</title>
<meta name="generator" content="Jekyll v3.8.6" />
<meta property="og:title" content="Project Structure" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="A shared agenda for local communities" />
<meta property="og:description" content="A shared agenda for local communities" />
<link rel="canonical" href="http://localhost:4000/dev/structure" />
<meta property="og:url" content="http://localhost:4000/dev/structure" />
2019-07-26 23:53:02 +02:00
<meta property="og:site_name" content="Gancio" />
<script type="application/ld+json">
{"@type":"WebPage","headline":"Project Structure","url":"http://localhost:4000/dev/structure","description":"A shared agenda for local communities","@context":"https://schema.org"}</script>
2019-07-26 23:53:02 +02:00
<!-- End Jekyll SEO tag -->
</head>
<body>
<div class="page-wrap">
<div class="side-bar">
<a href="http://localhost:4000/" class="site-title fs-6 lh-tight">Gancio</a>
2019-07-26 23:53:02 +02:00
<span class="fs-3"><button class="js-main-nav-trigger navigation-list-toggle btn btn-outline" type="button" data-text-toggle="Hide">Menu</button></span>
<div class="navigation main-nav js-main-nav">
<nav role="navigation" aria-label="Main navigation">
<ul class="navigation-list">
<li class="navigation-list-item active">
<a href="http://localhost:4000/404.html" class="navigation-list-link"></a>
2019-07-26 23:53:02 +02:00
</li>
<li class="navigation-list-item">
<a href="http://localhost:4000/" class="navigation-list-link">Home</a>
2019-07-26 23:53:02 +02:00
</li>
<li class="navigation-list-item">
<a href="http://localhost:4000/install" class="navigation-list-link">Install</a>
2019-07-26 23:53:02 +02:00
<ul class="navigation-list-child-list ">
<li class="navigation-list-item ">
<a href="http://localhost:4000/install/debian" class="navigation-list-link">Debian</a>
2019-07-26 23:53:02 +02:00
</li>
<li class="navigation-list-item ">
<a href="http://localhost:4000/install/docker" class="navigation-list-link">Docker</a>
2019-07-26 23:53:02 +02:00
</li>
<li class="navigation-list-item ">
<a href="http://localhost:4000/install/nginx" class="navigation-list-link">Nginx</a>
2019-07-26 23:53:02 +02:00
</li>
</ul>
</li>
<li class="navigation-list-item">
<a href="http://localhost:4000/config" class="navigation-list-link">Configuration</a>
2019-07-26 23:53:02 +02:00
</li>
<li class="navigation-list-item active">
<a href="http://localhost:4000/dev" class="navigation-list-link">Hacking</a>
2019-07-26 23:53:02 +02:00
2019-07-27 01:26:05 +02:00
<ul class="navigation-list-child-list ">
<li class="navigation-list-item ">
<a href="http://localhost:4000/dev/migration" class="navigation-list-link">Migration</a>
2019-07-27 01:26:05 +02:00
</li>
<li class="navigation-list-item active">
<a href="http://localhost:4000/dev/structure" class="navigation-list-link active">Project Structure</a>
2019-07-27 01:26:05 +02:00
</li>
</ul>
2019-07-26 23:53:02 +02:00
</li>
<li class="navigation-list-item">
<a href="http://localhost:4000/instances" class="navigation-list-link">Instances</a>
2019-07-26 23:53:02 +02:00
</li>
</ul>
</nav>
</div>
<footer role="contentinfo" class="site-footer">
<p class="text-small text-grey-dk-000 mb-0">This site uses <a href="https://github.com/pmarsceill/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.</p>
</footer>
</div>
<div class="main-content-wrap js-main-content" tabindex="0">
<div class="page-header">
<div class="main-content">
<div class="search js-search">
<div class="search-input-wrap">
<input type="text" class="js-search-input search-input" tabindex="0" placeholder="Search Gancio" aria-label="Search Gancio" autocomplete="off">
<svg width="14" height="14" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg" class="search-icon"><title>Search</title><g fill-rule="nonzero"><path d="M17.332 20.735c-5.537 0-10-4.6-10-10.247 0-5.646 4.463-10.247 10-10.247 5.536 0 10 4.601 10 10.247s-4.464 10.247-10 10.247zm0-4c3.3 0 6-2.783 6-6.247 0-3.463-2.7-6.247-6-6.247s-6 2.784-6 6.247c0 3.464 2.7 6.247 6 6.247z"/><path d="M11.672 13.791L.192 25.271 3.02 28.1 14.5 16.62z"/></g></svg>
</div>
<div class="js-search-results search-results-wrap"></div>
</div>
<ul class="list-style-none text-small mt-md-1 mb-md-1 pb-4 pb-md-0 js-aux-nav aux-nav">
2019-08-07 22:39:33 +02:00
<li class="d-inline-block my-0"><a href="https://framagit.org/les/gancio">Source</a></li>
2019-07-26 23:53:02 +02:00
</ul>
</div>
</div>
<div class="main-content">
<nav class="breadcrumb-nav">
<ol class="breadcrumb-nav-list">
<li class="breadcrumb-nav-list-item"><a href="http://localhost:4000/dev">Hacking</a></li>
2019-07-26 23:53:02 +02:00
<li class="breadcrumb-nav-list-item"><span>Project Structure</span></li>
</ol>
</nav>
<div id="main-content" class="page-content" role="main">
2019-08-06 01:12:05 +02:00
<h3 class="no_toc" id="project-structure">Project structure</h3>
<ol id="markdown-toc">
<li><a href="#api--backend" id="markdown-toc-api--backend">API / backend</a></li>
<li><a href="#client--frontend" id="markdown-toc-client--frontend">Client / frontend</a></li>
<li><a href="#federation--activitypub" id="markdown-toc-federation--activitypub">Federation / ActivityPub</a></li>
</ol>
2019-07-26 23:53:02 +02:00
<h3 id="api--backend">API / backend</h3>
2019-08-06 01:12:05 +02:00
<p>Source code inside <code class="highlighter-rouge">server/api/</code>.<br />
2019-07-26 23:53:02 +02:00
<code class="highlighter-rouge">index.js</code> is basically a routing table pointing each PATH with specified
HTTP VERB to a method of a controller.</p>
<p>jwt is used to authenticate api request.</p>
2019-08-06 01:12:05 +02:00
<p><a href="https://expressjs.com/">Express.js</a> is based on middleware, passing each request to a chain of methods.</p>
2019-07-26 23:53:02 +02:00
<p>If you come from a PHP background, note that the main difference with
2019-08-06 01:12:05 +02:00
<a href="https://en.wikipedia.org/wiki/Node.js">Node.js</a> is that the server process is always running and able to manage
2019-07-26 23:53:02 +02:00
multiple requests and tasks together (asyncronically) while each php
process is tied to a single request.</p>
<p><a href="https://sequelize.org/">Sequelize</a> is used as ORM. Take a look in <a href="https://framagit.org/les/gancio/tree/master/server/api/models"><code class="highlighter-rouge">/server/api/models</code></a>.</p>
2019-07-26 23:53:02 +02:00
<h3 id="client--frontend">Client / frontend</h3>
<p>Nuxt.js is used here!<br />
Nuxt is basically Vue plus SSR (Server Side Rendering).
Client routing in nuxt is automatic (if you dont need something special),
just put your page inside <code class="highlighter-rouge">pages</code> and thats it!</p>
2019-08-06 01:12:05 +02:00
<h3 id="federation--activitypub">Federation / ActivityPub</h3>
<p>Code inside <a href="https://framagit.org/les/gancio/tree/master/server/federation"><code class="highlighter-rouge">server/federation</code></a>.</p>
2019-07-26 23:53:02 +02:00
</div>
</div>
</div>
</div>
</body>
</html>