Complete documentation for both web and mobile frontend applications.
SkillSwap has two frontend applications:
- Web Frontend: React-based web application (desktop-optimized)
- Mobile Frontend: React Native mobile app built with Expo 54
Both applications share:
- Dark theme with light highlights (purple/blue gradient accents)
- React Context API for state management
- Axios for HTTP requests
- Custom theme system
- Dark theme with light highlights
- Responsive design (optimized for desktop)
- Animated discover cards with drag-to-swipe
- Complete profile editing with all features
- Mobile keyboard optimization
- Modern UI with smooth animations
- Real-time notifications (toast notifications)
- Badge notifications for matches and messages
- React: 18.3.1
- React Router DOM: 6.28.0
- Framer Motion: 11.15.0 (for animations)
- Axios: 1.7.9
- CSS Variables: For theming
- Create React App: 5.0.1 (build tool)
-
Install dependencies:
cd frontend-web npm install -
Start the development server:
npm start
-
Access the application:
- The app will run on http://localhost:3000
- API requests are proxied to http://localhost:8080
Create a .env file in the frontend-web directory (optional):
REACT_APP_API_URL=http://localhost:8080
frontend-web/
├── src/
│ ├── components/ # Reusable components (Navbar, DiscoverCard, etc.)
│ ├── contexts/ # React Context providers (Auth, Notifications)
│ ├── pages/ # Page components (Login, Discover, Profile, etc.)
│ ├── services/ # API service layer
│ ├── styles/ # Global styles and theme
│ ├── App.js # Main app component with routing
│ └── index.js # Entry point
├── public/ # Static assets
└── package.json # Dependencies
- Input fields use
font-size: 16pxto prevent iOS zoom - Touch-friendly button sizes
- Responsive layouts for mobile devices
- Keyboard-aware layouts
Current Status: 9 vulnerabilities in development dependencies only (not in production builds).
These vulnerabilities are in:
nth-check(high) - Inefficient Regular Expression Complexitypostcss(moderate) - Line return parsing errorwebpack-dev-server(moderate) - Source code exposure
Impact:
- ✅ Production builds are completely safe
- ✅ All runtime dependencies are up to date
⚠️ Only affects development server (local development)
Recommendations:
- Accept the risk (recommended for now) - these only affect dev server
- Future consideration: Migrate to Vite for better security
See frontend-web/SECURITY_NOTES.md for detailed information.
- Dark theme with light highlights
- Native mobile app experience
- Animated discover cards with swipe gestures
- Complete profile editing (photos, skills, interests, organizations, languages)
- Mobile keyboard optimization
- Easy testing on physical devices
- Photo upload with device camera/gallery
- Precise location using device GPS
- Pull-to-refresh on matches and messages
- Badge notifications for matches and messages
- State persistence (remembers last viewed conversation)
- Expo: ~54.0.0
- React: 19.1.0
- React Native: 0.81.5
- Expo Router: ~6.0.15 (file-based routing)
- React Navigation: 7.x (Bottom Tabs, Stack Navigator)
- React Native Reanimated: ~4.1.1 (animations)
- React Native Gesture Handler: ~2.28.0 (swipe gestures)
- Expo Location: ~19.0.7 (GPS location)
- Expo Image Picker: ~17.0.8 (photo uploads)
- AsyncStorage: 2.2.0 (local storage)
- Axios: 1.13.2
-
Install dependencies:
cd frontend-mobile npm install -
Start the Expo development server:
npx expo start
-
Scan the QR code with:
- iOS: Camera app or Expo Go app
- Android: Expo Go app
- Install Expo Go from App Store (iOS) or Play Store (Android)
- Run
npx expo start - Scan the QR code with Expo Go
- Run
npx expo run:iosornpx expo run:android - App will be installed on connected device/simulator
Important: When testing on a physical device, you need to configure the API URL.
When testing on a physical device, localhost:8080 refers to the device itself, not your development machine where the backend is running. This causes network errors.
1. Android Emulator
- Use:
http://10.0.2.2:8080 - This is automatically configured in the code
2. iOS Simulator
- Use:
http://localhost:8080 - This is automatically configured in the code
3. Physical Device (Android or iOS) You need to use your computer's local IP address:
Find Your IP Address:
- Windows: Open Command Prompt and run
ipconfig- Look for "IPv4 Address" under your active network adapter
- Example:
192.168.1.100
- Mac/Linux: Open Terminal and run
ifconfigorip addr- Look for your active network interface (usually
en0orwlan0) - Example:
192.168.1.100
- Look for your active network interface (usually
Update the API URL:
- Open
frontend-mobile/src/services/api.js - Find the
PHYSICAL_DEVICE_IPconstant (around line 10-11) - Update it with your computer's IP:
const PHYSICAL_DEVICE_IP = 'http://192.168.1.100:8080'; // Your IP const IS_PHYSICAL_DEVICE = true; // Set to true for physical device
Important Notes:
- Backend Must Be Running: Make sure your Spring Boot backend is running on port 8080
- Same Network: Your phone and computer must be on the same Wi-Fi network
- Firewall: Make sure your firewall allows connections on port 8080
- Backend CORS: Ensure your backend allows requests from your mobile app
Testing Steps:
- Start your backend server:
mvn spring-boot:run - Find your computer's IP address (see above)
- Update
src/services/api.jswith your IP - Restart the Expo app
- Test the connection
frontend-mobile/
├── app/ # Expo Router pages (file-based routing)
│ ├── (tabs)/ # Tab navigation screens
│ ├── login.js # Login screen
│ ├── register.js # Registration screen
│ └── profile/ # Profile viewing screens
├── src/
│ ├── components/ # Reusable components (DiscoverCard)
│ ├── contexts/ # React Context providers (Auth, Notifications)
│ ├── services/ # API service layer
│ └── styles/ # Theme configuration
├── assets/ # Image assets (icon, splash, etc.)
├── app.json # Expo configuration
└── package.json # Dependencies
- Input fields use
fontSize: 16to prevent iOS zoom KeyboardAvoidingViewfor proper keyboard handling- Touch-optimized button sizes
- Native animations with Reanimated
- Gesture-based swipe interactions
- Pull-to-refresh functionality
- State persistence with AsyncStorage
The assets/ folder should contain:
icon.png- App icon (1024x1024px recommended)splash.png- Splash screen imageadaptive-icon.png- Android adaptive icon (1024x1024px)favicon.png- Web favicon
Note: The app will work without these, but you'll see warnings. You can add actual images later using:
- Expo's asset generator:
npx expo-asset-generator - Or create simple colored squares as placeholders
Background Colors:
- Primary:
#0f0f1e(dark navy) - Secondary:
#1a1a2e(darker navy) - Tertiary:
#16213e(blue-gray) - Card:
#1e2746(card background)
Accent Colors:
- Primary:
#667eea(purple-blue) - Secondary:
#764ba2(purple) - Success:
#48bb78(green) - Warning:
#ed8936(orange) - Danger:
#f56565(red)
Text Colors:
- Primary:
#e2e8f0(light gray) - Secondary:
#a0aec0(medium gray) - Muted:
#718096(dark gray)
xs: 4pxsm: 8pxmd: 16pxlg: 24pxxl: 32pxxxl: 48px
sm: 6pxmd: 8pxlg: 12pxxl: 16px
Method 1: Clear via Expo Dev Tools
- Open Expo Dev Tools (shake device or press
min terminal) - Go to "Debug" → "Clear AsyncStorage"
- Reload the app
Method 2: Uninstall and Reinstall
- Uninstall the app from your device/emulator
- Reinstall it
- All storage will be cleared
Method 3: Clear via React Native Debugger
- Open React Native Debugger
- In console, type:
AsyncStorage.clear() - Reload app
Method 1: Browser DevTools
- Open browser DevTools (F12)
- Go to "Application" tab (Chrome) or "Storage" tab (Firefox)
- Click "Local Storage" → your domain
- Right-click → "Clear" or delete
currentUserkey - Refresh the page
Method 2: Browser Console
- Open browser console (F12)
- Type:
localStorage.removeItem('currentUser') - Press Enter
- Refresh the page
Current Implementation: Both apps are configured to NOT auto-login on startup. They will:
- Clear any stored user data on app load
- Always start at the login screen
- Require users to manually log in
Quick Fix Checklist:
- ✅ Verify backend is running:
http://YOUR_IP:8080/api/usersin browser - ✅ Check API URL in
frontend-mobile/src/services/api.js - ✅ Ensure phone and computer are on same Wi-Fi network
- ✅ Check firewall settings (allow port 8080)
- ✅ Test URL in phone browser first
Common Causes:
- Wrong IP address in
api.js - Backend not running
- Firewall blocking port 8080
- Phone and computer on different networks
- Missing
http://prefix in IP address
Solutions:
- Double-check IP address format:
http://192.168.1.100:8080(not192.168.1.100:8080) - Test URL in phone browser first
- Check firewall settings
- Verify backend is running:
mvn spring-boot:run
- Check your Spring Boot backend CORS configuration
- Make sure it allows requests from your mobile app
- Check backend controller routes match
/api/users,/api/profiles, etc.
- This is handled by
setupProxy.js- the error is expected if the backend doesn't serve/manifest.json - The app will continue to work normally
# Find what's using port 3000
netstat -ano | findstr :3000
# Kill the process (replace <PID> with the number from above)
taskkill /PID <PID> /F- Main README: See
README.mdfor backend setup and full project documentation - Security Notes: See
frontend-web/SECURITY_NOTES.mdfor detailed security information - Troubleshooting: See
TROUBLESHOOTING.mdfor more detailed troubleshooting guides
-
Start development server:
cd frontend-web npm start -
Make changes - Hot reload is enabled
-
Test in browser - App runs on http://localhost:3000
-
Start Expo server:
cd frontend-mobile npx expo start -
Scan QR code with Expo Go app
-
Make changes - Fast Refresh is enabled
-
Test on device - Changes appear automatically
Last Updated: Based on latest frontend implementations with Expo 54 and React 18.3.1