(`・ω・´)v2 Rewrite Completion Report
Project Address: This time it’s https://web.cxl–package.top/
v1 was:
https://cxl–package.top/Status: It runs, and this time I know why it runs
Three months ago, I wrote the first article, which was about “I made a web-based Linux, basically just to show off.” In that article, I used the word “approximately” seven times: approximately.
This time, I’ve deleted “approximately”.
One: What was wrong with v1?
First, let’s mourn, bow, and then speak.
| v1 Crime | Specific Performance |
|---|---|
| 600+ npm Dependencies | Installing a calendar gives you the distant relatives of Angular |
| Fake File System | File manager creates a folder, refreshes, and it’s gone — the browser version of Schrödinger’s folder |
| 71 Application Components | Most are shells, icons are decorations, and clicking opens an empty room |
| All git Commits are “sync” | Three months later, looking back at history: what is this? Where did it come from? |
| First Load 1-3 Minutes | Tea literature, remember? |
The most deadly is the combination of the last two: bad code + unreadable history = don’t dare to change. The real problem with a pile of shit is never the smell, it’s not knowing which shovel will collapse when you dig.
So the decision for v2 was simple: not to fix, but to rewrite.
Two: What did v2 create?
Dependencies: 600 → 6
v1: 600+ dependencies, "This library seems useful"
v2: 6 runtime dependencies:
react / react-dom / zustand / clsx
tailwind-merge / lucide-react
That's it. Really, it's over.
Astro 5 for the shell + React 19 for interaction + Tailwind 4 for styling + zustand for state.
With just these four sets, the entire desktop system is supported. The previous 594 dependencies did not make the project stronger; they just madenode_modulesmore like a black hole.
File System: This time it’s for real
v1 was criticized the most for this point. v2 directly connected to the browser’s original storage:
- OPFS (Origin Private File System) as the main force
- Automatically downgrade to IndexedDB if the browser does not support it
- Close tabs, refresh, come back tomorrow — files are still there
Several seed files are pre-installed. Try opening the terminal:
ls /home/arch
cat /home/arch/readme.txt
The first line of the readme writes “All files exist locally in the browser.” It’s not lying, v2’s stuff doesn’t lie, and this is a virtue v1 can’t learn.
Terminal: 40+ commands, really usable
v1’s terminal was “type a command, display preset output.” v2’s terminal really executes on the virtual file system:
ls / cd / cat / cp / mv / rm / mkdir / touch
grep / find / head / tail / wc / tree / stat
echo / date / uname / hostname / neofetch
ps / top / free / df / du / uptime
pacman / curl / man / history / which ...
````neofetch` still displays the preset information (it can't read your CPU, browsers don't have that permission, wake up), but `ls` is really listing your files, `rm` is really deleting them — remember to find them back in `history` if you delete them, oh wait, `history` only remembers commands, not souls.
### Applications: 12 → 34, and without a shell
| Type | Application |
|------|------|
| **System** | Terminal, file manager, settings, task manager, system monitor, disk usage |
| **Efficiency** | Notepad, sticky notes, calendar, clock, calculator, Markdown preview, clipboard history |
| **Tools** | JSON tool, Base64, regular expression test, color tool, unit conversion, random tool |
| **Media** | NetEase Cloud Music, video player, gallery, camera, weather |
| **Games** | 2048, snake, Tetris, Minesweeper, Gomoku, typing test |
All 34 applications are integrated into the window system: they can be dragged, resized, minimized, and switch focus. **NetEase Cloud Music uses the Meting API, supports playlists / songs / search, and has automatic fallback for multiple gateways** — yes, a "Linux" in a web page can play music, and it's smoother than installing netease-cloud-music on a real Arch.
### Engineering: The backup you left for yourself
This time, I've learned my lesson:
- `scripts/create-app.mjs` scaffold, add a new application with one command
- 6 zustand stores, each handling its own: windows, OS, clipboard, notifications, media, package management
- All git commits are semantic, and after three months, you can understand the history
---
## Three: Deployment: Still free
This time, I changed my tactics:
- v1: Cloudflare Pages, build cache, sleep literature
- v2: **Cloudflare Workers static assets**, pure static hosting, configuration is just one wrangler.jsonc, point to the `dist` directory and you're done
GitHub Actions automatically builds and deploys, saying goodbye to the "pour a cup of tea" for the first load, now it's just "take a sip".
> **Server? It doesn't exist. I will never rent a server in this lifetime.**
---
## Four: FAQ (v2 version)
**Q: What's the biggest difference between v1 and v2?**
A: v1 is a "web page that looks like Arch," v2 is a "desktop system running on your browser's storage." One deceives the eyes, one deceives localStorage — no, OPFS.
**Q: Will the files really not be lost?**
A: OPFS is the browser's native persistent storage, and it will be there as long as you don't clear your browser data. But if you foolishly clear the site data, that's a natural disaster, no compensation.
**Q: Will it still take 3 minutes to load?**
A: No longer. It's hard for 6 dependent projects to be slow.
**Q: Can the terminal do `sudo rm -rf /`?**
A: You can try. After all, the files you delete are the seed files in your browser, and they're gone after deleting the readme, painful?
**Q: Why rewrite instead of refactoring?**
A: Because the premise of refactoring a pile of shit is that you remember why you wrote it in the first place. The commit history of v1 only has two words: sync.
**Q: Do you have GitHub?**
A: Yes, [PAleimiao/arch-web-v2](https://github.com/PAleimiao/arch-web-v2). This time, the commit history is for people to see, welcome to visit.
---
## Five: Acknowledgments
- **zustand**: Made me realize that state management doesn't need the wedding process of Redux
- **OPFS**: Gave the web a real file system, even though the name is as awkward as Ele.me's membership level
- **Cloudflare Workers**: Still free, still free-riding, never slept once
- **Riko (Lizi)**: 26% of the code, also cursed together to find public API interfaces
- **The shit mountain of v1**: Although it has been cremated, it taught me what not to do — that's all it can offer
---
## Six: Conclusion
The conclusion of v1 said it was a "cyber figure."
v2's positioning has changed: **A desktop environment running in the browser, where files can really be saved, and the terminal can really be used.**
It still can't replace the real Arch. You still can't update to a new world with `pacman -Syu` in it.
But when you create a new file, close a tab, and open it the next day to find it's still there —
> (`・ω・´)b This thing, it's alive.
**After all, showing off also needs persistence.**
---
*If you open the link and find the page is white — refresh first, the white screen rate of v2 is 0 times tested (sample size: me).*