A React Native mobile application built with Expo and TypeScript for connecting communities and sharing resources.
Solar Village is a cross-platform mobile app that helps users discover and share resources within their community. The app features:
- Interactive Map View: Real-time location tracking with user positioning on a map
- Customizable Settings: Configure search preferences with distance slider (0-100 miles) and resource type toggles (Food, School Supplies)
- Location Services: Automatic device location detection with permission handling
Before you begin, ensure you have the following installed:
-
Node.js: Version 20.17.0 or higher (20.19.4+ recommended)
- Download from nodejs.org
- Verify installation:
node --version
-
Package Manager: npm (comes with Node.js) or yarn
- npm verify:
npm --version
- npm verify:
-
Expo CLI: Can be used via npx (recommended) or installed globally
- Global install (optional):
npm install -g expo-cli
- Global install (optional):
-
Testing Platforms (choose one or more):
- Physical Device: Install Expo Go app from App Store (iOS) or Google Play (Android)
- iOS Simulator: Requires macOS with Xcode installed
- Android Emulator: Requires Android Studio with AVD configured
-
** Clone the repository:**
git clone https://github.com/Kibble/solar-village.git
-
Navigate to the project directory:
cd solar-village -
Install dependencies:
npm install
-
Key packages included:
expo(~54.0.22) - Expo SDKreact-native(0.81.5) - React Native frameworktypescript(^5.9.3) - TypeScript supportreact-native-maps(1.20.1) - Map componentexpo-location(~19.0.7) - Location services@react-navigation/native- Navigation framework@react-navigation/bottom-tabs- Bottom tab navigator@react-native-community/slider(5.0.1) - Slider componentexpo-navigation-bar- Android system UI control@expo/vector-icons- Icon library (Ionicons)
npm startThis will start the Metro bundler and display a QR code in your terminal.
Once the development server is running, you can launch the app on different platforms:
# Press 'i' in the terminal, or run:
npx expo start --ios# Press 'a' in the terminal, or run:
npx expo start --android- Install the Expo Go app on your iOS or Android device
- Scan the QR code displayed in the terminal:
- iOS: Use the Camera app to scan the QR code
- Android: Use the Camera or Expo Go app to scan the QR code
- The app will load on your device
# Press 'w' in the terminal, or run:
npx expo start --webNote: Some features like native maps and location services may not work properly in web mode.
Use the A.B.C.D format for versioning:
- A: Major version - Used for complete overhauls and/or major milestones
- B: Minor version - Used for milestones
- C: Release number - Increment each time a build is handed off to QA
- D: Build number - Auto generated by EAS
We may switch to semver format once our workflow is ironed out.
Use EAS to generate builds for both Android and iOS devices. Before running
a build, be sure to increment the version number in app.json per the
versioning convention above.
# Authenticate with EAS
eas login
# Create an Android build
eas build --platform android
# Create an iOS build
eas build --platform iosHandoff to QA is currently done through the #solar-village-ticket-tracker channel in Discord, using the following format:
- Ticket Title: [Build] [{platform}] {version}
- Platform: {platform}
- Build: {version}
- Commit: {short commit hash}
- Taigas: {list of Taiga tickets the build addresses}
- Notes: {anything else that needs to be communicated}
Example:
Platform: Android
Build: 0.0.1.12
Commit: e158d44
Taigas: 35, 36, 37, 38, 39, 42
Notes:
None, this is an example.
solar-village/
βββ App.tsx # Main app component with navigation setup
βββ components/ # Folder with re-usable React components
βββ screens/
β βββ HomeScreen.tsx # Map view with location tracking
β βββ ChatScreen.tsx # Chat interface (placeholder)
β βββ SettingsScreen.tsx # Settings with slider and toggles
βββ types/ # TypeScript type definitions without a better home
βββ app.json # Expo configuration
βββ tsconfig.json # TypeScript configuration
βββ package.json # Dependencies and scripts
βββ assets/ # Images and icons
- App.tsx: Sets up React Navigation with bottom tabs, configures Android immersive mode
- screens/HomeScreen.tsx: Displays map with user location, handles permissions
- screens/SettingsScreen.tsx: Interactive settings with distance slider and resource toggles
- app.json: Expo configuration including permissions (location, Android edge-to-edge)
- tsconfig.json: TypeScript compiler configuration for React Native
Run TypeScript compiler to check for type errors without emitting files:
npx tsc --noEmitThe app requires location permissions to function properly:
- iOS: Configured in
app.jsonwithNSLocationWhenInUseUsageDescription - Android: Requires
ACCESS_FINE_LOCATIONandACCESS_COARSE_LOCATIONpermissions
Users will be prompted to grant location access when the app first launches.
- Hides the system navigation bar (back, home, recent apps buttons)
- Swipe up from bottom edge to temporarily reveal
- Auto-hides after a few seconds
- Requires development build - not available in Expo Go
- Android: Uses Google Maps by default
- iOS: Uses Apple Maps by default
- Production builds may require additional API key configuration
-
Expo Go Limitations:
- Android immersive mode requires a development build
- Some native features may not work in Expo Go
-
Map API Keys:
- For production builds, you may need to configure Google Maps API keys
- See react-native-maps documentation for details
-
Node Version:
- Some packages show warnings for Node.js < 20.19.4
- App works with Node.js 20.17.0 but upgrading is recommended
The app uses a consistent green color scheme:
- Primary Color:
#2d5016(Dark Green) - Secondary Color:
#7fb069(Light Green) - Active States: Green theme colors
- Inactive States: Gray (
#8e8e93)
# Start development server
npx expo start
# Start with cache cleared
npx expo start --clear
# Run on iOS simulator
npx expo start --ios
# Run on Android emulator
npx expo start --android
# Run in web browser
npx expo start --web
# Type check
npx tsc --noEmit
# Create development build
npx expo run:android
npx expo run:iosThis is a development project. For any questions or issues, please refer to the project documentation.
This project is part of the Solar Village initiative.
Version: 0.0.1 Built with: React Native, Expo, TypeScript Platform Support: iOS, Android