Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code consistency within and across the application(s) #2488

Open
3 tasks
shon-button opened this issue Nov 19, 2024 · 0 comments
Open
3 tasks

Code consistency within and across the application(s) #2488

shon-button opened this issue Nov 19, 2024 · 0 comments

Comments

@shon-button
Copy link
Contributor

shon-button commented Nov 19, 2024

Task: Ensure Code Consistency Across the Applications

Frontend Guidelines

  1. Component Naming

    • Use *Page for components representing routes (e.g., ContactPage).
    • Use *Form for form-related components (e.g., ContactForm).
  2. Parameter Naming

    • Use camelCase for function parameters, variables, and props (e.g., versionId) instead of snake_case, (e.g., version_id,)
  3. Async Components

    • Prefer React.Suspense for handling async components in Server Components (RSC).
    • Ensure proper fallback components are provided for a smooth user experience.
  4. Action Handlers

    • Ensure action handlers follow a consistent parameter pattern:
      • Example: Use revalidatePath to update the store's cache when making updates via mutations.
  5. Imports

    • Use easier to read app alias path defined in tsconfig.json over deeply nested, relative imports
  6. Typography and styles - how to make it consistent?

    • Use themes in bciers/tailwind-workspace-preset.js

Backend Guidelines

  1. Database Relationships

    • Use atomic transactions for all critical operations to ensure consistency and prevent partial updates.
    • For reverse relationships, use clear and concise names that reflect their purpose...
  2. Naming

    • Use consistent file naming conventions
    • Use consistent parameter naming conventions
  3. File Placement

    • Place files logically within your project structure
    • Place shared files in common directory

General Notes

  • Cleanup duplicated documentation details within classes etc.
  • Remove leftover Print statements
  • Conduct periodic code reviews to ensure adherence to these standards.

Outcome

By following these guidelines:

  • The codebase will maintain a uniform structure and naming convention.
  • Collaboration between teams will improve due to reduced ambiguity.
  • Changes and maintenance will become easier over time.

Tech Debt Triage

The purpose of our technical debt triage process is to analyze technical debt to determine risk level of the technical debt and the value in tackling that technical debt.

Risk Value Scoring:

Level Value
High
3
Medium
2
Low
1
Technical Debt - Risk Types Level Value
Business Area Risk - Risk of business area visibility / damage to user experience 0 0
Developer Fault Risk - How likely will this tech debt cause a future error related to coding on top of it 0 0
System Fault Risk - Risk of system errors or application downtime 0 0
Time Scale Risk - Compound risk effect if left alone. How much more difficult to fix or dangerous will this become over time? 0 0
Time Sink Risk - How much will this tech debt slow the development process down 0 0
TOTAL SCORE:
0 0

Development Checklist:

  • Checklist item
  • Checklist item
  • Checklist item
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant