Documentation
Comprehensive documentation is mandatory for all code contributions. Each function and endpoint must be documented with a clear description of its purpose, a detailed specification of its input parameters (including data types and any constraints), and a precise definition of its return values (including data types and any potential error conditions).
Code Documentation
- Comments: All code must be commented. Comments should be used to explain the purpose of the code, the logic behind it, and any assumptions or constraints.
- Function Documentation: Each function must be documented with a clear description of its purpose, a detailed specification of its input parameters (including data types and any constraints), and a precise definition of its return values (including data types and any potential error conditions).
- When documenting functions, we require using JSDoc syntax:
- Endpoint Documentation: Each endpoint must be documented with a clear description of its purpose, a detailed specification of its input parameters (including data types and any constraints), and a precise definition of its return values (including data types and any potential error conditions).
- When documenting endpoints, we require using JSDoc syntax:
API Documentation
- API documentation should be written in Markdown format.
- Each API endpoint must be documented with a clear description of its purpose, a detailed specification of its input parameters (including data types and any constraints), and a precise definition of its return values (including data types and any potential error conditions).
- API documentation should be versioned and stored in the
docsdirectory of the repository. - API documentation should be updated whenever a new endpoint is added, an existing endpoint is modified, or an endpoint is deprecated.
Fumadocs
We use Fumadocs for API documentation. Fumadocs is a simple, lightweight, and easy-to-use tool for documenting APIs. It allows you to write API documentation in Markdown format and generate a beautiful, interactive API documentation website.
