code-patterns
Code Patterns
Best practices distilled from implementation lessons. These patterns prevent common bugs in file I/O, data persistence, and validation.
Core Principle
LEARN FROM MISTAKES - DON'T REPEAT THEM
Each pattern here was extracted from a real bug or issue. Apply these patterns proactively to prevent the same mistakes.
When to Use
Always use for: File-based state, shared resources, data persistence, validation layers, concurrent access
Especially when: Multiple processes/hooks access same file, persisting JSON data, creating factory functions, implementing save/load logic
The Patterns
1. File Locking (references/file-io.md)
More from duc01226/easyplatform
pdf-to-markdown
[Document Processing] Use when you need to convert PDF files to Markdown with support for native text PDFs and scanned documents (OCR).
683markdown-to-docx
[Document Processing] Use when you need to convert markdown files to Microsoft Word ( DOCX) format with GFM support and math rendering.
433markdown-to-pdf
[Document Processing] Use when you need to convert markdown files to PDF with syntax highlighting and custom CSS support.
404docx-to-markdown
[Document Processing] Use when you need to convert Microsoft Word ( DOCX) files to Markdown with GFM support (tables, images, code blocks).
294ui-ux-pro-max
[Frontend] Frontend UI/UX design intelligence - activate FIRST when user requests beautiful, stunning, gorgeous, or aesthetic interfaces. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks. Triggers on ui design, ux design, design system, color palette, typography, glassmorphism, claymorphism, neumorphism, bento grid, font pairing, ui-ux-pro-max, stunning interface, beautiful ui.
83arch-security-review
[Architecture] Use when reviewing code for security vulnerabilities, implementing authorization, or ensuring data protection.
64