Skip to content

Establish project coding standards & guidelines #581

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

danditomaso
Copy link
Collaborator

@danditomaso danditomaso commented Apr 22, 2025

Description

This PR introduces CODING_GUIDELINES.md which is expected to provide guidelines for developers contributing to the project.

This includes coding standards, preferred tools (Deno, Vitest, Zustand, Tailwind), file organization, testing requirements, and library dependency usage philosophy to ensure consistency.

Changes Made

  • Added coding guidelines markdown file

Copy link

vercel bot commented Apr 22, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
web-test ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 22, 2025 7:27pm

@danditomaso
Copy link
Collaborator Author

@Hunter275 I'd love to get your thoughts on this

@danditomaso danditomaso changed the title Establish project contribution guidelines Establish project coding standards & guidelines Apr 22, 2025
Copy link
Member

@Hunter275 Hunter275 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work Dan!

- **Readability:** Write code that is easy for others (and your future self) to
understand.
- **Consistency:** Adhere to these guidelines to maintain a consistent codebase.
- **Simplicity (KISS):** Keep components and functions focused and avoid
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know what KISS means but maybe others don't

- **Reducer (`useReducer`):** Use for complex state logic involving multiple
sub-values or when the next state depends on the previous one, especially
within a single component or closely related components (can be co-located).
- **Global State (Zustand):** Use Zustand for managing application-wide state.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a link to Zustand


## Testing

- **Test Framework (Vitest):** Use Vitest for all levels of automated testing,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to vitest documentation

- **Test Framework (Vitest):** Use Vitest for all levels of automated testing,
including unit, integration, and component tests. Global test
configuration/setup files reside in `/src/tests`.
- **Component Testing (React Testing Library):** Utilize React Testing Library
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add link to documentation


**Core Principle: Minimize Bundle Size**

A primary goal of this project is to maintain a small and performant application
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add something about this being bundled onto SBCs or devices with very little memory

complexity. Therefore, we prioritize minimizing the number of third-party
libraries.

**Guidelines:**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename "Dependency & Library Guidelines"

@dzienisz
Copy link
Contributor

How do you plan to enforce these requirements?

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

Successfully merging this pull request may close these issues.

3 participants