import{_ as e,c as i,o as a,a3 as s}from"./chunks/framework.CXhrtaSR.js";const k=JSON.parse('{"title":"Development Guide","description":"","frontmatter":{},"headers":[],"relativePath":"deployment/devGuide.md","filePath":"deployment/devGuide.md","lastUpdated":1711621108000}'),t={name:"deployment/devGuide.md"},n=s(`<h1 id="development-guide" tabindex="-1">Development Guide <a class="header-anchor" href="#development-guide" aria-label="Permalink to &quot;Development Guide&quot;">​</a></h1><p><strong>Table of Contents</strong></p><ul><li><a href="#development-guide">Development Guide</a><ul><li><a href="#contribution">Contribution</a></li><li><a href="#naming-convention">Naming convention</a></li><li><a href="#build-for-distribution">Build for distribution</a></li><li><a href="#future-plan">Future plan</a></li></ul></li></ul><h2 id="contribution" tabindex="-1">Contribution <a class="header-anchor" href="#contribution" aria-label="Permalink to &quot;Contribution&quot;">​</a></h2><p>Any contribution is welcome!</p><p><strong>But please fire an issue before you start working on it.</strong> This is to avoid duplicated work and make sure the changes are necessary.</p><p>The principle is to <strong>Keep this project simple and maintainable</strong>:</p><ul><li><strong>Use type annotations whenever possible</strong></li><li>Adding features for common use cases</li><li>Minimal dependencies for each module</li></ul><h2 id="naming-convention" tabindex="-1">Naming convention <a class="header-anchor" href="#naming-convention" aria-label="Permalink to &quot;Naming convention&quot;">​</a></h2><p><strong>Python</strong></p><p>Alough <a href="https://peps.python.org/pep-0008/#function-and-variable-names" target="_blank" rel="noreferrer">PEP-8</a> suggests use <code>lower_case_with_underscores</code> for methods and functions...</p><p>By my personal preference, I use the following naming rules:</p><ul><li><code>snake_case</code> (Lowercase / Lower case with underscore) for variables, properties</li><li><code>lowerCamelCase</code> (Mixed case) for functions, methods</li><li><code>UpperCamelCase</code> (Pascal case) for classes</li></ul><p><strong>Please follow this style if you are working on this repository</strong>, these naming makes it very clear to distinguish between different types of code.</p><p><strong>Javascript</strong></p><p>I follow Javascript naming convention, which is:</p><ul><li><code>lowerCamelCase</code> for variables, properties, functions and methods.</li><li><code>UpperCamelCase</code> for classes.</li></ul><p><strong>Http path</strong></p><p>use <code>lowercase-with-dash</code> for http path, e.g. <code>/api/v1/your-path</code></p><h2 id="build-for-distribution" tabindex="-1">Build for distribution <a class="header-anchor" href="#build-for-distribution" aria-label="Permalink to &quot;Build for distribution&quot;">​</a></h2><p>Please run the following commands to build for the distribution:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># build fronted</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> lires_web</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &amp;&amp; </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">npm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &amp;&amp; </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">npm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &amp;&amp; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ..</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># fetch third party libs</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">lrs-utils</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> update_pdfjs</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># build for distribution</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">python</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> setup.py</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> sdist</span></span></code></pre></div><h2 id="future-plan" tabindex="-1">Future plan <a class="header-anchor" href="#future-plan" aria-label="Permalink to &quot;Future plan&quot;">​</a></h2><p>The current version mainly focus on the core features including data storage, user management, and basic data visualization.</p><p>In my plan, the next step is to optimize for large data sets, and add more features for collaboration between users, as these are the key features that really leverages the power of the server-side library.</p><ul><li>[ ] Add a discussion board, anyone can post a topic and discuss with others, the topic can be linked to a paper or a tag. The data can be stored in the user database as table <code>posts</code>, and refer to the paper by id.</li><li>[ ] Record user activities, e.g. who added/edited/removed a tag/note/paper, the reading history of a paper, etc. The data can be stored in the user database as table <code>activities</code>.</li></ul><details><summary>Finished</summary><ul><li>[x] Long connection between the server and the client, so that the client can receive notifications when there are new activities. This may be done by using <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API" target="_blank" rel="noreferrer">Websocket</a> or <a href="https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events" target="_blank" rel="noreferrer">Server-Sent Events</a>.</li><li>[x] Moving to microservice paradigm</li><li>[x] Move all data filtering to backend; frontend use partial async data loading to optimize bandwidth and rendering speed.</li></ul></details>`,27),o=[n];function r(l,d,p,h,c,u){return a(),i("div",null,o)}const m=e(t,[["render",r]]);export{k as __pageData,m as default};
