<?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>Forem: 1436941541</title>
    <description>The latest articles on Forem by 1436941541 (@1436941541).</description>
    <link>https://forem.com/1436941541</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3897268%2F013a6466-faef-4c95-be55-7f6ae3be77c4.jpg</url>
      <title>Forem: 1436941541</title>
      <link>https://forem.com/1436941541</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/1436941541"/>
    <language>en</language>
    <item>
      <title>I built firsttripchina.com — a China travel guide written by someone who lives here</title>
      <dc:creator>1436941541</dc:creator>
      <pubDate>Wed, 29 Apr 2026 13:55:25 +0000</pubDate>
      <link>https://forem.com/1436941541/i-built-firsttripchinacom-a-china-travel-guide-written-by-someone-who-lives-here-che</link>
      <guid>https://forem.com/1436941541/i-built-firsttripchinacom-a-china-travel-guide-written-by-someone-who-lives-here-che</guid>
      <description>&lt;p&gt;👋 Hey dev.to — I just shipped &lt;a href="https://firsttripchina.com" rel="noopener noreferrer"&gt;firsttripchina.com&lt;/a&gt;, a practical China travel guide written by someone who actually lives in China (me — Yunjie, a software engineer in Chengdu).&lt;/p&gt;

&lt;p&gt;It's a content site for first-time foreign visitors, covering the friction points existing English-language China resources consistently get wrong: the &lt;a href="https://firsttripchina.com/guide/visa" rel="noopener noreferrer"&gt;240-hour visa-free transit policy&lt;/a&gt;, how to &lt;a href="https://firsttripchina.com/guide/payment" rel="noopener noreferrer"&gt;register Alipay with a foreign card&lt;/a&gt;, the &lt;a href="https://firsttripchina.com/blog/booking-china-attraction-tickets-foreigner-guide" rel="noopener noreferrer"&gt;real-name attraction booking&lt;br&gt;
  system&lt;/a&gt;, and structured city itineraries (&lt;a href="https://firsttripchina.com/blog/perfect-4-day-beijing-itinerary" rel="noopener noreferrer"&gt;4-day Beijing&lt;/a&gt;, &lt;a href="https://firsttripchina.com/blog/perfect-3-day-zhangjiajie-itinerary" rel="noopener noreferrer"&gt;3-day Zhangjiajie&lt;/a&gt;, &lt;a href="https://firsttripchina.com/blog/beijing-to-xian-high-speed-rail" rel="noopener noreferrer"&gt;Beijing → Xi'an by&lt;br&gt;
  HSR&lt;/a&gt;). No tour packages. No affiliate scams. Free to read, no signup.&lt;/p&gt;

&lt;p&gt;## Why I built it&lt;/p&gt;

&lt;p&gt;Every Western friend who's ever told me they were planning a China trip sent me the same five questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Will my Visa card actually work?"&lt;/li&gt;
&lt;li&gt;"Do I need a VPN?"&lt;/li&gt;
&lt;li&gt;"Is the high-speed rail bookable in English?"&lt;/li&gt;
&lt;li&gt;"How do I book Forbidden City tickets?"&lt;/li&gt;
&lt;li&gt;"Do I need a tour, or can I do it solo?"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The English-language China travel internet is in a strange state. Lonely Planet's last meaningful update to its China chapter was years ago. TripAdvisor's China forum is full of well-intentioned travelers giving each other 2018 advice. The big content sites (Travel China Guide, China Highlights) are mostly OTA fronts pushing tour packages.&lt;/p&gt;

&lt;p&gt;None of them know that the 240-hour visa-free policy expanded in late 2024, that Alipay now accepts foreign cards but with a ¥200 single-transaction limit and 3% fee, or that buying a Forbidden City ticket requires a real-name passport-linked booking 7 days in advance. I write Markdown for fun, I have a Vercel account, so I built the version I wished&lt;br&gt;
  existed.&lt;/p&gt;

&lt;p&gt;## The tech stack (briefly)&lt;/p&gt;

&lt;p&gt;Stack is React 19 + Vite + TypeScript on the frontend, Vercel Functions + Neon Postgres on the backend, deployed on Vercel.&lt;/p&gt;

&lt;p&gt;The "obvious" content-site setup is &lt;code&gt;content/posts/*.md&lt;/code&gt; parsed at build time — Astro or Hugo would have been the textbook answer. I went with Postgres rows for content because I want to edit from a hosted admin UI, not commit-and-deploy. The tradeoff is real (you can't &lt;code&gt;git diff&lt;/code&gt; a content edit), but for a solo project the speed of "open admin, edit, save"&lt;br&gt;
  beats the audit trail.&lt;/p&gt;

&lt;p&gt;For SEO I prerender the SPA to static HTML at build time — Puppeteer pulls every published slug from Postgres, visits each URL on a local &lt;code&gt;vite preview&lt;/code&gt; server, and writes the rendered HTML into &lt;code&gt;dist/&amp;lt;path&amp;gt;/index.html&lt;/code&gt;. Vercel then serves the static HTML before falling back to the SPA. This took longer than expected to get running on Vercel's build&lt;br&gt;
  container (you need &lt;code&gt;puppeteer-core&lt;/code&gt; + &lt;code&gt;@sparticuz/chromium&lt;/code&gt;, not regular Puppeteer, because the container doesn't ship the shared libraries Chromium expects). Each route runs through a &lt;code&gt;usePageSeo&lt;/code&gt; hook that imperatively injects per-route &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt;, meta tags, canonical, and JSON-LD, so prerender captures complete SEO HTML for every page.&lt;/p&gt;

&lt;p&gt;The result: every page on the site lands in Google's index as static HTML — important, because Googlebot only executes JavaScript ~70% of the time on first crawl.&lt;/p&gt;

&lt;p&gt;## What's currently live&lt;/p&gt;

&lt;p&gt;12 destination pages (Beijing, Shanghai, Suzhou, Hangzhou, Zhangjiajie, Chengdu, plus more) and 8+ deep-dive blog posts.&lt;/p&gt;

&lt;p&gt;Coming soon: Xi'an, Guilin, Yunnan destinations; a China high-speed rail master guide; a DiDi (rideshare) walkthrough for foreign passport holders.&lt;/p&gt;




&lt;p&gt;The site is at &lt;a href="https://firsttripchina.com" rel="noopener noreferrer"&gt;firsttripchina.com&lt;/a&gt; — browse the &lt;a href="https://firsttripchina.com/destinations" rel="noopener noreferrer"&gt;destinations&lt;/a&gt; or &lt;a href="https://firsttripchina.com/blog" rel="noopener noreferrer"&gt;blog&lt;/a&gt; and take a look.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>showdev</category>
      <category>indiehackers</category>
    </item>
    <item>
      <title>I built a privacy-first PDF dark mode converter that runs entirely in your browser</title>
      <dc:creator>1436941541</dc:creator>
      <pubDate>Sat, 25 Apr 2026 08:58:01 +0000</pubDate>
      <link>https://forem.com/1436941541/i-built-a-privacy-first-pdf-dark-mode-converter-that-runs-entirely-in-your-browser-3ebl</link>
      <guid>https://forem.com/1436941541/i-built-a-privacy-first-pdf-dark-mode-converter-that-runs-entirely-in-your-browser-3ebl</guid>
      <description>&lt;p&gt;TL;DR: I shipped &lt;a href="https://pdfdark.org" rel="noopener noreferrer"&gt;pdfdark.org&lt;/a&gt; — a browser-side PDF dark mode converter. Files don't get&lt;/p&gt;

&lt;p&gt;uploaded; the entire conversion happens in your browser via PDF.js + a Web Worker. Open source (MIT), free, no signup.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I built this
&lt;/h2&gt;

&lt;p&gt;Reading long PDFs at night was killing my eyes. The two paths I had both sucked:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Existing "dark mode PDF" web tools → required uploading the file. For research papers, contracts, medical records&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;— that felt sketchy. No way to verify what they did with my data.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;OS-level "invert colors" → wrecked photos and charts. Faces became X-rays. Graphs became noise.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So I built one with two non-negotiable defaults:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Nothing leaves your browser. PDF.js parses the file, a Web Worker does the dark-mode pass, pdf-lib stitches the&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;result. Verify it yourself in DevTools → Network.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Images keep their original colors. A saturation classifier detects photos and figures and leaves them untouched&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;while it darkens text and UI.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;Drop PDF&lt;/p&gt;

&lt;p&gt;→ PDF.js renders pages to canvas&lt;/p&gt;

&lt;p&gt;→ Web Worker classifies each pixel by saturation&lt;/p&gt;

&lt;p&gt;├─ saturated pixels (images, charts) → preserved&lt;/p&gt;

&lt;p&gt;└─ low-saturation pixels (text, UI) → themed&lt;/p&gt;

&lt;p&gt;→ pdf-lib assembles a new PDF&lt;/p&gt;

&lt;p&gt;→ User downloads&lt;/p&gt;

&lt;p&gt;The classifier runs on OffscreenCanvas inside a Web Worker, so the UI thread never blocks on large PDFs.&lt;/p&gt;

&lt;p&gt;Output is a real PDF (image-based, one JPEG per page), so the dark mode persists when you email it, sync it to iPad, or&lt;/p&gt;

&lt;p&gt;open it on a Kindle. Not a viewer toggle.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it cost to ship
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Domain: $7.50 (Cloudflare Registrar, .org)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Hosting: $0 (Vercel free tier)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Email forwarding: $0 (Cloudflare Email Routing)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Error monitoring: $0 (Sentry free tier, errors only with full content masking)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Time: a few weekends&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Total cost: $7.50.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'm watching
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Whether the "no-upload" angle resonates beyond privacy nerds&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Edge cases that break the algorithm (weird embedded fonts, scanned PDFs)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Whether to add a vector-preserving mode for text-only PDFs (current output is image-based, so text isn't selectable)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Live: &lt;a href="https://pdfdark.org" rel="noopener noreferrer"&gt;pdfdark.org&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;GitHub: &lt;a href="https://github.com/1436941541/pdf-dark" rel="noopener noreferrer"&gt;github.com/1436941541/pdf-dark&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Privacy: &lt;a href="https://pdfdark.org/privacy" rel="noopener noreferrer"&gt;pdfdark.org/privacy&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>showdev</category>
      <category>javascript</category>
      <category>opensource</category>
      <category>privacy</category>
    </item>
  </channel>
</rss>
