DEV Community

Cover image for I built firsttripchina.com — a China travel guide written by someone who lives here
1436941541
1436941541

Posted on

I built firsttripchina.com — a China travel guide written by someone who lives here

👋 Hey dev.to — I just shipped firsttripchina.com, a practical China travel guide written by someone who actually lives in China (me — Yunjie, a software engineer in Chengdu).

It's a content site for first-time foreign visitors, covering the friction points existing English-language China resources consistently get wrong: the 240-hour visa-free transit policy, how to register Alipay with a foreign card, the real-name attraction booking
system
, and structured city itineraries (4-day Beijing, 3-day Zhangjiajie, Beijing → Xi'an by
HSR
). No tour packages. No affiliate scams. Free to read, no signup.

## Why I built it

Every Western friend who's ever told me they were planning a China trip sent me the same five questions:

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

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.

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
existed.

## The tech stack (briefly)

Stack is React 19 + Vite + TypeScript on the frontend, Vercel Functions + Neon Postgres on the backend, deployed on Vercel.

The "obvious" content-site setup is content/posts/*.md 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 git diff a content edit), but for a solo project the speed of "open admin, edit, save"
beats the audit trail.

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 vite preview server, and writes the rendered HTML into dist/<path>/index.html. Vercel then serves the static HTML before falling back to the SPA. This took longer than expected to get running on Vercel's build
container (you need puppeteer-core + @sparticuz/chromium, not regular Puppeteer, because the container doesn't ship the shared libraries Chromium expects). Each route runs through a usePageSeo hook that imperatively injects per-route <title>, meta tags, canonical, and JSON-LD, so prerender captures complete SEO HTML for every page.

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.

## What's currently live

12 destination pages (Beijing, Shanghai, Suzhou, Hangzhou, Zhangjiajie, Chengdu, plus more) and 8+ deep-dive blog posts.

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


The site is at firsttripchina.com — browse the destinations or blog and take a look.

Top comments (0)