<?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 Shreyash Ghanekar on Medium]]></title>
        <description><![CDATA[Stories by Shreyash Ghanekar on Medium]]></description>
        <link>https://medium.com/@shreyasghanekar35?source=rss-c6dbec49e4e7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*YHvQAjW7sp63Ke8VQn0UAA.png</url>
            <title>Stories by Shreyash Ghanekar on Medium</title>
            <link>https://medium.com/@shreyasghanekar35?source=rss-c6dbec49e4e7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 13:51:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shreyasghanekar35/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[I Wrote a Node.js Script to Generate an ATS-Friendly Resume — Here’s the Full Breakdown]]></title>
            <link>https://medium.com/@shreyasghanekar35/i-wrote-a-node-js-script-to-generate-an-ats-friendly-resume-heres-the-full-breakdown-be2dad518fd2?source=rss-c6dbec49e4e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/be2dad518fd2</guid>
            <dc:creator><![CDATA[Shreyash Ghanekar]]></dc:creator>
            <pubDate>Sat, 30 May 2026 12:23:18 GMT</pubDate>
            <atom:updated>2026-05-30T12:23:18.048Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*6Et1e_OxUG3w4hhHIeX4pg.png" /></figure><h3>Stop fighting Word templates. Start writing code.</h3><p><em>7 min read · Published in JavaScript in Plain English</em></p><p>Every year, thousands of perfectly qualified candidates get rejected before a human ever reads their resume.</p><p>Not because of their skills. Not because of their experience. Because an Applicant Tracking System — a piece of software — couldn’t parse their fancy two-column PDF layout.</p><p>I decided to fix that for myself. Instead of wrestling with Word templates or paying $19/month for resume builder subscriptions, I wrote a Node.js script that generates a production-grade, ATS-optimized .docx resume from scratch — every font, every bullet, every hyperlink — all code.</p><p>The full script and a sample resume are on GitHub: <a href="https://github.com/ShreyashPG/ATS-Friendly-Resume-Template"><strong>github.com/ShreyashPG/ATS-Friendly-Resume-Template</strong></a></p><p>Here’s the full breakdown of how it works, why it matters, and how you can use it.</p><h3>Why ATS Compatibility Matters More Than You Think</h3><p>Applicant Tracking Systems are the bouncers of the hiring world. Companies like Google, Amazon, and most mid-to-large enterprises use them to filter hundreds of applications automatically before a recruiter touches a single resume.</p><p>The painful truth? <strong>70–80% of resumes are rejected by ATS before a human reads them.</strong></p><p>Common failure points:</p><ul><li>Multi-column layouts that confuse the parser</li><li>Text inside text boxes or headers/footers that ATS can’t read</li><li>Icons and graphics used in place of actual text</li><li>Non-standard section headings (“My Journey” instead of “Experience”)</li><li>PDFs exported from Canva, Figma, or design tools</li></ul><p>A .docx file — a proper Microsoft Word document with semantic structure — is the gold standard for ATS compatibility. And generating it programmatically means you get <em>perfect</em> structure every single time.</p><h3>The Stack: One Package</h3><p>The entire script relies on a single npm package: <strong>docx</strong> — a library for generating .docx files programmatically in JavaScript.</p><pre>npm install docx</pre><p>That’s it. No Puppeteer. No headless Chrome. No LaTeX. No paid APIs. Just a clean library that builds a Word document element by element.</p><h3>Architecture: 5 Design Decisions Worth Stealing</h3><h3>1. A Four-Variable Color System</h3><pre>const COLOR_ACCENT = &quot;1A56A0&quot;; // Blue — headings, bullets, links<br>const COLOR_DARK   = &quot;1A1A2E&quot;; // Near-black — name, companies<br>const COLOR_MID    = &quot;444444&quot;; // Body text<br>const COLOR_LIGHT  = &quot;666666&quot;; // Dates, subtitles</pre><p>Four constants at the top of the file. Change them once, every color updates everywhere. No hunting through 300 lines for a hex code you used in three places.</p><h3>2. Composable Text-Run Helpers</h3><p>The most useful pattern in the entire script:</p><pre>function bold(text, color = COLOR_DARK, size = 19) {<br>  return new TextRun({ text, bold: true, color, size, font: &quot;Arial&quot; });<br>}</pre><pre>function normal(text, color = COLOR_MID, size = 19) {<br>  return new TextRun({ text, color, size, font: &quot;Arial&quot; });<br>}</pre><pre>function accent(text, size = 19) {<br>  return new TextRun({ text, bold: true, color: COLOR_ACCENT, size, font: &quot;Arial&quot; });<br>}</pre><p>You mix these inside a single bullet to create visually rich, semantically meaningful lines:</p><pre>bullet([<br>  normal(&quot;Reduced Redshift query costs by &quot;),<br>  accent(&quot;45%&quot;),<br>  normal(&quot; via partition pruning and materialized views.&quot;)<br>])</pre><p>The ATS reads the plain text. The human sees professional formatting. Both are happy.</p><h3>3. Section Headings That ATS Can Always Parse</h3><pre>function sectionHeading(text) {<br>  return new Paragraph({<br>    border: { bottom: { style: BorderStyle.SINGLE, size: 6, color: COLOR_ACCENT } },<br>    children: [<br>      new TextRun({<br>        text: text.toUpperCase(), // Always uppercase, regardless of input<br>        bold: true, size: 22, color: COLOR_ACCENT<br>      })<br>    ]<br>  });<br>}</pre><p>Two things worth noting: .toUpperCase() ensures headings are consistently cased no matter how you type them, and the visual styling is a simple bottom border — not a table, not a text box, not an image. ATS systems look for standard headings like EXPERIENCE, EDUCATION, SKILLS. This guarantees they&#39;re always findable.</p><h3>4. Right-Aligned Dates via Tab Stops</h3><p>Getting a date flush-right on the same line as a job title is one of the trickiest formatting challenges in Word. The script solves it cleanly with a tab stop — the same mechanism Word itself uses:</p><pre>function jobHeader(company, role, period) {<br>  return new Paragraph({<br>    tabStops: [{ type: TabStopType.RIGHT, position: 9360 }], // Right edge<br>    children: [<br>      new TextRun({ text: company, bold: true }),<br>      new TextRun({ text: &quot;  |  &quot; }),<br>      new TextRun({ text: role, bold: true, color: COLOR_ACCENT }),<br>      new TextRun({ text: &quot;\t&quot; }),        // ← jumps to right edge<br>      new TextRun({ text: period, italics: true })<br>    ]<br>  });<br>}</pre><p>This renders perfectly in Word, Google Docs, LibreOffice — and is completely readable by ATS parsers.</p><h3>5. Certificate and GitHub Links Inline</h3><p>You can attach a [Certificate] or [GitHub] hyperlink directly inside job and project headers:</p><pre>jobHeader(&quot;Acme Corp&quot;, &quot;Backend Developer&quot;, &quot;Jun–Dec 2024&quot;, &quot;https://your-cert-link.com&quot;)<br>projHeader(&quot;SmartBudget API&quot;, &quot;2024&quot;, &quot;https://github.com/you/smartbudget&quot;)</pre><p>These render as clickable inline links in the document — human-readable, and fully ATS-compatible because the underlying text is plain.</p><h3>The Full File Structure</h3><pre>ATS-Friendly-Resume-Template/<br>├── resume.js          ← The generator script<br>├── sample-resume.docx ← Pre-generated sample output<br>├── package.json<br>└── README.md</pre><p>The repo also includes sample-resume.docx — a pre-generated output you can open immediately to see what the finished document looks like before writing a single line of code.</p><p>📁 <a href="https://github.com/ShreyashPG/ATS-Friendly-Resume-Template"><strong>github.com/ShreyashPG/ATS-Friendly-Resume-Template</strong></a></p><h3>Running It in 3 Steps</h3><pre># 1. Clone the repo<br>git clone https://github.com/ShreyashPG/ATS-Friendly-Resume-Template<br>cd ATS-Friendly-Resume-Template</pre><pre># 2. Install the dependency<br>npm install</pre><pre># 3. Generate your resume<br>node resume.js<br># → resume.docx created in the current directory</pre><p>Open the .docx in Word, Google Docs, or any viewer and it renders exactly as designed.</p><h3>Why Code Beats Word Templates</h3><p>Aspect Word Template This Script Consistency Relies on discipline Enforced by code Updating a metric Manual find-and-replace Change one string Version control Filename chaos (resume_v3_FINAL2.docx) Clean git history ATS safety Depends on the template Guaranteed by structure Customizing per role Copy-paste nightmare Swap a data object Time to update 15–30 min Under 2 min</p><p>I’ve updated this resume four times in the past three months for different roles. Each time took under five minutes: edit the relevant bullet text, run node resume.js, done.</p><h3>ATS Best Practices Baked In by Default</h3><p>Feature Why It Matters .docx output Best-in-class ATS compatibility vs PDF Standard section names (EXPERIENCE, SKILLS) Reliably parsed by keyword scanners Single-column layout No multi-column parsing confusion Plain Arial font No missing-font fallback issues Real text, zero graphics Fully machine-readable Semantic heading hierarchy ATS can navigate the document structure Skills in a table Keyword-dense and scannable Dates on every entry Chronology is critical for ATS scoring</p><h3>Ideas to Extend This</h3><p>The script is intentionally a starting point. Some directions worth exploring:</p><p><strong>Multi-role variants</strong> — Extract resume content into a separate data.js file and import it. Maintain data-swe.js, data-data-engineer.js etc. and swap with a single import line.</p><p><strong>CLI flags</strong> — Add --role=backend to emphasize different skills automatically using simple conditionals.</p><p><strong>GitHub Actions automation</strong> — Commit a .docx to your repo on every push. Your resume is always one git pull away from being current.</p><p><strong>PDF export</strong> — Run soffice --headless --convert-to pdf resume.docx after generation for a PDF version when you need one.</p><p><strong>ATS keyword scorer</strong> — After generating the .docx, extract the plain text and run a keyword match against a target job description.</p><h3>Final Thoughts</h3><p>Most people treat resume formatting like a design problem. It’s actually a data problem. Your achievements are the content — the format is just a render function.</p><p>Writing your resume as code gives you reproducibility, version control, speed, and the confidence of knowing exactly what the ATS sees.</p><p>Stop fighting templates. Start writing code.</p><p>The full script, sample output, and README are at: <a href="https://github.com/ShreyashPG/ATS-Friendly-Resume-Template"><strong>github.com/ShreyashPG/ATS-Friendly-Resume-Template</strong></a></p><p><em>If this helped, leave a clap and share it with someone who’s job hunting. If you extend the script — CLI flags, multi-role support, GitHub Actions — drop a comment. I’d love to see what you build.</em></p><p><strong>Tags:</strong> javascript nodejs resume career webdev productivity opensource</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=be2dad518fd2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Django + GraphQL: The Complete Production Guide — From Zero to Advanced]]></title>
            <link>https://medium.com/@shreyasghanekar35/django-graphql-the-complete-production-guide-from-zero-to-advanced-e100df2b3893?source=rss-c6dbec49e4e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/e100df2b3893</guid>
            <dc:creator><![CDATA[Shreyash Ghanekar]]></dc:creator>
            <pubDate>Fri, 22 May 2026 18:35:46 GMT</pubDate>
            <atom:updated>2026-05-22T18:35:46.962Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Build a scalable travel platform (Countries → Cities → 5-Star Hotels → Images) using Django, Graphene, and GraphQL — with real queries from beginner to advanced.</em></p><h3>Table of Contents</h3><ol><li>What is GraphQL and why does it matter?</li><li>GraphQL vs REST — a real comparison</li><li>The project: our travel platform data model</li><li>Entity Relationship Diagram (ERD)</li><li>Project setup</li><li>Django models (production-grade)</li><li>GraphQL types and schema</li><li>DataLoader pattern — eliminating N+1 queries</li><li>Authentication and permissions</li><li>Queries: beginner to advanced (15+ examples)</li><li>Mutations — creating and updating data</li><li>Subscriptions — real-time data</li><li>Advanced GraphQL concepts</li><li>Performance, security, and production checklist</li><li>Summary and next steps</li></ol><h3>1. What is GraphQL and Why Does It Matter?</h3><p>When Facebook engineers built the mobile News Feed in 2012, they ran into a painful problem: REST APIs were designed around server resources, not client needs. Mobile clients needed specific, minimal data. REST gave them everything or nothing.</p><p>So they built GraphQL — a query language for APIs where <strong>the client specifies exactly what data it needs</strong>, and the server returns exactly that. Facebook open-sourced it in 2015. Today it powers APIs at GitHub, Shopify, Twitter, and thousands of production systems.</p><p><strong>The core idea in one sentence:</strong> Instead of multiple endpoints that return fixed data shapes, you have one endpoint where clients describe the shape of the data they want.</p><h3>2. GraphQL vs REST — A Real Comparison</h3><p>Let’s be concrete. Imagine we’re building a hotel listing page. We need: hotel name, star rating, city name, country name, country cover image, and the hotel’s first 3 gallery images.</p><p><strong>With REST:</strong></p><pre>GET /api/hotels/42/              → hotel data (but we also get 20 fields we don&#39;t need)<br>GET /api/cities/7/               → city data<br>GET /api/countries/3/            → country data<br>GET /api/countries/3/cover-image/ → cover image<br>GET /api/hotels/42/images/?limit=3 → gallery images</pre><p>Five requests. Overfetching on every one. The frontend developer has to know all five endpoints, stitch the data together, handle five loading states, and deal with five potential error cases.</p><p><strong>With GraphQL:</strong></p><pre>query HotelListingPage {<br>  hotel(id: &quot;42&quot;) {<br>    name<br>    starRating<br>    address<br>    city {<br>      name<br>      country {<br>        name<br>        coverImage {<br>          url<br>          altText<br>        }<br>      }<br>    }<br>    images(first: 3) {<br>      edges {<br>        node {<br>          url<br>          altText<br>        }<br>      }<br>    }<br>  }<br>}</pre><p>One request. Exactly the fields we need. One loading state. One error case. The schema itself is the documentation.</p><p><strong>When to use GraphQL:</strong></p><ul><li>Multiple clients (web, mobile, TV app) needing different data shapes</li><li>Complex, deeply related data (our travel platform is a perfect example)</li><li>Rapid frontend iteration where data requirements change often</li><li>Teams where frontend and backend work independently</li></ul><p><strong>When REST is still the right choice:</strong></p><ul><li>Simple, stable CRUD APIs</li><li>File uploads (use REST + multipart, then reference the URL in GraphQL)</li><li>Public APIs meant to be consumed by third parties (REST is simpler to document)</li><li>Caching at the CDN level (GraphQL POST requests don’t cache like GET)</li><li>Very simple, single-client applications</li></ul><h3>3. The Project: Our Travel Platform Data Model</h3><p>We’re building the backend for a travel platform with this hierarchy:</p><pre>World<br>├── Country (has a cover image)<br>│   ├── City<br>│   │   └── Hotel (5-star, has many gallery images)<br>│   │         └── Image (generic, reusable model)<br>└── Image (also used standalone for country covers)</pre><p>Key design decisions we’ll make:</p><ul><li>A <strong>generic Image model</strong> using Django’s ContentType framework — one model that can attach to any entity</li><li><strong>UUIDs</strong> as primary keys (better for distributed systems, don’t leak row counts)</li><li><strong>Soft relationships</strong> — hotels belong to cities, cities belong to countries, but the image relationship is polymorphic</li><li><strong>DataLoaders</strong> to prevent N+1 query problems</li><li><strong>Cursor-based pagination</strong> for hotel and image lists</li></ul><h3>4. Entity Relationship Diagram</h3><pre>┌─────────────────┐         ┌─────────────────┐<br>│    Country      │         │     Image        │<br>├─────────────────┤         ├─────────────────┤<br>│ id (PK, UUID)   │────┐    │ id (PK, UUID)   │<br>│ name            │    │    │ image (file)    │<br>│ code            │    │    │ alt_text        │<br>│ slug            │    │    │ caption         │<br>│ description     │    │    │ image_type      │<br>│ cover_image_id  │────┘    │ order           │<br>│ created_at      │         │ width           │<br>│ updated_at      │         │ height          │<br>└────────┬────────┘         │ content_type_id │◄──┐<br>         │                  │ object_id       │   │<br>         │ 1:N              └─────────────────┘   │ Generic FK<br>         ▼                                        │ (polymorphic)<br>┌─────────────────┐                               │<br>│    City         │                               │<br>├─────────────────┤                               │<br>│ id (PK, UUID)   │                               │<br>│ country_id (FK) │                               │<br>│ name            │                               │<br>│ slug            │                               │<br>│ description     │                               │<br>│ created_at      │                               │<br>│ updated_at      │                               │<br>└────────┬────────┘                               │<br>         │ 1:N                                    │<br>         ▼                                        │<br>┌─────────────────┐                               │<br>│    Hotel        │───────────────────────────────┘<br>├─────────────────┤<br>│ id (PK, UUID)   │<br>│ city_id (FK)    │<br>│ name            │<br>│ slug            │<br>│ description     │<br>│ star_rating     │<br>│ address         │<br>│ latitude        │<br>│ longitude       │<br>│ phone           │<br>│ email           │<br>│ website         │<br>│ is_active       │<br>│ created_at      │<br>│ updated_at      │<br>└─────────────────┘</pre><p>The Image model uses Django&#39;s <strong>GenericForeignKey</strong> — a polymorphic relationship that lets a single Image row point to either a Country row or a Hotel row using content_type_id + object_id. This means you don&#39;t need separate CountryImage and HotelImage tables.</p><h3>5. Project Setup</h3><h3>Requirements</h3><pre>pip install django==5.0 \<br>            graphene-django==3.2 \<br>            django-filter==23.5 \<br>            django-storages==1.14 \<br>            boto3==1.34 \<br>            Pillow==10.2 \<br>            python-decouple==3.8 \<br>            djangorestframework==3.14 \<br>            promise==2.3 \<br>            django-cors-headers==4.3</pre><h3>Project structure</h3><pre>travel_platform/<br>├── config/<br>│   ├── settings/<br>│   │   ├── base.py<br>│   │   ├── development.py<br>│   │   └── production.py<br>│   ├── urls.py<br>│   └── wsgi.py<br>├── apps/<br>│   ├── locations/        ← Country, City models<br>│   │   ├── models.py<br>│   │   ├── schema.py     ← GraphQL types and resolvers<br>│   │   └── loaders.py    ← DataLoaders<br>│   ├── hotels/           ← Hotel model<br>│   │   ├── models.py<br>│   │   ├── schema.py<br>│   │   └── loaders.py<br>│   └── media/            ← Image model<br>│       ├── models.py<br>│       └── schema.py<br>├── schema.py             ← Root schema (stitches everything together)<br>└── manage.py</pre><h3>Base settings</h3><pre># config/settings/base.py</pre><pre>import os<br>from pathlib import Path<br>from decouple import config</pre><pre>BASE_DIR = Path(__file__).resolve().parent.parent.parent</pre><pre>SECRET_KEY = config(&#39;SECRET_KEY&#39;)<br>DEBUG = config(&#39;DEBUG&#39;, default=False, cast=bool)</pre><pre>INSTALLED_APPS = [<br>    &#39;django.contrib.admin&#39;,<br>    &#39;django.contrib.auth&#39;,<br>    &#39;django.contrib.contenttypes&#39;,<br>    &#39;django.contrib.sessions&#39;,<br>    &#39;django.contrib.messages&#39;,<br>    &#39;django.contrib.staticfiles&#39;,<br>    # Third-party<br>    &#39;graphene_django&#39;,<br>    &#39;django_filters&#39;,<br>    &#39;corsheaders&#39;,<br>    &#39;storages&#39;,<br>    # Our apps<br>    &#39;apps.locations&#39;,<br>    &#39;apps.hotels&#39;,<br>    &#39;apps.media&#39;,<br>]</pre><pre>GRAPHENE = {<br>    # The path to our root schema class<br>    &#39;SCHEMA&#39;: &#39;schema.schema&#39;,<br>    # Middleware — add authentication, logging here<br>    &#39;MIDDLEWARE&#39;: [<br>        &#39;graphql_jwt.middleware.JSONWebTokenMiddleware&#39;,<br>    ],<br>    # Limit query depth to prevent abuse (e.g., infinite nesting attacks)<br>    &#39;SCHEMA_INDENT&#39;: 2,<br>}</pre><pre># Image storage — use S3 in production<br>DEFAULT_FILE_STORAGE = config(<br>    &#39;DEFAULT_FILE_STORAGE&#39;,<br>    default=&#39;django.core.files.storage.FileSystemStorage&#39;<br>)</pre><pre># AWS S3 settings (only used when DEFAULT_FILE_STORAGE points to S3)<br>AWS_ACCESS_KEY_ID = config(&#39;AWS_ACCESS_KEY_ID&#39;, default=&#39;&#39;)<br>AWS_SECRET_ACCESS_KEY = config(&#39;AWS_SECRET_ACCESS_KEY&#39;, default=&#39;&#39;)<br>AWS_STORAGE_BUCKET_NAME = config(&#39;AWS_STORAGE_BUCKET_NAME&#39;, default=&#39;&#39;)<br>AWS_S3_REGION_NAME = config(&#39;AWS_S3_REGION_NAME&#39;, default=&#39;us-east-1&#39;)<br>AWS_S3_CUSTOM_DOMAIN = config(&#39;AWS_S3_CUSTOM_DOMAIN&#39;, default=&#39;&#39;)<br>AWS_DEFAULT_ACL = &#39;public-read&#39;<br>AWS_S3_OBJECT_PARAMETERS = {&#39;CacheControl&#39;: &#39;max-age=86400&#39;}</pre><h3>URL configuration</h3><pre># config/urls.py</pre><pre>from django.contrib import admin<br>from django.urls import path<br>from django.views.decorators.csrf import csrf_exempt<br>from graphene_django.views import GraphQLView<br>from django.conf import settings<br>from django.conf.urls.static import static</pre><pre>urlpatterns = [<br>    path(&#39;admin/&#39;, admin.site.urls),<br>    # The single GraphQL endpoint — all queries, mutations, subscriptions go here<br>    path(&#39;graphql/&#39;, csrf_exempt(GraphQLView.as_view(graphiql=settings.DEBUG))),<br>]</pre><pre># Serve media files in development only<br>if settings.DEBUG:<br>    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)</pre><h3>6. Django Models (Production-Grade)</h3><h3>Image model — the foundation</h3><pre># apps/media/models.py</pre><pre>import uuid<br>from django.db import models<br>from django.contrib.contenttypes.fields import GenericForeignKey<br>from django.contrib.contenttypes.models import ContentType<br>from django.utils.text import slugify<br></pre><pre>def image_upload_path(instance, filename):<br>    &quot;&quot;&quot;<br>    Generate a structured upload path based on the content type.<br>    e.g., images/country/2024/01/15/my-image.jpg<br>    This keeps S3/filesystem organized and prevents root-level clutter.<br>    &quot;&quot;&quot;<br>    content_type_name = instance.content_type.model if instance.content_type else &#39;misc&#39;<br>    ext = filename.split(&#39;.&#39;)[-1].lower()<br>    new_filename = f&quot;{uuid.uuid4().hex}.{ext}&quot;<br>    return f&quot;images/{content_type_name}/{new_filename}&quot;<br></pre><pre>class Image(models.Model):<br>    &quot;&quot;&quot;<br>    A polymorphic image model that can attach to any Django model.<br>    <br>    Uses Django&#39;s GenericForeignKey to link to either a Country (cover image)<br>    or a Hotel (gallery image) — or any future model — without needing<br>    separate image tables for each entity.<br>    <br>    Pattern: content_type + object_id = generic foreign key to any model.<br>    &quot;&quot;&quot;</pre><pre>    # Image type choices — helps frontend render images correctly<br>    class ImageType(models.TextChoices):<br>        COVER = &#39;cover&#39;, &#39;Cover Image&#39;<br>        GALLERY = &#39;gallery&#39;, &#39;Gallery Image&#39;<br>        THUMBNAIL = &#39;thumbnail&#39;, &#39;Thumbnail&#39;<br>        BANNER = &#39;banner&#39;, &#39;Banner&#39;</pre><pre>    id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)</pre><pre>    # The actual image file — stored on S3 in production<br>    image = models.ImageField(<br>        upload_to=image_upload_path,<br>        help_text=&quot;Upload the image file. Will be stored on S3 in production.&quot;<br>    )</pre><pre>    alt_text = models.CharField(<br>        max_length=255,<br>        blank=True,<br>        help_text=&quot;Describe the image for screen readers and SEO.&quot;<br>    )<br>    caption = models.CharField(max_length=500, blank=True)<br>    image_type = models.CharField(<br>        max_length=20,<br>        choices=ImageType.choices,<br>        default=ImageType.GALLERY<br>    )</pre><pre>    # Display order — lower numbers appear first<br>    order = models.PositiveIntegerField(default=0, db_index=True)</pre><pre>    # Image dimensions — stored so we can render correct aspect ratios without loading the image<br>    width = models.PositiveIntegerField(null=True, blank=True)<br>    height = models.PositiveIntegerField(null=True, blank=True)</pre><pre>    # --- Generic Foreign Key setup ---<br>    # content_type points to the Django model table (e.g., &quot;locations | country&quot;)<br>    content_type = models.ForeignKey(<br>        ContentType,<br>        on_delete=models.CASCADE,<br>        null=True,<br>        blank=True,<br>        related_name=&#39;images&#39;<br>    )<br>    # object_id stores the UUID of the actual Country or Hotel record<br>    object_id = models.UUIDField(null=True, blank=True)<br>    # The magic glue — Django handles the join for us<br>    content_object = GenericForeignKey(&#39;content_type&#39;, &#39;object_id&#39;)<br>    # ---</pre><pre>    created_at = models.DateTimeField(auto_now_add=True)</pre><pre>    class Meta:<br>        ordering = [&#39;order&#39;, &#39;created_at&#39;]<br>        indexes = [<br>            # Composite index for fast &quot;all images for this hotel&quot; queries<br>            models.Index(fields=[&#39;content_type&#39;, &#39;object_id&#39;, &#39;order&#39;]),<br>        ]<br>        verbose_name = &#39;Image&#39;<br>        verbose_name_plural = &#39;Images&#39;</pre><pre>    def __str__(self):<br>        return self.alt_text or str(self.id)</pre><pre>    def save(self, *args, **kwargs):<br>        &quot;&quot;&quot;Auto-populate width and height when saving a new image.&quot;&quot;&quot;<br>        if self.image and not self.width:<br>            try:<br>                from PIL import Image as PILImage<br>                img = PILImage.open(self.image)<br>                self.width, self.height = img.size<br>            except Exception:<br>                pass  # Don&#39;t fail the save if PIL can&#39;t read the image<br>        super().save(*args, **kwargs)</pre><pre>    @property<br>    def url(https://medium.com/self):<br>        &quot;&quot;&quot;Return the full URL for this image.&quot;&quot;&quot;<br>        if self.image:<br>            return self.image.url<br>        return None</pre><pre>    @property<br>    def aspect_ratio(self):<br>        &quot;&quot;&quot;Return width/height ratio for responsive rendering.&quot;&quot;&quot;<br>        if self.width and self.height:<br>            return round(self.width / self.height, 4)<br>        return None</pre><h3>Location models — Country and City</h3><pre># apps/locations/models.py</pre><pre>import uuid<br>from django.db import models<br>from django.contrib.contenttypes.fields import GenericRelation<br>from django.utils.text import slugify<br>from apps.media.models import Image<br></pre><pre>class Country(models.Model):<br>    &quot;&quot;&quot;<br>    Represents a country.<br>    <br>    Each country has one cover image (stored as a GenericForeignKey on the Image model).<br>    We use a GenericRelation here so we can query country.images.all() and also<br>    let Django cascade-delete images when the country is deleted.<br>    &quot;&quot;&quot;</pre><pre>    id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)<br>    name = models.CharField(max_length=100, unique=True)<br>    # ISO 3166-1 alpha-2 code (e.g., &#39;IN&#39;, &#39;US&#39;, &#39;FR&#39;)<br>    code = models.CharField(max_length=3, unique=True, db_index=True)<br>    slug = models.SlugField(max_length=120, unique=True, blank=True)<br>    description = models.TextField(blank=True)</pre><pre>    # The cover image — we store a direct FK for fast access<br>    # (the Image model&#39;s GenericFK points back to us)<br>    cover_image = models.OneToOneField(<br>        Image,<br>        null=True,<br>        blank=True,<br>        on_delete=models.SET_NULL,<br>        related_name=&#39;cover_for_country&#39;,<br>        help_text=&quot;The primary cover image for this country.&quot;<br>    )</pre><pre>    # Reverse accessor for the generic relation — lets us do country.images.all()<br>    images = GenericRelation(<br>        Image,<br>        content_type_field=&#39;content_type&#39;,<br>        object_id_field=&#39;object_id&#39;,<br>        related_query_name=&#39;country&#39;<br>    )</pre><pre>    created_at = models.DateTimeField(auto_now_add=True)<br>    updated_at = models.DateTimeField(auto_now=True)</pre><pre>    class Meta:<br>        ordering = [&#39;name&#39;]<br>        verbose_name_plural = &#39;countries&#39;<br>        indexes = [<br>            models.Index(fields=[&#39;code&#39;]),<br>            models.Index(fields=[&#39;slug&#39;]),<br>        ]</pre><pre>    def __str__(self):<br>        return self.name</pre><pre>    def save(self, *args, **kwargs):<br>        &quot;&quot;&quot;Auto-generate slug from name if not provided.&quot;&quot;&quot;<br>        if not self.slug:<br>            self.slug = slugify(self.name)<br>        super().save(*args, **kwargs)</pre><pre>    @property<br>    def city_count(self):<br>        return self.cities.filter(hotels__is_active=True).distinct().count()</pre><pre>    @property<br>    def hotel_count(self):<br>        return Hotel.objects.filter(city__country=self, is_active=True).count()<br></pre><pre>class City(models.Model):<br>    &quot;&quot;&quot;<br>    A city within a country.<br>    Cities don&#39;t have their own images in this model — they inherit context<br>    from their country and hotels inherit from cities.<br>    &quot;&quot;&quot;</pre><pre>    id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)<br>    country = models.ForeignKey(<br>        Country,<br>        on_delete=models.CASCADE,<br>        related_name=&#39;cities&#39;,<br>        db_index=True<br>    )<br>    name = models.CharField(max_length=100)<br>    slug = models.SlugField(max_length=120, blank=True)<br>    description = models.TextField(blank=True)</pre><pre>    created_at = models.DateTimeField(auto_now_add=True)<br>    updated_at = models.DateTimeField(auto_now=True)</pre><pre>    class Meta:<br>        ordering = [&#39;name&#39;]<br>        verbose_name_plural = &#39;cities&#39;<br>        # A city name must be unique within a country<br>        unique_together = [[&#39;country&#39;, &#39;name&#39;]]<br>        indexes = [<br>            models.Index(fields=[&#39;country&#39;, &#39;slug&#39;]),<br>        ]</pre><pre>    def __str__(self):<br>        return f&quot;{self.name}, {self.country.name}&quot;</pre><pre>    def save(self, *args, **kwargs):<br>        if not self.slug:<br>            self.slug = slugify(self.name)<br>        super().save(*args, **kwargs)</pre><h3>Hotel model</h3><pre># apps/hotels/models.py</pre><pre>import uuid<br>from django.db import models<br>from django.contrib.contenttypes.fields import GenericRelation<br>from django.core.validators import MinValueValidator, MaxValueValidator<br>from django.utils.text import slugify<br>from apps.media.models import Image<br>from apps.locations.models import City<br></pre><pre>class Hotel(models.Model):<br>    &quot;&quot;&quot;<br>    A hotel — always located in a city, always has a star rating.<br>    <br>    Images are stored via the polymorphic Image model using GenericRelation.<br>    A hotel can have many gallery images in any order.<br>    <br>    Production considerations:<br>    - is_active flag for soft-disabling hotels without deleting records<br>    - lat/lng for map integrations<br>    - Indexed fields for common query patterns<br>    &quot;&quot;&quot;</pre><pre>    id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)<br>    city = models.ForeignKey(<br>        City,<br>        on_delete=models.CASCADE,<br>        related_name=&#39;hotels&#39;,<br>        db_index=True<br>    )<br>    name = models.CharField(max_length=200)<br>    slug = models.SlugField(max_length=220, blank=True)<br>    description = models.TextField(blank=True)</pre><pre>    # Only 5-star hotels for now — but we constrain to 1-5 for flexibility<br>    star_rating = models.PositiveSmallIntegerField(<br>        default=5,<br>        validators=[MinValueValidator(1), MaxValueValidator(5)],<br>        db_index=True,<br>        help_text=&quot;Star rating from 1 (budget) to 5 (luxury).&quot;<br>    )</pre><pre>    address = models.CharField(max_length=500, blank=True)<br>    latitude = models.DecimalField(<br>        max_digits=9, decimal_places=6, null=True, blank=True<br>    )<br>    longitude = models.DecimalField(<br>        max_digits=9, decimal_places=6, null=True, blank=True<br>    )</pre><pre>    phone = models.CharField(max_length=30, blank=True)<br>    email = models.EmailField(blank=True)<br>    website = models.URLField(blank=True)</pre><pre>    # Soft delete / enable-disable without data loss<br>    is_active = models.BooleanField(default=True, db_index=True)</pre><pre>    # Gallery images via generic relation<br>    images = GenericRelation(<br>        Image,<br>        content_type_field=&#39;content_type&#39;,<br>        object_id_field=&#39;object_id&#39;,<br>        related_query_name=&#39;hotel&#39;<br>    )</pre><pre>    created_at = models.DateTimeField(auto_now_add=True)<br>    updated_at = models.DateTimeField(auto_now=True)</pre><pre>    class Meta:<br>        ordering = [&#39;name&#39;]<br>        indexes = [<br>            models.Index(fields=[&#39;city&#39;, &#39;is_active&#39;]),<br>            models.Index(fields=[&#39;star_rating&#39;, &#39;is_active&#39;]),<br>            models.Index(fields=[&#39;slug&#39;]),<br>        ]</pre><pre>    def __str__(self):<br>        return f&quot;{self.name} ({self.star_rating}★)&quot;</pre><pre>    def save(self, *args, **kwargs):<br>        if not self.slug:<br>            self.slug = slugify(f&quot;{self.name}-{self.city.name}&quot;)<br>        super().save(*args, **kwargs)</pre><pre>    @property<br>    def country(self):<br>        &quot;&quot;&quot;Convenience property to jump up the hierarchy.&quot;&quot;&quot;<br>        return self.city.country</pre><pre>    @property<br>    def image_count(self):<br>        return self.images.count()</pre><h3>7. GraphQL Types and Schema</h3><p>Now we connect our Django models to the GraphQL world. Think of GraphQL types as the “shape” your API exposes — they don’t have to match your models exactly, and often shouldn’t.</p><h3>Image type</h3><pre># apps/media/schema.py</pre><pre>import graphene<br>from graphene_django import DjangoObjectType<br>from graphene import relay<br>from .models import Image<br></pre><pre>class ImageType(DjangoObjectType):<br>    &quot;&quot;&quot;<br>    GraphQL type for the Image model.<br>    <br>    We expose computed properties (url, aspect_ratio) alongside<br>    model fields, because GraphQL types are about what clients need,<br>    not what the database stores.<br>    &quot;&quot;&quot;</pre><pre>    class Meta:<br>        model = Image<br>        # Use Relay&#39;s Node interface for cursor-based pagination<br>        interfaces = (relay.Node,)<br>        fields = [<br>            &#39;id&#39;, &#39;alt_text&#39;, &#39;caption&#39;, &#39;image_type&#39;,<br>            &#39;order&#39;, &#39;width&#39;, &#39;height&#39;, &#39;created_at&#39;<br>        ]</pre><pre>    # Expose computed properties as GraphQL fields<br>    url = graphene.String(description=&quot;Full URL to the image file.&quot;)<br>    aspect_ratio = graphene.Float(<br>        description=&quot;Width divided by height. Useful for responsive containers.&quot;<br>    )</pre><pre>    def resolve_url(https://medium.com/self,%20info):<br>        &quot;&quot;&quot;Return the absolute URL, with CDN domain in production.&quot;&quot;&quot;<br>        return self.url</pre><pre>    def resolve_aspect_ratio(self, info):<br>        return self.aspect_ratio<br></pre><pre>class ImageConnection(relay.Connection):<br>    &quot;&quot;&quot;Relay connection for paginated image lists.&quot;&quot;&quot;<br>    class Meta:<br>        node = ImageType</pre><pre>    total_count = graphene.Int()</pre><pre>    def resolve_total_count(self, info):<br>        return self.iterable.count()</pre><h3>Location types</h3><pre># apps/locations/schema.py</pre><pre>import graphene<br>from graphene_django import DjangoObjectType<br>from graphene import relay<br>from graphene_django.filter import DjangoFilterConnectionField<br>import django_filters</pre><pre>from .models import Country, City<br>from apps.media.schema import ImageType<br></pre><pre># --- Filters ---<br># These enable ?filter={name_Icontains: &quot;paris&quot;} style queries</pre><pre>class CityFilter(django_filters.FilterSet):<br>    name = django_filters.CharFilter(lookup_expr=&#39;icontains&#39;)<br>    country_code = django_filters.CharFilter(field_name=&#39;country__code&#39;)</pre><pre>    class Meta:<br>        model = City<br>        fields = [&#39;name&#39;, &#39;country_code&#39;]<br></pre><pre>class CountryFilter(django_filters.FilterSet):<br>    name = django_filters.CharFilter(lookup_expr=&#39;icontains&#39;)<br>    code = django_filters.CharFilter(lookup_expr=&#39;iexact&#39;)</pre><pre>    class Meta:<br>        model = Country<br>        fields = [&#39;name&#39;, &#39;code&#39;]<br></pre><pre># --- Types ---</pre><pre>class CityType(DjangoObjectType):<br>    class Meta:<br>        model = City<br>        interfaces = (relay.Node,)<br>        fields = [&#39;id&#39;, &#39;name&#39;, &#39;slug&#39;, &#39;description&#39;, &#39;created_at&#39;, &#39;updated_at&#39;]<br>        filterset_class = CityFilter</pre><pre>    # Nested resolver — expose the parent country<br>    country = graphene.Field(lambda: CountryType)<br>    hotel_count = graphene.Int()</pre><pre>    def resolve_country(self, info):<br>        # The DataLoader will batch this — see loaders.py<br>        return info.context.loaders.country_by_id.load(str(self.country_id))</pre><pre>    def resolve_hotel_count(self, info):<br>        return self.hotels.filter(is_active=True).count()<br></pre><pre>class CountryType(DjangoObjectType):<br>    class Meta:<br>        model = Country<br>        interfaces = (relay.Node,)<br>        fields = [<br>            &#39;id&#39;, &#39;name&#39;, &#39;code&#39;, &#39;slug&#39;, &#39;description&#39;,<br>            &#39;created_at&#39;, &#39;updated_at&#39;<br>        ]<br>        filterset_class = CountryFilter</pre><pre>    # Nested relations<br>    cover_image = graphene.Field(ImageType)<br>    cities = graphene.List(CityType)<br>    city_count = graphene.Int()<br>    hotel_count = graphene.Int()</pre><pre>    def resolve_cover_image(self, info):<br>        return self.cover_image</pre><pre>    def resolve_cities(self, info):<br>        return self.cities.all()</pre><pre>    def resolve_city_count(self, info):<br>        return self.cities.count()</pre><pre>    def resolve_hotel_count(self, info):<br>        from apps.hotels.models import Hotel<br>        return Hotel.objects.filter(city__country=self, is_active=True).count()</pre><h3>Hotel type</h3><pre># apps/hotels/schema.py</pre><pre>import graphene<br>from graphene_django import DjangoObjectType<br>from graphene import relay<br>from graphene_django.filter import DjangoFilterConnectionField<br>import django_filters</pre><pre>from .models import Hotel<br>from apps.media.schema import ImageType, ImageConnection<br>from apps.locations.schema import CityType<br></pre><pre>class HotelFilter(django_filters.FilterSet):<br>    name = django_filters.CharFilter(lookup_expr=&#39;icontains&#39;)<br>    star_rating = django_filters.NumberFilter()<br>    star_rating_gte = django_filters.NumberFilter(<br>        field_name=&#39;star_rating&#39;, lookup_expr=&#39;gte&#39;<br>    )<br>    city_name = django_filters.CharFilter(<br>        field_name=&#39;city__name&#39;, lookup_expr=&#39;icontains&#39;<br>    )<br>    country_code = django_filters.CharFilter(<br>        field_name=&#39;city__country__code&#39;, lookup_expr=&#39;iexact&#39;<br>    )<br>    is_active = django_filters.BooleanFilter()</pre><pre>    class Meta:<br>        model = Hotel<br>        fields = [<br>            &#39;name&#39;, &#39;star_rating&#39;, &#39;star_rating_gte&#39;,<br>            &#39;city_name&#39;, &#39;country_code&#39;, &#39;is_active&#39;<br>        ]<br></pre><pre>class HotelType(DjangoObjectType):<br>    class Meta:<br>        model = Hotel<br>        interfaces = (relay.Node,)<br>        fields = [<br>            &#39;id&#39;, &#39;name&#39;, &#39;slug&#39;, &#39;description&#39;, &#39;star_rating&#39;,<br>            &#39;address&#39;, &#39;latitude&#39;, &#39;longitude&#39;, &#39;phone&#39;, &#39;email&#39;,<br>            &#39;website&#39;, &#39;is_active&#39;, &#39;created_at&#39;, &#39;updated_at&#39;<br>        ]<br>        filterset_class = HotelFilter</pre><pre>    city = graphene.Field(CityType)<br>    images = relay.ConnectionField(<br>        ImageConnection,<br>        image_type=graphene.String(description=&quot;Filter by image_type: &#39;gallery&#39;, &#39;cover&#39;, etc.&quot;)<br>    )<br>    image_count = graphene.Int()<br>    cover_image = graphene.Field(<br>        ImageType,<br>        description=&quot;The first gallery image, used as a default cover.&quot;<br>    )</pre><pre>    def resolve_city(self, info):<br>        # Batched via DataLoader — one DB query for all cities<br>        return info.context.loaders.city_by_id.load(str(self.city_id))</pre><pre>    def resolve_images(self, info, image_type=None, **kwargs):<br>        &quot;&quot;&quot;Return hotel images, optionally filtered by image type.&quot;&quot;&quot;<br>        qs = self.images.all()<br>        if image_type:<br>            qs = qs.filter(image_type=image_type)<br>        return qs</pre><pre>    def resolve_image_count(self, info):<br>        return self.images.count()</pre><pre>    def resolve_cover_image(self, info):<br>        &quot;&quot;&quot;Return the first gallery image as the cover.&quot;&quot;&quot;<br>        return self.images.filter(image_type=&#39;gallery&#39;).order_by(&#39;order&#39;).first()</pre><h3>8. DataLoader Pattern — Eliminating N+1 Queries</h3><p>This is the most important performance concept in GraphQL. Without DataLoaders, fetching 20 hotels would fire 20 separate queries to get each hotel’s city. With DataLoaders, it’s always 1 batched query.</p><pre># apps/locations/loaders.py</pre><pre>from promise import Promise<br>from promise.dataloader import DataLoader<br>from .models import Country, City<br></pre><pre>class CountryByIdLoader(DataLoader):<br>    &quot;&quot;&quot;<br>    Batch-loads Country objects by ID.<br>    <br>    Instead of: SELECT * FROM country WHERE id = 1 (×20 times)<br>    We get:     SELECT * FROM country WHERE id IN (1, 2, 3, ..., 20)<br>    <br>    DataLoader collects all IDs requested in one &quot;tick&quot; of the event loop,<br>    then fires a single batched query, then distributes results back.<br>    &quot;&quot;&quot;</pre><pre>    def batch_load_fn(self, country_ids):<br>        # Fetch all countries in one query<br>        countries = Country.objects.filter(id__in=country_ids)<br>        # Build a lookup dict<br>        country_map = {str(c.id): c for c in countries}<br>        # Return in the same order as the input IDs (DataLoader contract)<br>        return Promise.resolve([<br>            country_map.get(str(cid)) for cid in country_ids<br>        ])<br></pre><pre>class CityByIdLoader(DataLoader):<br>    &quot;&quot;&quot;Batch-loads City objects by ID.&quot;&quot;&quot;</pre><pre>    def batch_load_fn(self, city_ids):<br>        cities = City.objects.select_related(&#39;country&#39;).filter(id__in=city_ids)<br>        city_map = {str(c.id): c for c in cities}<br>        return Promise.resolve([<br>            city_map.get(str(cid)) for cid in city_ids<br>        ])<br></pre><pre>class HotelsByCityIdLoader(DataLoader):<br>    &quot;&quot;&quot;<br>    Batch-loads all hotels for multiple city IDs at once.<br>    Used when resolving city.hotels for a list of cities.<br>    &quot;&quot;&quot;</pre><pre>    def batch_load_fn(self, city_ids):<br>        from apps.hotels.models import Hotel<br>        hotels = Hotel.objects.filter(<br>            city_id__in=city_ids, is_active=True<br>        ).select_related(&#39;city&#39;)</pre><pre>        # Group hotels by city_id<br>        hotels_by_city = {}<br>        for hotel in hotels:<br>            key = str(hotel.city_id)<br>            hotels_by_city.setdefault(key, []).append(hotel)</pre><pre>        return Promise.resolve([<br>            hotels_by_city.get(str(cid), []) for cid in city_ids<br>        ])</pre><pre># The loader context — attach to every request</pre><pre>class LoaderContext:<br>    &quot;&quot;&quot;<br>    Container for all DataLoaders.<br>    Instantiate once per request so the batching window is per-request.<br>    &quot;&quot;&quot;<br>    def __init__(self):<br>        self.country_by_id = CountryByIdLoader()<br>        self.city_by_id = CityByIdLoader()<br>        self.hotels_by_city_id = HotelsByCityIdLoader()<br></pre><pre># In your GraphQL view or middleware:<br>class TravelGraphQLView(GraphQLView):<br>    def get_context(self, request):<br>        context = super().get_context(request)<br>        context.loaders = LoaderContext()<br>        return context</pre><h3>9. Authentication and Permissions</h3><pre># In your schema resolvers, protect mutations and sensitive queries:</pre><pre>import graphql_jwt<br>from graphql_jwt.decorators import login_required, staff_member_required<br></pre><pre>class Query(graphene.ObjectType):<br>    # Public queries — no auth required<br>    hotels = DjangoFilterConnectionField(HotelType)<br>    hotel = relay.Node.to_node_field(HotelType)<br>    countries = DjangoFilterConnectionField(CountryType)</pre><pre>    # Staff-only query — see all hotels including inactive ones<br>    all_hotels_admin = DjangoFilterConnectionField(HotelType)</pre><pre>    @staff_member_required<br>    def resolve_all_hotels_admin(self, info, **kwargs):<br>        return Hotel.objects.all()  # No is_active filter<br></pre><pre>class Mutation(graphene.ObjectType):<br>    # JWT auth mutations (included from graphql_jwt)<br>    token_auth = graphql_jwt.ObtainJSONWebToken.Field()<br>    verify_token = graphql_jwt.Verify.Field()<br>    refresh_token = graphql_jwt.Refresh.Field()</pre><pre>    # Our custom mutations<br>    create_hotel = CreateHotelMutation.Field()<br>    upload_hotel_image = UploadHotelImageMutation.Field()<br>    update_hotel = UpdateHotelMutation.Field()<br>    delete_hotel = DeleteHotelMutation.Field()</pre><h3>10. Queries — Beginner to Advanced</h3><h3>🟢 Beginner: Basic field selection</h3><p><strong>Query: Get all countries</strong></p><pre>query GetAllCountries {<br>  countries {<br>    edges {<br>      node {<br>        id<br>        name<br>        code<br>        slug<br>      }<br>    }<br>  }<br>}</pre><p><em>What’s happening:</em> We query the countries field (a Relay connection), then navigate to edges → node to get the actual Country objects. The edges wrapper is Relay&#39;s convention for cursor-based pagination — it lets us add cursor info alongside each result.</p><p><strong>Query: Get a single hotel by ID</strong></p><pre>query GetHotel {<br>  hotel(id: &quot;SG90ZWxUeXBlOjEyMw==&quot;) {<br>    name<br>    starRating<br>    address<br>    phone<br>    email<br>  }<br>}</pre><p><em>Note:</em> The id here is a base64-encoded Relay global ID in the format HotelType:uuid. You get this from list queries.</p><h3>🟡 Intermediate: Nested queries and filtering</h3><p><strong>Query: Hotels in a specific country with city and country info</strong></p><pre>query HotelsInIndia {<br>  hotels(countryCode: &quot;IN&quot;, isActive: true) {<br>    edges {<br>      node {<br>        name<br>        starRating<br>        address<br>        city {<br>          name<br>          country {<br>            name<br>            code<br>            coverImage {<br>              url<br>              altText<br>            }<br>          }<br>        }<br>      }<br>    }<br>    pageInfo {<br>      hasNextPage<br>      endCursor<br>    }<br>  }<br>}</pre><p><em>Why this is powerful:</em> One query, three levels of hierarchy, exactly the fields we need. No overfetching. The pageInfo gives us the cursor to fetch the next page.</p><p><strong>Query: Search hotels by name, filter by star rating</strong></p><pre>query SearchLuxuryHotels($search: String!, $minStars: Float) {<br>  hotels(name_Icontains: $search, starRatingGte: $minStars) {<br>    edges {<br>      node {<br>        name<br>        starRating<br>        city {<br>          name<br>        }<br>        coverImage {<br>          url<br>        }<br>      }<br>    }<br>  }<br>}</pre><p>Variables:</p><pre>{<br>  &quot;search&quot;: &quot;Grand&quot;,<br>  &quot;minStars&quot;: 4<br>}</pre><p><em>Variables</em> keep your queries reusable and prevent injection — always use them instead of string interpolation.</p><p><strong>Query: Get a country with its cities and hotel counts</strong></p><pre>query CountryWithStats($code: String!) {<br>  countries(code: $code) {<br>    edges {<br>      node {<br>        name<br>        code<br>        description<br>        coverImage {<br>          url<br>          altText<br>          width<br>          height<br>          aspectRatio<br>        }<br>        cityCount<br>        hotelCount<br>        cities {<br>          name<br>          slug<br>          hotelCount<br>        }<br>      }<br>    }<br>  }<br>}</pre><p>Variables:</p><pre>{ &quot;code&quot;: &quot;FR&quot; }</pre><p><em>What to notice:</em> We fetch computed properties (cityCount, hotelCount, aspectRatio) alongside raw fields. In REST, you&#39;d either return these in every response (wasting bandwidth) or make separate /stats endpoints. In GraphQL, clients opt-in to computed fields only when needed.</p><h3>🔴 Advanced: Pagination, fragments, aliases, directives</h3><p><strong>Query: Paginated hotel images with cursor pagination</strong></p><pre>query HotelGallery($hotelId: ID!, $after: String) {<br>  hotel(id: $hotelId) {<br>    name<br>    images(first: 12, after: $after) {<br>      totalCount<br>      edges {<br>        cursor<br>        node {<br>          url<br>          altText<br>          caption<br>          width<br>          height<br>          aspectRatio<br>          imageType<br>          order<br>        }<br>      }<br>      pageInfo {<br>        hasNextPage<br>        hasPreviousPage<br>        startCursor<br>        endCursor<br>      }<br>    }<br>  }<br>}</pre><p><em>Cursor pagination vs offset pagination:</em> Offset pagination (?page=2) breaks when records are inserted between requests. Cursors (after: &quot;xyz&quot;) are stable — they point to a specific record in the result set, so page 2 always starts where page 1 ended, even if new hotels were added.</p><p><strong>Query: Using fragments to avoid repetition</strong></p><pre># Define a reusable fragment for image fields<br>fragment ImageFields on ImageType {<br>  id<br>  url<br>  altText<br>  caption<br>  width<br>  height<br>  aspectRatio<br>  imageType<br>}</pre><pre># Use the fragment in multiple places<br>query TravelPageData($countryCode: String!) {<br>  countries(code: $countryCode) {<br>    edges {<br>      node {<br>        name<br>        coverImage {<br>          ...ImageFields   # Spread the fragment<br>        }<br>        cities {<br>          name<br>          hotels {<br>            edges {<br>              node {<br>                name<br>                starRating<br>                coverImage {<br>                  ...ImageFields   # Same fragment, zero repetition<br>                }<br>              }<br>            }<br>          }<br>        }<br>      }<br>    }<br>  }<br>}</pre><p><em>Fragments</em> are GraphQL’s equivalent of reusable components. Define once, use everywhere. When the ImageType adds a new field you need, update one fragment.</p><p><strong>Query: Aliases — two hotels in one request</strong></p><pre>query CompareHotels($hotel1Id: ID!, $hotel2Id: ID!) {<br>  # Alias lets us query the same field twice with different args<br>  optionA: hotel(id: $hotel1Id) {<br>    name<br>    starRating<br>    address<br>    city { name country { name } }<br>    imageCount<br>    coverImage { url }<br>  }</pre><pre>  optionB: hotel(id: $hotel2Id) {<br>    name<br>    starRating<br>    address<br>    city { name country { name } }<br>    imageCount<br>    coverImage { url }<br>  }<br>}</pre><p><em>Without aliases,</em> you can’t query the same field twice. With aliases, one request does the work of two.</p><p><strong>Query: Directives — conditional fields</strong></p><pre>query HotelList($includeImages: Boolean!, $includeLocation: Boolean!) {<br>  hotels(starRating: 5, isActive: true) {<br>    edges {<br>      node {<br>        name<br>        starRating<br>        # Only fetch images if the client needs them (e.g., list view vs detail view)<br>        coverImage @include(if: $includeImages) {<br>          url<br>          altText<br>        }<br>        # Only fetch coordinates for map view<br>        latitude @include(if: $includeLocation)<br>        longitude @include(if: $includeLocation)<br>      }<br>    }<br>  }<br>}</pre><p>Variables for a list view (no images, no map):</p><pre>{ &quot;includeImages&quot;: false, &quot;includeLocation&quot;: false }</pre><p>Variables for a map view:</p><pre>{ &quot;includeImages&quot;: false, &quot;includeLocation&quot;: true }</pre><p><em>This is impossible in REST.</em> You’d need separate endpoints or always return everything. With directives, one query schema serves every client’s needs.</p><p><strong>Query: Introspection — querying the schema itself</strong></p><pre># GraphQL&#39;s killer feature: the API documents itself<br>query ExploreSchema {<br>  __schema {<br>    types {<br>      name<br>      kind<br>      description<br>    }<br>  }<br>}</pre><pre># Explore a specific type<br>query ExploreHotelType {<br>  __type(name: &quot;HotelType&quot;) {<br>    name<br>    fields {<br>      name<br>      type {<br>        name<br>        kind<br>      }<br>      description<br>    }<br>  }<br>}</pre><p><em>Introspection</em> is why tools like GraphiQL, Apollo Studio, and Postman can auto-complete your queries — they just query __schema and build the UI from the result. This is also why you <strong>must disable introspection in production</strong> to prevent attackers from mapping your entire API surface.</p><h3>11. Mutations — Creating and Updating Data</h3><pre># apps/hotels/mutations.py</pre><pre>import graphene<br>from graphql_jwt.decorators import login_required, staff_member_required<br>from .models import Hotel<br>from apps.locations.models import City<br>from .schema import HotelType<br></pre><pre>class CreateHotelInput(graphene.InputObjectType):<br>    &quot;&quot;&quot;<br>    Input type for creating a hotel.<br>    Using InputObjectType keeps mutation arguments clean and reusable.<br>    &quot;&quot;&quot;<br>    city_id = graphene.ID(required=True)<br>    name = graphene.String(required=True)<br>    description = graphene.String()<br>    star_rating = graphene.Int(required=True)<br>    address = graphene.String()<br>    phone = graphene.String()<br>    email = graphene.String()<br>    website = graphene.String()<br>    latitude = graphene.Float()<br>    longitude = graphene.Float()<br></pre><pre>class CreateHotelMutation(graphene.Mutation):<br>    &quot;&quot;&quot;<br>    Create a new hotel. Staff only.<br>    <br>    Example mutation:<br>    mutation {<br>      createHotel(input: {<br>        cityId: &quot;Q2l0eVR5cGU6MQ==&quot;<br>        name: &quot;The Grand Palace&quot;<br>        starRating: 5<br>        description: &quot;Luxury in the heart of the city&quot;<br>        address: &quot;1 Palace Road&quot;<br>      }) {<br>        hotel {<br>          id<br>          name<br>          city { name country { name } }<br>        }<br>        errors<br>      }<br>    }<br>    &quot;&quot;&quot;</pre><pre>    class Arguments:<br>        input = CreateHotelInput(required=True)</pre><pre>    # What the mutation returns<br>    hotel = graphene.Field(HotelType)<br>    errors = graphene.List(graphene.String)</pre><pre>    @staff_member_required<br>    def mutate(self, info, input):<br>        try:<br>            # Decode the Relay global ID to get the actual city UUID<br>            city_type, city_id = graphene.relay.Node.from_global_id(input.city_id)<br>            city = City.objects.get(id=city_id)<br>        except (City.DoesNotExist, Exception) as e:<br>            return CreateHotelMutation(hotel=None, errors=[f&quot;City not found: {str(e)}&quot;])</pre><pre>        hotel = Hotel.objects.create(<br>            city=city,<br>            name=input.name,<br>            description=input.description or &#39;&#39;,<br>            star_rating=input.star_rating,<br>            address=input.address or &#39;&#39;,<br>            phone=input.phone or &#39;&#39;,<br>            email=input.email or &#39;&#39;,<br>            website=input.website or &#39;&#39;,<br>            latitude=input.latitude,<br>            longitude=input.longitude,<br>        )</pre><pre>        return CreateHotelMutation(hotel=hotel, errors=[])</pre><p><strong>Calling the mutation:</strong></p><pre>mutation CreateGrandHotel {<br>  createHotel(input: {<br>    cityId: &quot;Q2l0eVR5cGU6MQ==&quot;<br>    name: &quot;The Grand Palace Hotel&quot;<br>    starRating: 5<br>    description: &quot;Iconic luxury property overlooking the bay&quot;<br>    address: &quot;1 Marine Drive, Mumbai&quot;<br>    phone: &quot;+91-22-1234-5678&quot;<br>    email: &quot;reservations@grandpalace.com&quot;<br>    latitude: 18.9220<br>    longitude: 72.8347<br>  }) {<br>    hotel {<br>      id<br>      name<br>      slug<br>      city {<br>        name<br>        country { name }<br>      }<br>    }<br>    errors<br>  }<br>}</pre><h3>12. Subscriptions — Real-Time Data</h3><pre># Subscriptions let clients receive push updates (via WebSocket)</pre><pre>import graphene<br>from rx import Observable<br></pre><pre>class HotelAvailabilitySubscription(graphene.ObjectType):<br>    &quot;&quot;&quot;<br>    Subscribe to availability changes for a specific hotel.<br>    Useful for booking UIs that need live room count updates.<br>    &quot;&quot;&quot;</pre><pre>    hotel_availability = graphene.Field(<br>        HotelAvailabilityType,<br>        hotel_id=graphene.ID(required=True)<br>    )</pre><pre>    def resolve_hotel_availability(root, info, hotel_id):<br>        # In production: connect to Redis pub/sub or Django Channels<br>        # This simplified version emits an update every 5 seconds<br>        return Observable.interval(5000).map(<br>            lambda _: get_hotel_availability(hotel_id)<br>        )</pre><p><strong>Subscribing from the client:</strong></p><pre>subscription WatchHotelAvailability {<br>  hotelAvailability(hotelId: &quot;SG90ZWxUeXBlOjEyMw==&quot;) {<br>    hotelId<br>    hotelName<br>    roomsAvailable<br>    updatedAt<br>  }<br>}</pre><h3>13. Advanced GraphQL Concepts</h3><h3>Query complexity limits</h3><p>Without this, an attacker can write a query like:</p><pre>{ countries { cities { hotels { images { ... } } } } }</pre><p>…nested 10 levels deep, across thousands of records, bringing your server down.</p><pre># settings.py<br>GRAPHENE = {<br>    &#39;SCHEMA&#39;: &#39;schema.schema&#39;,<br>    &#39;MIDDLEWARE&#39;: [<br>        &#39;graphene_django.debug.DjangoDebugMiddleware&#39;,  # Dev only — SQL query logger<br>    ],<br>    # Maximum allowed query depth (recommended: 5-7 for most apps)<br>    &#39;MAX_DEPTH&#39;: 6,<br>}</pre><h3>Disable introspection in production</h3><pre># schema.py<br>import graphene<br>from graphene_django.views import GraphQLView<br></pre><pre>class SecureGraphQLView(GraphQLView):<br>    def execute_graphql_request(self, request, data, query, *args, **kwargs):<br>        # Block introspection queries in production<br>        if not settings.DEBUG and query and &#39;__schema&#39; in query:<br>            from graphql import GraphQLError<br>            raise GraphQLError(&quot;Introspection is disabled in production.&quot;)<br>        return super().execute_graphql_request(request, data, query, *args, **kwargs)</pre><h3>Persisted queries</h3><p>Instead of sending the full query string on every request, clients send a hash:</p><pre>POST /graphql<br>{ &quot;id&quot;: &quot;sha256:abc123...&quot;, &quot;variables&quot;: { &quot;code&quot;: &quot;FR&quot; } }</pre><p>The server maps hashes to pre-approved queries. This:</p><ul><li>Reduces bandwidth (especially on mobile)</li><li>Prevents arbitrary query execution (even without introspection disabled)</li><li>Enables CDN caching of queries</li></ul><h3>Batching queries</h3><p>Apollo Client and Relay support batching multiple queries into one HTTP request:</p><pre>[<br>  { &quot;query&quot;: &quot;{ countries { edges { node { name } } } }&quot; },<br>  { &quot;query&quot;: &quot;{ hotel(id: \&quot;xxx\&quot;) { name } }&quot; }<br>]</pre><p>Your server handles them in parallel and returns an array of results. One HTTP round trip instead of two.</p><h3>14. Performance, Security, and Production Checklist</h3><h3>Database</h3><ul><li>[ ] Indexes on all FK fields and common filter fields (is_active, star_rating, code)</li><li>[ ] select_related() for forward FK lookups in resolvers</li><li>[ ] prefetch_related() for reverse FK lookups</li><li>[ ] DataLoaders for all repeated FK lookups in list resolvers</li><li>[ ] Query the django.db.connection.queries in development to catch N+1 problems</li></ul><h3>GraphQL layer</h3><ul><li>[ ] Disable introspection in production</li><li>[ ] Set maximum query depth (recommended: 6)</li><li>[ ] Set maximum query complexity score</li><li>[ ] Rate limit the /graphql/ endpoint (e.g., with django-ratelimit)</li><li>[ ] Log all slow queries (threshold: 500ms)</li><li>[ ] Use cursor-based pagination, never offset</li></ul><h3>Images</h3><ul><li>[ ] Store on S3 or equivalent — never the application server</li><li>[ ] Serve via CloudFront or CloudFlare CDN</li><li>[ ] Generate thumbnails at upload time (e.g., with django-imagekit)</li><li>[ ] Store width/height in DB to avoid loading images to get dimensions</li><li>[ ] Set correct Cache-Control headers on S3 objects</li></ul><h3>Authentication</h3><ul><li>[ ] JWT tokens with short expiry (15 minutes) + refresh tokens</li><li>[ ] HTTPS only — never GraphQL over plain HTTP</li><li>[ ] Validate field-level permissions in resolvers, not just at the query level</li><li>[ ] Sanitize all mutation inputs</li></ul><h3>15. Summary and Next Steps</h3><p>Here’s what we built:</p><p>A production-grade Django backend with:</p><ul><li>Four models (Country, City, Hotel, Image) with proper indexing, UUID PKs, and soft delete</li><li>A polymorphic generic image model that attaches to any entity</li><li>A complete GraphQL schema using graphene-django with Relay pagination</li><li>DataLoaders that eliminate N+1 queries — always 1–2 DB queries regardless of list size</li><li>JWT authentication protecting mutations</li><li>Filters on every list query</li><li>Security measures for production</li></ul><p><strong>The key insight about GraphQL:</strong> It’s not just a different way to write API calls. It’s a fundamentally different relationship between frontend and backend. Frontend developers stop depending on backend developers to create specific endpoints. The schema is the contract. Once the schema is defined, frontend and backend can work independently. That velocity improvement — especially in teams — is often where the real value of GraphQL shows up.</p><p><strong>Next steps to explore:</strong></p><ul><li><strong>Apollo Federation</strong> — if you have multiple Django services, Federation lets you build one unified GraphQL schema across them</li><li><strong>Strawberry</strong> — a newer, type-annotated GraphQL library for Python that’s more Pythonic than graphene-django</li><li><strong>Django Channels</strong> — full WebSocket support for production GraphQL subscriptions</li><li><strong>graphene-django-optimizer</strong> — automatic query optimization using query introspection</li><li><strong>Ariadne</strong> — a schema-first alternative (define your SDL first, then write resolvers)</li></ul><p>The code in this article is production-ready. Clone it, adapt the models, and ship.</p><p><em>If this was useful, follow me for more Django and Python deep-dives. Questions? Drop them in the comments — I read every one.</em></p><p><em>Tags: Django, GraphQL, Python, Graphene, REST API, Backend Development, Web Development, Software Engineering, API Design, Database Design</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e100df2b3893" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Journey to Something Meaningful]]></title>
            <link>https://medium.com/@shreyasghanekar35/the-journey-to-something-meaningful-0f4c0baed107?source=rss-c6dbec49e4e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/0f4c0baed107</guid>
            <dc:creator><![CDATA[Shreyash Ghanekar]]></dc:creator>
            <pubDate>Thu, 01 Jan 2026 17:58:36 GMT</pubDate>
            <atom:updated>2026-01-01T17:58:36.632Z</atom:updated>
            <content:encoded><![CDATA[<h3>2025: A Year of Growth, Grind &amp; Gratitude 🚀</h3><p>As the dust settles on 2025, I’ve found myself reflecting on a year that pushed me further than any before. It wasn’t a year of “easy wins” — it was a year of technical hurdles, professional pivots, and deeply personal growth.</p><p>Looking back, 2025 taught me one vital lesson: <strong>Growth isn’t linear.</strong> It’s a messy, beautiful combination of small victories and the resilience to keep going after a “no.”</p><h3>💻 The Professional Pivot: From Internships to Impact</h3><p>The year started with a hands-on dive into the real world. At <strong>Borgave Group</strong>, I worked on the backend of a Dairy ERP system. For the first time, it wasn’t just about writing code; it was about understanding product requirements and managing client expectations.</p><p>From there, the momentum built:</p><ul><li><strong>The Power of Choice:</strong> I was fortunate enough to crack SDE internship offers at Alemeno and Mesdo, as well as a Dubai-based Wix development role. However, I chose to decline these to stay focused on my ultimate goal: campus placements.</li><li><strong>Tech for Good:</strong> I took on a freelance project for an Ahmedabad-based hospital. We built an embedded chat platform and a pregnancy-support website. Integrating a <strong>Gen-AI assistant</strong> and an <strong>IVF tracking calendar</strong> reminded me why I love tech — it has the power to provide clarity and support to people during life’s most vulnerable moments.</li><li><strong>The Destination:</strong> After clearing rounds for EPAM Systems and Qualys, I am thrilled to share that I’ve accepted an SDE role at <strong>HashedIn by Deloitte</strong>. The alignment with my long-term goals made this the clear choice for my next chapter.</li></ul><h3>📉 Rejections: The Best Teachers</h3><p>It’s easy to list the offers, but the rejections were just as transformative. My interviews with <strong>Uptiq.ai</strong> (deep-diving into System Design) and <strong>ION</strong> (navigating complex case studies) forced me to rethink my approach.</p><p>These “failures” were actually blueprints. They pushed me to double down on engineering fundamentals, structured thinking, and technical depth. I learned that an interview isn’t just a test — it’s a mirror reflecting where you need to grow.</p><h3>🛠️ The Tech Stack Evolution</h3><p>This year was a massive “level up” for my toolkit. I moved beyond just building features to understanding the infrastructure that supports them.</p><ul><li><strong>Languages &amp; Frameworks:</strong> Mastered Golang, Node.js, and Java.</li><li><strong>Data &amp; DevOps:</strong> Worked extensively with PostgreSQL, Redis, and MongoDB, while gaining hands-on experience with <strong>Docker, Kubernetes, and AWS.</strong></li><li><strong>Creative Coding:</strong> Beyond the “standard” stack, I experimented with building <strong>npm packages</strong> and <strong>VS Code extensions</strong> — tools meant to make life easier for other developers.</li></ul><h3>🐾 Life Beyond the Screen</h3><p>If 2025 was all about code, I would have burned out by February. What kept me grounded were the moments away from the keyboard:</p><ul><li><strong>Adventures:</strong> Traveling with friends and family provided the much-needed perspective that life is larger than a terminal window.</li><li><strong>Compassion:</strong> I continued my work with stray dogs and cats, coordinating with NGOs for their treatment and recovery. There is no better way to de-stress than knowing you’ve helped a life that can’t thank you in words.</li><li><strong>Downtime:</strong> I finally binged <em>The Office</em>, <em>Ozark</em>, and <em>Jack Ryan</em>. Every developer needs a good show to escape into after a long day of debugging.</li></ul><h3>⏩ Looking Ahead to 2026</h3><p>I completed some resolutions and, honestly, I broke many others. But I’m not entering 2026 with a clean slate; I’m entering it with a <strong>foundation.</strong></p><p>2025 was about the grind. 2026 will be about building on that momentum, fixing the mistakes of the past, and staying grateful for every opportunity to learn.</p><p><strong>If you’ve read this far, thank you for being part of my journey. Here’s to a bigger, bolder, and more resilient year for all of us! ✨</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0f4c0baed107" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop Manually Creating Folders: How I Built a CLI to Generate Projects from Text]]></title>
            <link>https://medium.com/@shreyasghanekar35/stop-manually-creating-folders-how-i-built-a-cli-to-generate-projects-from-text-f62c60932b16?source=rss-c6dbec49e4e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/f62c60932b16</guid>
            <dc:creator><![CDATA[Shreyash Ghanekar]]></dc:creator>
            <pubDate>Fri, 19 Dec 2025 19:03:07 GMT</pubDate>
            <atom:updated>2025-12-19T19:03:07.938Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CZrg6LIJyfDRO5OqjswKEw.png" /></figure><h3>From Text to Trees: Reaching 1,500+ Downloads and a Major Update for Folder-Generator</h3><p>Building in public often starts with solving a personal “itch.” For me, that itch was the friction between planning a project’s architecture and actually creating the folders and files.</p><p>Today, I’m excited to share a small but meaningful milestone: <strong>folder-generator has officially crossed 1,500+ downloads on npm!</strong> 🚀</p><p>To celebrate, I’ve pushed a major update that makes the tool more flexible and resilient for real-world engineering workflows.</p><h3>The Problem: The Architecture Gap</h3><p>Project structure is the first thing a developer looks at, yet it is rarely documented well. We often sketch out structures in AI prompts, design docs, or READMEs, only to manually mkdir and touch our way through the setup.</p><p>My goal with these two CLIs — <strong>folder-generator</strong> and <strong>SketchIt</strong> — is to make project structures explicit, shareable, and fast to reason about.</p><h3>1. folder-generator: Scaffolding at the Speed of Thought</h3><p>NPM Package link — <a href="https://www.npmjs.com/package/folder-generator">folder-generator — npm</a></p><p>The core idea is simple: convert a text-based representation of a project into a real file system instantly. While it previously focused on the standard “tree” format (├──), the new update adds much-needed versatility.</p><h4>What’s New:</h4><ul><li><strong>Indented Path Support:</strong> You can now use simple indentation to define structures. This is particularly useful for copying and pasting from AI outputs or brainstorming notes.</li><li><strong>Special File Handling:</strong> Improved logic for handling files without extensions or specific naming conventions like Dockerfile, Makefile, and README.</li><li><strong>Reliable Parsing:</strong> Better handling of edge cases in complex, nested projects.</li></ul><h4>Example: Indented Path Format</h4><p>If you have a structure.txt file like this:</p><p>Plaintext</p><pre>backend/<br>  cmd/server/main.go<br>  internal/config/config.go<br>  Dockerfile<br>  go.mod</pre><pre>frontend/<br>  src/App.tsx<br>  vite.config.ts</pre><p>You can now generate that entire structure instantly:</p><p>Bash</p><pre>npx folder-generator --file structure.txt</pre><h3>2. SketchIt: The Reverse Workflow</h3><p>NPM Package link — <a href="https://www.npmjs.com/package/sketchit">sketchit — npm</a></p><p>While folder-generator builds, <strong>SketchIt</strong> documents. It scans your existing directory and generates a clean, tree-style visualization.</p><p><strong>It’s been a lifesaver for:</strong></p><ul><li>Updating README documentation.</li><li>Conducting architecture reviews.</li><li>Onboarding new developers to a complex codebase.</li><li>Taking “refactor snapshots” before moving files around.</li></ul><p><strong>Try it out:</strong></p><p>Bash</p><pre>npx sketchit</pre><h3>Closing Thoughts</h3><p>Building open-source tools is a constant learning process. Reaching 1,500 downloads reminds me that even “small” utilities can save fellow developers time and mental energy.</p><p>If you’re into building CLIs, internal tools, or general OSS utilities, I’d love to hear your thoughts. What’s the one part of your workflow you wish you could automate?</p><p><em>Feel free to check out the projects on npm and leave any feedback or feature ideas in the comments!</em></p><p>#OpenSource #WebDevelopment #NodeJS #DeveloperExperience #BuildInPublic</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f62c60932b16" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ My Interview Experience at Uptiq.ai — Online Assessment + 3 Rounds (On-Campus)]]></title>
            <link>https://medium.com/@shreyasghanekar35/my-interview-experience-at-uptiq-ai-online-assessment-3-rounds-on-campus-9167398fd8ce?source=rss-c6dbec49e4e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/9167398fd8ce</guid>
            <category><![CDATA[system-design-interview]]></category>
            <category><![CDATA[interview]]></category>
            <dc:creator><![CDATA[Shreyash Ghanekar]]></dc:creator>
            <pubDate>Thu, 04 Dec 2025 09:08:18 GMT</pubDate>
            <atom:updated>2025-12-04T09:08:18.091Z</atom:updated>
            <content:encoded><![CDATA[<h3>🎯 My Interview Experience at Uptiq.ai — Online Assessment + 3 Rounds (On-Campus)</h3><p>I recently appeared for an on-campus placement drive at <strong>Uptiq.ai</strong>, and I want to share my complete interview journey. This experience taught me a lot, boosted my confidence, and gave me clarity about how real industry interviews work.</p><h3>📍 Round 1 — Online Assessment</h3><p>The first step was an online assessment consisting of:</p><ul><li><strong>MCQs on core Computer Science subjects</strong><br> (OS, DBMS, CN, OOP, and basic SQL)</li><li><strong>2 DSA Coding Problems</strong></li><li>Difficulty: <strong>Medium to Hard</strong></li><li>Topics: <strong>Graph</strong> &amp; <strong>Dynamic Programming</strong></li></ul><p>There were <strong>~600 students</strong> who appeared for this round, and <strong>only ~100</strong> candidates were shortlisted.<br> I was glad to be one of them. 🚀</p><h3>📍 Round 2 — Technical Interview (Online in College)</h3><p>This round focused heavily on <strong>Data Structures &amp; Algorithms</strong>, <strong>puzzles</strong>, and <strong>core CS fundamentals</strong>.</p><h3>Topics Covered:</h3><ul><li>Arrays, Trees, DP concepts</li><li>Puzzles involving logic &amp; pattern reasoning</li><li>DBMS, OS, CN conceptual questions</li></ul><p>⏳ <strong>Duration:</strong> ~1 hour<br> I answered everything well and felt very confident leaving the room.</p><p>Out of the 100 students, <strong>only ~40 were shortlisted</strong>, and I was fortunate to be in those selected.</p><h3>📍 Round 3 — In-Office Technical + Resume Deep Dive</h3><p>This was the <strong>most intense interview</strong> I’ve ever experienced. It was entirely based on:</p><h3>🔹 My resume</h3><h3>🔹 Projects I worked on</h3><h3>🔹 System Design and Architecture</h3><p>They asked questions about:</p><ul><li>Every section of my resume</li><li>Real-world implementation details</li><li>Trade-offs, scalability, and optimizations</li><li>Logic behind decisions, not just final output</li></ul><p>Only <strong>12 students</strong> made it to the final round with the CTO, and I was one of them.</p><h3>📍 Round 4 — Final Round with CTO</h3><p>I was the <strong>11th candidate</strong> to face the CTO. Interestingly, the previous interviews lasted nearly <strong>1 hour each</strong>, but mine wrapped up in <strong>25–30 minutes</strong>.</p><h3>What was asked?</h3><ul><li>Draw a <strong>database ER diagram</strong> for one of my projects</li><li>Create a <strong>DB schema</strong> based on that ERD</li><li>Write <strong>React frontend code</strong> for a feature from my project</li></ul><p>I was able to write the solution, but after completing a part of the task, the interviewer said:</p><blockquote><strong><em>“This interview is over, you may leave.”</em></strong></blockquote><p>At that moment, I knew I probably didn’t make it.</p><h3>💡 Final Thoughts</h3><p>Even though I did not get selected, <strong>this was an amazing learning experience</strong>.<br> It was my <strong>first on-campus interview</strong>, and I learned more in these few rounds than in months of preparation.</p><h3>Key Takeaways</h3><ul><li>Resume depth matters more than buzzwords.</li><li>DSA is still essential.</li><li>System design is expected even for internship roles.</li><li>Confidence grows after every attempt.</li><li>Failure is just feedback.</li></ul><p>This interview gave me <strong>huge confidence</strong> for upcoming opportunities, and I’m excited for what’s next. ✨</p><h3>🙏 Thank You for Reading</h3><p>If you’re preparing for placements, keep practicing and stay consistent.<br> Every interview makes you better — whether you get selected or not. 💪</p><p>Feel free to reach out if you need guidance regarding <strong>DSA, system design, projects, or resume review</strong>.</p><p>Happy learning &amp; all the best! 🚀😄</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9167398fd8ce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Introducing GitKV — A Redis-like Key-Value Store built entirely on Git commit history ️ (wait…]]></title>
            <link>https://medium.com/@shreyasghanekar35/introducing-gitkv-a-redis-like-key-value-store-built-entirely-on-git-commit-history-%EF%B8%8F-wait-9d4eec42945a?source=rss-c6dbec49e4e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d4eec42945a</guid>
            <dc:creator><![CDATA[Shreyash Ghanekar]]></dc:creator>
            <pubDate>Thu, 04 Dec 2025 08:27:42 GMT</pubDate>
            <atom:updated>2025-12-04T08:27:42.982Z</atom:updated>
            <content:encoded><![CDATA[<h3>🚀 Introducing GitKV — A Redis-like Key-Value Store built entirely on Git commit history 🗄️ (wait there’s even more ….)</h3><h3>Over some time, I’ve been working on something exciting — GitKV, a real-time, event-sourced Key-Value database where Git commits are the actual storage engine.</h3><h3>Every SET, GET, DELETE, LIST, and MAP operation creates an immutable event commit, and the database state is reconstructed by replaying the commit log.</h3><h3>🔥 Key Capabilities:<br> 🔄 Time-travel rollback to any previous commit<br> 📡 Real-time monitoring via WebSockets<br> 📣 Pub/Sub messaging channels<br> 🌍 Remote replication using GitHub<br> 🖥 Interactive CLI shell with autocomplete<br> 💥 No traditional DB files — Git itself is the database</h3><h3>This makes GitKV a powerful playground for:<br> Event-Sourcing &amp; CQRS learning<br> Auditable / immutable state systems<br> Distributed and replicated system design<br> Debugging &amp; system replay techniques</h3><h3>🧠 What’s inside the CLI tool?<br> I built a Redis-like interactive REPL (kv-shell) with:<br> Autocomplete commands<br> Real-time live event streaming<br> Parallel monitor + command execution<br> Pub/Sub visualization</h3><h3>📸 Sharing screenshots shortly so you can experience the workflow visually</h3><h3>Just to clarify 😁 <br>This project was my way of learning event-sourcing, Git internals, replay- based state reconstruction, building a real-time WebSocket system, and designing a custom CLI with pub/sub.<br>It helped me understand how databases and distributed systems work under the hood, instead of treating them like black boxes.</h3><h3>If this sounds interesting — <br> 💬 GitHub repo link : <a href="https://github.com/ShreyashPG/gitkv">https://github.com/ShreyashPG/gitkv</a></h3><h3>Please contribute / test the project.<br> Would love feedback and collaboration from the community!<br><a href="https://www.linkedin.com/search/results/all/?keywords=%23opensource&amp;origin=HASH_TAG_FROM_FEED">#OpenSource</a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23redis&amp;origin=HASH_TAG_FROM_FEED">#Redis</a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23eventsourcing&amp;origin=HASH_TAG_FROM_FEED">#EventSourcing</a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23cqrs&amp;origin=HASH_TAG_FROM_FEED">#CQRS</a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23git&amp;origin=HASH_TAG_FROM_FEED">#Git</a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23distributedsystems&amp;origin=HASH_TAG_FROM_FEED">hashtag#DistributedSystems</a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23websockets&amp;origin=HASH_TAG_FROM_FEED">#WebSockets</a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23systemdesign&amp;origin=HASH_TAG_FROM_FEED">#SystemDesign</a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23nodejs&amp;origin=HASH_TAG_FROM_FEED">#NodeJS</a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23fullstackdevelopment&amp;origin=HASH_TAG_FROM_FEED">#FullStackDevelopment</a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23opensourceproject&amp;origin=HASH_TAG_FROM_FEED">#opensourceproject</a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23cli&amp;origin=HASH_TAG_FROM_FEED">#cli</a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23database&amp;origin=HASH_TAG_FROM_FEED">#database</a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23devcommunity&amp;origin=HASH_TAG_FROM_FEED">#devcommunity</a></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cQANXE5Lp3V3847WZ_TInA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IIv-scemh8ur6AVpNBHFOQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q5FeUSG0tBx-TzfP6yA-JQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*66qELvRhf84IQsC3ndUlzg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lut8s_TwH1IiSzR5JEsKDg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YFMXOw3cuVLaNumxVnIQwQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EKUNt2s_VMtbY7anxNFP-Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*61MoHTTjtx293gFHBflj_A.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d4eec42945a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ HashedIn by Deloitte Internship + Full-Time Offer Journey]]></title>
            <link>https://medium.com/@shreyasghanekar35/my-hashedin-by-deloitte-internship-full-time-offer-journey-5d7544a86738?source=rss-c6dbec49e4e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d7544a86738</guid>
            <dc:creator><![CDATA[Shreyash Ghanekar]]></dc:creator>
            <pubDate>Sat, 18 Oct 2025 07:12:54 GMT</pubDate>
            <atom:updated>2025-10-18T07:13:51.882Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZYfWwcLno9QFmcXufOImWA.jpeg" /></figure><h3>✨ Introduction</h3><p>I’m thrilled to share one of the most memorable milestones of my academic journey — I’ve received an <strong>Internship + Full-Time Offer from HashedIn by Deloitte!</strong> 🚀</p><p>Through my college’s on-campus placement drive, I had the incredible opportunity to interview with HashedIn by Deloitte. Out of all the participants, <strong>9 students were selected</strong>, and I feel deeply grateful to be <strong>one of the 3</strong> who received the <strong>Intern + FTE offer</strong>.</p><p>This journey was intense, insightful, and full of learning — and in this article, I’ll walk you through every round of the process and what I learned along the way.</p><h3>🧩 Selection Process Overview</h3><p>The complete selection process consisted of <strong>four rounds</strong>, each designed to test both technical depth and personality fit.</p><h3>🧠 Round 1: Online Assessment (OA)</h3><p>The first round was an <strong>Online Assessment</strong> that focused purely on <strong>Data Structures and Algorithms (DSA)</strong>.</p><ul><li>It included <strong>3 coding questions</strong> — all based on <strong>arrays and strings</strong>.</li><li><strong>Two questions</strong> were easy, and <strong>one</strong> was of medium difficulty.</li><li>I managed to solve all three successfully within the given time.</li></ul><p>This performance helped me move to the next stage — the technical interviews.</p><h3>💻 Round 2: Technical Interview 1</h3><p>This round tested my <strong>fundamental understanding</strong> of core computer science concepts.</p><p>It started with a brief <strong>introduction</strong> about myself and my projects, followed by:</p><ul><li><strong>2 easy DSA questions</strong> (pen-paper based).</li><li>Questions from <strong>OOPs, OS, and Computer Networks</strong>.</li><li>Discussions around <strong>Docker</strong> and <strong>AWS basics</strong>.</li></ul><p>Some of the specific topics asked included:</p><ul><li>Encapsulation and abstraction in OOP</li><li>TCP vs UDP</li><li>CPU Scheduling Algorithms (Round Robin, SJF)</li><li>Sorting algorithms (Bubble, Insertion, Selection)</li></ul><p>⏱ <strong>Duration:</strong> ~30 minutes</p><p>This round was friendly and conversational. The interviewer mainly tested my clarity of thought and ability to explain concepts in simple terms.</p><h3>⚙️ Round 3: Technical Interview 2</h3><p>This was the <strong>most challenging and in-depth</strong> round of the process.</p><p>The interviewer carefully went through my <strong>resume line by line</strong> — underlining almost every word and asking me to elaborate or demonstrate it practically.</p><p>Here’s what was covered:</p><ol><li>Writing a <strong>login and signup controller</strong>.</li><li>Designing the <strong>database schema</strong> for one of my projects.</li><li>Drawing and explaining the <strong>architecture diagram</strong> of a project.</li><li>In-depth questions on <strong>AWS</strong>, <strong>CI/CD pipelines</strong>, <strong>frontend and backend integration</strong>, and my <strong>open-source contributions</strong>.</li></ol><p>Though I was a bit nervous and struggled with a few explanations, I managed to stay composed and answered most questions confidently.</p><p>⏱ <strong>Duration:</strong> ~1 hour</p><p>This round truly tested not only my technical ability but also how well I understood <strong>my own work</strong> and could explain it clearly.</p><h3>🤝 Round 4: Fitment (HR) Round</h3><p>The final round was less about testing and more about <strong>understanding who I am</strong> as a person.</p><p>It felt more like a <strong>friendly discussion</strong> than a formal interview. Topics included:</p><ul><li>My family background and journey in tech</li><li>My views on pursuing higher studies (like MS)</li><li>3–4 behavioral questions</li><li>Some light technical questions about <strong>Git</strong> and <strong>CI/CD</strong></li><li>Feedback on the entire interview process</li></ul><p>I also asked the interviewer questions about the <strong>company culture</strong>, <strong>growth opportunities</strong>, and <strong>policies</strong>, which made it a two-way, engaging conversation.</p><p>⏱ <strong>Duration:</strong> ~40 minutes</p><h3>🎯 Final Outcome</h3><p>After a long and rewarding day, I received the news that I was <strong>selected for the Intern + Full-Time role</strong> at <strong>HashedIn by Deloitte</strong>! 🎉</p><p>It was a surreal moment — all the preparation, late-night coding sessions, and project work had finally paid off.</p><p>This entire experience was more than just a placement — it was a journey of <strong>self-reflection, learning, and growth</strong>.</p><h3>💡 Key Takeaways</h3><ol><li><strong>Strengthen your fundamentals:</strong> Master OOPs, OS, CN, and DBMS concepts.</li><li><strong>Focus on DSA patterns:</strong> Arrays and strings are favorites in most coding rounds.</li><li><strong>Know your resume thoroughly:</strong> If you’ve mentioned something, be ready to explain it.</li><li><strong>Stay calm and confident:</strong> Honesty and composure go a long way in interviews.</li></ol><h3>💙 Looking Ahead</h3><p>I’m truly excited to start my journey with <strong>HashedIn by Deloitte</strong>, work with brilliant minds, and continue learning every single day.</p><p>To all students preparing for placements — believe in your preparation, trust your process, and don’t be afraid to make mistakes. Every interview, whether successful or not, teaches you something valuable.</p><p><strong>#HashedInByDeloitte #PlacementJourney #InternToFTE #SoftwareEngineering #CampusPlacements #FullStackDevelopment #AWS #DSA #CareerGrowth #Gratitude</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d7544a86738" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Owe AWS ₹1,936.42 for a Student Project — A Costly Lesson in Cloud FinOps]]></title>
            <link>https://medium.com/@shreyasghanekar35/i-owe-aws-1-936-42-for-a-student-project-a-costly-lesson-in-cloud-finops-ef7af8079ef6?source=rss-c6dbec49e4e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/ef7af8079ef6</guid>
            <dc:creator><![CDATA[Shreyash Ghanekar]]></dc:creator>
            <pubDate>Sat, 04 Oct 2025 14:38:49 GMT</pubDate>
            <atom:updated>2025-10-04T14:39:32.027Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*8XFlMbCbqdTm4nVPH3Pexw.jpeg" /></figure><h3>I Owe AWS ₹1,936.42 for a Student Project — A Costly Lesson in Cloud FinOps</h3><p><em>Don’t make the same mistake I did. Here’s a practical guide to understanding AWS costs, choosing the right services, and avoiding devastating surprise bills.</em></p><p>The email notification was innocuous, a standard <strong>“AWS Bill Update”</strong> subject line I’d grown accustomed to ignoring. I was in the middle of submitting a take-home assignment for a company, feeling pretty proud of myself.</p><p>I had containerized my Flask backend, pushed it to Amazon Elastic Container Registry (ECR), and deployed it using Elastic Container Service (ECS). It felt professional. It felt like “real” engineering.</p><p>Then I opened the bill.</p><p>💸 ₹<strong>1,936.42. For 20 days of usage.</strong></p><p>My heart sank. For a project that maybe got 50 API calls in total, this was nonsensical. It was a gut punch. A costly, painful, and frankly embarrassing reminder of what happens when a developer’s enthusiasm to build outpaces their financial diligence.</p><p>I made the classic cloud mistake: <strong>deploy first, think about cost later.</strong></p><p>This article is my story, and my guide, so you don’t have to learn this lesson the hard way.</p><h3>The Anatomy of a Bill Shock: How Did This Happen?</h3><p>On paper, my project was simple: a Python Flask backend. But in trying to make it “production-like,” I unknowingly built a money sink.</p><p>Here’s where the costs came from:</p><ul><li><strong>Running Tasks 24/7</strong> — My ECS container was always on. Unlike AWS Lambda, which sleeps when unused, this meant continuous billing.</li><li><strong>NAT Gateway</strong> — The hidden villain. I placed my container in a private subnet, so AWS provisioned a NAT Gateway for outbound internet access. NATs charge per hour <strong>and</strong> per GB of data processed.</li><li><strong>Load Balancer (ALB)</strong> — I added one for “best practice” even though my app had almost no traffic. That’s an hourly and per-request charge.</li><li><strong>Data Transfer Costs</strong> — Every byte leaving AWS racks up costs, especially to the public internet.</li></ul><p>In short: I architected like a Fortune 500 startup and paid like one, too.</p><h3>Your AWS Financial Safety Net: The Non-Negotiables</h3><p>You wouldn’t drive without a speedometer or a fuel gauge. Don’t use the cloud without <strong>financial guardrails</strong>. Set these up <em>before</em> you deploy.</p><h3>1. Master the AWS Free Tier</h3><p>The Free Tier isn’t a free-for-all — it has strict limits.</p><ul><li><strong>Always Free:</strong> Services like Lambda with specific request limits.</li><li><strong>12 Months Free:</strong> e.g., 750 hours/month of a t2.micro instance (that’s one instance running continuously, not unlimited instances).</li><li><strong>Trials:</strong> Time-limited offers.</li></ul><p>Read the fine print. Always.</p><h3>2. Set Up AWS Budgets &amp; Billing Alarms</h3><p>The single best thing you can do.</p><ul><li>Go to <strong>Billing → Budgets</strong>.</li><li>Create a <strong>Cost Budget</strong> with a low cap (start at $10/month).</li><li>Add <strong>alerts at 50% and 100%</strong> of your budget (actual + forecasted).</li><li>Send alerts to email/SNS.</li></ul><p>This turns a ₹1,900 disaster into a ₹5 email warning.</p><h3>3. Use AWS Cost Explorer</h3><p>Check it every few days. It breaks down spend by service, region, and tags. This is how you answer: <strong>“What’s draining my wallet?”</strong></p><h3>Right Tool, Right Price: Architecting for Cost</h3><p>Here’s the cheat sheet I wish I had:</p><ul><li><strong>For Hobby Projects / Assignments:</strong></li><li><strong>Lightsail</strong> → VPS with predictable, fixed monthly cost. Starts at $3.50.</li><li><strong>Serverless (Lambda + API Gateway)</strong> → Pay only per request. Perfect for low-traffic APIs. Often $0.00 for small projects.</li><li><strong>Elastic Beanstalk</strong> → A simplified PaaS with Free Tier configurations. Great for small apps without surprises.</li><li><strong>For Production-Grade Apps:</strong></li><li><strong>ECS/EKS</strong> → Use only when you <em>need</em> container orchestration, high availability, and microservices. For student projects, it’s overkill.</li></ul><h3>Fore-Costing: The 10-Minute Habit</h3><p>Before you spin up anything, spend <strong>10 minutes</strong> with the AWS Pricing Calculator.</p><p>It forces you to model:</p><ul><li>EC2 instance types</li><li>Data transfer</li><li>Load balancers</li><li>Storage</li></ul><p>Seeing a cost estimate upfront keeps you honest. It’s a guardrail that could save you <strong>hundreds or thousands</strong> later.</p><h3>Conclusion: Code and Cost Are Two Sides of the Same Coin</h3><p>My ₹1,936.42 bill was eventually waived by AWS Support (after some very humble emails), but the scar remains.</p><p>The cloud is powerful — but not free. It demands <strong>FinOps discipline</strong>: financial accountability in engineering decisions.</p><p>Don’t let fear of cost stifle your creativity. Instead, build <strong>financial awareness into your workflow</strong>:</p><ul><li>Know the Free Tier.</li><li>Set budgets &amp; alarms.</li><li>Check Cost Explorer.</li><li>Choose the right tool for the right job.</li><li>Always, always estimate before you deploy.</li></ul><p>Do that, and your creativity will flourish — without draining your bank account.</p><p>💡 <strong>Remember: Every line of code you deploy has a cost. Write responsibly.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef7af8079ef6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ EPAM Off-Campus Drive Interview Experience ]]></title>
            <link>https://medium.com/@shreyasghanekar35/epam-off-campus-drive-interview-experience-39a85042c3b6?source=rss-c6dbec49e4e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/39a85042c3b6</guid>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[epam]]></category>
            <category><![CDATA[interview-experience]]></category>
            <category><![CDATA[placement]]></category>
            <category><![CDATA[internships]]></category>
            <dc:creator><![CDATA[Shreyash Ghanekar]]></dc:creator>
            <pubDate>Tue, 30 Sep 2025 08:19:01 GMT</pubDate>
            <atom:updated>2025-09-30T08:19:01.172Z</atom:updated>
            <content:encoded><![CDATA[<p>I recently participated in the <strong>EPAM Systems Off-Campus Employee Referral Drive</strong>, and I’d like to share my interview journey in detail. Hopefully, this helps future aspirants preparing for similar drives!</p><h3>🔹 1. Resume Screening</h3><p>The first step was <strong>resume shortlisting</strong>. Profiles matching the role requirements were selected, and I was fortunate to move ahead.</p><h3>🔹 2. Online Assessment</h3><p>This round tested both <strong>core computer science fundamentals</strong> and problem-solving skills.</p><ul><li><strong>Core CS MCQs</strong> (covering DBMS, OS, Networking, OOPs)</li><li><strong>DSA Coding Questions</strong></li></ul><p>I was able to clear this round successfully.</p><h3>🔹 3. Technical Interview (45–50 mins)</h3><p>The interviewer started by introducing himself, his work at EPAM, and making me feel comfortable before diving into technical questions.</p><h3>Topics Covered:</h3><ol><li><strong>Introduction &amp; Internship Experiences</strong></li><li><strong>C++ &amp; Pointers</strong> — A deep dive with multiple follow-ups</li><li><strong>Coding Questions</strong>:</li></ol><ul><li>Fibonacci (using <strong>iterative + recursion</strong> approaches)</li><li>Preorder Traversal (using <strong>recursion</strong> approach)</li><li>Factorial (using <strong>iterative + recursion + memoization</strong> approaches)</li></ul><p>4.<strong> Concepts Discussion</strong> — Detailed conversation on recursion, memoization, and their real-world applications</p><p>5.<strong> Project Discussion (FastChat)</strong> — My contributions, secure chat exchange, Redis implementation, and protocols used</p><p>6.<strong> Networking</strong> — Difference between HTTP &amp; HTTPS, and what makes HTTPS secure</p><p>📌 <strong>Feedback</strong>: The interviewer mentioned I should work on having a deeper knowledge of pointers, as I fumbled a bit there. However, he was satisfied with my answers for the rest of the discussion.</p><h3>🔹 4. HR Interview (30–35 mins)</h3><p>This was a <strong>behavioral round</strong> where the focus was on personality, decision-making, and leadership qualities.</p><p><strong>Questions included:</strong></p><ul><li>Leadership experiences</li><li>Risks taken in life</li><li>Situational/problem-solving scenarios</li></ul><p>I also asked a few questions about EPAM, the role, and the work culture. The interviewer closed on a positive note, and a couple of days later, I received the <strong>confirmation email for my selection</strong>.</p><h3>✨ Takeaways</h3><ol><li>Strong grip on <strong>pointers, recursion, and DSA</strong> is extremely helpful.</li><li>Be thorough with your <strong>projects and their underlying implementation</strong>.</li><li><strong>Behavioral questions</strong> test how you think and respond in real-world scenarios.</li></ol><p>#EPAM #EPAMSYSTEMS #EPAMINDIA #EPAMGLOBAL #INTERVIEWEXPERIENCE #INTERNSHIP #PLACEMENT #INFORMATIONTECHNOLOGY #OFFCAMPUS</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39a85042c3b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Instantly Generate Project Folder Structures from Text Diagrams with This CLI Tool]]></title>
            <link>https://medium.com/@shreyasghanekar35/instantly-generate-project-folder-structures-from-text-diagrams-with-this-cli-tool-11417d521c8f?source=rss-c6dbec49e4e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/11417d521c8f</guid>
            <dc:creator><![CDATA[Shreyash Ghanekar]]></dc:creator>
            <pubDate>Tue, 15 Jul 2025 05:51:52 GMT</pubDate>
            <atom:updated>2025-07-15T05:51:52.372Z</atom:updated>
            <content:encoded><![CDATA[<h3>🚀 Instantly Generate Project Folder Structures from Text Diagrams with This CLI Tool</h3><p>If you’ve ever started a new project only to spend the first 10 minutes manually creating folders and boilerplate files — you’re not alone.</p><p>In today’s fast-paced development cycles, we often rely on AI tools, templates, or boilerplate generators. But what if you could go from a simple tree-style text diagram straight to a full folder structure with one command?</p><p>Introducing <strong>Folder Structure Generator CLI</strong> — a developer-friendly command-line tool that converts text-based folder trees into actual directories and files on your machine, instantly.</p><h3>🛠 Why I Built This</h3><p>As a full-stack developer, I constantly found myself generating folder structures from README diagrams, AI-generated suggestions, or internal docs. Manually creating nested directories is time-consuming, error-prone, and — let’s be honest — just plain boring.</p><p>That’s why I built this tool.</p><h3>⚡ What It Does</h3><p><strong>Folder Structure Generator CLI</strong> reads a simple tree-like structure (like the ones in documentation or markdown files) and automatically generates the entire file/folder layout on your system.</p><h3>✨ Key Features:</h3><ul><li>🪄 One-liner to generate complex directory trees</li><li>📄 Supports input via CLI string, file, or even stdin</li><li>📂 Custom output directory support</li><li>🔗 Cross-platform: works on Windows, macOS, and Linux</li><li>🧼 Zero bloat: minimal dependencies, fast execution</li></ul><h3>🚀 Quick Start</h3><h3>1. Install the CLI Tool</h3><p>Install it globally to use anywhere:</p><pre>npm install -g folder-generator</pre><p>Or run it instantly with npx:</p><pre>npx folder-generator --file structure.txt</pre><h3>🔧 How To Use</h3><h3>Option 1: From Direct Input</h3><pre>foldgen --input &quot;src/<br>├── App.js<br>├── index.js<br>└── components/<br>    ├── Button.js<br>    └── Header.js</pre><h3>Option 2: From a File</h3><pre>foldgen --file structure.txt</pre><p>Your structure.txt might look like this:</p><pre>project/<br>├── README.md<br>├── src/<br>│   ├── index.js<br>│   └── utils/<br>│       └── helpers.js<br>└── tests/<br>    └── index.test.js</pre><h3>Option 3: From STDIN (Piping)</h3><pre>echo &quot;config/<br>├── default.json<br>└── production.json&quot; | foldgen</pre><h3>Output to Custom Directory</h3><pre>foldgen --file structure.txt --output ./my-project</pre><h3>📦 Real-World Use Cases</h3><h3>🧱 React Boilerplate</h3><pre>src/<br>├── App.jsx<br>├── index.js<br>├── components/<br>│   ├── Button/<br>│   │   ├── index.jsx<br>│   │   └── styles.module.css<br>│   └── Header.jsx<br>├── pages/<br>│   └── Home.jsx<br>└── utils/<br>    └── api.js</pre><h3>🌐 Node.js API Skeleton</h3><pre>app/<br>├── config/<br>│   └── database.js<br>├── controllers/<br>│   └── userController.js<br>├── models/<br>│   └── User.js<br>├── routes/<br>│   └── api.js<br>├── app.js<br>└── package.json</pre><h3>💻 Programmatic API (for Tooling Nerds)</h3><p>You can even integrate this into your Node.js tools:</p><pre>const { parseStructure, createFiles } = require(&#39;folder-structure-generator&#39;);</pre><pre>const structure = parseStructure(`src/index.js`);<br>createFiles(structure, &#39;./output&#39;);</pre><h3>🤝 Contribute and Collaborate</h3><p>This tool is open source under the MIT License. Contributions, suggestions, and stars are all welcome!</p><p>GitHub: <a href="https://github.com/shreyashghanekar/folder-structure-generator">https://github.com/shreyashghanekar/folder-generator</a></p><h3>🔚 Final Thoughts</h3><p>We spend so much time automating large things in software. But it’s the small, repetitive tasks — like setting up folders — that interrupt our flow.</p><p><strong>Folder Structure Generator CLI</strong> removes that friction and lets you go from <em>idea</em> → <em>structured codebase</em> in seconds.</p><p>If you ever find yourself copying and pasting a folder diagram into a README and wishing it “just worked” — now it does.</p><p>📦 <strong>Install today</strong>:</p><pre>npm install -g folder-generator</pre><p>🛠 <strong>Run instantly</strong>:</p><pre>npx folder-generator --file structure.txt</pre><p>🧠 <strong>Think in trees. Build in seconds.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11417d521c8f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>