{"id":33230221,"url":"https://github.com/maciejb2k/chronlife","last_synced_at":"2026-05-14T16:21:15.127Z","repository":{"id":189899726,"uuid":"662726379","full_name":"maciejb2k/chronlife","owner":"maciejb2k","description":"Social platform for people with chronic diseases","archived":false,"fork":false,"pushed_at":"2024-01-17T14:44:05.000Z","size":29428,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-23T20:16:32.782Z","etag":null,"topics":["chronic-diseases","health","medical","rails","ruby","ruby-on-rails"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maciejb2k.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-07-05T18:49:36.000Z","updated_at":"2024-08-03T03:20:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"4f9bdb12-c5a4-4d12-8b2e-8074574a7d1a","html_url":"https://github.com/maciejb2k/chronlife","commit_stats":null,"previous_names":["maciejb2k/chronlife"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maciejb2k/chronlife","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maciejb2k%2Fchronlife","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maciejb2k%2Fchronlife/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maciejb2k%2Fchronlife/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maciejb2k%2Fchronlife/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maciejb2k","download_url":"https://codeload.github.com/maciejb2k/chronlife/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maciejb2k%2Fchronlife/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285603340,"owners_count":27200013,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-21T02:00:06.175Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chronic-diseases","health","medical","rails","ruby","ruby-on-rails"],"created_at":"2025-11-16T17:00:42.529Z","updated_at":"2025-11-21T11:02:10.297Z","avatar_url":"https://github.com/maciejb2k.png","language":"Ruby","funding_links":[],"categories":["Open Source Rails Apps"],"sub_categories":["Articles"],"readme":"# ChronLife\n\n[![Ruby on Rails CI](https://github.com/maciejb2k/chronlife/actions/workflows/rubyonrails.yml/badge.svg)](https://github.com/maciejb2k/chronlife/actions/workflows/rubyonrails.yml)\n\nThis repository contains my full-stack side project, which is a social platform for people with chronic diseases.\n\nTechnologies used in this project:\n\n\u003cp\u003e\n  \u003cimg src=\"https://img.shields.io/badge/ruby-%23CC342D.svg?style=for-the-badge\u0026logo=ruby\u0026logoColor=white\" alt=\"Ruby\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/rails_7-%23CC0000.svg?style=for-the-badge\u0026logo=ruby-on-rails\u0026logoColor=white\" alt=\"Rails\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/hotwire-%234c4c4c.svg?style=for-the-badge\u0026logo=hotwire\u0026logoColor=white\" alt=\"Hotwire\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/postgresql_15-%23316192.svg?style=for-the-badge\u0026logo=postgresql\u0026logoColor=white\" alt=\"Postgres\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/redis-%23DD0031.svg?style=for-the-badge\u0026logo=redis\u0026logoColor=white\" alt=\"Redis\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge\u0026logo=docker\u0026logoColor=white\" alt=\"Docker\"\u003e\n\u003c/p\u003e\n\n![homepage showing hero section of the platform](screenshots/en/home.png)\n\n## What is this project about?\n\nThe idea of this project, is to provide very simple and user friendly platform, where users can manage their chronic diseases, share their experiences with other people, find new friends and support each other.\n\nCheckout the screenshots from the application with detailed explanations below for more details.\n\n\n## Getting started\n\n1. Install the following dependencies:\n- **Ruby** `3.2.0` (I'm using [chruby](https://github.com/postmodern/chruby))\n- **NodeJS** `18.16.1` (I recommend using [nvm](https://github.com/nvm-sh/nvm))\n- **Yarn** (`npm i --global yarn`)\n- **Docker** ([Ubuntu setup](https://docs.docker.com/engine/install/ubuntu/))\n\n2. Create `.env` file in the root directory and fill it with the necessary data. You can use `.env.example` as a template. To setup ActiveRecord encryption, you can use the following command:\n\n```bash\nbin/rails db:encryption:init\n```\n\n3. Setup docker containers for local development:\n\n```bash\ndocker-compose up -d\n```\n\n4. Finally, execute the following commands:\n\n```bash\n# Install dependencies\nbundle install\n\n# Setup the Rails application:\n./bin/setup\n\n# Run the application:\n./bin/dev\n```\n\n5. Sign in to the app:\n\nDepending on the locale, the seed data will be different. For each locale (`:en` is default one), there is a predefined user with the following credentials (the Atopic Dematitis disease in the panel has some predefined data):\n\n`:en` locale:\n- **Email:** `john.doe@gmail.com`\n- **Password:** `password`\n\n`:pl` locale:\n- **Email:** `tomasz.nowak@gmail.com`\n- **Password:** `password`\n\n\n## Design\n\nI've came up with the design of this application by myself. I am not using any tools like Figma to create UI. I'm just creating the design on the fly. While working by myself, [I really like this approach](https://world.hey.com/dhh/design-for-the-web-without-figma-4bc3a218).\n\n95% of SCSS code is also written by myself. I am not using any predefined templates, themes, blocks, utilities or component libraries, besides a few [Stimulus Components](https://www.stimulus-components.com/) or [Quill Editor](https://quilljs.com/).\n\nMaybe I'm weird, but I enjoy getting my hands dirty with CSS.\n\n## Hotwire (Turbo + Stimulus)\n\nThis application is my first take on **Turbo** (I've used **Stimulus** before, so it's not that big deal).\n\nI haven't used the Turbo features in the whole project, but only in a few places, where the application required **eager-loaded frames** or some **interactivity**, like the comments section and reactions for disease statuses, friend requests, some of the forms and flash messages.\n\n## RSpec \u0026 Rubocop\n\nRight now, there are only [model specs](https://github.com/maciejb2k/chronlife/tree/main/spec/models) (`406 examples, 0 failures`), but I'm planning to add system specs in the future.\n\nIf the **GitHub CI** passes, it means that there all specs are passing and there are no Rubocop offenses in the codebase.\n\nNote: The test database requires seeding. Also, if you are switching between locales, you need to seed the test database again:\n\n```bash\nRAILS_ENV=test bin/rails db:reset\n```\n\n## I18n\n\nThis application is **I18n-ready**, offering full translation support for both **Polish** and **English** languages.\n\nIf you want to change the locale of the application, you can do it by changing the `I18n.locale` value in the `config/initializers/locale.rb` file.\n\n```ruby\n# config/initializers/locale.rb\n\nI18n.default_locale = :en\n```\n\nRemember to reset and seed the database again after changing the locale, if you want to see the data in the new language.\n\n## Application overview\n\nBelow is a list of features that I've already implemented or I'm planning to implement in the future.\n\n### Auth\n- [x] Users authentication using Devise\n- [x] Confirming account, resetting password\n- [x] Omniauth authentication with Google\n- [x] 2FA authentication\n- [ ] Sing in using backup codes\n\n![sign up screen](screenshots/en/register.png)\n![sign in screen](screenshots/en/login.png)\n![reset password](screenshots/en/reset_password.png)\n![two factor authentication screen](screenshots/en/2fa_setup.png)\n![two factor authentication screen](screenshots/en/2fa.png)\n\n### Dashboard\n- [x] Showing feed from friends\n- [x] Showing common statistics\n\n![dash_home](screenshots/en/dash_home.png)\n\n### Diseases\n- [x] Users can add disease from the list of predefined diseases\n\n![diseases](screenshots/en/diseases.png)\n![add_disease](screenshots/en/add_disease.png)\n\n### Disease Panel\n- [x] Users have access to the disease panel, where they can manage their disease statuses, symptoms, risk factors, therapies and photos\n\n![disease](screenshots/en/disease.png)\n![edit_disease](screenshots/en/edit_disease.png)\n\n#### Disease Statuses\n- [x] Users can share short updates about their disease and related well-being\n\n![disease_statuses](screenshots/en/disease_statuses.png)\n![edit_disease_status](screenshots/en/edit_disease_status.png)\n\n### Disease Statuses - Comments and Likes\n- [x] Friends and group members can comment and like disease statuses\n- [x] Comments and likes features are implemented using Hotwire\n\n![disease_status](screenshots/en/disease_status.png)\n\n#### Disease Symptoms\n- [x] Users can add disease symptoms with updates of their severity in time\n- [x] Users can add predefined symptoms\n- [x] Users can add their own symptoms\n\n![disease_symptoms](screenshots/en/disease_symptoms.png)\n![disease_symptom](screenshots/en/disease_symptom.png)\n![new_disease_symptom](screenshots/en/new_disease_symptom.png)\n\n#### Disease Risk Factors\n- [x] Users can add disease risk factors, with the intensity of their influence on the disease\n\n![disease_risk_factors](screenshots/en/disease_risk_factors.png)\n![disease_risk_factor](screenshots/en/disease_risk_factor.png)\n\n#### Disease Treatments\n- [x] Users can add disease treatments\n- [x] Multiple diseases can be assigned to the same treatment\n- [x] Users can post updates about the effectiveness of the treatment with simple statuses\n\n![treatments](screenshots/en/treatments.png)\n![treatment](screenshots/en/treatment.png)\n![edit_treatment](screenshots/en/edit_treatment.png)\n\n#### Disease Photos\n- [x] Users can add photos related to their diseases\n\n![disease_photos](screenshots/en/disease_photos.png)\n![disease_photo](screenshots/en/disease_photo.png)\n\n### Groups\n- [x] Users can only join groups related to their diseases\n- [x] When users join a group, they can see all of the disease statuses, symptoms, risk factors, therapies and photos from all of the users with the same disease. This way, users can compare their disease statuses, symptoms, therapies, etc. with other people.\n\n![groups](screenshots/en/groups.png)\n\n#### Group Posts\n- [x] Users can share posts in groups about anything related to their disease\n\n![group_posts](screenshots/en/group_posts.png)\n\n#### Group Disease Statuses\n- [x] All of the disease statuses from all of the users with the same disease are aggregated in one place\n\n![group_disease_statuses](screenshots/en/group_disease_statuses.png)\n\n#### Group Disease Symptoms\n- [x] All of the disease symptoms from all of the users with the same disease are aggregated in one place\n- [x] There are simple statistics about predefined symptoms assigned to the disease by all of the users\n\n![group_disease_symptoms](screenshots/en/group_disease_symptoms.png)\n\n#### Group Disease Risk Factors\n- [x] All of the disease risk factors from all of the users with the same disease are aggregated in one place\n\n![group_risk_factors](screenshots/en/group_disease_risk_factors.png)\n\n#### Group Disease Treatments\n- [x] All of the disease treatments from all of the users with the same disease are aggregated in one place\n\n![group_treatments](screenshots/en/group_disease_treatments.png)\n\n#### Group Disease Photos\n- [x] All of the disease photos from all of the users with the same disease are aggregated in one place\n\n![group_disease_photos](screenshots/en/group_disease_photos.png)\n\n### Measurements\n- [x] Users can easily add common measurements like blood pressure, blood sugar, weight, etc.\n- [x] Users can track their measurements in time\n- [x] Users can easily view all health measurements from a specific day using the calendar view.\n- [x] Users can view their measurements in a chart\n- [x] Users can generate a PDF report with all of their measurements from a specific day\n\n![measurements](screenshots/en/measurements.png)\n![measurements_calendar](screenshots/en/measurements_calendar.png)\n![measurements_charts](screenshots/en/measurements_charts.png)\n![measurements_by_day](screenshots/en/measurements_by_day.png)\n![measurement](screenshots/en/measurement.png)\n![measurement_raports](screenshots/en/measurements_raports.png)\n\n### Notes\n- [x] Users can add simple notes\n- [x] Users can pin or unpin notes\n- [x] Users can add tags to notes\n\n![notes](screenshots/en/notes.png)\n![note](screenshots/en/note.png)\n![new_note](screenshots/en/new_note.png)\n\n### Account\n- [x] Users can view their or others accounts\n\n![account](screenshots/en/account.png)\n\n### All users\n- [x] Users can look for other users\n- [ ] Users can search for other users\n\n![accounts](screenshots/en/accounts.png)\n\n### Friends\n- [x] Users can send friend requests to other users\n\n![friend_requests](screenshots/en/friend_requests.png)\n\n### Specialists\n- [x] Users can submit a request for a specialist role, which will grant them a special status on the platform and enable them to write articles.\n- [x] Specialist requests are verified by the administrators, which can accept or reject the request.\n\n![specialists](screenshots/en/specialists.png)\n![specialist_profile](screenshots/en/specialist.png)\n![specialists_requests](screenshots/en/specialist_requests.png)\n\n### Articles\n- [x] Specialists can write articles on the platform\n- [ ] Articles can be filtered by tags\n- [ ] Articles can be commented and liked by users\n\n![articles](screenshots/en/articles.png)\n![new_article](screenshots/en/new_article.png)\n![article](screenshots/en/article.png)\n\n### Settings\n- [x] Users can change their personal data\n- [x] Users can upload their avatar\n- [x] Users can enable two factor authentication\n- [ ] Users can change their password when signed in\n\n![settings](screenshots/en/account_settings.png)\n![settings_privacy](screenshots/en/security_settings.png)\n![settings_backup_codes](screenshots/en/2fa_backup_codes.png)\n\n## ERD Diagram\n\nBelow is the current ERD diagram of the application.\n\n![settings](screenshots/erd.png)\n\n## TODO\n\n### Important\n- [x] Add models specs\n- [x] Fix all Rubocop errors\n- [x] Fix most of the queries performance issues (n+1, etc.)\n- [x] Complete the seeder\n- [x] Add authorization using Pundit policies\n- [x] Add background jobs\n- [ ] Add system specs\n- [ ] Add caching\n- [ ] Add mailers\n- [ ] Add notifications\n\n### Less important, but also important\n- [x] Add controller translations\n- [x] Add models translations\n- [x] Refactor controllers\n- [x] Add views translations\n- [x] Refactor routes\n- [ ] Move from importmaps to `jsbundling-rails`\n- [ ] Add RWD\n\n## Final thoughts\n\n**Working on large side projects is incredibly time-consuming**, and I didn't anticipate it to be to this extent. I'm pleased that I managed to complete the basic version of the project, as seen in the screenshots, in nearly 1.5 months. **It's physically impossible to write such a substantial amount of code within a limited timeframe on my own**.\n\n**One of the most time consuming parts of this project was the design and writing CSS**. My goal was to create a simple and user friendly design from scratch without using any predefined templates, themes, blocks, utilities or component libraries.\n\nEven though there are still a lot of things to do, **I'm proud of what I've accomplished so far**. I've learned a lot of new things, and I'm sure that I will learn even more while working on this project in the future.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaciejb2k%2Fchronlife","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaciejb2k%2Fchronlife","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaciejb2k%2Fchronlife/lists"}