iOS: Watch Demo
Android: Watch Demo
The project implements the MVVM (Model-View-ViewModel) architecture pattern, ensuring:
- Clean separation of concerns
- Maintainable and testable code
- SOLID principles adherence
- Optimized performance
src/
├── components/ # Reusable UI components
│ ├── article-card/
│ ├── article-preview/
│ └── ...
├── models/ # Data models and interfaces
├── viewmodels/ # Business logic and state management
├── views/ # Screen components
├── context/ # React Context for state sharing
├── navigation/ # Navigation configuration
└── utils/ # Helper functions and constants
- Models: Define data structures and interfaces (Article.ts)
- Views: React Native components for UI rendering (ArticleDetail.tsx, HomeScreen.tsx)
- ViewModels: Handle business logic and state management (ArticleViewModel.ts)
Note: Make sure you have completed the React Native - Environment Setup instructions before proceeding.
- Node.js >= 18
- Ruby >= 2.6.10 (for iOS)
- Xcode (for iOS)
- Android Studio (for Android)
- CocoaPods (for iOS)
- Clone the repository:
git clone [your-repo-url]
cd article-stack- Install dependencies:
npm install
# or
yarn install- Install iOS dependencies:
bundle install
bundle exec pod install --project-directory=iosnpm run ios
# or
yarn iosnpm run android
# or
yarn android- Follow SOLID principles
- Implement proper error handling
- Write unit tests for ViewModels
- Use TypeScript for type safety
- Follow React Native best practices
The project uses Jest and React Native Testing Library for testing:
npm test
# or
yarn test