<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Paul Solbach on Medium]]></title>
        <description><![CDATA[Stories by Paul Solbach on Medium]]></description>
        <link>https://medium.com/@psolbach?source=rss-b9a1b056fcb4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*m79q8a6eavdaUwOLH_FRKw.jpeg</url>
            <title>Stories by Paul Solbach on Medium</title>
            <link>https://medium.com/@psolbach?source=rss-b9a1b056fcb4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 13:01:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@psolbach/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Lessons Learned running a Startup on Firebase Part II]]></title>
            <link>https://medium.com/praise-blog/advanced-firebase-applications-ii-9c0a485eb05c?source=rss-b9a1b056fcb4------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c0a485eb05c</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[tutorial]]></category>
            <dc:creator><![CDATA[Paul Solbach]]></dc:creator>
            <pubDate>Sun, 17 Jun 2018 12:58:36 GMT</pubDate>
            <atom:updated>2018-06-19T06:11:06.135Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NvxTph4p2OwkTLIIa7qTfg.jpeg" /></figure><p>At <a href="https://praise.press/">Praise</a>, we’re building a social network for quality journalism on top of Firebase Web. This is our development diary. After talking about Testability, Support, Firebase Hosting and Express Cloud Functions as Server Middleware in a <a href="https://medium.com/praise-blog/advanced-firebase-applications-i-ae9c978af862">previous post</a>, today — we’re venturing on into the depths of Firebase for the Web with Session Management and its gotchas.</p><p>Topics covered: Managing user session data with custom claims. Another essential part in our quest to replace as many elements of a traditional app stack with Firebase and Google offerings.</p><h3>User Sessions with Custom Claims</h3><p>There are many <a href="https://firebase.google.com/docs/auth/admin/manage-cookies">methods to simulate cookie-based user sessions</a> in the Firebase realm. One particularly elegant way to create custom user data: custom claims, data objects attached to the built-in Firebase auth management. These claims have several advantages:</p><ol><li>data is shared between client and server,</li><li>no need to do asychronous lookups on your realtime or Firestore db</li><li>claims can be used inside Firebase security rules</li><li>no session management boilerplate code</li></ol><p>Let’s get to an example. A logical choice would be to set a claim upon user creation. As Praise is built around Twitter auth for now, we’re piggy-backing the finite user namespace of Twitter and make it our own. These Twitter “handles” are human readable, make up portions of our urls and are familiar to our target group. This is the simplest form of code you would need to set a custom claim inside a Firebase function that runs onAuthCreate .</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/80cb649331ca14b109738385d36585f6/href">https://medium.com/media/80cb649331ca14b109738385d36585f6/href</a></iframe><p>This claim will be available on every user auth object everywhere in your app. BUT … there are some gotchas.</p><p>Custom claims are not magically available on the client after you set them within a function. If you need to be able to work with the claim immediately after user creation—during onboarding as in our case — you would fall back to the db to inform about the change. Simply watch a path corresponding to the internal Firebase user id (which you know at any given time) on the client and update it after the claim is set on the function. Continuing our snippet above, it would look like so:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b152071e66a379612e75731b129706ac/href">https://medium.com/media/b152071e66a379612e75731b129706ac/href</a></iframe><p>Also, custom claims are not exported from the internal Firebase auth system. That means you would have to set them programmatically if you migrate users between databases or Firebase accounts. Put simply, this firebase-cli command won’t spit out any custom claims:</p><pre>firebase auth:export users.json --format=json</pre><p>So, to recap: We’re setting a custom claim inside a cloud function and inform the client about it by updating the database. The client listens for changes on that database object and finally reloads the idToken containing all user data and custom claims:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0e2664b2311bbcef66a95848572b886d/href">https://medium.com/media/0e2664b2311bbcef66a95848572b886d/href</a></iframe><h3>More to come</h3><p>In Part III of our development diary, we’ll be talking about routine tasks with Firebase in lieu of CRON jobs. Stay tuned and follow us here to get the latest posts right to your inbox.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c0a485eb05c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/praise-blog/advanced-firebase-applications-ii-9c0a485eb05c">Lessons Learned running a Startup on Firebase Part II</a> was originally published in <a href="https://medium.com/praise-blog">Praise</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lessons Learned running a Startup on Firebase Part I]]></title>
            <link>https://medium.com/praise-blog/advanced-firebase-applications-i-ae9c978af862?source=rss-b9a1b056fcb4------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae9c978af862</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[single-page-applications]]></category>
            <category><![CDATA[firebase]]></category>
            <dc:creator><![CDATA[Paul Solbach]]></dc:creator>
            <pubDate>Thu, 17 May 2018 18:00:23 GMT</pubDate>
            <atom:updated>2018-06-17T13:29:19.223Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x6d5cBKLlgrktASxDsSErA.jpeg" /></figure><h4>As engineers, you know the situation: Building from scratch is what gets us excited all the time! Things can get tricky though if you succumb to the siren song of the shiny and new, like Firebase, over the tried and trusted — a traditional web stack.</h4><p>Today, we want to help you make informed decisions by sharing our experience with <a href="https://firebase.google.com/">Firebase</a>, a mobile and web development suite that rose to prominence after its acquisition by Google. Developing <a href="https://praise.press/">Praise</a>, the “Instagram of quality journalism”, we ended up using Firebase in hopes of quick iteration cycles. We’re developing the building blocks of a social network where it’s all about real-time interaction, distribution of events and a solid user experience. While we quickly made progress, Firebase confronted us with quite a few trade offs. This is the first installment in a series about our development journey with the popular all-in-one solution. Some of our findings are undocumented, some may strike you as odd. Let’s go.</p><h3>Firebase for Rapid Prototyping</h3><p>Praise started out with the notion of a Graph database connecting an infinite amount of item types — we centered around <a href="https://github.com/cayleygraph/cayley">Cayley</a> and a bespoke Go backend, only to ditch the concept altogether a few weeks down the road in favour of a rather unwieldy Spring Boot Application. Praise was growing from an academic exercise into a very serious app, seed funding followed, we needed to speed things up. So we switched to Javascript exclusively and went all in on Firebase. These are the criteria that led to the decision:</p><ol><li>As a social network, we needed to implement user feeds at scale — something that Firebase promised to easily fulfill.</li><li>While in prototype phase, we wanted to be front-end driven. We didn’t want to spend time on schema migrations, models and most importantly, infrastructure decisions.</li><li>All development happens in Javascript</li><li>Solid performance and availability</li></ol><p>Firebase helped us concentrate on the product: authentication, API, infrastructure, hosting and more we simply got out of the box. But as always, there is a catch. While the basic Firebase API is really easy to grasp, dealing with its idiosyncrasies like security rules — a middle ground between authorization and consistency checks, can be painful and time-consuming to test against. Which brings us to our first topic.</p><h3>Testing</h3><p>Testing is the biggest trade-off with this type of serverless applications. Mostly because we’re not dealing with a local database. Rolling back and replaying transactions is not easily done with Firebase. Testing cloud functions is cumbersome — we’re triggering functions on database changes a lot, much like stored procedures in SQL. Before deciding to invest in Firebase, you might be well advised to glance over the unit testing documentation.</p><p>While you can run cloud functions locally, interfacing is only possible through a Node REPL. That means, piping lines of code into that REPL is an option — waiting for the result of an asynchronous function is not. To their credit, the Firebase team has programmatic access to local functions on their roadmap.</p><h3>Support</h3><p>Ideally, developers support each other through documentation. Firebase tutorials outside of the Google docs are scarce and subject to constant changes. Firebase is a moving target. We ran into multiple standard issues that we addressed either on Github or Stack Overflow. The Firebase team was very responsive and did their best to help. Only once did we resort to a more traditional bug filing that never went anywhere.</p><h3>Hosting &amp; Server Middleware</h3><p>As a precursor to server-side rendering, we needed to deliver dynamic meta tags to Twitter and Facebook crawlers. Without these, no fancy Twitter cards or rich Facebook shares. While this requirement is purely web related and therefore outside of the Firebase sweet spot, we needed it. Yet at the same time, we didn’t want to leave the serverless world and set up all kinds of cloud resources just for this one feature.</p><p>Turns out, Firebase hosting offers access to a faux server layer out of the box — though it ain’t pretty: define cloud function handlers for routes inside your firebase.json. An approach that immediately reminded us of Zappa, one of the first killer apps done on top of AWS Lambda. With Zappa, you could run a whole Django app inside a cloud function. What seemed mind-blowing at the time has now become our awkward reality.</p><p>We set up a bare bones https function that runs Express to “hydrate” our index.html with dynamic meta tags — relative to the requested route. We quickly got working results.</p><pre>{<br>  &quot;database&quot;: {<br>    &quot;rules&quot;: &quot;rules/rules.json&quot;<br>  },</pre><pre>  &quot;hosting&quot;: {<br>    &quot;public&quot;: &quot;./public&quot;,<br>    &quot;ignore&quot;: [<br>      &quot;firebase.json&quot;,<br>      &quot;**/.*&quot;,<br>      &quot;**/node_modules/**&quot;<br>    ],</pre><pre>    &quot;rewrites&quot;: [{<br>      &quot;source&quot;: &quot;**/&quot;,<br>      &quot;function&quot;: &quot;app&quot;<br>    }]<br>  }<br>}</pre><p>And then the pitfalls started. The function had a cold start execution time of a whopping 7 seconds. After that it dropped to sub 100 milliseconds. To mitigate this, we introduced a) aggressive caching and b) restricted the paths for the Express function to trigger.</p><p>Firebase documentation states that routes are defined using the glob pattern. Which is not entirely true. We found that routes starting with modifiers are deemed invalid by Firebase. If you want to match all routes except x, you need to start your pattern with **/. No way around it.</p><pre>“source”: “**/!(person|user|search|etc)”,</pre><p>After deploying the fixed code, Firebase deploy threw a syntax error that we didn’t encounter running the official development server. While the error message didn’t hint at it, we needed a trailing slash in our “destination” value. Always prepend a slash to files, but leave it out if you target a cloud function.</p><p>While the Firebase example for dynamic responses suggested filtering by User-Agent, we decided to forego this as we now had the function trigger only where we needed it.</p><p>Finally, we set up Pingdom to prevent the function from being instantiated and thus keep execution times low. The result is far from ideal but good enough for now. We will move away from serverless at some point — unless Firebase comes up with a solution to deliver dynamic responses on web.</p><h3>More to come</h3><p>In Part II of this series, <a href="https://medium.com/praise-blog/advanced-firebase-applications-ii-9c0a485eb05c">we’re diving into Custom Tokens to replace standard cookie-based User Sessions</a>. Follow us here to get the latest posts right to your inbox.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae9c978af862" width="1" height="1" alt=""><hr><p><a href="https://medium.com/praise-blog/advanced-firebase-applications-i-ae9c978af862">Lessons Learned running a Startup on Firebase Part I</a> was originally published in <a href="https://medium.com/praise-blog">Praise</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[This is why we need the web of stories]]></title>
            <link>https://medium.com/praise-blog/this-is-why-we-need-the-web-of-stories-lets-build-it-together-8f5e4e90d4e2?source=rss-b9a1b056fcb4------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f5e4e90d4e2</guid>
            <category><![CDATA[democracy]]></category>
            <category><![CDATA[journalism]]></category>
            <category><![CDATA[stories]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[web]]></category>
            <dc:creator><![CDATA[Paul Solbach]]></dc:creator>
            <pubDate>Fri, 02 Feb 2018 09:42:31 GMT</pubDate>
            <atom:updated>2018-03-02T15:08:07.237Z</atom:updated>
            <content:encoded><![CDATA[<h3>This is why we need the Web of Stories. Let’s build it together!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5ykRatdF_mUS6rX6yuZHzA.jpeg" /></figure><p>Hi there! 👋😺</p><p>We’re building <a href="https://praise.press/"><em>Praise</em></a>, a social network around the best reading recommendations on the web.</p><p>There’s three things you can do with <em>Praise</em>:</p><ol><li>You praise journalism that you think is exceptionally good.</li><li>You follow people, experts and publications to see what <em>they</em> think is worth praising. In addition to you, we also compile stuff like best longreads, best foreign reports etc. for your convenience.</li><li>You <strong>get the best stories in your inbox</strong>. Once a week.</li></ol><h3>Why do we build <em>Praise</em>?</h3><p>We live in a world of misinformation and distrust. To many, it appears as if the days of journalism as the fourth estate are over. Anti-democratic sentiment is spreading like wildfire. To counter that, <strong>we need to get our facts straight but we also need good stories</strong>. Stories are not only the oldest form of entertainment, they can also be vehicles of empathy, bringing the world closer to those who listen.</p><p><em>Praise</em> is a central gateway for users into the world’s best stories, the best exclusive journalism — as opposed to commodity news that are reported everywhere. While both types of journalism are equally as important, we focus on everything outside of hard news: <strong>Users share and discover stories on Praise.</strong></p><p>To illustrate, here’s this very blog post inside <em>Praise.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9nhZDJFCWyqyM50EeZB_KQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*duHzwZZNNYpLVLLR7O1XSw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*futJ1hvRdz1xo1klqmUXlQ.png" /></figure><p>Now, we talked about what drives us to build this product from a user perspective: Get the best in journalism to your inbox. But what about publishers? Why are they getting onboard?</p><p>On the average larger publishing brand’s web offering you’ll find exclusive content alongside <em>fast moving consumer news</em>. We found that publishers need a place to showcase their best exclusive content, an <strong>atmosphere of excellence to convert users to subscribers</strong>. Our goal is to untangle the web of news from the web of stories. And put personal recommendations before magic algorithms.</p><p>But we’re also building a tool for authors to stay in touch with their audience. As an avid user you can even take your <em>Praises </em>with you in the form of a widget and place it wherever you like: On your website, underneath your articles that you wrote for a publisher, etc.</p><h3>Trust</h3><p>We need to promote journalism in an atmosphere of excellence for it to survive. This is impossible through <strong>platforms that do not have journalism as a core value </strong>— like the <em>Facebook Newsfeed, Apple</em> <em>News </em>or <em>Google News</em>. We are leveraging both our publishing partners collective power and build a trusted environment for user engagement on their web destinations. The selection of “the best” is not only what users want, it’s what publishers need to target and unlock new audiences on the open web.</p><p>Speaking of it, the <strong>world wide web</strong> is a huge motivator for <em>Praise</em>. None of the big players in digital ad revenue want to rely on the web to function. Not even <em>Google</em>. So the logical thing for them is to maximize user retention on their offerings. That’s what publishers try to do as well. Therefore, <em>Praise</em> will not ingest content, but instead build on an idea that is as old as the web itself: <em>social bookmarking</em>. We believe that <strong>social bookmarking is far from dead</strong>. On the contrary, we need it to empower the web. Without noise, with a strong appeal to non-technical folk. Using the principle of trust in experts and people you know.</p><h3>Our Background</h3><p>Our team consists of 4 people, in both parts journalists and hackers. While we’re an international bunch with 6 languages between us, we see <em>Praise</em> as very much rooted in <em>Germany</em>. This place has a rich history in publishing, starting with the <em>Gutenberg Press </em>and the oldest newspapers in the world, to our present day image as the haven for internet dissidents. Instead of holding on to the status quo, <em>Praise</em> is a new environment for traditional values. We want people to engage with compelling stories, nourish the gift of knowledge, make others care about global issues through that device. Does that sound like a place for you? Get in touch, <strong>we are hiring</strong> for positions in development and customer relations.</p><h3>Let’s do this</h3><p>Feel free to <a href="https://press.us16.list-manage.com/subscribe/post?u=5f0d4c3753829f314f18a6314&amp;id=d4606e1bdd"><strong>sign up for our invite list right now</strong></a>! If there’s anything you might want to ask or an idea you want to discuss, shoot us a mail at <a href="/service/mailto:desk@praise.press">desk@praise.press</a>.</p><figure><a href="https://press.us16.list-manage.com/subscribe/post?u=5f0d4c3753829f314f18a6314&amp;id=d4606e1bdd"><img alt="" src="https://cdn-images-1.medium.com/max/600/1*TepRyrc0f4fBRMCoDtUIrA.png" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f5e4e90d4e2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/praise-blog/this-is-why-we-need-the-web-of-stories-lets-build-it-together-8f5e4e90d4e2">This is why we need the web of stories</a> was originally published in <a href="https://medium.com/praise-blog">Praise</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>