Article title: I Used AI to Make a Two-Thousand-Year Map of Chinese History
Body:
Matrix Homepage Recommendation
Matrix is the writing community of Shaoshupai. We advocate sharing real product experiences, practical lessons, and reflections. From time to time, we select the best articles from Matrix to showcase the most authentic experiences and viewpoints from users.
The article represents the author's personal views; Shaoshupai has only made minor edits to the title and formatting.
When I woke up early on the morning of October 21 and casually scrolled through GitHub, I discovered that "Jiangshan Timeline," which had only a few dozen stars just days earlier, had gained over a hundred overnight. Over the following days, that number climbed all the way to 1,400.

Even now it still feels a bit unreal, so I figured I'd write something to record why I wanted to build a site like this.
Illustrations in History Textbooks
I'm a science-track student, but I've loved history since I was a kid, and I love looking at maps too. Back in school, I often scored the highest in the class on history and geography exams, and for a while I really wanted to choose the humanities track. Unfortunately, I was truly terrible at politics—my head would ache the moment I saw an essay question—so I reluctantly went the science route and later, naturally, became a programmer. But the love for humanities and geography in my heart never changed.
The thing I loved leafing through most in school was the maps in my middle and high school history textbooks. Looking at the map of the Tang Dynasty's territory, I'd imagine the golden ages of Zhenguan and Kaiyuan; turning to the Song Dynasty, I'd quietly sigh over the loss of the Sixteen Prefectures of Yan and Yun; seeing the Great Ming restore the realm, then flipping to the "Begonia Leaf" of the Qing at its peak, I'd always get excited for ages. I often placed maps from different dynasties side by side to compare their changes, then matched them against today's cities to find locations, and every time I'd discover something new. Later, as I studied more classical Chinese and poetry, whenever I came across place names in poems and prose, I'd make a habit of finding where they are today on a map.
Back then I thought: if only there were a map like this, one that could fit all the dynastic changes of Chinese history into it, where a drag could show the changes—that would be so cool.
After starting work, I also read a lot of history books. The ones that left the deepest impression were Bohai Xiaoli's Elegy of the Two Jins and North and South United. Every time I read about the Sixteen Kingdoms of the Five Barbarians and saw that muddled mess of regime changes, I'd always want to piece together a map in my head, but I could never get it clear.
From an Abandoned Game to the First Block-Color Map
This idea stayed in my heart for many years, but I never thought of building it myself. It wasn't until Vibe Coding gradually became popular that I first felt I might actually be able to bring the picture in my head to life.
In July this year I tried making a prototype. What I wanted to make at the time was a small historical geography game, but halfway through I realized that what I really wanted to see wasn't the game but the map itself; plus the prototype's effect was only so-so, so I set it aside.
By October, model capabilities had reached another level, so I picked the project back up, and this time I'd make a pure map. At the very beginning there was just one simple prompt:
Help me make a map of Chinese history with a draggable timeline.
It didn't take AI long to deliver the first version: no mountains or rivers, just a few rough blocks of color, dynasties divided very coarsely, boundaries all straight lines and jagged edges. But when I dragged the timeline at the bottom and watched those few blocks grow and shrink with the years, I was still amazed.
Competing with Myself, and with History
From that day on, this project became a bit unstoppable. Over two and a half weeks, I committed code more than two hundred times, most of it written late at night and on weekends.
Once the horizontal axis of time was done, I started thinking: could I also start from each city and walk the vertical axis of geography? So I added "Tap a Place to Trace Its Origins"—tap any city, and you can see what names it has had over more than two thousand years and what major events happened there. With the horizontal and vertical axes both in place, heaven and earth were both covered—so could people, the protagonists of history, naturally walk onto this map too? So I added "Tap a Person to Trace Their Deeds," drawing the life journeys of figures like Zhang Qian, Xuanzang, and Su Shi onto the map.

Later I had a flash of inspiration and gave it an AI Skill, so that anyone could command this map in natural language. Casually ask "my horse halts where the snows crowd Blue Pass," and it will locate the year Han Yu was demoted to Chaozhou and halted his horse at Blue Pass, marking Blue Pass on the map; ask "ask of your life's achievements—Huangzhou, Huizhou, Danzhou," and it will string together and draw for you the route of Su Dongpo's repeated exiles.

The more detailed the map became, the more things there were to fuss over. Together with AI, I scoured various open-source datasets online, then checked against the Zizhi Tongjian and the official histories of each dynasty to correct errors bit by bit. Once, when I zoomed in on the map, I discovered that the Liao capital, Shangjing, had actually been drawn outside Liao territory, so I had to go back and fill in the northern Liao territory and the Shangjing Circuit bit by bit. Another time, the Mongol Empire, which stretched across Eurasia, inexplicably had a hole near Lop Nur, and it took me ages of checking to patch it.
After I finished fixing the section on the Sixteen Kingdoms of the Five Barbarians, I pulled out Elegy of the Two Jins and reread it against my own map. The Former Qin, Later Qin, and Western Qin that I could never keep straight before—this time I finally sorted them out.
From Hitting Walls Everywhere to Being Seen
Once the map had taken shape, I first posted it in my colleagues' group chat and on my WeChat Moments. Quite a few history-loving friends offered suggestions, and some colleagues were inspired to make derivative versions—some made historical maps of their hometowns, others used the map to memorize Tang poetry. When I first put it on GitHub, hardly anyone looked at it, and I even shamelessly posted on my WeChat Moments asking friends to help click star.
To get more people to see it, I added an English version and posted it to LinkedIn and Reddit. On LinkedIn there was no ripple at all; on Reddit the response was quite good. A Chinese netizen overseas left a comment saying he used this map to teach his child Chinese history, and the child loved it.
But back on Chinese platforms, almost every attempt hit a wall: my own posts on Xiaohongshu and Zhihu were throttled; I submitted the project with a try-it-and-see attitude to several well-known Chinese GitHub recommendation communities, and nothing happened.
It wasn't until the "Knowledge Sharing Officer" on X reposted my site that "Jiangshan Timeline" truly entered the public eye for the first time, gaining over a thousand stars within days. The funny thing is, my own Xiaohongshu posts were throttled, but after it took off, quite a few people reposted my map on Xiaohongshu and WeChat public accounts, and they actually got a lot of traffic.
Scrolling through the comments on X, I saw someone say "finally I don't have to search what this place is called now while reading history," someone worrying "with granularity this fine, whoever did the data cleaning behind this must have lost a lot of hair," and one comment I stared at for a long time:
The moment you drag the timeline, dynasties are no longer nouns in a textbook, but the mountains and rivers beneath your feet that you can travel back and forth through. A good tool gives memory coordinates.
As more people paid attention, the project also welcomed its first batch of external contributors: someone helped me optimize rendering performance, someone added GeoJSON export to make secondary development easier, someone turned it into an app that can be installed on a phone's home screen, a friend in Taiwan helped me add a Traditional Chinese version, and I also received many encouraging private messages. One GitHub reply was just one sentence:
My son has been utterly captivated by this site for days.
During these days of making this map, I've reviewed those dynasties over and over many times, often sitting until midnight. I'm that captivated kid too.
Who says science guys don't understand romance? Fitting more than two thousand years of mountains and rivers, cities, and the paths walked by ancients into a single map, and seeing so many people share the same passion as me—isn't that a kind of happiness?
I hope this map can accompany more people on a journey through the vast landscapes hidden in old paper stacks.
- Try it online: https://deanchen.me/jiangshan-map/
- Open-source address: https://github.com/DeanChensj/jiangshan-map
Download the Shaoshupai client, follow the Shaoshupai official account, and discover more new gadgets 🆒
Great deals and useful hardware products—all at the Shaoshupai sspai official store 🛒