-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Create Sehatsathi #2344
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
base: main
Are you sure you want to change the base?
Create Sehatsathi #2344
Conversation
Healthy and stronger
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a new JSON file, Sehatsathi
, which appears to define the UI and logic for a health application. The structure is well-defined, but there are a few areas for improvement based on the provided style guide and general best practices.
My review identifies a few issues:
- Naming Conventions: The filename
Sehatsathi
does not follow thesnake_case
convention specified in the style guide (line 19). It would also be beneficial to add a.json
extension to clarify the file type (e.g.,sehat_sathi.json
). Similarly, several keys and values within the JSON usesnake_case
instead of the prescribedlowerCamelCase
(line 18). - Security: A placeholder phone number is hardcoded in the file. This is a security risk, as sensitive data should not be stored in version control.
I've added detailed comments on these points in the code.
"type": "button", | ||
"label": "Call Emergency Contact", | ||
"action": "call", | ||
"phone_number": "+91XXXXXXXXXX" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoding sensitive data like a phone number, even as a placeholder, is a security concern. This value could be accidentally replaced with a real one and committed to the repository. It's recommended to load such configuration from a more secure source at runtime, such as environment variables or a secrets management service, rather than including it in version-controlled files.
"title": "Welcome / Login", | ||
"fields": [ | ||
{ | ||
"type": "mobile_number", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value mobile_number
for the type
key uses snake_case
. According to the style guide, lowerCamelCase
should be used for such identifiers.1
"type": "mobileNumber",
Style Guide References
Footnotes
"required": true | ||
}, | ||
{ | ||
"type": "otp_verification", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value otp_verification
for the type
key uses snake_case
. According to the style guide, lowerCamelCase
should be used for such identifiers.1
"type": "otpVerification",
Style Guide References
Footnotes
{ | ||
"type": "info", | ||
"label": "💡 Daily Health Tips:", | ||
"dynamic_content": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"type": "button", | ||
"label": "Call Emergency Contact", | ||
"action": "call", | ||
"phone_number": "+91XXXXXXXXXX" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heal

thy and stronger
Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.
List which issues are fixed by this PR. For larger changes, raising an issue first helps
reduce redundant work.
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-devrel channel on Discord.