<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Cole Godfrey</title>
    <description>The latest articles on DEV Community by Cole Godfrey (@colegodfrey).</description>
    <link>https://dev.to/colegodfrey</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4148214%2F1ef5b034-c0f2-4fff-ac21-dc41988121ea.jpg</url>
      <title>DEV Community: Cole Godfrey</title>
      <link>https://dev.to/colegodfrey</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/colegodfrey"/>
    <language>en</language>
    <item>
      <title>Clew: a URL shortener with SQLite click counts</title>
      <dc:creator>Cole Godfrey</dc:creator>
      <pubDate>Tue, 29 Sep 2026 00:59:23 +0000</pubDate>
      <link>https://dev.to/colegodfrey/clew-a-url-shortener-with-sqlite-click-counts-25an</link>
      <guid>https://dev.to/colegodfrey/clew-a-url-shortener-with-sqlite-click-counts-25an</guid>
      <description>&lt;p&gt;Clew is a small URL shortener with a JSON API. Send a destination to /api/links and it returns a short URL. Following that URL sends a 302 redirect and records the visit.&lt;/p&gt;

&lt;p&gt;For concurrent visits, each redirect starts a BEGIN IMMEDIATE transaction before updating the total and storing the click time. Clew keeps the total count and the newest 20 timestamps. A HEAD request checks the destination without adding a click.&lt;/p&gt;

&lt;p&gt;Create and stats requests need an API key; redirects are public. It runs as one app instance with a persistent SQLite file. The &lt;a href="https://github.com/Cole-Godfrey/Clew" rel="noopener noreferrer"&gt;repo&lt;/a&gt; has local setup and Docker instructions, and the &lt;a href="https://colegodfrey.pythonanywhere.com/docs" rel="noopener noreferrer"&gt;API docs&lt;/a&gt; are online.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>python</category>
      <category>fastapi</category>
      <category>sqlite</category>
    </item>
  </channel>
</rss>
