Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I Built a Pixiv Alternative in Go (and Taught It SEO)

说明与用途

使用 Go 和 React SPA 构建了一个插画社区平台,通过机器人预渲染、IndexNow、客户端图像处理和强大的身份验证提升了 SEO。

问题

Building an illustration community platform that is SEO‑friendly while maintaining a SPA architecture and secure upload/auth flows.

结果

The platform achieved SEO visibility for a SPA, reduced bandwidth costs via client‑side downsampling, and hardened security for uploads and authentication.

工作流

  • 1. Detect Googlebot UA and serve pre‑rendered HTML with title, meta, OG, JSON‑LD.
  • 2. On artwork publish, send IndexNow ping to Bing/Yandex.
  • 3. Generate sitemap.xml and robots.txt.
  • 4. Validate uploads via magic‑byte, reject absurd dimensions, downsample on client to ~800KB WebP before upload.
  • 5. Store uploads in Cloudinary, avoiding large server‑side files.
  • 6. Use bcrypt with dummy‑hash for timing attack protection.
  • 7. Issue JWT (HS256) with Redis‑backed revocation and password‑change epoch.
  • 8. Apply rate limiting, account lockout, generic error messages.
  • 9. Use Sqids for artwork URLs.
  • 10. Deploy and monitor SEO performance.

证据

I implemented bot pre-rendering: when the user-agent smells like Googlebot, the server returns fully rendered HTML with real <title>, meta/OG tags, and JSON-LD structured data per artwork — instead of an empty <div id="root">.

来源

Every artwork publish fires an IndexNow ping, so Bing/Yandex learn about new content in minutes instead of weeks.

来源

Magic-byte validation — never trust the extension or the Content-Type header.

来源

Client-side downsampling — a Canvas GPU pipeline shrinks 10–20 MB master illustrations to ~800 KB WebP before network transit.

来源

bcrypt with constant-time dummy-hash execution so username enumeration via timing attacks doesn't work.

来源

Artwork URLs use Sqids hash IDs (/artwork/v06sDC) instead of sequential integers.

来源

  • 记录日期: 2026-10-18T04:41:01.427Z