api-endpoint-builder

Featured

Builds production-ready REST API endpoints with validation, error handling, authentication, and documentation. Follows best practices for security and scalability.

API & Backend 38,979 stars 6339 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# API Endpoint Builder Build complete, production-ready REST API endpoints with proper validation, error handling, authentication, and documentation. ## When to Use This Skill - User asks to "create an API endpoint" or "build a REST API" - Building new backend features - Adding endpoints to existing APIs - User mentions "API", "endpoint", "route", or "REST" - Creating CRUD operations ## What You'll Build For each endpoint, you create: - Route handler with proper HTTP method - Input validation (request body, params, query) - Authentication/authorization checks - Business logic - Error handling - Response formatting - API documentation - Tests (if requested) ## Endpoint Structure ### 1. Route Definition ```javascript // Express example router.post('/api/users', authenticate, validateUser, createUser); // Fastify example fastify.post('/api/users', { preHandler: [authenticate], schema: userSchema }, createUser); ``` ### 2. Input Validation Always validate before processing: ```javascript const validateUser = (req, res, next) => { const { email, name, password } = req.body; if (!email || !email.includes('@')) { return res.status(400).json({ error: 'Valid email required' }); } if (!name || name.length < 2) { return res.status(400).json({ error: 'Name must be at least 2 characters' }); } if (!password || password.length < 8) { return res.status(400).json({ error: 'Password must be at least 8 characters' }); } next(); }; ``` ##...

Details

Author
sickn33
Repository
sickn33/antigravity-awesome-skills
Created
4 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Related Skills