<?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 Emmanuel Bourmalo on Medium]]></title>
        <description><![CDATA[Stories by Emmanuel Bourmalo on Medium]]></description>
        <link>https://medium.com/@ebourmalo?source=rss-aff85eac6f00------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*C3RnoBWikhaEFo5Uz5lWWA.png</url>
            <title>Stories by Emmanuel Bourmalo on Medium</title>
            <link>https://medium.com/@ebourmalo?source=rss-aff85eac6f00------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 13:45:21 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ebourmalo/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[PayFit, my source of Happiness]]></title>
            <link>https://medium.com/payfit/payfit-my-source-of-happiness-2c963a472e62?source=rss-aff85eac6f00------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c963a472e62</guid>
            <category><![CDATA[entrepreneurship]]></category>
            <category><![CDATA[jobs-and-careers]]></category>
            <category><![CDATA[true-story]]></category>
            <category><![CDATA[personal-development]]></category>
            <category><![CDATA[happiness]]></category>
            <dc:creator><![CDATA[Emmanuel Bourmalo]]></dc:creator>
            <pubDate>Sat, 26 Nov 2016 02:57:50 GMT</pubDate>
            <atom:updated>2016-11-26T16:57:25.119Z</atom:updated>
            <content:encoded><![CDATA[<h4>It’s 12.10am, I was reading the end of the book “Delivering Happiness” and I suddenly got a brain connection. I had to write down my minds about my own definition of happiness..</h4><blockquote>I’m not the best writer of all time so I’ll speak with my words simply, sorry for the mistakes you could spot.</blockquote><p><strong><em>🎉 A first 1-year anniversary<br></em></strong>We celebrated my 1-year anniversary at <a href="https://payfit.com/">PayFit</a> last Wednesday, September 16th. We spent an awesome night with a Beer Pong tournament, trading beers and listening music.</p><p>Sooner this evening, as all the team was listening, I pronounced some words I did not prepare. I eventually forgot to tell them what I had in my heart, how it was 1 year ago and what makes me happy today..</p><h3>How it all began</h3><p>Back to mid 2015, I was looking for a startup to join (yet created or not) ideally as a co-founder. After some experiences with previous companies, I exactly knew what were my focus points to have a crush:</p><blockquote>💪 working hard with talented and smart people<br> 👪 sharing the same culture &amp; vision about the company 😍 trusting in the product we&#39;d build</blockquote><p>Mainly via Slack, I met a couple of people looking for technical co-founder and ready to build something. It appeared to be much more difficult than I thought:<br><strong>😴 Wrong human fit<br>👎 No love for product<br>💩 Extreme legacy in existing code</strong></p><p>I ended up taking some time to think about what was wrong in my process.</p><blockquote>Was I too picky?</blockquote><p><strong><em>September 28th, 2015 | </em></strong><a href="https://medium.com/u/d5594e26887e">Ghislain</a> sent me a direct message on startup-dedicated Slack, telling some info about a company called PayFit. I wasn&#39;t that interested first but he wanted a call. As a matter of fact, meeting new people is always positive in some way — personally or professionally. I answered the thing I used to say at the time: &quot;Sure to discuss. but I can&#39;t promise anything :)&quot;.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jC7fPRTmr1CB04vgrpkOgw.png" /></figure><h4><strong>📞 The call with Ghislain</strong></h4><p>I rapidly liked the things that G was telling me. Simple words, <strong>straight</strong>, <strong>honest</strong> and <strong>skilled</strong>. But I rapidly hated the red flag we pointed out a couple of minutes later:</p><blockquote>I was living in Nantes*, they were looking for a guy in Paris*</blockquote><p>It was an interesting call, with a good guy, a good product but I was so frustrated to have this physical issue, I started to think about eventual solutions.</p><p><em>(*)French cities, I bet you knew for Paris right :p ?</em></p><h4>🏋️ &quot;The cold war&quot; — in a good way</h4><p>For a month, I continued speaking with G on Slack in a funny way.</p><p>I was asking for advices about<br><strong><em>&gt; finding the potential good guys to start building something</em></strong></p><p>G was asking for advices about<br><strong><em>&lt; recruitment process and ideas for hiring tech guys</em></strong></p><p>A month passed — By speaking with each other almost every day, we definitely knew we needed to work together. <strong>It was my crush</strong>.<br>[You can learn more about this periods by reading <a href="https://medium.com/kima-ventures/how-we-went-from-knowing-nothing-about-hiring-to-300-screened-profiles-3-recruits-in-3-weeks-54cb90e465e4#.inzhqya5d">this post</a>]<br><strong><em>October 14th</em></strong> | Some next morning, G told me:</p><blockquote>&quot;Hey, my partner definitely wants to speak with you now. He&#39;ll call you very soon&quot;</blockquote><h4><strong>📞 The call with Firmin</strong></h4><p>3 words: <strong>convincing</strong>, <strong>smart</strong> and <strong>reactive</strong>. I rapidly heard they had a solution for us (yeah, there was an &quot;us&quot; 😎). I could work in Paris 3 days a week, remote for the rest. I needed to arrange a call with the 3 of them to validate the coming things, as soon as possible. F told me that call was scheduled for 7pm, the same day.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j9Ccj8lOLMM1ytHN-QtEwA.jpeg" /></figure><h4>📞 The decisive call</h4><p>I finally had a time to meet and discuss with <a href="https://medium.com/u/d5594e26887e">Ghislain</a>, <a href="https://medium.com/u/bf8cc7fef62b">Firmin</a> and <a href="https://medium.com/u/572b920b96f">Florian</a>, the 3 co-founders. Within these 45 minutes, I was able to see the complicity, the relationship and the trust they had in each other.<br>All the flags were green. I won&#39;t be a co-founder but I had a crush on them and I knew that was the adventure I was ready to join.<br>After some discussion, I ended up saying to them:</p><blockquote>🚀 &quot;Well, I quit my job tomorrow. we&#39;ll start together in a month&quot;</blockquote><h4>🍷My first day</h4><p><strong><em>November 16th</em></strong> | That was it, I was in the train for Paris. I didn&#39;t even ask myself if it was going to be hard to live back to Paris. I didn&#39;t care. When I arrived at the place, they warmly welcomed me with a tasty breakfast, fresh orange juice and big smiles. They were as truly happy as I was to join them. After some discussion and presentation of the product, the 4 of us were ready to move forward with the product.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*IhmO3L_OOA53V14LGp7KKQ.jpeg" /></figure><p>As noon was coming, Firmin and Florian went to the kitchen. They were up to something! They got back 20 minutes later with a big plate of &quot;Tartiflette&quot; (potato, bacon &amp; cheese).<br>We eventually also discovered our common taste for good food and wine ❤️ We ate, drunk, laughed and shared a nice first moment together, as friends working together. That&#39;s a sentiment I wish I&#39;d known sooner.</p><p>At the end of the week, it was intense. I coud deeply feel we had the same philosophy and personal values. All that matters was working hard together, enjoying our time and making the product grow.</p><h4>Today — My 375th day</h4><p>I live the adventure the same way I lived it the first day, except we are 18. The team grows, we have real customers and the culture is even stronger than before.</p><blockquote>I love knowing the people I work with, <br>the relationship we have,<br>the work we do,<br>the passion we share<br>and the moments we spend all together.</blockquote><p><strong><em>We create our own world and enjoy together the same story we are part of. We are a family 😘</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qhg8yXyRoQwRWGCRjY2JvA.jpeg" /></figure><blockquote>Now it&#39;s 4am and I&#39;m off to bed, hope it was an inspiring story to read.<br>Be my guest if you have any question or anything, I&#39;ll be glad to share more :)</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c963a472e62" width="1" height="1" alt=""><hr><p><a href="https://medium.com/payfit/payfit-my-source-of-happiness-2c963a472e62">PayFit, my source of Happiness</a> was originally published in <a href="https://medium.com/payfit">PayFit</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Mongoose Models to a Real-time API with FeathersJS]]></title>
            <link>https://medium.com/all-about-feathersjs/from-mongoose-models-to-a-real-time-api-with-feathersjs-ec1cc3fb0a5c?source=rss-aff85eac6f00------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec1cc3fb0a5c</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[feathers-guides]]></category>
            <category><![CDATA[mongodb]]></category>
            <dc:creator><![CDATA[Emmanuel Bourmalo]]></dc:creator>
            <pubDate>Wed, 02 Sep 2015 17:34:37 GMT</pubDate>
            <atom:updated>2016-04-11T20:50:15.552Z</atom:updated>
            <content:encoded><![CDATA[<h4>The story of a migration</h4><p>A couple of months ago, I started working on a collaborative platform for people to efficiently work together on projects, with some cool integrations like Slack to notify users about important events from the Slack team, and Trello to keep an eye on the project realisation.</p><p>To make things simple, we’ll focus on the questions &amp; answers module, a simple feature similar to StackOverflow where people can ask questions and get answers.</p><blockquote>As a user, I can see the list of questions,<br>ask a new question,<br>add an answer to an existing question,<br>I am notified about a new question or a new answer</blockquote><p>An internal API exposes a resource Q<em>uestions</em> and uses 2 existing mongoose models.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8606850e20050922e21654107220c8e6/href">https://medium.com/media/8606850e20050922e21654107220c8e6/href</a></iframe><p>You&#39;ll notice there is no reference to answers in the <em>Question</em> model.<br>The relationship is on the A<em>nswer</em> model side.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/959f8a4c0421951ab9154cb75b9b79b0/href">https://medium.com/media/959f8a4c0421951ab9154cb75b9b79b0/href</a></iframe><p>Here comes the controller. Basic CRUD methods for the questions and 2 extra methods for the answers (collection).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/329eb7f7d713062f2006875a005e7b0b/href">https://medium.com/media/329eb7f7d713062f2006875a005e7b0b/href</a></iframe><p>Let&#39;s focus on the last method <em>addAnswer</em>. When implementing it, there was a confusion between the concerns of controller, service and model. Here is what happens within this controller method:</p><ul><li>request parameters are checked (i.e question id)</li><li>mongoose documents are created / updated</li><li>some emails are sent</li><li>the (request) response is sent</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6dd48da011b9807398b5673b2fed606d/href">https://medium.com/media/6dd48da011b9807398b5673b2fed606d/href</a></iframe><p><strong>Whoa, that’s a lot of stuff happening in one controller!</strong></p><p>A 30-seconds polling system was used for the notification system. Even if the realization wasn&#39;t the best (the mongo database handled lots of queries, with population), it worked well … until a new feature was requested:</p><blockquote>&quot;Now, the user should be able to see a new question or a new answer in real-time&quot;</blockquote><p>It was a good opportunity to update the models to match the data expected for the user notifications.</p><h4>Choosing a solution to make the API real-time</h4><blockquote>KISS first, DRY second.</blockquote><p>APIs have existed for a long time, the REST conventions made them “unified” (kind of a lengthy topic so I won’t go into detail). So for a given resource, we all know the routes that should be created, the actions requested and the kind of responses we should expect. Instead of manually creating them for exposing our resources, I wanted to find and trust a module that does it, and does it well. Something had to be out there, with a real-time feature.</p><blockquote><a href="https://www.meteor.com/"><strong><em>Meteor</em></strong></a></blockquote><p>I don&#39;t know much about Meteor to be honest. But the fact it manages client, server, and database afraid me. I&#39;m not a big fan of the all inclusive framework, it&#39;s intrusive and you&#39;re highly coupled to it. You can ship extremely fast with it but it was not my need for this project.</p><blockquote><a href="http://sailsjs.org/"><strong><em>Sailsjs</em></strong></a></blockquote><p>Sails is a great configuration-oriented framework. Very productive as well but when you choose this framework, you make a sails app, not a node app.<br>I see it like a big factory working for you, helping you to build your app over configurations. I&#39;m also not a big fan of waterline, the embedded ORM and prefer native database adapters. It&#39;s a really nice framework but not matching with my current needs.</p><blockquote><a href="http://feathersjs.com/"><strong><em>FeathersJS</em></strong></a></blockquote><p>I quickly liked the ideas of feathers: light core, easy integration, extensible with plugins. A <strong>highly</strong> <strong>modular</strong>, <strong>loosely</strong> <strong>coupled </strong>framework and easy to integrate with an existing app.</p><p>Feathers was what I was looking for. I quickly found the plugins I needed:</p><ul><li><a href="https://github.com/feathersjs/feathers-hooks">feathers-hooks</a>: a plugin for setting before/after methods hooks for validation, authorization. <a href="https://medium.com/all-about-feathersjs/api-service-composition-with-hooks-47af13aa6c01">Here is a great article about hooks</a> to find out more about it.</li><li><a href="https://github.com/feathersjs/feathers-mongoose">feathers-mongoose</a>: a plugin for exposing a resource from a mongoose model</li></ul><h4>Updating the models</h4><p>The <em>answer</em> model had no reason to exist. An answer is owned by a question and can&#39;t &quot;live&quot; without it. I integrated it in the <em>question</em> model as an embedded collection.</p><p>Here is the <em>question</em> model updated for the new needs</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/62cf7c927dda9a29991910af0882dc43/href">https://medium.com/media/62cf7c927dda9a29991910af0882dc43/href</a></iframe><p>This way, in one atomic operation with mongoDB, I get all the data I need for a question without populating any field (answers are embedded).</p><h4>Using hooks</h4><p>After switching to feathers I had to make some minor changes to my Question controller as well. I directly use a service created from my <em>question</em> model to expose my resource though the path <strong>/api/questions</strong>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a3b77dc926102fdf881f9e1b7da01dbb/href">https://medium.com/media/a3b77dc926102fdf881f9e1b7da01dbb/href</a></iframe><p>We see here how hooks are used. For example, when we add an answer to a question, it concerns the <strong>addToCollection</strong> method (a feathers plugin is currently being developed for automatically handling embedded collection in a resource).</p><ul><li>Before adding an answer, I set the author (the current user)</li><li>After adding it, I add the author to the question&#39;s followers (author of others answers of this question) and I notify the others followers about this new answer</li></ul><p>In order to make sure that we always have the current user available in the hooks methods, I use the following configuration (note the last .use() call):</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/50437d36820bfc1e59290e5787cf821a/href">https://medium.com/media/50437d36820bfc1e59290e5787cf821a/href</a></iframe><h4>A new start</h4><p>At the beginning, my Question controller was bloated, with lots of things going on (not KISS). My database was handling lots of requests that could be avoided. And lots of code was duplicated between my resources, essentially the CRUD operations with mongoose (not DRY).</p><p>Now, my app is simple to read and modular so it&#39;s really easy to develop new features since it&#39;s a question of adding a hook or altering an existing one. I really like this aspect approach brought by hooks, it makes the app much more adaptable.</p><p>Having your Mongoose Models exposed as api resources within minutes is really awesome. You won&#39;t go back after trying this out :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec1cc3fb0a5c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/all-about-feathersjs/from-mongoose-models-to-a-real-time-api-with-feathersjs-ec1cc3fb0a5c">From Mongoose Models to a Real-time API with FeathersJS</a> was originally published in <a href="https://medium.com/all-about-feathersjs">The Feathers Flightpath</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>