スバラシの技術資料
スバラシの設計および実装に関する技術的な話題に関する資料を公開しています。
設計
スバラシのオブジェクトモデル
スバラシのHTTP API
スバラシ開発メモ
実装
仕様の記述から他モデルオブジェクトを参照するモデルクラスとリポジトリを生成する
Entityクラスのドキュメントと型注釈からInteractorもRouterも生成する
OpenAPI DocumentをFastifyのスキーマに変換する
参考にした資料: The Fastify team "TypeScript | Fastify"
ReactのCustom Hookを用いたHTTP APIコールの隠蔽
採用技術・ライブラリ
package.json
アプリケーションサーバ
言語: TypeScript
HTTP: Fastify、@fastify/static、@fastify/cookie、@fastify/helmet、@fastify/etag
SMTP: nodemailer
データベースとの接続: node-postgres(pg)、Prisma
設計: OpenAPI
データベース: PostgreSQL
クライアント
言語: TypeScript
UI: React(react、react-dom)、React Router(react-router-dom)、react-transition-group
データ取得、状態管理: TanStack Query(@tanstack/react-query)
検索: Fuse.js
マルチスレッド処理: @mgn901/asyncify-events
CSSやUIデザインに関するもの: Tailwind CSS、@k-vyn/coloralgorithm、material-symbols、Inter font family
Scrapbox記法のサポート: @progfay/scrapbox-parser
ビルドツール
esbuild、esbuild-style-plugin
PostCSS、autoprefixer
tsx (TypeScript eXecute)
テストツール
Jest(@jest/globals、jest、esbuild-jest)
その他
ESLint(@typescript-eslint/eslint-plugin、@typescript-eslint/parser、eslint-config-airbnb、eslint-config-airbnb-typescript、eslint-config-prettier)、Prettier、husky、lint-staged
JSON Schema関連のnpmパッケージ
swagger-parser
openapi-types
js-yaml
json-schema-to-ts