<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Programming on Prateek Sharma</title>
		<link>https://prateeksharma.me/categories/programming/</link>
		<description>Recent content in Programming on Prateek Sharma</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<lastBuildDate>Tue, 01 Sep 2026 00:00:00 +0000</lastBuildDate>
		
			<atom:link href="https://prateeksharma.me/categories/programming/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>The Go Programming Language</title>
				<link>https://prateeksharma.me/books/the-go-programming-language/</link>
				<pubDate>Tue, 01 Sep 2026 00:00:00 +0000</pubDate>
				<guid>https://prateeksharma.me/books/the-go-programming-language/</guid>
				<description>&lt;p&gt;TODO: Add review / notes once read.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Give callers two error types, one extending the other</title>
				<link>https://prateeksharma.me/opinions/two-exceptions-not-one/</link>
				<pubDate>Fri, 28 Aug 2026 00:00:00 +0000</pubDate>
				<guid>https://prateeksharma.me/opinions/two-exceptions-not-one/</guid>
				<description>&lt;p&gt;In the &lt;a href=&#34;https://prateeksharma.me/projects/wazirx-connector-java/&#34;&gt;WazirX Java connector&lt;/a&gt;&#xA; I split errors&#xA;into two:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;WazirxClientException&lt;/code&gt; — the caller made a mistake the caller can fix: a bad&#xA;&lt;code&gt;side&lt;/code&gt; value, a missing required field. Thrown before a request is even sent.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;WazirxApiException&lt;/code&gt; — something went wrong once the request left the process:&#xA;a network failure, a non-2xx response.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;code&gt;WazirxClientException extends WazirxApiException&lt;/code&gt;. That one line is the whole&#xA;design. A caller who only cares &amp;ldquo;did this work?&amp;rdquo; catches the parent. A caller who&#xA;wants to retry network failures but fail fast on their own bad input catches both&#xA;separately. Nobody is forced into a giant &lt;code&gt;catch (Exception e)&lt;/code&gt; that swallows&#xA;bugs, and nobody has to &lt;code&gt;try/catch&lt;/code&gt; five specific types at every call site.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Two-sided membership needs one lock, not two</title>
				<link>https://prateeksharma.me/blog/atomic-membership-in-a-concurrent-go-library/</link>
				<pubDate>Thu, 27 Aug 2026 00:00:00 +0000</pubDate>
				<guid>https://prateeksharma.me/blog/atomic-membership-in-a-concurrent-go-library/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://prateeksharma.me/projects/goroomlib/&#34;&gt;Goroomlib&lt;/a&gt;&#xA; models a relationship that points both ways: a&#xA;&lt;code&gt;Room&lt;/code&gt; holds a map of its users, and each &lt;code&gt;User&lt;/code&gt; holds a list of the rooms it&amp;rsquo;s&#xA;in. That redundancy is deliberate — both lookups need to be O(1) — but it&amp;rsquo;s also&#xA;the whole bug surface.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-first-version&#34;&gt;The first version&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;AddUserToRoom&lt;/code&gt; did the obvious thing:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#e6edf3;background-color:#0d1117;-moz-tab-size:2;-o-tab-size:2;tab-size:2;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ff7b72&#34;&gt;func&lt;/span&gt;&lt;span style=&#34;color:#6e7681&#34;&gt; &lt;/span&gt;(s&lt;span style=&#34;color:#6e7681&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#ff7b72;font-weight:bold&#34;&gt;*&lt;/span&gt;RoomService)&lt;span style=&#34;color:#6e7681&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#d2a8ff;font-weight:bold&#34;&gt;AddUserToRoom&lt;/span&gt;(roomName&lt;span style=&#34;color:#6e7681&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#ff7b72&#34;&gt;string&lt;/span&gt;,&lt;span style=&#34;color:#6e7681&#34;&gt; &lt;/span&gt;user&lt;span style=&#34;color:#6e7681&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#ff7b72;font-weight:bold&#34;&gt;*&lt;/span&gt;User)&lt;span style=&#34;color:#6e7681&#34;&gt; &lt;/span&gt;{&lt;span style=&#34;color:#6e7681&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#6e7681&#34;&gt;    &lt;/span&gt;room&lt;span style=&#34;color:#6e7681&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#ff7b72;font-weight:bold&#34;&gt;:=&lt;/span&gt;&lt;span style=&#34;color:#6e7681&#34;&gt; &lt;/span&gt;s.rooms[roomName]&lt;span style=&#34;color:#6e7681&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#6e7681&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#6e7681&#34;&gt;    &lt;/span&gt;room.mu.&lt;span style=&#34;color:#d2a8ff;font-weight:bold&#34;&gt;Lock&lt;/span&gt;()&lt;span style=&#34;color:#6e7681&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#6e7681&#34;&gt;    &lt;/span&gt;room.users[user.ID]&lt;span style=&#34;color:#6e7681&#34;&gt; &lt;/span&gt;=&lt;span style=&#34;color:#6e7681&#34;&gt; &lt;/span&gt;user&lt;span style=&#34;color:#6e7681&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#6e7681&#34;&gt;    &lt;/span&gt;room.mu.&lt;span style=&#34;color:#d2a8ff;font-weight:bold&#34;&gt;Unlock&lt;/span&gt;()&lt;span style=&#34;color:#6e7681&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#6e7681&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#6e7681&#34;&gt;    &lt;/span&gt;user.mu.&lt;span style=&#34;color:#d2a8ff;font-weight:bold&#34;&gt;Lock&lt;/span&gt;()&lt;span style=&#34;color:#6e7681&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#6e7681&#34;&gt;    &lt;/span&gt;user.joinedRooms&lt;span style=&#34;color:#6e7681&#34;&gt; &lt;/span&gt;=&lt;span style=&#34;color:#6e7681&#34;&gt; &lt;/span&gt;append(user.joinedRooms,&lt;span style=&#34;color:#6e7681&#34;&gt; &lt;/span&gt;roomName)&lt;span style=&#34;color:#6e7681&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#6e7681&#34;&gt;    &lt;/span&gt;user.mu.&lt;span style=&#34;color:#d2a8ff;font-weight:bold&#34;&gt;Unlock&lt;/span&gt;()&lt;span style=&#34;color:#6e7681&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&lt;span style=&#34;color:#6e7681&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Each side is individually locked, so &lt;code&gt;go vet&lt;/code&gt; and the race detector on a simple&#xA;test are both happy. But there&amp;rsquo;s a window between the two critical sections where&#xA;the room says &amp;ldquo;user is here&amp;rdquo; and the user says &amp;ldquo;I&amp;rsquo;m not in that room.&amp;rdquo; Anything&#xA;that reads both — say, a disconnect handler that walks &lt;code&gt;user.joinedRooms&lt;/code&gt; to&#xA;remove the user from each — can run in that window and leak the membership.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Generic returns can be the right call for a library you maintain alone</title>
				<link>https://prateeksharma.me/opinions/generic-returns-for-a-solo-maintained-library/</link>
				<pubDate>Wed, 26 Aug 2026 00:00:00 +0000</pubDate>
				<guid>https://prateeksharma.me/opinions/generic-returns-for-a-solo-maintained-library/</guid>
				<description>&lt;p&gt;The standard advice for a client library is: give callers typed responses.&#xA;&lt;code&gt;client.Ticker(...) (*Ticker, error)&lt;/code&gt;, not &lt;code&gt;(any, error)&lt;/code&gt;. I went the other way&#xA;in my &lt;a href=&#34;https://prateeksharma.me/projects/wazirx-connector-go/&#34;&gt;WazirX Go connector&lt;/a&gt;&#xA; and I still think it&#xA;was right &lt;em&gt;for that library&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The upstream API&amp;rsquo;s response shapes move around — objects that become arrays,&#xA;fields that appear and vanish across endpoints. With ~25 endpoints and one&#xA;maintainer (me, in spare hours), typed structs would mean 25 things to keep in&#xA;sync with an API I don&amp;rsquo;t control and can&amp;rsquo;t see changes to until they ship. The&#xA;generic return pushed that cost to the call site, where the caller already knows&#xA;which two fields they want and can assert for them.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Endpoint maps over hand-rolled methods</title>
				<link>https://prateeksharma.me/blog/endpoint-maps-over-hand-rolled-methods/</link>
				<pubDate>Tue, 25 Aug 2026 00:00:00 +0000</pubDate>
				<guid>https://prateeksharma.me/blog/endpoint-maps-over-hand-rolled-methods/</guid>
				<description>&lt;p&gt;I&amp;rsquo;ve now written two client libraries for the same exchange API — one in&#xA;&lt;a href=&#34;https://prateeksharma.me/projects/wazirx-connector-go/&#34;&gt;Go&lt;/a&gt;&#xA;, one in&#xA;&lt;a href=&#34;https://prateeksharma.me/projects/wazirx-connector-java/&#34;&gt;Java&lt;/a&gt;&#xA; — and the thing I&amp;rsquo;d keep from both is&#xA;the same: don&amp;rsquo;t write a method per endpoint. Describe the endpoints as data and&#xA;dispatch through one function.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-shape-of-the-problem&#34;&gt;The shape of the problem&lt;/h2&gt;&#xA;&lt;p&gt;The API has roughly two dozen endpoints. They differ in four ways:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;HTTP verb (&lt;code&gt;GET&lt;/code&gt;, &lt;code&gt;POST&lt;/code&gt;, &lt;code&gt;DELETE&lt;/code&gt;)&lt;/li&gt;&#xA;&lt;li&gt;path&lt;/li&gt;&#xA;&lt;li&gt;whether the request must be signed&lt;/li&gt;&#xA;&lt;li&gt;the response body&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Everything else — building query params, adding a signature, choosing the verb&#xA;handler, parsing the response — is identical. Writing a hand-rolled method per&#xA;endpoint means writing that identical body 25 times, and then maintaining 25&#xA;copies of it when the signing scheme or the base URL handling changes.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Goroomlib</title>
				<link>https://prateeksharma.me/projects/goroomlib/</link>
				<pubDate>Sun, 23 Aug 2026 00:00:00 +0000</pubDate>
				<guid>https://prateeksharma.me/projects/goroomlib/</guid>
				<description>&lt;p&gt;Across the poker platforms I&amp;rsquo;ve worked on at Adda52 and Mind Sports League, one&#xA;shape kept showing up: users joining a table, leaving it, sending messages to&#xA;everyone at it, and the server keeping track of who&amp;rsquo;s where. Every time I touched&#xA;a new real-time feature, I ended up rewriting the same User and Room bookkeeping&#xA;from scratch. I wanted to pull that pattern out once, get it right, and stop&#xA;reimplementing it.&lt;/p&gt;</description>
			</item>
			<item>
				<title>WazirX Go Connector</title>
				<link>https://prateeksharma.me/projects/wazirx-connector-go/</link>
				<pubDate>Sun, 23 Aug 2026 00:00:00 +0000</pubDate>
				<guid>https://prateeksharma.me/projects/wazirx-connector-go/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://wazirx.com&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;WazirX&lt;/a&gt;&#xA; is one of India&amp;rsquo;s largest crypto exchanges, and&#xA;while its REST API is well documented, it doesn&amp;rsquo;t ship an official Go client. I&#xA;wanted to poke at their API for a side project and didn&amp;rsquo;t want to hand-roll&#xA;request signing and endpoint plumbing every time, so I built&#xA;&lt;a href=&#34;https://github.com/pratts/wazirx-connector-go&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;wazirx-connector-go&lt;/a&gt;&#xA; and&#xA;open-sourced it once it was in decent shape.&lt;/p&gt;&#xA;&lt;h2 id=&#34;avoiding-25-near-identical-methods&#34;&gt;Avoiding ~25 near-identical methods&lt;/h2&gt;&#xA;&lt;p&gt;The exchange exposes close to two dozen endpoints — tickers, order book depth,&#xA;order placement, withdrawals, sub-account transfers, and so on. Writing a&#xA;hand-rolled method for each one would have meant the same boilerplate repeated&#xA;two dozen times: build params, sign if needed, pick GET/POST/DELETE, hit the URL,&#xA;parse the response.&lt;/p&gt;</description>
			</item>
			<item>
				<title>WazirX Java Connector</title>
				<link>https://prateeksharma.me/projects/wazirx-connector-java/</link>
				<pubDate>Sun, 23 Aug 2026 00:00:00 +0000</pubDate>
				<guid>https://prateeksharma.me/projects/wazirx-connector-java/</guid>
				<description>&lt;p&gt;After building the &lt;a href=&#34;https://prateeksharma.me/projects/wazirx-connector-go/&#34;&gt;Go connector&lt;/a&gt;&#xA; for WazirX, I&#xA;wanted the same thing on the JVM — but WazirX doesn&amp;rsquo;t publish an official Java&#xA;client at all, REST or WebSocket. The REST half was a fairly direct port of what&#xA;I&amp;rsquo;d already learned building the Go client. The WebSocket half turned out to be&#xA;its own project.&lt;/p&gt;&#xA;&lt;h2 id=&#34;letting-callers-choose-their-failure-granularity&#34;&gt;Letting callers choose their failure granularity&lt;/h2&gt;&#xA;&lt;p&gt;For errors, I didn&amp;rsquo;t want every caller forced into one giant catch-all&#xA;exception, but I also didn&amp;rsquo;t want to force a &lt;code&gt;try/catch&lt;/code&gt; at every single call&#xA;site. I split errors into two, with one extending the other:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Audio Cloning</title>
				<link>https://prateeksharma.me/projects/audio-cloning/</link>
				<pubDate>Mon, 23 Jun 2025 00:00:00 +0000</pubDate>
				<guid>https://prateeksharma.me/projects/audio-cloning/</guid>
				<description>&lt;p&gt;This is an extension of the &lt;a href=&#34;https://prateeksharma.me/projects/video-translator/&#34;&gt;Video Translator&lt;/a&gt;&#xA; tool&#xA;that generates cloned audio for short subtitles, improving the quality of the&#xA;dubbed output. It uses &lt;a href=&#34;https://github.com/myshell-ai/OpenVoice&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenVoice&lt;/a&gt;&#xA; and&#xA;&lt;a href=&#34;https://github.com/myshell-ai/MeloTTS&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;MeloTTS&lt;/a&gt;&#xA; to clone the original speaker&amp;rsquo;s&#xA;voice.&lt;/p&gt;&#xA;&lt;h2 id=&#34;challenges&#34;&gt;Challenges&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Library compatibility.&lt;/strong&gt; The libraries weren&amp;rsquo;t functional on Python 3.12,&#xA;which I was using — they worked on 3.10. So the TTS stage couldn&amp;rsquo;t live in the&#xA;same script as the rest of the pipeline.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Short subtitles.&lt;/strong&gt; The libraries needed a longer sample to clone a voice&#xA;well, and very short lines (&lt;code&gt;hello&lt;/code&gt;, &lt;code&gt;hi&lt;/code&gt;, &lt;code&gt;bye&lt;/code&gt;) errored out.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;what-i-changed-in-the-fork&#34;&gt;What I changed in the fork&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;openvoice/se_extractor.py&lt;/code&gt; had a check that discarded audio segments shorter&#xA;than 1.5 seconds. Words like &lt;code&gt;hello&lt;/code&gt; fall under that. I relaxed the check to&#xA;allow segments down to ~0.5 seconds, and added a skip for lines too short to&#xA;process.&lt;/li&gt;&#xA;&lt;li&gt;Added &lt;code&gt;melo-tts&lt;/code&gt; to &lt;code&gt;requirements.txt&lt;/code&gt; (the docs mention it but don&amp;rsquo;t pin it).&lt;/li&gt;&#xA;&lt;li&gt;Added a driver script that points at a &lt;code&gt;video-translator&lt;/code&gt; output folder and&#xA;runs cloning across every generated audio file.&lt;/li&gt;&#xA;&lt;li&gt;Patched the library to run on CPU for Apple M1.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The fork is at &lt;a href=&#34;https://github.com/pratts/OpenVoice&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;github.com/pratts/OpenVoice&lt;/a&gt;&#xA;;&#xA;&lt;code&gt;test1.py&lt;/code&gt; runs the cloning over the translator&amp;rsquo;s output.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Video Translator</title>
				<link>https://prateeksharma.me/projects/video-translator/</link>
				<pubDate>Mon, 23 Jun 2025 00:00:00 +0000</pubDate>
				<guid>https://prateeksharma.me/projects/video-translator/</guid>
				<description>&lt;p&gt;I always wanted to watch Japanese anime and other foreign-language films in&#xA;English without living in the subtitles. During a break I decided to see how far&#xA;open-source models could get me, and built a script that:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Extracts the background audio from the video.&lt;/li&gt;&#xA;&lt;li&gt;Transcribes it to a subtitle file in the original language.&lt;/li&gt;&#xA;&lt;li&gt;Translates each subtitle to English.&lt;/li&gt;&#xA;&lt;li&gt;Converts the translated subtitles to audio.&lt;/li&gt;&#xA;&lt;li&gt;Merges the translated audio with the background track.&lt;/li&gt;&#xA;&lt;li&gt;Muxes the final audio back into the video.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;I wanted to lean on open-source tooling and minimize paid services:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Patched OpenVoice for short-clip cloning and CPU inference</title>
				<link>https://prateeksharma.me/open-source/openvoice-short-clip-patch/</link>
				<pubDate>Fri, 20 Jun 2025 00:00:00 +0000</pubDate>
				<guid>https://prateeksharma.me/open-source/openvoice-short-clip-patch/</guid>
				<description>&lt;p&gt;While building the &lt;a href=&#34;https://prateeksharma.me/projects/audio-cloning/&#34;&gt;Audio Cloning&lt;/a&gt;&#xA; stage of my&#xA;video-translator pipeline, I hit two blockers in &lt;a href=&#34;https://github.com/myshell-ai/OpenVoice&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;OpenVoice&lt;/a&gt;&#xA;:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;openvoice/se_extractor.py&lt;/code&gt; discarded audio segments shorter than 1.5 seconds,&#xA;which meant short subtitle lines (&lt;code&gt;hello&lt;/code&gt;, &lt;code&gt;hi&lt;/code&gt;, &lt;code&gt;bye&lt;/code&gt;) couldn&amp;rsquo;t be cloned at&#xA;all. I relaxed the threshold to ~0.5 seconds and added an explicit skip for&#xA;lines too short to process.&lt;/li&gt;&#xA;&lt;li&gt;The library assumed a CUDA GPU. I patched it to run on CPU so it worked on&#xA;Apple M1.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The changes live in my fork at&#xA;&lt;a href=&#34;https://github.com/pratts/OpenVoice&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;github.com/pratts/OpenVoice&lt;/a&gt;&#xA;. They were&#xA;scoped to my use case and haven&amp;rsquo;t been proposed upstream.&lt;/p&gt;</description>
			</item>
			<item>
				<title>TTS Study Assistant</title>
				<link>https://prateeksharma.me/projects/tts-study-assistant/</link>
				<pubDate>Mon, 15 Jan 2024 00:00:00 +0000</pubDate>
				<guid>https://prateeksharma.me/projects/tts-study-assistant/</guid>
				<description>&lt;p&gt;The TTS Study Assistant lets you select text on any webpage, save it as a note,&#xA;hear it read aloud, and summarize it with AI for review. It&amp;rsquo;s a Chrome extension&#xA;(Manifest V3), a Go/Fiber backend, and a React admin panel.&lt;/p&gt;&#xA;&lt;h2 id=&#34;architecture&#34;&gt;Architecture&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Backend (Go)&lt;/strong&gt; — Fiber for HTTP, PostgreSQL via GORM, JWT auth, OpenAI for&#xA;summarization, deployed on Railway in a Docker container.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Frontend (React + TypeScript)&lt;/strong&gt; — Vite build, React Query + Context for&#xA;state, deployed on Vercel.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Extension&lt;/strong&gt; — Manifest V3 service worker, Chrome Storage API for local state,&#xA;Chrome TTS API for playback, content scripts for text selection.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;decisions-worth-noting&#34;&gt;Decisions worth noting&lt;/h2&gt;&#xA;&lt;h3 id=&#34;source-based-token-lifetimes&#34;&gt;Source-based token lifetimes&lt;/h3&gt;&#xA;&lt;p&gt;Web sessions and extension sessions have very different UX expectations, so the&#xA;access-token lifetime depends on where the request comes from:&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
