How agencyenterprise/nano-creatures-sdk works
Project type and purpose
• This is an open-source TypeScript SDK (“@nano-creatures/sdk”) designed to let client applications programmatically interact with the Nano Creatures REST API.
• It exposes methods for authentication (signUp/signIn), creatures management (CRUD), memory sources, and chat.
File structure
• Top level:
• index.ts – SDK entry point, re-exports public API
• types.ts – shared TypeScript interfaces and types
• package.json, tsconfig.json – build and packaging configuration
• dist/ – compiled JS + declaration files for distribution
• No “frontend” or “backend” code here; it’s purely a client library that wraps HTTP calls to an external service.
README for additional insights
• The README outlines every public method, parameters, and expected responses.
• It calls out a default baseUrl, optional apiKey, error handling patterns, and the requirement to attach memory sources before chat.
Elements
• Clear labels: “Client Application,” “NanoCreaturesSDK,” sub-modules (AuthService, CreatureService, etc.), “Nano Creatures REST API,” “Data Store”
• App → SDK methods
• SDK → HTTP Client → API
• API → HTTP Client → SDK → App
• Orange for External API
• Configuration module feeding into each service (baseUrl, apiKey)
• Which TypeScript types flow in/out of each service (e.g., CreateCreatureParams → Creature)
• Apply consistent coloring and legends to distinguish:
• Client code vs. SDK internals vs. external API