Building Paindai: A Rails and HTMX-Powered App to Help Chronic Pain Patients Advocate for Themselves
I’m excited to announce that I’m launching Paindai, a pain journaling app for people with chronic pain, on ProductHunt this Saturday. The journey behind this app has been both personal and technical, with the goal of helping people advocate for themselves in a medical system that often overlooks complex, subjective conditions like chronic pain. In this post, I’ll share the inspiration behind Paindai, the technical stack (Rails, HTMX, Ubuntu, and AWS), and how I’ve brought together my experience in full-stack development to build this app.
The Origin of Paindai: A Personal Struggle with Chronic Pain
The idea for Paindai came from my fiancée’s experience with chronic pain. For years, she has dealt with symptoms that were both severe and unpredictable, from aching joints and muscle pain to back pain that often needed pain gel just to get through the day. Recently, she was finally diagnosed with a cerebrospinal fluid (CSF) leak and deteriorating spinal discs, a huge relief after years of searching for answers. But reaching this point was a frustrating journey, as her pain often shifted locations and intensity, making it hard for her to articulate her symptoms to doctors.
Watching her struggle to communicate her pain inspired me to develop Paindai, a tool that allows people to log their pain as it happens, so they can track patterns, spot triggers, and more easily share detailed pain records with their doctors. Chronic pain disproportionately impacts women, and research shows that women’s pain is often dismissed or minimized, leading to delayed diagnoses and poorer health outcomes. With Paindai, I aim to give people the means to communicate their experience effectively, helping them advocate for themselves in a healthcare system that doesn’t always take subjective pain seriously.
Paindai’s Core Functionality
Paindai is a Rails-based app that serves as a digital pain journal. Users can log incidents of pain as they happen, capturing important details like location, intensity, time, and context. This data is invaluable when trying to identify triggers, monitor progress, or simply provide a clear history to healthcare providers.
The free version of Paindai is designed to be useful for anyone. However, I also have a paid version to cover hosting and development costs, as well as fund additional features, such as AI-driven insights and recommendations for which types of specialists to see or treatments to explore.
The Stack: Rails, HTMX, and a Lean Full-Stack Approach
Building Paindai required a backend with strong data-handling capabilities and a frontend that could deliver a smooth, interactive experience without requiring a lot of JavaScript. Here’s a look at the main technologies I used:
Ruby on Rails for the Backend
I’ve been working with Ruby on Rails for over a decade, and it’s been a reliable framework for managing data-heavy applications. Rails’ strong ORM support and routing make it easy to manage pain logs, user accounts, and insights in a way that’s both powerful and maintainable.
HTMX for Dynamic Pain Logging
One of the most critical features for Paindai was a fluid, interactive way for users to log pain without reloading the page. For this, I turned to HTMX, which lets you add interactivity through HTML attributes rather than an extensive JavaScript framework. With HTMX, I can dynamically load and update content by swapping out HTML, which was perfect for Paindai’s need to add and edit pain logs in real time.
Using HTMX with Rails, I was able to create a seamless single-page experience for users logging their pain, while keeping the codebase lean and avoiding the overhead of managing a heavy frontend framework like React or Vue.
Deployment on AWS and Ubuntu
Paindai is hosted on AWS, using an Ubuntu instance as the server environment. This setup allows for scalable, cost-effective hosting, with enough flexibility for me to handle custom configurations as needed. I’m running Nginx as a web server and PostgreSQL for the database, both of which are ideal for handling Paindai’s relational data requirements.
One area where I chose to be hands-on is with SSL setup. I prefer manual DNS configuration over automated solutions to avoid adding unnecessary dependencies to the server environment. This approach provides me with a bit more control over the domain while keeping things straightforward.
Background Jobs with Delayed Job
Since Paindai involves some data-intensive processes, such as generating reports and preparing insights, I’m using Delayed Job for background processing. Delayed Job integrates smoothly with Rails, allowing me to manage tasks without the need for an additional Redis-based solution like Sidekiq. This keeps things simple while ensuring Paindai can handle important backend tasks efficiently.
I’m also developing a notification feature that will encourage users to log pain if they haven’t in a while or celebrate milestones, like logging consistently for a week. This helps users stay engaged and can provide them with a gentle reminder to keep tracking their symptoms, which is invaluable for anyone managing a chronic condition.
The Future: AI-Driven Insights
In the future, I plan to add AI-driven insights to Paindai. One of the biggest struggles for my fiancée was figuring out which specialists to consult and what treatments to consider. With the right AI, Paindai could provide users with recommendations based on similar cases or existing research, helping guide users to the best possible care for their symptoms.
Rails’ Active Record makes it easy to store pain logs in JSON format, which can then be used for analysis by AI tools. The goal is to let the AI analyze patterns in users’ data and provide actionable recommendations that could make a real difference in their care. By combining Rails’ robust data handling with AI, I hope Paindai can become a proactive tool for people dealing with chronic pain.
Launching on ProductHunt and Building a Community
Launching on ProductHunt this Saturday is an exciting milestone, and I’m hopeful that Paindai will resonate with users who can benefit from it. I’m currently promoting it through blogging on sites like Dev.to and Medium, as well as on Twitter. I’d love to hear from other makers who’ve launched on ProductHunt—any advice on what helped drive visibility? Did a particular blog post or strategy work best?
Why Paindai Matters
Chronic pain can be isolating and difficult to communicate, especially when healthcare providers don’t always take subjective pain seriously. With Paindai, I want to provide a tool that empowers people to advocate for themselves by tracking their symptoms in a detailed, consistent way. The app isn’t just about recording pain; it’s about using that data to help users feel seen, validated, and empowered in their healthcare journey.
If you or someone you know could benefit from Paindai, I invite you to check it out on ProductHunt or visit Paindai.com. Thank you for reading, and I hope you find Paindai as helpful as I’ve intended it to be.
Subscribe to my newsletter
Read articles from Ryan Kopf directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by