<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Mihail Raulea</title>
    <description>The latest articles on Forem by Mihail Raulea (@mihairaulea).</description>
    <link>https://forem.com/mihairaulea</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F232772%2F158f9a60-ad60-4553-919b-d10a43c7b095.jpeg</url>
      <title>Forem: Mihail Raulea</title>
      <link>https://forem.com/mihairaulea</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/mihairaulea"/>
    <language>en</language>
    <item>
      <title>Building SaaS?</title>
      <dc:creator>Mihail Raulea</dc:creator>
      <pubDate>Thu, 19 Sep 2019 14:31:01 +0000</pubDate>
      <link>https://forem.com/mihairaulea/building-saas-4db9</link>
      <guid>https://forem.com/mihairaulea/building-saas-4db9</guid>
      <description>&lt;p&gt;We're giving away user management, UI and recurrent billing(with Stripe) for free(MIT license). We've used Adminator and made it functional by slapping Firebase and Svelte on top. Grab it from Github: &lt;a href="https://github.com/mihairaulea/DashboardHeroLite" rel="noopener noreferrer"&gt;https://github.com/mihairaulea/DashboardHeroLite&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2FbvxtDb1%2F1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2FbvxtDb1%2F1.png" alt="Adminator admin dashboard"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Won't bore you - you know you need user management. You know you need a UI. Billing is what keeps your company alive, so better have that, too. Here's how to do it quickly and cheaply with Dashboard Hero Lite, and get your MVP up and running this week.&lt;/p&gt;

&lt;p&gt;After becoming a master at building MVPs(and failed startups), one thing stuck. How to build quickly, cheaply and (somewhat)reliably.&lt;/p&gt;

&lt;p&gt;After you've built out the core of your product, you should be able to present it to the world and start getting revenue fairly quickly. Only, that's not usually the case - we've got a customer which spent 181k USD on building just that before hiring us.&lt;/p&gt;

&lt;p&gt;Dashboard Hero aims to help SaaS companies scale quickly and focus on the core of their product.&lt;/p&gt;

&lt;h1&gt;
  
  
  User management
&lt;/h1&gt;

&lt;p&gt;At a bare minimum, you need a register and login interface. The point is to collect emails, so a communication channel can be established with your user.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2Fnj1k482%2F2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2Fnj1k482%2F2.png" alt="Firebase user management"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You also need to filter access and render UI differently, based on the role of the user(authenticated vs guest, admin vs regular vs other roles). &lt;/p&gt;

&lt;p&gt;Would be nice to be able to let user login and register with Facebook and Google(OAuth), block certain users, manually reset the password from a master admin dashboard and verify the email address.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2FBL2WLk5%2F3.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2FBL2WLk5%2F3.gif" alt="Firebase login/logout screens"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How about registering a user manually? We've got that, too.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2FWV8FhmQ%2F4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2FWV8FhmQ%2F4.png" alt="Manually register user with firebase"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For details on how this is accomplished, read the Architecture section.&lt;/p&gt;

&lt;h1&gt;
  
  
  UI
&lt;/h1&gt;

&lt;p&gt;Maybe you've put in the 3–6 months required to learn and become productive with React, Angular or Vue. Maybe you even like those frameworks. I haven't and don't. &lt;/p&gt;

&lt;p&gt;Startups are strapped for resources - focusing on front-end best practices is the last thing you want to do in a hyper-competitive environment.&lt;/p&gt;

&lt;p&gt;Svelte is pure awesomeness - it perfectly applies the Pareto principle: get 80% of the benefit with 20% of the effort.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2FN3Rb3P4%2F5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2FN3Rb3P4%2F5.png" alt="Svelte framework example 1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You get components - isolated pieces of code, comprised of HTML, CSS, and Javascript. But none of the React hooks, component lifecycle, and Webpack build jazz. You'll be dancing on the keyboard like it's 2004. The idea is to ship the project and start learning and iterating.&lt;/p&gt;

&lt;p&gt;Examples of components include the Menu and the TopBar, but also Buttons of different colors, notifications and more.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2FxqcJkSm%2F6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2FxqcJkSm%2F6.png" alt="Svelte framework admin dashboard"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Svelte is one of the few frameworks I've used in 14 years of coding that does not get in the way AT ALL - simply write Html(with a templating system), CSS and javascript.&lt;/p&gt;

&lt;p&gt;Explanations, hands-on and examples, in the Architecture section.&lt;/p&gt;

&lt;h1&gt;
  
  
  Billing
&lt;/h1&gt;

&lt;p&gt;Dashboard Hero Lite is loosely integrated with Stripe. You can generate a URL for a plan subscription in the Stripe Billing dashboard, and manually assign it in Firebase. It should be enough for your first 10–20 customers. &lt;/p&gt;

&lt;p&gt;Article and video explaining how to do this, coming soon.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2F7rTtNms%2F7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2F7rTtNms%2F7.png" alt="Svelte framework admin dashboard"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Architecture
&lt;/h1&gt;

&lt;p&gt;After cloning the admin dashboard GitHub you will notice two important folders: src and public. Rollup(a build tool) takes as input the src folder and produces the public version of your web app. The public folder is what gets deployed to Firebase Hosting.&lt;/p&gt;

&lt;h3&gt;
  
  
  The source(src) folder
&lt;/h3&gt;

&lt;p&gt;App.svelte is the entry point for our admin dashboard. It fetches a Firebase instance and renders different components if the user is logged in, or not.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2FC126KQN%2F8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2FC126KQN%2F8.png" alt="Svelte framework admin dashboard open source"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pretty straight-forward, right? You can use Firebase Cloud Functions to hide sensitive business processes, and also deny access to a resource if the user is not logged in.&lt;/p&gt;

&lt;p&gt;Important components are the MenuDrawer and the TopBar. The MenuDrawer tells the router which components to render, by using the Link tag. &lt;/p&gt;

&lt;p&gt;Here's an example:&lt;br&gt;
UI Elements&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2F9qtxB5S%2F9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2F9qtxB5S%2F9.png" alt="Svelte framework admin dashboard"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At build time, Svelte knows how to unpack the Link attribute&lt;/p&gt;

&lt;p&gt;The TopBar renders the user email and allows one to sign out.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2FkMPrcTQ%2F10.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2FkMPrcTQ%2F10.png" alt="Svelte framework admin dashboard"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ContentContainer lists the Routes(pages) available and maps the URL path to the svelte Component. Only displayed when the user is logged in(see App.svelte).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2FcwzR5Cj%2F11.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2FcwzR5Cj%2F11.png" alt="Svelte framework admin dashboard"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;UserContainer has a similar structure and handles Login and Register.&lt;/p&gt;

&lt;p&gt;To run the project on localhost, from the project root, do:&lt;br&gt;
npm install&lt;br&gt;
npm run dev&lt;/p&gt;

&lt;p&gt;To deploy to Firebase and get the whole world see your awesome admin dashboard: change the firebase credentials in src/common/resources/firebase/index.js(line 6) with your own, and from the project root, run:&lt;/p&gt;

&lt;p&gt;firebase deploy&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusions
&lt;/h1&gt;

&lt;p&gt;This article tries to keep it short and sweet, so you get up and running in no time. There's no substitute for reading and tinkering with the code yourself :)&lt;/p&gt;

&lt;p&gt;Let us know in the comments what you're building - always passionate about new tech. Also, let us know if there's something that would need further explaining. And if you've found a bug - don't be shy, open an issue on GitHub.&lt;/p&gt;

&lt;p&gt;Just saying hello also works :)&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>opensource</category>
      <category>react</category>
      <category>angular</category>
    </item>
  </channel>
</rss>
