
課題
開発者が日常的に使うユーティリティツールが複数のWebサイトに散在しており、素早くアクセスしづらい。
アプローチ
3つのアプリから成るpnpm + Turborepoモノレポを構築:ビルド時にツールカタログを生成するNext.js 15フロントエンド、React + Vite管理ダッシュボード、PostgreSQL/Prisma・ブログ用MongoDB・Typesense検索・Googleログイン・レート制限・Sharp画像変換・Socket.IOコラボ機能を備えたExpress 5 API。
成果
コンバーター、フォーマッター、エンコーダー、計算機、画像・共有ユーティリティなど235種類のツールを提供。大半がブラウザ内で完結し、アカウント・お気に入り・履歴・利用分析に対応。
WebUtility の構成
技術アーキテクチャの説明は英語です。
A pnpm + Turborepo monorepo of three deployables. The tool catalogue is a build-time registry in the Next.js frontend and most tools run entirely in the browser; an Express 5 API handles accounts, Google sign-in, uploads, server-side image conversion, search and the blog, and a Socket.IO gateway powers the collaborative tools.
- tools in the registry
- 235
- apps in one monorepo
- 3
- Prisma models
- 13
- processing requests per IP
- 10/min
01 · Clients
client
Visitors
client
Admins
02 · Frontends
service
User frontend
Next.js · Zustand
generated tool registry, in-browser tools
service
Admin dashboard
React · Vite · Recharts
users, blog, analytics
03 · Backend
service
REST API
Express 5 · TypeScript
JWT, per-route rate limits, uploads
service
Realtime gateway
Socket.IO
whiteboard, ShareBro rooms
04 · Data
database
PostgreSQL
Prisma
users, favorites, history, analytics
database
MongoDB
Mongoose
blog posts & categories
database
Typesense
search index
object store
Object storage
OCI · local disk
uploads, blog media
05 · Third-party
third-party
Google OAuth
third-party
SMTP
Nodemailer
third-party
Rates APIs
currency & metal prices
12 connections
- Visitors→User frontendHTTPS
- Admins→Admin dashboardHTTPS
- User frontend→REST APIREST
- User frontend→Realtime gatewayWebSocket · async
- Admin dashboard→REST APIREST
- REST API→PostgreSQLSQL
- REST API→MongoDBblog CRUD
- REST API→Typesensequery
- REST API→Object storageput object
- REST API→Google OAuthverify sign-in
- REST API→SMTPadmin alerts · async
- REST API→Rates APIslive rates
Request flow · Converting an image on the server
- 1The tool page posts the file to /api/process/image/convert with the target format and quality.
- 2The processing router applies its rate limit (10 requests per minute per IP) and multer enforces size and type before the handler runs.
- 3Sharp re-encodes the image in-process and the converted file is returned to the browser.
- 4Lighter tools such as formatters, encoders and calculators never reach the API; they run client-side from the registry.
Design decisions
- Tools as a generated registry
- Each tool is a folder with config.json and tool.tsx; a build step generates the registry and search index, so adding a tool never touches routing.
- Stateless JWT
- Short-lived access and refresh tokens carry user id and role, so the auth middleware verifies without a database round trip.
- Store per data shape
- Relational user data lives in Postgres through Prisma; free-form blog documents live in MongoDB; search is a dedicated Typesense index.
- Pluggable storage
- Uploads go through a storage-provider interface, with OCI Object Storage and local disk implemented behind it.
Trade-offs & known limits
- Queue workers and the Redis cache are scaffolded but not implemented, so server-side processing runs synchronously in the request.
- Logout is client-side: there is no token blacklist, so revocation relies on short token lifetimes.