Vitals is a user-centric web application designed to streamline the tracking of vital signs and dietary habits, enabling users and healthcare professionals to uncover correlations between diet and health outcomes. This application aims to support individuals managing chronic conditions, such as diabetes, by providing insights into how food intake affects their health. The current iteration features tools for logging numerical, image-based, and text-based health markers, as well as OpenAI API integration for analyzing user health logs and providing correlation and improvement analysis.
Users can create their own custom vitals to track. These can be numeric, image, and text based. The most useful way to use these vitals is to create one named 'Meals' and track anything against that Vital.
customvitals.mov
For numeric vitals, such as blood glucose, Vitals comes with Charts that track daily Vital averages for a quick reference point for facilitating correlation identication.
charts.mov
Best used in conjunction with numeric vital charts, the calendar paginated logs allow the user to target peak and low dates and troubleshoot which foods may be the cause of these fluctuations.
logs.mov
As scaffolding for Image support, users can log meals as image values to facilitate intuitive and quick logging.
Currently working with two vital types, users can gauge correlations from a birds eye perspective, using Open AI to search for correlations and provide meal improvements and recommendations.
OpenAIIntegrationSample.mp4
- Rails 7
- Tailwind
- Daisy UI
- AWS S3
- Open AI API
To configure your application to use AWS S3 and OpenAI API services, follow these detailed steps:
If you do not already have a master.key file, you can generate one by running:
EDITOR="code --wait" rails credentials:editThis command will open the credentials file in Visual Studio Code (replace "code --wait" with your preferred editor), and a new master.key file will be generated automatically if it does not exist.
Inside the opened credentials file, add your API tokens and other sensitive configuration variables in a structured format. For example:
aws:
access_key_id: YOUR_AWS_ACCESS_KEY_ID
secret_access_key: YOUR_AWS_SECRET_ACCESS_KEY
openai:
api_key: YOUR_OPENAI_API_KEYSave and close the file. The changes will be encrypted and saved securely, accessible only via the master.key.
Never commit your master.key or the credentials file to version control. Add the master.key to your .gitignore file to prevent it from being accidentally pushed to your repository:
echo 'config/master.key' >> .gitignore- clone the repository and switch to the main branch
- run the following commands
bundle install
yarn install
rails db:migrate
rake sample_data
bin/devAfter running the above commands one user with about 6 months of numeric and text data will be generated. Sign in with:
- Email:
alice@example.com - Password:
password
Thank you for your interest in contributing to Vitals. This document provides guidelines and instructions on how to contribute to the project.
- Setup your environment: Follow the installation instructions above.
- Find an issue to work on: In the Projects tab, check out our issues, at times I may have some issues labeled "good first issue".
We adhere to the Ruby community style guide, and we expect all contributors to follow suit. Here are key conventions specific to our project:
-
Code Style: Follow the Ruby Style Guide, which provides detailed guidelines on the coding style preferred by the Ruby community.
-
Naming Conventions:
- Use
snake_casefor variables, methods, and file names. - Use
PascalCasefor class and module names. - Reflect domain concepts accurately in naming. For instance, if you are working within a medical application, prefer names like
patient_recordover vague terms likedata_entry.
- Use
-
Design Principles: Focus on Domain-Driven Design (DDD):
- Organize code to reflect the domain model clearly.
- Use service objects, decorators, and other design patterns that help isolate domain logic from application logic.
-
Testing Conventions:
- Write tests for all new features and bug fixes.
- Use RSpec for testing, adhering to the RSpec Style Guide.
- Ensure test names clearly describe their purpose, reflecting domain-specific terminology.
- Comment your code where necessary to explain "why" something is done, not "what" is done—source code should be self-explanatory regarding the "what".
- Document methods and classes thoroughly, focusing on their roles within the domain model, especially for public APIs.
- Commit messages should be clear and follow best practices, such as those outlined in How to Write a Git Commit Message.
- Keep commits focused on a single issue to simplify future maintenance and troubleshooting.
Please use the following naming conventions for your branches:
<issue#-description>(i.e 31-added-ransack-search)
- Creating a Pull Request: Provide a detailed PR description, referencing the issue it addresses.
- Review Process: PRs require review from at least one maintainer.
Join our [Discord] to communicate with other contributors and maintainers.
Contributors who make significant contributions will be listed in our [README/CONTRIBUTORS] file.
Thank you for contributing to Vitals!
- To setup your AWS S3 bucket, sign up for an account here: Sign Up for AWS Account
- For more setup help, see this guide: AWS S3 Bucket and IAM User Setup Guide
- Be sure to follow the Configuration Instructions if you encounter an issue when setting up the project.
- For setup help, see the Open AI Documentation
- The project is written using Ruby 3.1.1, if you encounter issues upon cloning, make sure you have Ruby version 3.1.1 in your environment.

