Substance use recovery app: Securing an 81% satisfaction rate for NJCounseling

Project overview
Recovering from substance use is a long, treacherous process. It requires both professional help to guide the effort and individual effort to reflect on and manage cravings and coping strategies.
Data regarding substance-related cravings can be a powerful tool for the patients themselves, as well as their therapists. For one, it can offer insights into the efficiency of the current treatment strategies. Keeping track of the recovery progress can also be a powerful motivator for the individuals pursuing treatment.
Our client, a startup founded by therapist Gage Blanck-Singer, recognized the power of data in the recovery process. However, none of the existing mobile apps on the market could quite hit the mark in meeting the needs of both those recovering and their therapists.
For example, no existing solutions supported extensive data export in a user-friendly format — a must for discussing data with a therapist in person. Most questionnaires also lack questions and fields critical for assessing an individual’s therapeutic needs.
That’s why our client decided to develop a mobile app that would offer simple yet comprehensive tracking tools with robust PDF export capabilities. Besides being user-friendly to promote repeated use, the app would also have to be secure, enable seamless offline use, and remain cost-efficient for our client.
We rose to the challenge of developing the lean MVP our client envisioned.
Services


Challenges
NJCounseling envisioned the mobile app as a tracking tool for substance use recovery and assessing therapeutic needs. To promote user retention and engagement, it had to be simple and intuitive to use. So, we were tasked with designing UI/UX that would fulfill these goals.
At the same time, the app would be dealing with sensitive recovery data. Therefore, keeping it secure was a priority. This required us to integrate Supabase Auth with HTTP-only cookies and implement secure token handling to protect user accounts against attacks.
The product’s architectural design also represented a challenge. The backend didn’t account for some of the app logic, so we had to shift it to the frontend. At the same time, the mobile app had to maintain data integrity and provide a smooth user experience.
Finally, the data entered into the app had to be easily shared in a convenient format. We settled on the PDF export to meet this requirement, and the key challenge lay in enabling robust support for complex layouts, tables, and charts within the exported files.
Our discovery phase revealed the following requirements that guided the project:
Strategic business needs
01 Keep development time and costs to a minimum to optimize resource allocation
02 Ensure users keep returning to the app daily, as measured by the satisfaction rate
03 Secure a net promoter score of at least 70 among early adopters
04 Achieve an average session depth of at least four screens per session
05 Increase recovery engagement among mobile app users to demonstrate value
Technical requirements
01 Design the mobile app UI/UX to ensure simple, intuitive user flows and encourage consistent use
02 Develop a responsive, high-performance interface using Ionic React
03 Implement some of the business logic using frontend capabilities without detriment to performance
04 Secure the app with Supabase Auth, HTTP-Only cookies, and safe token handling
05 Achieve a task success rate of at least 80% during user testing
06 Enable push notifications with Firebase Cloud Messaging (FCM)
07 Implement robust PDF generation capabilities with support for complex layouts, tables, and charts
08 Ensure the Capacitor plugin compatibility between Android and iOS environments
09 Enable offline data management while preventing data loss and conflicts
10 Keep the app latency below 100 ms under peak loads
We’ll find the right strategy to secure access to it, whether that involves multi-factor authentication, encryption, or HTTP-only cookies.

Talk to an expert.webp)
Solutions
To ensure support for complex frontend logic without sacrificing the app’s performance, we opted for building the app with Ionic React. This framework also enabled us to build two mobile apps using a single shared codebase, primarily powered by JavaScript and TypeScript.
Thanks to our tech stack selection, the app can access any native APIs using Capacitor plugins, thus offering a seamless native-like UX on both Android and iOS. At the same time, the tech stack helped us speed up development and reduce its costs, thus falling in line with our client’s constraints.
The app we delivered enables users to keep track of their cravings daily, review past entries and historical data, and export it for further discussion with their therapist. Our user-centered UI/UX design promotes retention and engagement with simple, quick-to-complete flows, while secure login keeps all data protected against attacks.



Secure sign-up and login
By its nature, the NJCounseling mobile app handles sensitive personal data. Therefore, securing the data against potential cyberattacks was a must.
To that end, we implemented HTTP-Only cookies that prevent client-side scripts from executing. This protects the app against attacks like cross-site scripting (XSS). We also enabled secure storage and transmission for authentication tokens and used Supabase Auth for multi-factor authentication.
While securing access to the app, we had to counter the unusual login flows imposed by Supabase Auth to keep the experience simple for users. Despite those challenges, our approach worked: the login flow showed one of the highest task success rates during our user testing.

Daily check-ins
The daily check-ins are the mobile app’s core feature, with questionnaires developed by our client to take all possible therapeutic needs into account. We transformed these questionnaires into an easy-to-grasp check-in flow that takes mere minutes to complete.
To that end, we used the React Hook Form library to keep the form intuitive and responsive. The Zod library, in turn, powered advanced validation mechanisms to prevent unintentional mistakes on the users’ part.
Overall, daily check-ins proved to be one of the app’s most valued features during its rollout, helping it earn the 89 NPS as a result. The data also proved to be invaluable for motivating self-reflection, resulting in a 14% improvement in recovery engagement among early users.

Robust PDF export
Exporting responses for further discussion with therapists is the app’s another cornerstone feature, on par with daily check-ins. To implement this feature, we used two JavaScript libraries, jsPDF and jsPDF-AutoTable.
Thanks to our efforts, NJConseling users can easily export all the tracking data they entered into the app to a PDF file, making it one of the app’s value propositions. We made file generation as quick as possible (<500 ms) to avoid friction in the user experience, all while thoroughly testing support for complex layouts and data formats.

Seamless offline access
Consistent Internet access isn’t always a given, and our client didn’t want the lack of connection to become a barrier for the app’s users. So, we set out to ensure the app could support daily check-ins and offline data viewing without any detriment to user experience.
That meant we had to carefully design the syncing processes to prevent data loss or conflicts, which could compromise data integrity and cause frustration among users. We rose to the challenge, making data sync seamless and quick (<100 ms, in line with the average latency).

Regular reminders
To promote engagement and help users keep track of their recovery progress, the app reminds them about daily check-ins with timely push notifications. We implemented these push notifications using Firebase Cloud Messaging (FCM), a cross-platform messaging solution that offers great customizability and flexibility in push notification management.
These push notifications helped drive user engagement, contributing to the app’s 81% satisfaction rate. With an open rate of 23%, push notifications also reduced the proportion of users missing daily check-ins at least once a week by 31% after several rounds of A/B testing.

History view
The mobile app features a dedicated history screen that lets users review their previous entries and identify trends and insights in the data. To make it a truly valuable addition to the app, we visualized key insights, helping users grasp them easily at a glance.
As a result, the history view enables users to keep track of their recovery progress and take note of gaps in daily check-ins. The history view screen is one of the most commonly visited app components during an average user session, which typically comprises six screens.

Cross-platform tech stack
Our choice of Ionic React helped us overcome the architectural challenges of building the mobile app, all while speeding up development. Besides easy code sharing, Ionic React also provides facilitated access to native features via Capacitor plugins.
Thanks to this cross-platform tech stack, our client could quickly roll out the lean MVP to validate the idea and refine its features where necessary. At the same time, we delivered the two mobile apps 29% faster and at a 21% lower cost than we would have if we’d used a native tech stack.

Simple, intuitive user flows
We followed the tenets of the user-centered design to make the mobile app as simple and intuitive to use as possible. To that end, we initiated our design work with thorough user research. Our client’s first-hand experience in substance use treatment proved invaluable in the process, informing many of our design choices.
Based on our findings, we designed the information architecture and user flows, refining them through iterative development of wireframes and prototypes. Our iterative approach, combined with the user-centered philosophy, paid off: the app earned an 81% satisfaction rate and a net promoter score of 89.
Tech stack
Impact
As a result, our client received a lean MVP with quick-to-fill daily check-in questionnaires, robust PDF export capabilities, and seamless offline UX. NJCounseling piloted the app among the founder’s patients, and its reception was marked by:
We’ll select the right tech stack, design frictionless user flows, and encourage daily use with engagement techniques that drive up the app’s satisfaction rate.

Contact usRelated case study
Connect with us
.webp)
We are a tech partner that delivers ingenious digital solutions, engineering and vertical services for industry leaders powered by vetted talents.








