<?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 Andres Gutierrez on Medium]]></title>
        <description><![CDATA[Stories by Andres Gutierrez on Medium]]></description>
        <link>https://medium.com/@andresgutierrez_16319?source=rss-36c59a14b3bf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*lqLFpjDDo04E5Zaz.</url>
            <title>Stories by Andres Gutierrez on Medium</title>
            <link>https://medium.com/@andresgutierrez_16319?source=rss-36c59a14b3bf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 05:13:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@andresgutierrez_16319/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[Creating Japanese Resources Social Network]]></title>
            <link>https://medium.com/@andresgutierrez_16319/creating-japanese-resources-social-network-b6b80b4fcaa?source=rss-36c59a14b3bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6b80b4fcaa</guid>
            <dc:creator><![CDATA[Andres Gutierrez]]></dc:creator>
            <pubDate>Sun, 08 May 2022 18:36:07 GMT</pubDate>
            <atom:updated>2022-05-08T18:36:07.453Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0cdE0NocKhnJ3MR_" /></figure><p>This is going to be my first post documenting my journey not in creating the initial application but adding new features that I think are interesting.</p><p>Currently, I have the site live at this URL: ( <a href="https://japanese-resources.com/">https://japanese-resources.com</a>)</p><p>The Dev site with the new features is <a href="https://japanese-resource-app.vercel.app/">https://japanese-resource-app.vercel.app/</a>. It will have a lot of beta features with bugs.</p><p>Github Code if you would like to follow along <a href="https://github.com/Andres9888/japanese-resource-app">https://github.com/Andres9888/japanese-resource-app</a></p><p>What the application currently does is it shows you are a list of curated Japanese Resources that I added in the backend MongoDB database.</p><p>You can search the resources for items you are interested like grammar.</p><p>You can also vote on these resources and like Reddit, the most popular ones will appear at the top.</p><p>Before you can vote you have to log in which is handled by google Oauth2.</p><p>Some other interesting features are that the application has is your liked items are tracked on the profile/account page and based on these likes you will get suggested resources kinda like how Netflix recommends you movies.</p><p>My future plans and the reason I am writing is to expand the features.</p><p>I have a lot of ideas that I have to think through so writing them out will help make them more concrete.</p><p>My current goal is to add social media features.</p><p>I currently have Japanese Resources that I listed but in reality, anything can be a resource while learning Japanese. Whatever you are learning from should be something you like and keeps your interest. It can be a book, manga, pictures, meme if it helps you out that is useful.</p><p>The initial direction that I am taking is using a site called <a href="https://getstream.io/">https://getstream.io/</a></p><p>This will provide the backend for adding feeds and timelines like Facebook and Instagram.</p><p>If you want to test it out without creating the backend or an account you can use their react components with test data.</p><p>All you have to do is follow the steps below to get the sample app working.</p><pre>npx create-react-app react-feeds-example cd react-feeds-example npm install react-activity-feed npm start</pre><p>When you have that you have to use their react components.</p><p>This is based on their tutorial here <a href="https://getstream.io/react-activity-feed/tutorial/">https://getstream.io/react-activity-feed/tutorial/</a></p><p>You can use that link to test the sample data endpoints.</p><p>I was playing around with this last week and now I am past the point of playing with the sample data and created an account to start creating my own feeds.</p><p>I am going to write that what I have done, the problems, I have encountered, and how I solved them.</p><p>When you start creating your own application for the client to make a request you will have to generate a user token.</p><p>It will look something like this in the backend.</p><pre>let stream = require(&#39;getstream&#39;); let client = stream.connect(&#39;ezcjh4aax2cv&#39;, &#39;ts4fzwrywyu5u7uautsy7k4uwypcc565hbc63q8cmg3k7ymrfmur3h6kdsghsc77&#39;); let userToken = client.createUserToken(&#39;lucky-pond-1&#39;);</pre><p>This token is based to the client.</p><p>The way I currently do it and it might not be the correct way so appreciate feedback on this from more experienced developers</p><p>This token I send as a JSON response and set it as a cookie.</p><p>I will show the code below but I know this can be improved on the more I work on it and learn.</p><pre>const stream = require(&#39;getstream&#39;); import cookie from &#39;cookie&#39;; const secret = process.env.GETSTREAM_SECRET; export default async (req, res) =&gt; { const client = stream.connect(&#39;ezcjh4aax2cv&#39;, secret, &#39;1163661&#39;); const currentUser = req.query.id; const userToken = client.createUserToken(currentUser); const feed = await client.feed(&#39;user&#39;, currentUser, userToken); client.user(currentUser).update({ name: req.query.name, }); feed.follow(&#39;user&#39;, &#39;global&#39;); res.setHeader( &#39;Set-Cookie&#39;, cookie.serialize(&#39;token&#39;, userToken, { httpOnly: true, secure: process.env.NODE_ENV !== &#39;development&#39;, maxAge: 60 * 60, sameSite: &#39;strict&#39;, path: &#39;/&#39;, }) ); res.statusCode = 200; res.json({ userToken }); };</pre><p>This is my client</p><p>The current issues that I have are that on first load my feed page does not get past the loading screen.</p><p>It will work with the cookie token used which is good but I have to fix that bug.</p><p>The way I set my current token is not ideal but I have to refactor it.</p><p>Some problems that I encountered that I was able to solve that would be useful to other people are.</p><p>Setting up global feeds by having a global user and everyone following that global user when the account is created.</p><p>Also, I was having issues with my posts not having names. Which I was able to solve by updating the client name with my google oauth name.</p><pre>client.user(currentUser).update({ name: req.query.name, });</pre><p>Anyway thanks, everyone this is my first post and I generally don’t like to write or consider myself a good writer but I will force and push myself to keep writing to get better at thinking and communicating my ideas. I appreciate all kinds of feedback from code, to writing, to if you found this blog post useful.</p><p><em>Originally published at </em><a href="https://andres9888.hashnode.dev/creating-japanese-resources-social-network"><em>https://andres9888.hashnode.dev</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6b80b4fcaa" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>