Skip to content

πŸ“š Development Guidelines

This document outlines the standard development practices at Darukaa to ensure high-quality, scalable, and secure code across all teams and projects.


πŸ“ Project Structure

  • Keep a clean and consistent folder structure across repositories (especially FE and BE).

  • Organize code by domain or feature, not by type.

src/

β”œβ”€β”€ components/

β”œβ”€β”€ pages/

β”œβ”€β”€ hooks/

β”œβ”€β”€ services/

└── utils/
  • Prefer co-locating tests with the components they test.

🧼 Code Style & Linting

  • Use Prettier + ESLint for JavaScript/TypeScript code.

  • Use black or ruff for Python code.

  • Code should always pass lint checks before committing.

  • Enable pre-commit hooks in your local setup.

Naming Conventions

| Entity | Convention | Example |

| --------- | ------------- | -------------------------------- |

| Variables | camelCase | userName, isLoading |

| Functions | camelCase | getUserData() |

| Classes | PascalCase | UserProfile, ApiClient |

| Constants | UPPER_SNAKE | MAX_RETRY_COUNT |

| Files | kebab-case | user-card.tsx, api-client.py |

βœ… Git Commit Messages

  1. Use the Conventional Commits format:

  2. feat: add support for new onboarding flow

  3. fix: resolve crash on mobile view

  4. chore: update eslint config

🌳 Branching Strategy

  1. Always branch off from main or dev.
  2. Use descriptive names:
  3. feature/add-payment-button

  4. bugfix/invalid-token-error

  5. hotfix/deployment-crash

πŸ”„ Environment Configuration

  1. Use .env files locally (do not commit them)

  2. All sensitive config values should be managed through:

  3. GitHub Secrets (for GitHub Actions)

  4. GCP Secret Manager (for deployments)

  5. Maintain sample .env.example in each repo.

πŸ§ͺ Testing

  1. Write unit tests for logic-heavy modules.

  2. Use mocks/stubs for external services.

  3. Follow TDD for new critical components.

  4. Recommended tools:

  5. Frontend: Jest, React Testing Library

  6. Backend: Pytest, unittest

  7. Minimum test coverage (as of now): 70%

πŸ›‘οΈ Security Best Practices

  • Never log secrets or tokens

  • Sanitize all user inputs (backend)

  • Escape HTML in frontend views

  • Use HTTPS APIs only

  • Keep third-party dependencies up to date

πŸ—ƒοΈ Documentation

  • Every new feature or module must include:

  • README (if applicable)

  • API signature or interface

  • Inline code comments for non-trivial logic

  • Update internal docs (internal-doc/) if architecture or process changes.

🚫 Anti-Patterns

  • Avoid the following:

  • Deeply nested logic blocks (> 3 levels)

  • Hardcoded URLs or API tokens

  • Committing .env, .DS_Store, or build folders

  • Using any in TypeScript unless strictly necessary

  • Global state for local component data

βœ… Done Means Done

A task is considered done only if:

  • Code is committed and pushed to a feature branch

  • Code is reviewed and merged

  • Tests pass in CI

  • Staging is tested (for features)

  • Documentation is updated

  • Task is marked complete in the board

  • Consistency beats cleverness. Let’s keep it clean and readable πŸš€