docs: add comprehensive API endpoint documentation#21
docs: add comprehensive API endpoint documentation#21jezweb wants to merge 1 commit intoifindev:mainfrom
Conversation
Add complete API reference documentation covering all REST endpoints and server actions. Contents: - REST API Endpoints (2 endpoints) - POST /api/summarize - Text summarization with Workers AI - /api/auth/[...all] - Better Auth endpoints - Server Actions (11 actions) - Authentication: signIn, signUp, signOut - Todos: getAllTodos, getTodoById, create, update, updateField, delete - Categories: getAllCategories, createCategory - Authentication Details - Better Auth configuration - OAuth providers (Google) - Utility functions - Data Models - Todo, Category, User, Session schemas - Validation rules and constraints - Error Handling - API error formats - Server action patterns - Security considerations Each endpoint/action includes: - Purpose and description - Request/response formats with TypeScript types - Authentication requirements - Error conditions and codes - Practical usage examples - Side effects (revalidation, redirects, R2 uploads) Total: 500+ lines of comprehensive API documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Warning Rate limit exceeded@jezweb has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 22 minutes and 11 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Overview
This PR adds complete API reference documentation that was previously missing from the project.
What's New
New File:
docs/API_ENDPOINTS.md(872 lines)A comprehensive API reference covering the entire application surface:
📡 REST API Endpoints (2)
POST /api/summarize
/api/auth/[...all]
⚡ Server Actions (11)
Authentication (3)
signIn()- Email/password authenticationsignUp()- User registrationsignOut()- Session terminationTodos (6)
getAllTodos()- Fetch user's todos with categoriesgetTodoById()- Fetch single todocreateTodoAction()- Create with optional R2 image uploadupdateTodoAction()- Full todo updateupdateTodoFieldAction()- Partial update (optimized)deleteTodoAction()- Delete todoCategories (2)
getAllCategories()- Fetch user's categoriescreateCategory()- Create new category📚 Additional Documentation
Authentication Details
getCurrentUser,requireAuth,isAuthenticated,getSession)Data Models
Error Handling
Development Patterns
What Each Entry Includes
For every endpoint/action, the documentation provides:
Why This Matters
Before: Developers had to read source code to understand the API
After: Complete reference for building features or integrations
This documentation:
Example Documentation Quality
Here's a sample entry structure:
Impact
This PR fills a major documentation gap in the project. Developers can now:
🤖 Generated with Claude Code