How genshindev/api works
genshin.dev is a static-data API for Genshin Impact, not a game client. A caller requests entity types, entity lists, localized entity details, or image listings/images; Koa routes the request to filesystem-backed services, which read JSON or image assets and return the result. The principal runtime layers and the documented data and image capabilities are shown. The route and storage calls are evidenced by excerpts; asset behavior is also described in the README. Image assets are documented but not present in the supplied tree.
Main entry points: filesystem.ts Filesystem services · src/index.ts Koa server · routes/index.ts Endpoint routing · data Entity JSON
Components 8
API runtime
- Koa server
src/index.ts - Endpoint routing
src/routes/index.ts
Static content
- Entity JSON
assets/data - Entity images
assets/images
Data access
- Filesystem services
src/modules/filesystem.ts - Asset paths
src/config.ts - In-memory cache
src/modules/filesystem.ts
Other components
- API caller
Connections 7
- API caller → Koa server: requests endpoints
README.md - Koa server → Endpoint routing: registers routes
src/index.ts - Endpoint routing → Filesystem services: calls data services
src/routes/index.ts - Filesystem services → Asset paths: uses asset paths
src/modules/filesystem.ts - Filesystem services → In-memory cache: reads and writes
src/modules/filesystem.ts - Filesystem services → Entity JSON: reads JSON
src/modules/filesystem.ts - Filesystem services → Entity images: reads and converts
src/modules/filesystem.ts