EMS Applications: A multi-module management system for muscle electrostimulation devices

EMS Applications: A multi-module management system for muscle electrostimulation devices

The EMS project is a modern system for the comprehensive management of muscle electrostimulation devices. The ecosystem combines a central backend, a web dashboard, and mobile apps based on a monorepo architecture. It ensures a high level of security and enables real-time control of the equipment via Bluetooth (BLE).

The EMS Project is an advanced, next-generation system designed for comprehensive management of muscle electrostimulation devices. The system serves as the foundation for modern training and rehabilitation processes, combining hardware with intuitive software.
System Architecture: Monorepo for Scalability
The entire project was built using a multi-module monorepo architecture, which allows for the concurrent development of the backend and three independent client applications while maintaining full code consistency.
Key project modules
Ikona
Web Administration Panel A tool designed for system administrators, providing full control over processes and data.
Ikona
Central Backend (API) The scalable heart of the system, which manages business logic and facilitates communication between all platforms.
Ikona
Mobile App (Smartphone) An intuitive tool for individual users, optimized for mobile devices.
Ikona
Dedicated Tablet App An interface version designed for professional training studios, taking full advantage of larger screens.

Modern technology stack

The choice of technology was driven by the need to ensure maximum performance and data integrity (type safety) at every stage of the information flow.

TypeScript Primary language

It ensures strong typing and eliminates compilation errors.

GraphQL API

It allows you to precisely define the data you need, thereby reducing data redundancy.

React Native & Expo Mobile

It allows you to build native iOS and Android apps from a single source code.

PostgreSQL & Prisma Database

A relational database managed by a modern ORM with full migration control.

Tailwind & NativeWind Styling

It ensures strong typing and eliminates compilation errors.

Ikona
Bluetooth Low Energy (BLE) Integration The mobile apps are equipped with an advanced communication module for EMS devices. By utilizing the react-native-ble-plx library, the system enables:
  • Direct Control: Users can manage the intensity of electrostimulation directly from their smartphone or tablet.
  • Real-time Monitoring: The system continuously monitors the device’s status, such as battery level or connection status.
Ikona
Multi-Layered Security The system has been secured in accordance with the highest data protection standards:
  • CORS Mechanism:Controls which domains have access to API resources.
  • Rate Limiting: Protects the infrastructure against overload and DoS attacks.
  • Helmet & CSRF Protection: Additional layers of HTTP header protection and protection against fraudulent requests.
  • Zod Validation: Rigorous validation of input data on both the client side (forms) and the server side.
Ikona
Automation and Developer “Quality of Life” A key component of the project is the GraphQL Code Generator. This tool automatically generates TypeScript types and React hooks based on API schemas. This eliminates errors resulting from manual data mapping and ensures that any changes in the backend are immediately visible to frontend developers.

Engineering Standards and Project Maintenance

The EMS project is not just about code; it also involves a rigorous approach to quality:

State Management

We use Apollo Client for GraphQL data and the Zustand library for local state management in mobile apps.

Internationalization (i18n)

Full support for multiple languages thanks to the i18next framework.

Code Consistency

Strict ESLint rules and automatic Prettier formatting ensure that the code is readable and consistent, regardless of which developer is working on it.

Database Version Control

Every change to the data structure is recorded as a migration, enabling rapid environment restoration and secure production deployments.

Summary

The EMS Project is an example of the seamless integration of multiple technologies into a single, efficient ecosystem that prioritizes user safety and convenience.

Previous
Connected case studies
See all