<?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"><channel><title><![CDATA[Manavendra Sen]]></title><description><![CDATA[curious software developer]]></description><link>https://blog.manavendrasen.com</link><generator>RSS for Node</generator><lastBuildDate>Sat, 12 Sep 2026 07:49:07 GMT</lastBuildDate><atom:link href="https://blog.manavendrasen.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Building a NixOS Server: A Step-by-Step Guide]]></title><description><![CDATA[I had an old laptop lying around—a Dell Inspiron 7572 with a 1TB SSD and 16GB RAM. Instead of letting it gather dust, I decided to repurpose it into a powerful deployment server using NixOS. My goal was to self-host services instead of relying on AWS...]]></description><link>https://blog.manavendrasen.com/building-a-nixos-server</link><guid isPermaLink="true">https://blog.manavendrasen.com/building-a-nixos-server</guid><category><![CDATA[Linux]]></category><category><![CDATA[NixOS]]></category><category><![CDATA[cicd]]></category><dc:creator><![CDATA[Manavendra Sen]]></dc:creator><pubDate>Sat, 06 Jul 2024 13:35:16 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1720272773953/359bab79-1a73-45d0-adff-d12ed4b32c22.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I had an old laptop lying around—a Dell Inspiron 7572 with a 1TB SSD and 16GB RAM. Instead of letting it gather dust, I decided to repurpose it into a powerful deployment server using NixOS. My goal was to self-host services instead of relying on AWS or other cloud providers. In this blog, I'll walk you through the setup process, from installing NixOS to configuring SSH, monitoring server health, and more.</p>
<h4 id="heading-1-what-is-nixos">1. What is NixOS?</h4>
<p>NixOS is a unique Linux distribution known for its <strong>declarative configuration model.</strong> This means that you define the entire system configuration in a single file, which describes all aspects of the system: installed packages, configuration files, and system services. This approach ensures that your system is reproducible and consistent. If you need to rebuild your system or set it up on another machine, you simply use the same configuration file.</p>
<p><strong>Key Features of NixOS:</strong></p>
<ul>
<li><p><strong>Declarative System Configuration:</strong> The state of the system is fully described in a single configuration file.</p>
</li>
<li><p><strong>Reproducibility:</strong> Ensures that the system can be reproduced exactly on any machine.</p>
</li>
<li><p><strong>Atomic Upgrades and Rollbacks:</strong> Allows for safe system upgrades and the ability to roll back to previous configurations.</p>
</li>
<li><p><strong>Isolation of Dependencies:</strong> Different versions of packages can coexist without conflicts.</p>
</li>
</ul>
<h4 id="heading-1-installing-nixos">1. Installing NixOS</h4>
<p>To get started, we'll install NixOS on your laptop.</p>
<p><strong>Prerequisites:</strong></p>
<ul>
<li><p>A USB drive (at least 4GB)</p>
</li>
<li><p>NixOS ISO image, which can be downloaded from <a target="_blank" href="https://nixos.org/download/#nix-install-windows">NixOS Downloads</a></p>
</li>
</ul>
<p>Follow this guide to setup NixOS - <a target="_blank" href="https://youtu.be/GymWdyizBRA">https://youtu.be/GymWdyizBRA</a></p>
<h4 id="heading-3-what-is-ssh">3. What is SSH?</h4>
<p>SSH (Secure Shell) is a protocol for securely logging into a remote machine over an insecure network. It provides a secure channel over an unsecured network in a client-server architecture, connecting an SSH client application with an SSH server.</p>
<p><strong>Login Remotely Using Password:</strong></p>
<p><a target="_blank" href="https://www.digitalocean.com/community/tutorials/how-to-configure-ssh-key-based-authentication-on-a-linux-server">https://www.digitalocean.com/community/tutorials/how-to-configure-ssh-key-based-authentication-on-a-linux-server</a></p>
<ul>
<li><p>Find your server's IP address:</p>
<pre><code class="lang-bash">  ip a
</code></pre>
<p>  Use an SSH client to log in:</p>
<ul>
<li><pre><code class="lang-bash">  ssh user@server-ip
</code></pre>
</li>
</ul>
</li>
<li><p><strong>Set Up SSH Key Authentication:</strong></p>
<ul>
<li><p>Generate SSH key pair on your local machine:</p>
<pre><code class="lang-bash">  ssh-keygen -t rsa -b 2048
</code></pre>
</li>
<li><p>Copy the public key to the server:</p>
<pre><code class="lang-bash">  ssh-copy-id user@server-ip
</code></pre>
</li>
</ul>
</li>
</ul>
<p>Now, you can log in using your key pair:</p>
<pre><code class="lang-bash">ssh -i ./.ssh/&lt;key name&gt; user@server-ip
</code></pre>
<h4 id="heading-4-installing-cockpit-for-server-health-monitoring">4. Installing Cockpit for Server Health Monitoring</h4>
<p>Cockpit is a web-based interface that makes it easy to administer your Linux servers. It allows you to monitor system health, manage storage, configure networks, and inspect logs.</p>
<p><a target="_blank" href="https://fictionbecomesfact.com/nixos-cockpit">https://fictionbecomesfact.com/nixos-cockpit</a></p>
<h4 id="heading-5-accessing-the-app-on-the-internet">5. Accessing the App on the Internet</h4>
<p>To make your application accessible over the internet, you need to set up port forwarding on your router. This allows external traffic to reach your server.</p>
<p>Private IP and Public IP explained - <a target="_blank" href="https://youtu.be/92b-jjBURkw">https://youtu.be/92b-jjBURkw</a></p>
<h4 id="heading-6-using-ngrok">6. Using ngrok</h4>
<p>Because my router didn't allow port forwarding I used ngrok.<br />ngrok is a tool that creates a secure tunnel to your <a target="_blank" href="http://localhost">localhost</a>, making your local server accessible over the internet. Till I figure out how to setup a public IP, ngrok is good enough.</p>
<p><strong>Setting Up ngrok:</strong></p>
<ol>
<li><p><strong>Download ngrok:</strong></p>
<p> <a target="_blank" href="https://ngrok.com/docs/guides/device-gateway/linux/">https://ngrok.com/docs/guides/device-gateway/linux/</a></p>
</li>
<li><p><strong>Run ngrok:</strong></p>
<pre><code class="lang-bash"> ./ngrok http 80
</code></pre>
</li>
<li><p><strong>Access your server:</strong> ngrok will provide a public URL that tunnels to your local server.</p>
</li>
</ol>
<h4 id="heading-7-setting-up-a-cicd-pipeline-and-file-transfer-using-ssh">7. Setting Up a CI/CD Pipeline and File Transfer Using SSH</h4>
<p>A CI/CD pipeline automates the process of integrating and deploying code changes.</p>
<p>Setting up a deployment server with NixOS offers a robust and reproducible environment. By following these steps, you can configure SSH access, monitor server health with Cockpit, make your applications accessible over the internet, and set up a CI/CD pipeline. NixOS's declarative approach ensures that your system setup is consistent and easy :)</p>
]]></content:encoded></item><item><title><![CDATA[Nexus - Networking with Data-Driven Surveys | Appwrite  Hashnode Hackathon]]></title><description><![CDATA[Introduction
Hey readers 👋,
Here is my entry for the Appwrite Hashnode hackathon; I hope you like what I was able to create over these two weeks.
Github - https://github.com/manavendrasen/nexus
Team Members

Manavendra Sen - @manavendrasen on Hashno...]]></description><link>https://blog.manavendrasen.com/nexus-networking-with-data-driven-serveys</link><guid isPermaLink="true">https://blog.manavendrasen.com/nexus-networking-with-data-driven-serveys</guid><category><![CDATA[Web Development]]></category><category><![CDATA[UI]]></category><category><![CDATA[community]]></category><category><![CDATA[Appwrite]]></category><category><![CDATA[Appwrite Hackathon]]></category><dc:creator><![CDATA[Manavendra Sen]]></dc:creator><pubDate>Tue, 13 Jun 2023 11:38:38 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1686656084414/af3a22ae-14c4-41a0-9159-06b39cae616d.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-introduction">Introduction</h2>
<p>Hey readers 👋,</p>
<p>Here is my entry for the <a target="_blank" href="https://cloud.appwrite.io/">Appwrite</a> <a target="_blank" href="https://hashnode.com/">Hashnode</a> hackathon; I hope you like what I was able to create over these two weeks.</p>
<p>Github - <a target="_blank" href="https://github.com/manavendrasen/nexus">https://github.com/manavendrasen/nexus</a></p>
<h3 id="heading-team-members">Team Members</h3>
<ul>
<li>Manavendra Sen - <a target="_blank" href="https://hashnode.com/@manavendrasen">@manavendrasen on Hashnode</a>, <a target="_blank" href="https://manavendrasen.com/">Website</a></li>
</ul>
<h2 id="heading-project-description">Project Description</h2>
<h3 id="heading-the-problem">The Problem</h3>
<p>What are we trying to solve?</p>
<p>Seeking like-minded individuals in conferences and communities can often resemble searching for a needle in a haystack. The vast number of participants makes it impossible to engage with everyone and identify the right connections.</p>
<p>Let's be real, It is not possible to talk to everyone and build your network. If only there was a way which would give me information about people who are similar or dissimilar to me and give me a starting point to build the connection.</p>
<h3 id="heading-the-solution">The Solution</h3>
<p>Introducing Nexus, a solution that <strong>empowers networking in conferences and communities</strong>. Leveraging data from a simple survey, Nexus generates an <strong>interactive social graph</strong>, visually depicting all attendees. Within this graph, individuals with similar interests and characteristics are positioned closer together, facilitating effortless identification of potential connections.</p>
<p>Sounds interesting right? Nexus is just that!! 🤗</p>
<h3 id="heading-demo-video">Demo Video</h3>
<p>A short 3 min video to showcase the product.</p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://youtu.be/nx5RGF9URL4">https://youtu.be/nx5RGF9URL4</a></div>
<p> </p>
<h3 id="heading-how-to-use-nexus-its-easy">How to use Nexus? (It's easy!)</h3>
<p><strong>Organizers/Community leads' POV</strong></p>
<p>In 3 easy steps, communities and conferences can be superpowered!</p>
<ol>
<li>The organizers create an account on Nexus and create a new survey.</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686652351789/0a9d0832-a123-4856-9bb8-a6c278ef24ed.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686652412734/45736546-7534-46cc-9814-0e116fc7e1b5.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686652262408/e89b5d17-f884-4b4f-ac2e-fc5fcb547e3d.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686652821530/a4ba3018-42f5-4c8b-a884-326ebc25fd53.png" alt class="image--center mx-auto" /></p>
<ol>
<li><p>They add questions to the survey</p>
<ul>
<li><p>Three fundamental questions that act as an introduction are included in each survey.</p>
</li>
<li><p>The survey can have objective questions added by the organisers; the visualisation needs at least three objective questions, but the more the better.</p>
</li>
<li><p>If necessary, they can alter the questions.</p>
</li>
<li><p>Finally, they hit the <strong>Publish</strong> button to make the survey live!<br />  The generated link can be copied and shared.</p>
</li>
</ul>
</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686652774016/5d08210b-4401-427b-b703-09042c952c82.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686652954581/61b3b475-13ba-4d3d-995b-9a928f8a67cf.png" alt class="image--center mx-auto" /></p>
<ol>
<li>Once the survey has been filled by the attendees/members the organizer can hit the "Complete" button to mark the survey as complete and generate the visualization.</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686653183536/9227ade6-7eba-4838-a25f-52008305236d.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686653304061/4a4d168d-cce4-47ce-81a6-b2bade231827.png" alt class="image--center mx-auto" /></p>
<hr />
<p><strong>Participants' POV</strong></p>
<ol>
<li><p>Visit the survey link/code shared by the organizers</p>
</li>
<li><p>Fill out their email and complete the simple form, the progress bar at the top shows the progress.</p>
</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686653548403/0dc84621-6421-4264-b6c9-92c9768c65a1.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686653646709/bd80c26c-8886-4a8e-bde7-05a4791adb76.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686653686409/5795e219-b49e-4120-b213-f78b37f28700.png" alt class="image--center mx-auto" /></p>
<p>When the survey is finished, the participants can view the results on the survey link; the logged-in participant is indicated by a green dot.</p>
<p>From here, Participants can see other participants who are similar to them and get the link to connect with them and network.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686653847075/2949c68e-d6bd-4fc9-9067-e52407552d4a.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-key-features">Key Features</h3>
<ul>
<li><p>Organizers can create surveys to understand and interact with the community/conference attendees.</p>
</li>
<li><p>Participants can <strong>network with like-minded people to collaborate and discuss</strong>.</p>
</li>
<li><p>The app is light mode and dark mode compatible and mobile responsive :)</p>
</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686655726593/c60e6d1f-537f-4711-a837-88341a8f55e5.png" alt class="image--center mx-auto" /></p>
<p>Nexus empowers communities by enhancing the networking and collaboration potential by using data visualization-driven surveys.</p>
<h2 id="heading-tech-stack">Tech Stack</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686651488499/94192d64-8af8-40e7-94e9-8349593458b8.png" alt class="image--center mx-auto" /></p>
<ul>
<li><p><a target="_blank" href="https://nextjs.org/">NextJS</a> 13 (Typescript)</p>
</li>
<li><p>Zustand</p>
</li>
<li><p>Tailwind CSS</p>
</li>
<li><p>react-hook-form</p>
</li>
<li><p>Chart.js</p>
</li>
<li><p><a target="_blank" href="https://upstash.com/">Upstash</a></p>
</li>
<li><p>AWS Lambda and API Gateway (Python)</p>
</li>
<li><p>SkLearn <a target="_blank" href="https://scikit-learn.org/stable/modules/generated/sklearn.manifold.TSNE.html">T-SNE</a> - Dimensionality Reduction while keeping similarities</p>
</li>
<li><p>Appwrite - Auth, Database</p>
<p>  How Appwrite helped us?</p>
<p>  <a target="_blank" href="https://cloud.appwrite.io/">Appwrite Cloud</a> serverless <strong>Auth</strong> (Email and Password) and <strong>Database</strong> made it easy and fast to build the application. Used the client-side SDK to connect to Appwrite directly from NextJS.</p>
</li>
</ul>
<h2 id="heading-challenges">Challenges</h2>
<ol>
<li><p>How do I visualize the data?</p>
<p> I had no idea how to convert the survey responses into a graph. Research led me to Dimensionality Reduction - PCA and T-SNE. Other algorithms can be used as well, such as Cosine similarity etc.</p>
</li>
<li><p>Deploying the Python script.</p>
<p> Initially, I planned on using Appwrite Functions to deploy the Python script as a simple serverless function. But, my script uses Numpy and Sklearn which are not supported by the runtime Appwrite uses. I would request the Appwrite team to allow custom container images to run the serverless functions. (<a target="_blank" href="https://github.com/appwrite/appwrite/issues/1037">known issue</a>)</p>
<p> I went with AWS Lambda with a custom image on ECR.</p>
</li>
</ol>
<h2 id="heading-future-plans">Future Plans</h2>
<ol>
<li><p>Improve the visualisation algorithm and incorporate text responses into the analysis.</p>
</li>
<li><p>Add more charts like - Most common responses from participants to improve analysis.</p>
</li>
</ol>
<h2 id="heading-contributing"><strong>Contributing</strong></h2>
<p>PRs are always welcome. If you would like to add some components that you think would be useful while writing docs, you can add/contribute <a target="_blank" href="https://github.com/manavendrasen/nexus">here</a>.</p>
<h2 id="heading-references">References</h2>
<p>Github - <a target="_blank" href="https://github.com/manavendrasen/nexus">https://github.com/manavendrasen/nexus</a></p>
<p>Demo - <a target="_blank" href="https://youtu.be/nx5RGF9URL4">Nexus - Networking with Data-Driven Surveys | Demo</a></p>
<p>T-SNE - <a target="_blank" href="https://towardsdatascience.com/an-introduction-to-t-sne-with-python-example-5a3a293108d1#:~:text=The%20t%2DSNE%20algorithm%20calculates,measures%20using%20a%20cost%20function">https://towardsdatascience.com</a></p>
<p>Inspired by - <a target="_blank" href="https://twitter.com/ansonyuu/status/1661518548664041472">Anson Yu on Twitter</a></p>
<p>Thank you! 🤍</p>
]]></content:encoded></item></channel></rss>