- Information: This document is for both humans and AI to understand the project. If you need more details, make a AGENTS.md file. Welcome to your super-cool Hono + OpenAPI starter! 🚀✨
- Hono web framework
- OpenAPI documentation with hono-openapi
- Zod schema validation
- Scalar API docs UI
- Ready for Cloudflare Workers with Wrangler
# Install dependencies
pnpm install
# Run the development server
pnpm dev
# Format code
pnpm format
# Build the project
pnpm buildCheck out /docs. Generated docs are at /docs.
src/
index.ts # Main app entry, don't make it messy!
route.ts # API routes, make changes here
public/ # Static assets
Apache-2.0, see LICENSE for details.
To keep our code super neat and sparkly, please follow these rules:
-
JavaScript:
- Avoid. Use TypeScript instead!
- If you must, follow the same rules as TypeScript.
- Use JSDoc comments, especially for functions.
- Do not use common types like
Object,Any. Use specific types.
-
TypeScript:
- Name files and folders in
kebab-case. - Use
camelCasefor variables and functions,PascalCasefor classes and types. - Write JSDoc comments as much as possible. Especially, add comments
@firesand@listensfor event-related functions.
- Name files and folders in
-
Hono:
- MAKE a schema for each endpoint. Check out the route.ts file for examples. It is needed for generating OpenAPI docs.
- Use middleware for common tasks like authentication, logging, etc.
- Keep route handlers focused on a single task. We got the serverless power!
-
Commit Messages:
- Use Conventional Commits style. Check out conventionalcommits.org for details.
-
Review:
- PRs should be reviewed by at least one friend(AI friend is friend too) before merging!
Let’s keep everything tidy and readable so everyone can enjoy coding together~! (。•̀ᴗ-)✧