Musclegram is an interactive 3D web application that allows users to explore and learn about human muscles through an engaging 3D visualization. It provides detailed information about different muscle groups, their functions, and related exercises.
- Interactive 3D human model with selectable muscle groups
- Detailed muscle information in both English and Chinese
- Categorization of muscles (upper body, lower body, core, neck)
- Responsive sidebar with muscle details
- Smooth animations and transitions
- Mobile-friendly interface
- Frontend:
- React 19 with TypeScript
- Three.js with React Three Fiber and Drei
- Tailwind CSS for styling
- Radix UI components
- Vite as build tool
- State Management: Zustand
- Animation: Framer Motion
- Icons: Lucide React
- Form Handling: React Hook Form
- Notifications: Sonner
interface MuscleData {
id: string;
name_en: string;
name_zh: string;
position_3d?: {
x: number;
y: number;
z: number;
};
mesh_data?: {
type: string;
radius?: number;
};
category: 'upper_body' | 'lower_body' | 'core' | 'neck';
description?: string;
exercises?: string[];
origin?: string;
insertion?: string;
action?: string;
nerve_supply?: string;
blood_supply?: string;
}-
Prerequisites
- Node.js (v18+)
- npm or pnpm
-
Installation
# Install dependencies pnpm install # or npm install
-
Environment Setup
- Copy
.env.exampleto.envand configure environment variables if needed
- Copy
-
Running the Application
# Start development server pnpm dev # or npm run dev
-
Building for Production
# Build the application pnpm build # Preview the production build pnpm preview
src/
├── components/ # Reusable UI components
├── pages/ # Page components
├── hooks/ # Custom React hooks
├── lib/ # Utility functions
├── services/ # API and service integration
├── types/ # TypeScript type definitions
└── assets/ # Static assets
-
3D Model Interaction
- Rotate, zoom, and pan the 3D model
- Click on muscles to view details
- Hover effects for better user experience
-
Responsive Design
- Works on desktop and mobile devices
- Adaptive layout for different screen sizes
-
Accessibility
- Keyboard navigation support
- ARIA labels and roles
- High contrast mode
- Click on any muscle in the 3D model
- View detailed information in the sidebar
- Navigate between different muscle groups using the category filters
- Rotate: Click and drag with left mouse button
- Pan: Right-click and drag
- Zoom: Scroll wheel or pinch gesture on touch devices
- Reset View: Click the reset button in the corner
# Run tests
pnpm test- Add more detailed muscle information
- Implement exercise demonstrations
- Add quiz mode for learning
- Support for different anatomical models
- Add user authentication for saving favorites
- Implement 3D printing support for physical models
MIT