<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Booster-Template on Techformist</title>
    <link>https://techformist.com/tags/booster-template/</link>
    <description>Recent content in Booster-Template on Techformist</description>
    <image>
      <url>https://techformist.com/logo.svg</url>
      <link>https://techformist.com/logo.svg</link>
    </image>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Wed, 15 Apr 2020 06:30:00 +0000</lastBuildDate><atom:link href="https://techformist.com/tags/booster-template/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Simple VueJS Starter Template</title>
      <link>https://techformist.com/vuejs-starter-template/</link>
      <pubDate>Wed, 15 Apr 2020 06:30:00 +0000</pubDate>
      
      <guid>https://techformist.com/vuejs-starter-template/</guid>
      <description>&lt;p&gt;VueJS booster template is a boilerplate that has simple features that make it &lt;em&gt;really&lt;/em&gt; easy to start new projects.&lt;/p&gt;
&lt;p&gt;Vue CLI makes starting a Vue project simple -&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;vue create demo
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This sets up everything that you need to start - but just so. There are more than few things missing for a functioning/easy-to-use project :)&lt;/p&gt;
&lt;h2 id=&#34;the-case-for-a-new-boilerplate&#34;&gt;The Case for a New Boilerplate&lt;/h2&gt;
&lt;p&gt;I take my role as a developer with every bit of smartness inherent in me. The problems faced with my back-end projects and my simple solution, &lt;a href=&#34;https://techformist.com/adonisjs-starter-template/&#34;&gt;booster project in AdonisJS&lt;/a&gt;, are very relevant to VueJS and other front-end experiments.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>VueJS booster template is a boilerplate that has simple features that make it <em>really</em> easy to start new projects.</p>
<p>Vue CLI makes starting a Vue project simple -</p>
<pre tabindex="0"><code>vue create demo
</code></pre><p>This sets up everything that you need to start - but just so. There are more than few things missing for a functioning/easy-to-use project :)</p>
<h2 id="the-case-for-a-new-boilerplate">The Case for a New Boilerplate</h2>
<p>I take my role as a developer with every bit of smartness inherent in me. The problems faced with my back-end projects and my simple solution, <a href="/adonisjs-starter-template/">booster project in AdonisJS</a>, are very relevant to VueJS and other front-end experiments.</p>
<p>In essence, I copy old projects to create something new to keep things as productive as possible.</p>
<p>Ignoring the philosophical implications of doing such a thing, there is this recurring problem of -</p>
<ol>
<li>Removing parts that are not relevant</li>
<li>Removing complexity for small/simple projects</li>
<li>Staying consistent to standards and practices</li>
<li>Trying to get all these messages to new developers (they exist and I don&rsquo;t like talking to them overnight to get them started)</li>
</ol>
<p>So it is that I created another simple starter template for VueJS that is useful to beginners and simple projects.</p>
<p>The idea is to keep things painfully simple and allow users to change as and when they need more complexity.</p>
<p>Here&rsquo;s presenting <a href="https://github.com/techformist/vue-vuetify-api-boost">vue-vuetify-api-boost</a>.</p>
<h2 id="what-does-the-starter-template-contain">What does the starter template contain?</h2>
<p>The standard set of components of this starter project/ boilerplate provide a consistent and standard experience while starting new projects. It consists of -</p>
<ol>
<li>Standard front-end library - Vuetify is used in this boilerplate</li>
<li>Consistent way of dealing with Vuex - Pathify FTW</li>
<li>Standard practices for them pesky API calls</li>
<li>Some screens to help get started</li>
</ol>
<h3 id="packages">Packages</h3>
<p>We use the below standard features of Vue CLI-</p>
<ol>
<li>Vue + Vuex + Vue Router</li>
<li>Node SaSS</li>
<li>Linter</li>
</ol>
<p>The major additional packages beyond those installed by Vue CLI installed -</p>
<ul>
<li><code>vuetify</code>: the most popular Vue styling library</li>
<li><code>axios</code>: API calls</li>
<li><code>vuex-persist</code>: Persist vuex to local storage and cookies (using <code>js-cookie</code>)</li>
<li><code>vue-html-to-paper</code>: allow pretty printing of pages (no example pages)</li>
<li><code>file-saver</code>: Save files being downloaded from server (no example pages)</li>
<li><code>vue2-dropzone</code>: Drop files to upload (no example pages)</li>
<li><code>v-tooltip</code>: Tooltips that don&rsquo;t need a 100 lines to implement</li>
<li>[dev] <code>prerender-spa-plugin</code>: pre-render pages without selling your soul</li>
</ul>
<h3 id="key-features">Key Features</h3>
<ul>
<li>Registration and login pages</li>
<li>Router setup with protected routes, and dynamically loaded components</li>
<li>Standard <code>Terms</code>, <code>Privacy Policy</code> and <code>Credit</code> pages</li>
<li>Default and standard layouts for list and detail views (of a CRUD application)</li>
<li>A sample <code>Service Request</code> entity that demonstrates how fetch/insert/update work</li>
</ul>
<h3 id="structure">Structure</h3>
<p>The structure is plain and simple.</p>
<h4 id="views-and-components">Views and components</h4>
<p>UI elements are like any other project. We use Vuetify for styling!</p>
<h4 id="layouts">Layouts</h4>
<p>Layouts exist in a separate folder under components. Every view starts with a layout and utilises the slots provided by layout to paint the pretty picture.</p>
<h4 id="mixin">Mixin</h4>
<p>There is a single mixin that provides validations and a few utilities used across the board. You have to import the mixin in every component you use. It is deliberately not included for the entire app - though you could do that.</p>
<h4 id="router">Router</h4>
<p>Router is as simple as they come. It dynamically imports most components to avoid front-loading every single component at start-up.</p>
<p>It also provides protected routes and dynamic component loading in a couple of cases.</p>
<h4 id="vuex">Vuex</h4>
<ul>
<li><code>mutations</code>, <code>getters</code>, <code>actions</code> exist in <code>store/*</code> themselves. They can be segregated into separate files if projects become too complex</li>
<li>There is no distinct <code>service</code> layer. I understand (and agree to) the arguments to keep business logic separate from <code>vuex</code> logic, but I don&rsquo;t use those in simpler projects.</li>
<li><code>vuex-pathify</code> takes care of all mutations - so, few mutations are hand-written</li>
</ul>
<h2 id="using-the-boilerplate">Using the boilerplate</h2>
<p>Clone this repository to start..</p>
<pre tabindex="0"><code>git clone https://github.com/techformist/vue-vuetify-api-boost
</code></pre><p>Install packages -</p>
<pre tabindex="0"><code>cd vue-vuetify-api-boost
npm i
</code></pre><h2 id="project-setup">Project setup</h2>
<p>Setup like any other Vue project.</p>
<ul>
<li>Add/ change views and components</li>
<li>Change layouts</li>
<li>.. and more</li>
</ul>
<p>Compile with hot-reload for development</p>
<pre tabindex="0"><code>npm run serve
</code></pre><p>Voila, we have this super screen :)</p>
<p><img loading="lazy" src="/misc/vue-booster-template.jpg" type="" alt="vue-booster-template"  /></p>
<p>You can continue using Vue CLI with this project.</p>
<h2 id="back-end-partner-projects">Back-end Partner Projects</h2>
<p>The template runs without issues out-of-the-box with the following projects in back-end -</p>
<ul>
<li><a href="/adonisjs-starter-template/">booster project in AdonisJS</a></li>
</ul>
<h2 id="other-boilerplates">Other Boilerplates</h2>
<p>See -</p>
<ul>
<li><a href="https://github.com/chrisvfritz/vue-enterprise-boilerplate">Vue Enterprise Boilerplate</a>: for large projects / teams</li>
</ul>
<h2 id="conclusion">Conclusion</h2>
<p>None of the additional packages or features in the starter template add anything significantly new, but required at least a day to set everything up.</p>
<p>Hopefully, we continue optimising the start-up time for our projects and eliminate more boring tasks required at the very beginning of a project. And.. add even more stuff useful to ourselves and anyone else who bothers picking up this boilerplate amongst a million other (better) templates available on the Internet.</p>
]]></content:encoded>
    </item>
    
    <item>
      <title>Starter Template for AdonisJS</title>
      <link>https://techformist.com/adonisjs-starter-template/</link>
      <pubDate>Wed, 01 Apr 2020 06:30:00 +0000</pubDate>
      
      <guid>https://techformist.com/adonisjs-starter-template/</guid>
      <description>&lt;p&gt;I have used AdonisJS in and out of projects in the last year. Despite it&amp;rsquo;s smaller community and not-so-regular enhancements, it remains one of my favourite NodeJS frameworks. &lt;a href=&#34;https://techformist.com/why-should-you-use-adonisjs-framework/&#34;&gt;I recommend AdonisJS&lt;/a&gt; for hobby and production projects in full confidence :)&lt;/p&gt;
&lt;p&gt;I typically use AdonisJS for back-end, which has me start with -&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;adonis new awesomeness --api
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;AdonisJS comes with a neat set of powerful features -&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;An ORM that works quite well&lt;/li&gt;
&lt;li&gt;Authentication and security already setup&lt;/li&gt;
&lt;li&gt;Basic features to serve API without pulling a thousand wires just to get started&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;the-case-for-a-new-boilerplate&#34;&gt;The Case for a New Boilerplate&lt;/h2&gt;
&lt;p&gt;Even with all the features baked in the default boilerplate, I tend to just copy older projects -&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>I have used AdonisJS in and out of projects in the last year. Despite it&rsquo;s smaller community and not-so-regular enhancements, it remains one of my favourite NodeJS frameworks. <a href="/why-should-you-use-adonisjs-framework/">I recommend AdonisJS</a> for hobby and production projects in full confidence :)</p>
<p>I typically use AdonisJS for back-end, which has me start with -</p>
<pre tabindex="0"><code>adonis new awesomeness --api
</code></pre><p>AdonisJS comes with a neat set of powerful features -</p>
<ol>
<li>An ORM that works quite well</li>
<li>Authentication and security already setup</li>
<li>Basic features to serve API without pulling a thousand wires just to get started</li>
</ol>
<h2 id="the-case-for-a-new-boilerplate">The Case for a New Boilerplate</h2>
<p>Even with all the features baked in the default boilerplate, I tend to just copy older projects -</p>
<ol>
<li>AdonisJS has not changed much over the last year</li>
<li>The additional features that I added over time are invaluable in saving time at the very beginning</li>
<li>It takes away the boring tasks of &ldquo;setting up stuff&rdquo;</li>
</ol>
<p>Unfortunately, the simple copy/paste model (even when using older Git commits) were not clean and not friendly to other developers.</p>
<p>So then.. I started using a simple starter template (or a booster template) to start all my AdonisJS projects.</p>
<p>Here&rsquo;s presenting <a href="https://github.com/techformist/adonis41-api-boost">adonis-api-boost</a>.</p>
<h2 id="what-does-the-starter-template-contain">What does the starter template contain?</h2>
<p>The standard set of components of the starter project/ boilerplate provide a more consistent and standard experience while starting new projects.</p>
<p>The template is just a boilerplate on top of the AdonisJS provided boilerplate. It consists of additional packages for real-world apps (in my opinion), configured functionality and examples.</p>
<h3 id="packages">Packages</h3>
<p>The major additional packages are -</p>
<ul>
<li><code>@adonisjs/mail</code>: Mail people using SMTP or third party mail providers</li>
<li><code>@adonisjs/persona</code>: User registration, password change, &amp; related paraphernalia</li>
<li><code>@adonisjs/validator</code>: Validate data in routes, sanitize data (also, required by persona)</li>
<li><code>adonis-scheduler</code>: Schedule jobs</li>
<li><code>pg</code>: Connect to PostGRE database. Remove this if you are using other DBs</li>
</ul>
<p>We also register these packages and have examples of how they work (for e.g. a daily scheduled job that does nothing).</p>
<h3 id="key-features">Key Features</h3>
<ul>
<li>Complete user registration, change password flow with email - thanks to Persona and Mail</li>
<li>Use mail templates and do mail-merge (replace placeholders in template with data) using AdonisJS views</li>
<li>Add &lsquo;sensible&rsquo; user attributes like status, start date, etc. See the user migration file for user</li>
<li>Simple authorisation flow using user role. See <code>app/services/AuthorisationService.js</code> to know more</li>
<li>A sample <code>Service Request</code> entity that demonstrates authenticated routes</li>
<li>Sample batch job that runs daily</li>
</ul>
<h2 id="using-the-boilerplate">Using the boilerplate</h2>
<p>Clone this repository to start..</p>
<pre tabindex="0"><code>git clone https://github.com/techformist/adonis41-api-boost.git
</code></pre><p>Install packages -</p>
<pre tabindex="0"><code>cd adonis41-api-boost
npm i
</code></pre><p>Now you continue your work as in any other AdonisJS project.</p>
<ul>
<li>
<p>Run the following command to run startup migrations.
<code>adonis migration:run</code></p>
</li>
<li>
<p>Run the project in dev mode
<code>adonis serve --dev</code></p>
</li>
</ul>
<p>See API usage examples on the <a href="https://github.com/techformist/adonis41-api-boost">repo&rsquo;s README</a>.</p>
<h2 id="conclusion">Conclusion</h2>
<p>None of the additional packages or features in the starter template add anything significantly new, but required at least half a day to set everything up.</p>
<p>And.. we had consistency issues with the fields used in the standard entities / controller logic. Hopefully we add more useful stuff as we use AdonisJS more and when the next major release happens.</p>
]]></content:encoded>
    </item>
    
  </channel>
</rss>
