diff --git a/style.md b/style.md new file mode 100644 index 0000000..64f7e4f --- /dev/null +++ b/style.md @@ -0,0 +1,36 @@ +# Code Style Guidelines + +## 1. Naming Conventions +- Use descriptive variable names +- Adhere to PEP 8 for Python and ES6 for JavaScript + +## 2. Code Structure +- Follow the DRY (Don't Repeat Yourself) principle +- Keep functions short with single responsibilities +- Use const/let instead of var in JavaScript +- Ensure consistent use of semicolons in JavaScript +- Use JavaScript PropTypes for type checking + +## 3. Documentation +- Maintain a comprehensive README.md with a table of contents for all files +- Use Markdown formatting for documentation + +## 4. Error Handling +- Check for potential index out-of-range errors in lists + +## 5. Performance +- Optimize database interactions with bulk updates +- Use Document Fragment to minimize DOM manipulation + +## 6. Security +- Implement SQL parameterization to prevent SQL Injection +- Sanitize user inputs to prevent XSS vulnerabilities +- Use bcrypt for password hashing + +## 7. Project Structure +- Organize files in appropriate directories (e.g., .github/workflows for CI/CD) +- List project dependencies in requirements.txt + +## 8. Version Control and CI/CD +- Use GitHub for version control and pull requests +- Implement GitHub Actions for CI/CD \ No newline at end of file