An open API service indexing awesome lists of open source software.

https://github.com/dianait/jinkobot

JinkoBot: Therapeutic ROBOT for children with autism spectrum disorder (ASD)
https://github.com/dianait/jinkobot

firebase nextjs react ros styled-components

Last synced: 3 months ago
JSON representation

JinkoBot: Therapeutic ROBOT for children with autism spectrum disorder (ASD)

Awesome Lists containing this project

README

          

# Jinkobot Web Application

![header image](https://github.com/DianaIT/jinkobot/blob/master/public/img/header.png)

**Therapist Interface for Exercise Configuration and Progress Analytics**

Part of the [Jinkobot Project](https://github.com/dianait/tfg) - Therapeutic Robot for Children with Autism Spectrum Disorder (ASD)

---

## ๐Ÿ“‹ Overview

This web application provides therapists with an intuitive interface to configure therapeutic exercises, monitor therapy sessions in real-time, and analyze children's progress through detailed analytics and visualizations. Built with Next.js and Firebase, it serves as the command center for the Jinkobot therapeutic robot system.

## ๐ŸŽฏ Purpose

The web application enables therapists to:
- **Prepare personalized therapy sessions** with customized exercises and difficulty levels
- **Monitor real-time progress** during active therapy sessions
- **Analyze historical data** through graphs and statistics
- **Track individual patient progress** over multiple sessions
- **Configure robot behavior** for different therapeutic scenarios

## ๐Ÿ›  Technical Stack

### Frontend
- **Next.js**: React framework for server-side rendering and optimal performance
- **TypeScript**: Type-safe development for reliability
- **React**: Component-based UI architecture
- **Styled Components**: CSS-in-JS for modular, maintainable styling

### Backend & Infrastructure
- **Firebase Realtime Database**: Real-time data synchronization with the robot
- **Firebase Authentication**: Secure therapist login and session management
- **Firebase Hosting**: Fast, secure web hosting

### Real-time Communication
- **Firebase Realtime Database**: Bi-directional communication between web app and ROS system
- **WebSocket-like sync**: Instant updates during therapy sessions

## ๐ŸŽฎ Key Features

### Session Configuration
- **Patient Setup**: Register patient information and preferences
- **Exercise Selection**: Choose between Emotion and Orientation exercises
- **Difficulty Adjustment**: Set appropriate challenge levels for each child
- **Custom Questions**: Configure specific emotion recognition questions from the database

### Real-time Monitoring
- **Live Session View**: Watch therapy progress in real-time
- **Current Exercise Status**: See which question/task is active
- **Response Tracking**: Monitor correct/incorrect answers as they happen
- **Robot Status**: Check robot state and connectivity

### Analytics & Reporting
- **Session History**: Complete record of all therapy sessions
- **Progress Graphs**: Visual representation of improvement over time
- **Performance Metrics**:
- Time spent on each task
- Number of correct answers
- Number of unanswered questions
- Success rate trends
- **Comparative Analysis**: Compare performance across sessions

### Data Visualization
- **Interactive Charts**: Built with charting libraries for clear insights
- **Customizable Time Ranges**: Filter data by date, week, or month
- **Export Capabilities**: Generate reports for clinical records

## ๐Ÿ“ Repository Structure

```
jinkobot/
โ”œโ”€โ”€ components/ # React components (UI elements, charts, forms)
โ”œโ”€โ”€ pages/ # Next.js pages (routes and views)
โ”œโ”€โ”€ firebase/ # Firebase configuration and services
โ”œโ”€โ”€ models/ # TypeScript interfaces and data models
โ”œโ”€โ”€ services/ # Business logic and API calls
โ”œโ”€โ”€ Hooks/ # Custom React hooks
โ”œโ”€โ”€ styles/ # Global styles and theme configuration
โ”œโ”€โ”€ public/ # Static assets (images, icons)
โ””โ”€โ”€ package.json # Dependencies and scripts
```

## ๐Ÿ”ง Dependencies

- **Next.js**: ^12.x
- **React**: ^18.x
- **TypeScript**: ^4.x
- **Firebase**: ^9.x
- **Styled Components**: ^5.x

## ๐Ÿš€ Setup & Development

### Installation
```bash
# Clone the repository
git clone https://github.com/DianaIT/jinkobot.git

# Install dependencies
npm install

# Configure Firebase
# Add your Firebase configuration to firebase/config.js
```

### Development Server
```bash
npm run dev
# Open http://localhost:3000
```

### Build for Production
```bash
npm run build
npm start
```

## ๐Ÿ”— System Integration

### Communication Flow
1. **Therapist Configuration**: Therapist sets up session parameters in web app
2. **Firebase Sync**: Configuration data is written to Firebase Realtime Database
3. **ROS Listener**: Robot's ROS system listens for configuration changes
4. **Session Execution**: Robot executes exercises based on configuration
5. **Real-time Updates**: Robot writes progress data back to Firebase
6. **Live Dashboard**: Web app displays updates instantly

### Data Model
```typescript
interface Session {
patientId: string;
patientName: string;
emotionQuestions: number;
orientationDifficulty: 'easy' | 'medium';
timestamp: Date;
results: {
correctAnswers: number;
incorrectAnswers: number;
unansweredQuestions: number;
timePerQuestion: number[];
};
}
```

## ๐Ÿ“Š Data Flow

```
Web App โ†’ Firebase โ†’ ROS System โ†’ Robot Actions
โ†“
Robot Results โ†’ Firebase โ†’ Web App Display
```

## ๐Ÿ”— Related Repositories

- **[Jinkobot Main](https://github.com/dianait/tfg)**: Core ROS system and state machine
- **[Emotion Exercise](https://github.com/DianaIT/Emotion)**: Computer vision module
- **[Orientation Exercise](https://github.com/DianaIT/Orientation)**: Autonomous navigation module

## ๐ŸŽ“ Academic Context

This web application was developed as part of a Bachelor's thesis project (Honors Distinction) at Universitat Politรจcnica de Valรจncia for the Interactive Technologies program. It demonstrates full-stack development skills with real-time data synchronization and integration with robotics systems.

## ๐Ÿ” Security Considerations

- Firebase Authentication for secure therapist access
- Database rules to protect patient data
- Session-based access control
- HIPAA-compliant data handling considerations

## ๐Ÿ‘ฉโ€๐Ÿ’ป Author

**Diana Hernรกndez Soler**
- GitHub: [@dianait](https://github.com/dianait)
- LinkedIn: [linkedin.com/in/dianait](https://linkedin.com/in/dianait)
- Blog: [dianait.blog](https://dianait.blog)

## ๐Ÿ“„ License

This project was developed for academic purposes as part of the Jinkobot therapeutic robot system.

---

For more information about the complete Jinkobot system, visit the [main repository](https://github.com/dianait/tfg).