To keep the Create MERN App repository clean, predictable, and easy to navigate for thousands of developers, we strictly follow a set of coding and workflow standards.
Don't worry—these aren't meant to slow you down. They are here to ensure that your code works perfectly for everyone who downloads your templates.
Consistent code is easier to read, debug, and maintain.
- Prettier: We use Prettier to format all code. It automatically handles spacing, quotes, and line breaks.
- ESLint: We use ESLint to catch bugs and bad practices.
- TypeScript (Recommended): Whenever possible, write new templates in TypeScript. It provides better autocomplete for developers and helps AI agents understand your code structure.
✅ Do: Run
npm run lint(if configured in your template) before submitting your code. ❌ Don't: Submit pull requests with dozens of ESLint warnings. Fix them first!
Every folder inside the templates/ directory is essentially a standalone mini-project. When a developer downloads your template, it needs to work out-of-the-box.
Here are the strict rules for creating a template:
- Self-Contained: Your template must not rely on files outside of its own folder.
- Standard Scripts: Your
package.jsonmust include the following scripts (if applicable to the tech stack):"start": Runs the app in production mode."dev": Runs the app in development mode with hot-reloading."build": Compiles the app.
- Template README: You must include a
README.mdinside your template folder. It should explain:- What the template is.
- How to install dependencies (
npm install). - What environment variables are needed (
.env.example). - How to run the project.
- No Junk Files: Absolutely NO
node_modules,.envfiles containing real secrets,.DS_Storefiles, or build folders (dist/,build/).
💡 Example of a good template structure:
templates/app/my-awesome-template/ ├── src/ ├── package.json ├── .gitignore <-- Crucial! Must ignore node_modules ├── .env.example <-- Blank template for env variables └── README.md <-- Setup instructions
We use a structured way of branching and committing. This keeps our GitHub history readable and makes generating release notes automatic.
Create a new branch for your work using these prefixes:
feature/- For adding a new template or feature (e.g.,feature/add-nestjs-template)bugfix/- For fixing an issue (e.g.,bugfix/fix-express-cors-error)docs/- For updating documentation (e.g.,docs/update-readme)
Your commit messages must be clear and structured. We follow the Conventional Commits standard.
✅ Good Commit Messages:
feat: add react-vite boilerplatefix: resolve dependency vulnerability in express templatedocs: improve AI workflow guidelines
❌ Bad Commit Messages:
added new templatefixed bugwip
- Use Markdown: All documentation must be written in GitHub Flavored Markdown (
.md). - Keep it Simple: Use plain English. Break long paragraphs into bullet points.
- Provide Examples: If you are explaining a concept, provide a code snippet.
Security is non-negotiable. Many developers rely on our boilerplates to start their companies.
- No Secrets: Never hardcode API keys, database passwords, or JWT secrets in your code. Use
process.env. - Dependency Health: Don't use outdated or deprecated npm packages.
- Security Headers: If you are building a backend boilerplate, include security middleware (like
helmetfor Express).
If you find a security vulnerability in our repository, please do not open a public issue. Follow the instructions in SECURITY.md to report it privately.