Interactive Chemistry Lab is an iOS educational application that provides an engaging, interactive environment for learning chemistry through hands-on experimentation. The app allows users to combine elements, discover compounds, and understand chemical reactions through a visual and intuitive interface.
Interactive Chemistry Lab addresses the challenge of making abstract chemical concepts more tangible and engaging for learners. Through an intuitive touch interface, users can:
https://github.com/user-attachments/assets/bf1c1d58-f4bb-4d9a-91c1-5d3e258757a6
chem2.swiftpm/
├── MyApp.swift # Application entry point and main app configuration
├── ContentView.swift # Main view controller managing the lab interface
├── ChemistryLabView.swift # Home screen and navigation setup
├── WorkspaceViewModel.swift # Core business logic for chemical reactions
├── ReactionRepository.swift # Database of chemical compounds and reactions
├── CanvasViews.swift # Canvas interface for element manipulation
├── ElementSelectionPanel.swift # UI for selecting chemical elements
├── BadgeView.swift # Achievement system interface
├── DashboardView.swift # Progress tracking and statistics view
├── guidedlesson/ # Guided learning module
│ ├── GuidedLessons.swift # Lesson content and structure
│ └── LessonsListView.swift # Lesson navigation interface
├── Overlays/ # UI overlay components
│ ├── CompletionOverlay.swift # Lesson completion feedback
│ ├── CompoundInfoPanel.swift # Compound information display
│ └── NewDiscoveryOverlay.swift # New compound discovery notifications
└── Tutorial/ # Tutorial system
└── TutorialManager.swift # Tutorial flow management
git clone [repository-url]
cd chem2.swiftpm
xed .
// Combine elements place(element1) near element2
// View compound information tap(compound)
// Break down compounds doubleTap(compound)
### More Detailed Examples
1. Creating Water (H₂O):
```swift
// Drag two hydrogen atoms and one oxygen atom close together
H + H + O -> H₂O
// Combine sodium and chlorine
Na + Cl -> NaCl
UserDefaults.standard.bool(forKey: "hasSeenTutorial122") is falseUserDefaults.standard.removeObject(forKey: "hasSeenTutorial122")The application processes chemical reactions through a state-driven architecture where element placement triggers reaction checks and compound formation.
[Element Selection] -> [Canvas]
↓ ↓
[Drag Operation] -> [Placement]
↓ ↓
[Reaction Check] -> [Compound Formation]
↓ ↓
[State Update] <- [Visual Feedback]
Key Component Interactions:
https://github.com/user-attachments/assets/2000d06f-fcd2-48c2-b59d-0da044bcac01