Переглянути джерело

docs: rewrite the README for the liquid-glass site, with new screenshots

The README still described HeroUI, Framer Motion, Mapbox and a 2024
design. It now covers what the site is and does, the stack, the layout
of the code, setup on Node.js 24, the two optional environment
variables, and how to make the site your own. Fresh desktop, phone and
lens screenshots (light and dark) live in docs/screenshots, and
.env.local.example drops the unused Mapbox token and site URL for the
OpenAI key the emoji card needs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QEPoSHwHCYMNpm2iKxY9hL
Claude 1 місяць тому
батько
коміт
27189f9b36

+ 5 - 7
.env.local.example

@@ -1,8 +1,6 @@
-# Firebase
-NEXT_PUBLIC_FIREBASE_API_KEY=your_firebase_api_key_here
-
-# Mapbox
-NEXT_PUBLIC_MAPBOX_TOKEN=your_mapbox_token_here
+# The emoji card (/api/emoji) asks OpenAI to pick an emoji. Optional: without
+# it only that card shows an error.
+OPENAI_API_KEY=your_openai_api_key_here
 
-# Site URL (for sitemap)
-SITE_URL=https://ericwu.me
+# Firebase Storage: photos, the avatar and project images (firebase/firebase.ts).
+NEXT_PUBLIC_FIREBASE_API_KEY=your_firebase_api_key_here

+ 103 - 62
README.md

@@ -1,81 +1,122 @@
-# My Personal Website
-
-<a href="https://ericwu.me">ericwu.me</a>
-
-![image](https://github.com/user-attachments/assets/38e4b0b4-b942-4e46-9248-4423e820bba9)
-
-![Google Chrome 2024-07-12 22 33 34](https://github.com/user-attachments/assets/7949a952-580f-4577-ab7f-e7ccfc1dd57e)
-
-Built using Next.js 16 with React 19, HeroUI v2, and Tailwind CSS v4. The website features a blog powered by the Notion API, serving as the CMS. The design is inspired by Nev Flynn's Bento design, focusing on simplicity and user-friendly interfaces.
-
-## Features
-
-- **Next.js 16**: Utilizes the latest features of Next.js with Turbopack for fast rendering and efficient SEO optimization.
-- **React 19**: Latest React with improved performance and new features.
-- **HeroUI v2**: Modern React UI library (successor to NextUI).
-- **Tailwind CSS v4**: CSS-first configuration with improved performance.
-- **Notion API**: Integrates Notion as a headless CMS to manage and retrieve blog content dynamically.
-- **Responsive Bento Design**: Adopts the aesthetic and functional principles of Bento design, customized for a unique look and feel.
-
-## Getting Started
-
-### Prerequisites
-
-- Node.js (v20.x or later recommended)
-- npm or yarn
+# ericwu.me
+
+The personal site of Eric Wu, an SDE II at AWS building agentic systems and generative UI.
+Live at **[ericwu.me](https://ericwu.me)**.
+
+<picture>
+  <source media="(prefers-color-scheme: dark)" srcset="docs/screenshots/desktop-dark.webp">
+  <img alt="The ericwu.me home page: liquid-glass bento cards with the hero, FinOps Agent, Amazon Q artifacts, the Seattle sky, a globe and SecondSelf" src="docs/screenshots/desktop-light.webp">
+</picture>
+
+It's a bento grid of liquid-glass cards, built from scratch with Next.js 16, React 19 and Tailwind CSS v4.
+There's no UI kit: the cards, the glass material and the motion are all hand-made.
+
+## Highlights
+
+- **The glass period.** The period in "Hey, I'm Eric." is a bead of liquid glass. Pull it and it swells into a lens that magnifies the card and stretches with speed. Let go and it springs back into a period. Chromium bends light through an SVG displacement map, and Safari and iOS get a magnified copy of the card.
+- **A grid you can rearrange.** Drag a card onto another to swap them (on touch, press and hold first). The All, About and Work views reflow the grid with spring-driven FLIP animations.
+- **Cards that do something.**
+  - Seattle's sky right now, with the sun's real position and the moon's phase.
+  - A WebGL globe tracing Purdue → UCLA → Seattle.
+  - A toolbox sphere you can spin and a photo deck you can fling.
+  - iOS-style FinOps Agent notifications and Amazon Q artifacts you can click through.
+  - A 3D MINI that loads only when asked for.
+  - An emoji card that picks an emoji for how you feel.
+- **A blog on Notion.** Posts are written in Notion, rendered with react-notion-x, prerendered and refreshed hourly.
+- **⌘K everywhere.** A command palette with fuzzy search over views, projects, links and a few tricks.
+- **Light and dark.** The theme switches with a circular reveal. Safari switches instantly, because it paints view-transition snapshots without glass.
+- **Built to be fast.**
+  - Pages are prerendered and the CSS is inlined.
+  - The web fonts load after first paint, and Apple devices use SF Pro.
+  - The globe and three.js load only when they're needed.
+  - A tab left open picks up a new deploy when you come back to it.
+- **Mount Rainier behind it all.** The contour lines come from AWS Terrain Tiles (USGS 3DEP), generated by `scripts/gen-topo.py`.
+
+<p align="center">
+  <img alt="The home page on a phone, in light and dark mode" src="docs/screenshots/phones.webp" width="640">
+</p>
+
+<p align="center">
+  <img alt="The glass period pulled over the bio, magnifying the words beneath it, in light and dark mode" src="docs/screenshots/lens.webp" width="820">
+</p>
+
+## Tech stack
+
+| Part      | Built with                                                                                                                                                                                            |
+| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| Framework | [Next.js 16](https://nextjs.org) (App Router), [React 19](https://react.dev), [TypeScript](https://www.typescriptlang.org)                                                                            |
+| Styling   | [Tailwind CSS v4](https://tailwindcss.com), container queries, hand-built liquid glass                                                                                                                |
+| Type      | [Fraunces](https://fonts.google.com/specimen/Fraunces) for display, [Figtree](https://fonts.google.com/specimen/Figtree) for text (SF Pro on Apple devices)                                           |
+| Blog      | [Notion](https://www.notion.so) through [notion-client](https://github.com/NotionX/react-notion-x/tree/master/packages/notion-client) and [react-notion-x](https://github.com/NotionX/react-notion-x) |
+| Graphics  | [cobe](https://github.com/shuding/cobe) for the globe, [three.js](https://threejs.org) with [React Three Fiber](https://r3f.docs.pmnd.rs) and [drei](https://drei.docs.pmnd.rs) for the MINI          |
+| Data      | [Firebase Storage](https://firebase.google.com/docs/storage) for photos, [OpenAI](https://platform.openai.com) for the emoji card                                                                     |
+| Search    | [Fuse.js](https://www.fusejs.io)                                                                                                                                                                      |
+| Hosting   | [Vercel](https://vercel.com), with Vercel Analytics                                                                                                                                                   |
+
+## Project structure
+
+```text
+app/              Routes: home, /blog, /blog/[blogId], the emoji and version APIs, OG image, sitemap
+components/
+  bento/          The grid: layout per view, drag to swap, FLIP view changes
+  cards/          Every card on the home page
+  glass/          Liquid-glass material, refraction maps, the cursor lens
+  nav/            Floating nav and the ⌘K command palette
+  backdrop/       The Mount Rainier contour background
+  blog/           Blog list and Notion page renderer
+config/           Site metadata, links, projects and fonts
+lib/              Layouts, Notion and Firebase data, motion springs, theme transition
+scripts/          Generators for the contour background and the Rainier skyline
+public/           Static files: contour data, the MINI model, emoji
+```
 
-### Installation
+## Getting started
 
-1. Clone the repository:
+You need Node.js 24.
 
-   ```bash
-   git clone https://github.com/itsEricWu/ericwu.me.git
-   ```
+```bash
+git clone https://github.com/itsEricWu/ericwu.me.git
+cd ericwu.me
+npm install
+npm run dev
+```
 
-2. Install dependencies:
+Then open [localhost:3000](http://localhost:3000).
 
-   ```bash
-   npm install
-   ```
+### Environment variables
 
-3. Set up environment variables:
-   Create a `.env.local` file in the root directory and add the following variables:
-   ```plaintext
-   OPENAI_API_KEY=exampleAPIKey
-   NEXT_PUBLIC_MAPBOX_TOKEN=exampleAPIKey
-   NEXT_PUBLIC_FIREBASE_API_KEY=exampleAPIKey
-   SITE_URL=https://www.example.com
-   ```
+Copy `.env.local.example` to `.env.local`. Both variables are optional.
 
-### Running the project
+| Variable                       | What it's for                                                                                            |
+| ------------------------------ | -------------------------------------------------------------------------------------------------------- |
+| `OPENAI_API_KEY`               | The emoji card (`/api/emoji`). Without it, only that card shows an error.                                |
+| `NEXT_PUBLIC_FIREBASE_API_KEY` | The Firebase project that stores the photos, the avatar and the project images (`firebase/firebase.ts`). |
 
-```bash
-npm run dev
-```
+### Scripts
 
-Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
+| Command                                               | What it does                          |
+| ----------------------------------------------------- | ------------------------------------- |
+| `npm run dev`                                         | Dev server with Turbopack             |
+| `npm run build`, `npm start`                          | Production build and server           |
+| `npm run lint`, `npm run typecheck`, `npm run format` | ESLint, TypeScript, Prettier          |
+| `npm run topo`                                        | Regenerate the Mount Rainier contours |
 
-## Tech Stack
+## Make it yours
 
-- [Next.js 16](https://nextjs.org/docs/getting-started)
-- [React 19](https://react.dev/)
-- [HeroUI v2](https://heroui.com/)
-- [Tailwind CSS v4](https://tailwindcss.com/)
-- [TypeScript](https://www.typescriptlang.org/)
-- [Framer Motion](https://www.framer.com/motion/)
-- [Three.js](https://threejs.org/) with React Three Fiber
-- [Notion API](https://developers.notion.com/)
-- [Firebase](https://firebase.google.com/)
-- [Mapbox](https://www.mapbox.com/)
+- **Who you are:** edit your name, links and projects in `config/site.ts`, and the bio in `components/cards/hero.tsx`.
+- **Your blog:** point `notionBlogConfig.blogParentId` at your own public Notion page.
+- **Your images:** point `firebase/firebase.ts` at your own Firebase project and upload your photos and avatar (the paths are in `lib/data.ts`).
+- **Your cards:** cards live in `components/cards`. `app/page.tsx` lists them with their size at each breakpoint and the views they belong to.
 
 ## Deployment
 
-This website is ready to be deployed on platforms like Vercel, Netlify, or any other platform that supports Next.js.
+The site runs on Vercel, and every push to `main` deploys to [ericwu.me](https://ericwu.me).
+Any host that runs Next.js 16 on Node.js 24 works too.
 
-## Star History
+## Star history
 
 [![Star History Chart](https://api.star-history.com/svg?repos=itsEricWu/ericwu.me&type=Date)](https://star-history.com/#itsEricWu/ericwu.me&Date)
 
-## Contributing
+## License
 
-Contributions are welcome! For major changes, please open an issue first to discuss what you would like to change.
+[MIT](LICENSE)

BIN
docs/screenshots/desktop-dark.webp


BIN
docs/screenshots/desktop-light.webp


BIN
docs/screenshots/lens.webp


BIN
docs/screenshots/phones.webp