How canvas-tech-horizon/notelink works
Project type and purpose
• This is a Go library (open-source package) named “Notelink”.
• Purpose: simplify API documentation generation and serve an interactive HTML docs UI alongside a Fiber web server.
File structure
• api_note.go: core API manager, route registration, server start/stop logic.
• html.go: HTML template definitions and rendering logic for the interactive docs.
• schema.go: logic that inspects Go structs and emits TypeScript interface definitions.
• types.go: shared type definitions (Config, DocumentedRouteInput, Parameter, etc.).
• go.mod / go.sum: dependency management (Fiber, JWT, godotenv).
• README.md / LICENSE / .gitignore: project documentation and policy.
README for additional insights
• Integrates with Fiber v2 for HTTP routing.
• Uses JWT for optional authentication middleware.
• Uses godotenv to load environment variables (JWT_SECRET).
• Exposes a /api-docs endpoint serving a client-side app that:
• Displays endpoints by version/path
• Renders parameter tables, schemas (TS interfaces)
• Supports in-browser testing of each endpoint
Detail
• Modules: Config, ApiNote Manager, Route Registry, JWT Middleware, SchemaGen, HTMLGen.
• Integration with Fiber and godotenv.
• Don’t omit the interactive testing path from the docs UI back to the real endpoints.