backend-core
SKILL.md
Backend Core Development
Instructions
-
Routing
- Define RESTful API routes
- Use proper HTTP methods (GET, POST, PUT, DELETE)
- Organize routes by feature or resource
-
Request & Response Handling
- Validate incoming requests
- Parse request body, params, and query strings
- Send structured JSON responses
- Handle success and error responses properly
-
Database Connection
- Connect to database securely
- Use environment variables for credentials
- Perform CRUD operations
- Handle connection errors gracefully
-
Error Handling
- Centralized error handling
- Meaningful status codes
- Clear error messages
Best Practices
- Follow REST API conventions
- Keep controllers thin and reusable
- Never expose sensitive data
- Use async/await for database operations
- Separate routes, controllers, and services
- Validate data before DB operations
Example Structure
// routes/user.routes.js
import express from "express";
import { createUser, getUsers } from "../controllers/user.controller.js";
const router = express.Router();
router.post("/users", createUser);
router.get("/users", getUsers);
export default router;
Weekly Installs
1
Repository
ghaniya08/todo-…hackatonFirst Seen
13 days ago
Security Audits
Installed on
amp1
cline1
opencode1
cursor1
kimi-cli1
codex1