Rebuilding the portfolio from scratch把作品站重做了一遍
The old site was a browser DAW wearing a portfolio's clothes. This rebuild splits them: the tool is a tool, the works are the works.旧站是一个套着作品集外壳的浏览器 DAW。这次拆开:工具归工具,作品归作品。
The old site was 15,000 lines, of which roughly 11,000 were audio tooling — the DAW, the plugin rack, the lyrics close-reading tool. The portfolio was a single hero screen. It was not a works site; it was a tool with a landing page.
Pulling them apart surfaced three problems, none of them cosmetic.
1. The works were invisible to everyone else
Every music work lived in IndexedDB. Which is to say: they existed only in my
own browser. Anyone else opening /works saw an empty list.
That is the fundamental error. A portfolio is by definition the thing you show to other people. Local-first is right for a tool — a recording should not have to upload before it can be processed — but it is fatal for display. Audio now goes through a CDN and the metadata lives in git.
2. Development work had nowhere to go
I had always treated code and music as two separate things, so code works had no entry point in the old site at all. But that split is fake: in both cases I finish something and want to show it to someone. The only difference is presentation — a piece of audio wants a play button, a repository wants a link and a stack list, a film wants an embed.
So now there is one type:
export type Work = CodeWork | MusicWork | VideoWork;
and one WorkCard component that keeps the frame identical and swaps only the
media block. A beat and a repository sit in the same grid, at the same size,
filtered by the same control — because on this site they rank the same.
3. There was nowhere to write anything down
Wanting to write something meant creating a React component, writing JSX and editing a route. So I never wrote anything.
Now each entry is an .mdx file under content/notes/, with frontmatter
validated at build time; you write it and push and it is published. No
database, no admin login, no CMS to keep upgrading. The whole archive can be
grep-ed, git diff-ed and rolled back.
On deleting the tooling
The DAW is the most interesting thing I have written and deleting it stung. But it survives as a case study in the works list — the technical teardown, the algorithms and the repository link are all there, it just no longer ships a live page. The code is in git history; not a line is lost.
For a tool to survive it has to become its own product, rather than living as a parasite on someone else's home page.
旧站有 15,000 行代码,其中大约 11,000 行是音频工具——DAW、插件机架、歌词精读。 作品集只有一屏 hero。它不是一个作品网站,是一个自带首页的工具。
拆开的时候发现三个问题,而且都不是样式问题。
一、作品对别人不可见
音乐作品全部存在 IndexedDB 里。也就是说,它们只存在于我自己这台浏览器上。
别人打开 /works,看到的是一个空列表。
这是最根本的错。作品集的定义就是给别人看的东西。本地优先对工具是对的——录音 不该先上传再处理——但对展示是致命的。现在音频走 CDN,元数据进 git。
二、开发作品完全没有位置
我一直觉得代码和音乐是两回事,所以旧站里代码作品干脆没有入口。但这个划分是假的: 两边我都是做完一个东西然后想给人看。区别只在于呈现方式——一段音频要播放按钮, 一个仓库要链接和技术栈,一支片子要嵌播放器。
所以现在只有一个类型:
export type Work = CodeWork | MusicWork | VideoWork;
一个 WorkCard 组件,外框完全一致,只替换中间的媒体块。一首 beat 和一个仓库在
同一个栅格里、同样大小、被同一个筛选器过滤——因为在这个站上它们的地位是一样的。
三、没有地方记录东西
想写点什么的时候,得新建一个 React 组件、写 JSX、改路由。所以我从来没写过。
现在每篇是 content/notes/ 下的一个 .mdx 文件,frontmatter 在构建期校验,
写完 push 就发布了。没有数据库,没有后台登录,没有 CMS 要跟着升级。整个归档可以
grep,可以 git diff,可以回滚。
关于删掉那些工具
DAW 是我写过最有意思的东西,删它有点舍不得。但它现在以 case study 的形式留在 作品集里——技术拆解、算法、仓库链接都在,只是不再挂 一个实时可用的页面。代码在 git 历史里,一行都没丢。
一个工具想活下去,得自己成为一个产品,而不是寄生在别人的首页上。