<?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 Mansi Saini on Medium]]></title>
        <description><![CDATA[Stories by Mansi Saini on Medium]]></description>
        <link>https://medium.com/@mansi.saini01?source=rss-799c53ff0400------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*rxp18S_oordhZ4mSISa0_A.jpeg</url>
            <title>Stories by Mansi Saini on Medium</title>
            <link>https://medium.com/@mansi.saini01?source=rss-799c53ff0400------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 02:38:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mansi.saini01/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[Learn how to make frontend responsive once and for all.]]></title>
            <link>https://medium.com/@mansi.saini01/learn-how-to-make-frontend-responsive-once-and-for-all-21f13377e676?source=rss-799c53ff0400------2</link>
            <guid isPermaLink="false">https://medium.com/p/21f13377e676</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[full-stack-developer]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Mansi Saini]]></dc:creator>
            <pubDate>Sun, 23 Apr 2023 17:21:51 GMT</pubDate>
            <atom:updated>2023-04-23T17:21:51.637Z</atom:updated>
            <content:encoded><![CDATA[<p>I have seen some of the smartest beginners in the CS industry needing to be more knowledgeable about making their frontend website responsive, usually because they think it is not as much a priority, but a responsive website is essential for a great user experience. It makes a significant impact on user retention, and it is ultimately great for businesses.</p><p>Below are some basics and guides for you to get started</p><h3><strong>Responsiveness Basics and Topics</strong></h3><p>If you are or plan on becoming a Full Stack Developer or an SDE, you should know some basic principles related to website responsiveness. Even if you use a library for your front end, I suggest you know these fundamentals.</p><ol><li><a href="https://www.w3schools.com/css/css_rwd_viewport.asp"><strong>Viewport</strong></a><strong>: </strong>The viewport is the user’s visible web page area. The viewport varies with the device and will be smaller on a mobile phone than on a computer screen.<br> There are two Relative CSS Units:<br> — View Height (vh): Relative to 1% of the height of the viewport<br> — View Width (vw): Relative to 1% of the width of the viewport<br> For example, if your screen is 100 cm wide, then your screen 1 vw = 1cm; this varies from screen to screen</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*7oCKiVHxSzZHIXasXhHbVw.png" /></figure><p>This unit is a blessing for a relative unit measurement of different components.<br> For instance, if I want my Navigation bar to take up exactly 12 per cent of the total height of the screen, this is what I will need to add to my Navigation Bar’s CSS properties :</p><pre>height : 12vh;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*30c2FAfPOO2C6ctP8qVW3Q.png" /></figure><p>When I change the height of my device, my navbar is still 12% of total height of the device.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HJs1SD9tL9hcjfSOChG9pQ.png" /></figure><p>Here is the entire code for it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4K2_C_e4ozRQcz6TxBvtUw.png" /></figure><p>This is applicable for View Width or vw as well!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aGMv8ULwbhtdCwu6kSICUQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WuGNmVe_W6iDnScX6CLudA.png" /></figure><p>2. Layout Reference: <a href="https://www.w3schools.com/css/css3_flexbox.asp">Flex Box</a> (or Flexible Box) and <a href="https://www.w3schools.com/css/css_grid.asp">CSS Grid</a> are kinds of Layout Modules; they make flexible, responsive layout structures quite easy to design.<br>They both are deep topics, but to get started, just go through their basics on W3 schools.</p><p>3. <a href="https://www.w3schools.com/css/css_rwd_grid.asp">Grid View</a>: Grid View is a concept where the entire webpage is divided into columns, usually 12 or 24, and these columns are then used to make the website responsive. Grid view are often used for easy layout building in React Libraries, like MUI or AntD.</p><p>4. <a href="https://www.w3schools.com/css/css_rwd_mediaqueries.asp">Media Query</a>: This is used to add a breakpoint in your webpage, which means it can ask your webpage to behave differently when its width or height is different. Let&#39;s take a look at an example:</p><p>We run this code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QVjnDagqMjem1V-k9NWzBw.png" /></figure><p>And in a window of width &gt;600 we get the flex direction as row:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s_ALSRPQKbxkw-Ca4bk73w.png" /></figure><p>But 600 or &lt;600 we have the flex direction as column:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/1*e01m5RisGL9nxoYzvxY2Jw.png" /></figure><p>4. <a href="https://www.w3schools.com/cssref/css_units.php">Relative Units</a>: specify a length relative to another length property. Relative length units scale better between different rendering mediums. View height, and View Width are included in relative units.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*zeqS5OPNoQ18s9IAZsJ_8w.png" /><figcaption>Source: W3Schools</figcaption></figure><h3>While Building the website, we need to take care of a few things</h3><p>1. Layout <br> The first thing is to choose how we are going to build a layout, We can either use Pure CSS (Flex Box or CSS Grid) or use the GRID view of any react library, or use something like Tailwind CSS for implementing the pure css.<br> Build the layout using relative units, like viewport height/width or percentages.</p><p>2. Add Breakpoints <br> This is where the aforementioned <a href="https://www.w3schools.com/css/css_rwd_mediaqueries.asp">media query</a> comes into the picture. By adding these breakpoints, you make the website truly responsive.</p><p>3. Uniform code throughout<br> Use a uniform code throughout your codebase; in fact you can create some rules which you follow personally or in a particular project (below are my rules).</p><p>When it comes to frontend, I like personally like to follow some rules:<br>1. Using Viewport and percentages for most elements.<br>2. Using CSS for Layouts<br>3. Using GRID feature of libraries (MUI or AntD)<br>4. Relative units only (VW, VH and REM)<br>5. NO PIXELS ANYWHERE , AT ALL</p><p>These are not some hard and fast rules; in fact, I have been updating them quite regularly but rather rules I use as a guide so that my website-building process is structured and uniform. They are personal, based on my preference and things I find easier. For instance, I prefer Flex Box over CSS Grid any day or using AntD over MUI; these worked for me, Once you get a little experience in website building, you should make your own rules which will work for you!</p><p>End Note: This guide is just for you to get started, (or a sign from the universe to finally learn responsive development), here I have followed the breadth-first approach of going through this on a surface level, you will still need to practice and deep dive while building your project, and you will learn most stuff through experience.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21f13377e676" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scalable TicTacToe API]]></title>
            <link>https://medium.com/@mansi.saini01/scalable-tictactoe-api-30c4cbb44922?source=rss-799c53ff0400------2</link>
            <guid isPermaLink="false">https://medium.com/p/30c4cbb44922</guid>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[expressjs]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Mansi Saini]]></dc:creator>
            <pubDate>Sun, 12 Mar 2023 10:39:54 GMT</pubDate>
            <atom:updated>2023-03-12T10:44:49.505Z</atom:updated>
            <content:encoded><![CDATA[<p>Here is an API by which we can play TicTacToe for any N x N size board.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*USI3PdVyhYpWxUOsJW-yig.png" /></figure><p><strong>Complexity <br></strong>The time complexity for each move is: <strong>O(1)</strong><br>The overall space complexity of each game is: <strong>O(N)</strong></p><p>The base URL is <a href="https://tictactoe-game.up.railway.app/">https://tictactoe-game.up.railway.app/</a></p><p><strong>Endpoints</strong><br>1. ‘/start’: Endpoint to start a new game returns a game with gameId and more game information; the gameId is used in turn to play the game further.<br> Headers: <br> “Content-Type”: “application/x-www-form-urlencoded” (OPTIONAL) // IF board size is specified<br> Body :<br> game_num : number (OPTIONAL) // specifies the board size, by default 3x3<br> <br>2. ‘/gameStatus’: To return the status of a particular game<br> Query Params:<br> gameId: string // game id of the game should be sent with the request<br> <br>3. ‘/move’ : To play a particular move<br> Query Params:<br> gameId: string // game id of the game should be sent with the request<br> Headers: <br> “Content-Type”: “application/x-www-form-urlencoded” <br> Body :<br> row : number // row of the move<br> col : number // col of the move <br> <br> 4. ‘/deletegame’ : To delete a particular game play<br> Query Params:<br> gameId: string // game id of the game should be sent with the request</p><p><strong>Stack</strong><br>This API was built with Express JS and Node JS, using MongoDB for the database.<br>Full Code: <a href="https://github.com/mansi-done/tictactoeAPI.git">https://github.com/mansi-done/tictactoeAPI.git</a></p><p>You can use it to play a tic-tac-toe game with a 3x3 board or even a 100x100 board (if you dare).</p><p>Originally posted at <a href="https://blog.mansisaini.online/post/scalable-tic-tac-toe-api">https://blog.mansisaini.online/post/scalable-tic-tac-toe-api</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=30c4cbb44922" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google Calendar API and Django Integration]]></title>
            <link>https://medium.com/@mansi.saini01/google-calendar-api-and-django-intergration-e7d6c1743eb5?source=rss-799c53ff0400------2</link>
            <guid isPermaLink="false">https://medium.com/p/e7d6c1743eb5</guid>
            <category><![CDATA[google-calendar-api]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[django]]></category>
            <dc:creator><![CDATA[Mansi Saini]]></dc:creator>
            <pubDate>Thu, 02 Mar 2023 10:47:22 GMT</pubDate>
            <atom:updated>2023-03-03T03:33:45.792Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*zsqYzFat9lA4ql8grtybZw.png" /></figure><p><a href="https://developers.google.com/apis-explorer">Google APIs</a> are helpful REST APIs that can be used for various purposes; for instance, the <a href="https://developers.google.com/calendar/api/v3/reference">Google Calendar API</a> is used to access the Google Calendar Features of a user.</p><p>Suppose you want to view or edit the calendar events of Users of your application; Google can take permissions from your users as shown below :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*byMu3-ikvrKlq4Vh8mAeag.png" /></figure><p>And if they allow, you will be able to access the allowed features that could involve viewing, editing or creating events; check <a href="https://developers.google.com/calendar/api/guides/overview">https://developers.google.com/calendar/api/guides/overview</a> for an overview of it</p><p>These permissions require <a href="https://en.wikipedia.org/wiki/Authorization">Authorization</a>, Google Uses <a href="https://oauth.net/2/">OAuth2.0</a> for authorization to access Google APIs. Check <a href="https://developers.google.com/identity/protocols/oauth2/web-server#httprest_2">https://developers.google.com/identity/protocols/oauth2/web-server#httprest_2</a> for complete documentation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nn1CAWryrhx_woLTmlBKkw.png" /></figure><p>This is how the flow between the User, The APP and Google’s OAuth server works:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SNpzdy0DfRCalWKnpj8s4Q.png" /></figure><p>Let us learn how to set up and build a service which can access the User&#39;s calendar events as well as; we will see an example where we actually fetch the list of events and send it back as an HttpResponse.</p><blockquote>Prerequisites:</blockquote><blockquote>1. Setup a new Django Project.</blockquote><blockquote>2. Have a GCP Account</blockquote><h3>Setting up GCP</h3><p>Go to <a href="https://console.cloud.google.com/">Google Cloud Platform</a> and create a new project (You can also use any existing project). I have created a scribe that contains all the steps one by one on how to set up the GCP for this, click on the link below or <a href="https://scribehow.com/shared/Creating_a_Google_Calendar_API_Credential_for_Test_APP__XGiwNoavS96hIJ5oste4KA">Click Here</a> for all the steps.</p><p><a href="https://scribehow.com/shared/Creating_a_Google_Calendar_API_Credential_for_Test_APP__XGiwNoavS96hIJ5oste4KA">Creating a Google Calendar API Credential for Test APP | Scribe</a></p><h3>CODE</h3><p>Now we Setup the code, The codebase is available at: <a href="https://github.com/mansi-done/gcal">https://github.com/mansi-done/gcal</a></p><p>We majorly have two Views, the code below has all the information about what each view does, and it uses the HTTP/REST for accessing Googles Auth Server Endpoints</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/703064de2cfd3e9557937f717d5a50cc/href">https://medium.com/media/703064de2cfd3e9557937f717d5a50cc/href</a></iframe><p>Make sure to add the paths in the url.py in your django project</p><h3>Important Things to note:</h3><ol><li><strong>Redirect URI</strong> : Make sure before testing your application you add your Redirect URI’s for your Credentials in GCP Project.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*DFeZHhW2QE8zAAWVfaMd5A.png" /></figure><p>2. Add the client credential file in your root folder and make sure to use if for credentials in the views (refer views.py)</p><p>3. Add the API Key in your root folder in a json format as given below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/765/1*Aqwmee6xdr-Wdfsh8uY3cA.png" /><figcaption>api_key.json</figcaption></figure><p>I hope this was helpful. Please feel free to correct me if I am wrong anywhere and ask any doubt or clarification.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e7d6c1743eb5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>