This document provides a summary of the work done to set up the MusicBud React Native application using Expo Go, including the integration of screens based on provided Figma images, navigation setup, and strategies for API integration and testing.
- Project Initialization: A new Expo project named
musicbud-expowas successfully created. - Project Structure: A structured project layout was established within the
musicbud-expodirectory, including:src/componentssrc/screenssrc/navigationsrc/assets
- Figma Image Integration: All exported Figma images from the provided
@uidirectory (and its subdirectoriesSearchandextra) were copied intomusicbud-expo/src/assets/ui. - Screen Component Generation: React Native placeholder screen components were created for each identified Figma image. Each component displays its corresponding image as a background and a screen title for identification. This includes the
IntroductionScreen, which was derived from the previously generated Figma code. - Navigation Setup: React Navigation was configured using
expo-routerwith aStack.Navigator. This sets up the basic navigation flow between all the generated screens, withIntroductionScreenas the initial route.musicbud-expo/app/_layout.tsx: Defines the root Stack Navigator.musicbud-expo/app/index.tsx: Redirects to theIntroductionScreenas the starting point.
- API Integration Strategy: A detailed
API_INTEGRATION_STRATEGY.mddocument was created in the project root, proposing a layered architecture for API interaction (Network Layer, Data Sources, Repositories), along with recommendations for state management (Redux Toolkit or Context API + React Query). - Testing Strategy: A
TESTING_STRATEGY.mddocument was created in the project root, outlining comprehensive testing approaches for Unit, Integration, and End-to-End testing using Jest and React Native Testing Library. - Backend API Integration: Transitioned key screens (like
BudsandChat) from using hardcoded mock data to fetching real data from the backend API using RTK Query.
-
Navigate to the project directory:
cd musicbud-expo -
Start the Expo development server:
npx expo start
-
Open the app:
- Scan the QR code displayed in your terminal with the Expo Go app on your physical device.
- Alternatively, choose to run on an Android emulator or iOS simulator (requires Xcode on macOS for iOS).
The IntroductionScreen (and potentially other future components if detailed Figma designs are manually converted) requires custom fonts for accurate visual representation.
-
Action Required from You: Please provide the
.ttfor.otffont files for the following fonts:PoiretOne-RegularJost-BoldJost-RegularTypo Round Bold Demo:Regular
-
Once you have the font files, follow these steps:
-
Create an
assets/fontsdirectory in the root of yourmusicbud-expoproject:mkdir -p assets/fonts
-
Place the acquired font files into the
musicbud-expo/assets/fontsdirectory. -
Create a
react-native.config.jsfile at the root of yourmusicbud-expoproject (if it doesn't already exist) with the following content:module.exports = { assets: ['./assets/fonts/'], };
-
Link the assets:
cd musicbud-expo npx react-native link(You might need to rebuild your app after linking fonts for the changes to take effect).
-
Verify
fontFamilynames: Ensure thefontFamilyvalues used in the components (e.g.,src/screens/IntroductionScreen.tsx) exactly match the base names of your font files (e.g., if the file isMyCustomFont-Regular.ttf, usefontFamily: 'MyCustomFont-Regular').
-
This completes the setup of the MusicBud React Native application with Expo Go, based on the provided Figma image assets.