NAMING-CONVENTIONS.md — scaffolder
NAMING-CONVENTIONS.md — scaffolder
Section titled “NAMING-CONVENTIONS.md — scaffolder”File and folder naming
Section titled “File and folder naming”- All files: lowercase, hyphens only, no spaces
- All folders: lowercase, hyphens only, no spaces
- Component files: PascalCase (e.g. UserProfile.tsx)
- Test files: [name].test.ts alongside source file
- No abbreviations unless universally understood (e.g. btn, nav, auth)
Variable and function naming
Section titled “Variable and function naming”- Variables: camelCase (e.g. userName, isLoading)
- Functions: camelCase, verb-first (e.g. getUser, handleSubmit, createProject)
- Constants: SCREAMING_SNAKE_CASE (e.g. MAX_RETRY_COUNT)
- Types and interfaces: PascalCase (e.g. UserProfile, ApiResponse)
- Enums: PascalCase, members SCREAMING_SNAKE_CASE
Component naming
Section titled “Component naming”- React components: PascalCase matching filename (e.g. UserCard in UserCard.tsx)
- Props interfaces: [ComponentName]Props (e.g. UserCardProps)
- Hooks: camelCase, use prefix (e.g. useUserProfile, useLocalStorage)
Database naming
Section titled “Database naming”- Tables: snake_case, plural (e.g. user_profiles, project_tasks)
- Columns: snake_case (e.g. created_at, user_id)
- Foreign keys: [table]_id (e.g. user_id, project_id)
- Indexes: idx_[table]_[column] (e.g. idx_users_email)
API naming
Section titled “API naming”- Endpoints: lowercase, hyphens, plural nouns (e.g. /api/users, /api/project-tasks)
- HTTP methods: follow REST conventions (GET=read, POST=create, PUT=update, DELETE=remove)
- Query params: camelCase (e.g. ?userId=123&sortBy=name)
Branch naming
Section titled “Branch naming”- Features: feature/short-description (e.g. feature/user-login)
- Bug fixes: fix/short-description (e.g. fix/login-redirect)
- Hotfixes: hotfix/short-description (e.g. hotfix/payment-crash)
- Releases: release/version (e.g. release/v1.0.0)
Commit messages
Section titled “Commit messages”Follow Conventional Commits — see STANDARDS.md for full format.