A self-hosted media library and file management system with secure JWT authentication and TrueNAS storage integration.
- ✅ Created missing
FileUploader.tsxcomponent - ✅ Created missing
login.tsxroute - ✅ Created missing
signup.tsxroute - ✅ Created missing
two.tsxtab route ⚠️ Package version updates needed
In your frontend directory, run:
cd frontend
npm install expo-document-picker@~13.0.4
npm install expo-constants@~18.0.12
npm install expo-linking@~8.0.11
npm install expo-status-bar@~3.0.9
npm install react@19.1.0 react-dom@19.1.0
npm install react-native@0.81.5
npm install react-native-web@^0.21.0
npm install --save-dev @types/react@~19.1.10Or update your package.json with these versions and run npm install:
{
"dependencies": {
"expo": "~54.0.30",
"expo-constants": "~18.0.12",
"expo-document-picker": "~13.0.4",
"expo-linking": "~8.0.11",
"expo-router": "~6.0.21",
"expo-secure-store": "^15.0.8",
"expo-status-bar": "~3.0.9",
"react": "19.1.0",
"react-dom": "19.1.0",
"react-native": "0.81.5",
"react-native-safe-area-context": "5.6.2",
"react-native-screens": "~4.16.0",
"react-native-web": "^0.21.0"
},
"devDependencies": {
"@types/react": "~19.1.10",
"typescript": "^5.9.3"
}
}I've created these files for you:
frontend/src/components/FileUploader.tsx- File upload componentfrontend/app/login.tsx- Login screenfrontend/app/signup.tsx- Signup screenfrontend/app/(tabs)/two.tsx- Second tab
These files are in the /mnt/user-data/outputs/frontend/ directory.
Make sure to update the API URL in these files to match your backend IP:
Files to update:
src/context/AuthContext.js- Line 12src/components/FileUploader.tsx- Line 6app/signup.tsx- Line 6
Replace 100.120.80.117 with your actual IP address.
After making these changes:
# Clear Metro bundler cache
npx expo start -c
# Or if that doesn't work:
rm -rf node_modules
rm -rf .expo
npm install
npx expo start -cThis component:
- Uses expo-document-picker to select files
- Uploads files to your backend using FormData
- Shows upload progress with ActivityIndicator
- Displays success/error alerts
- Standalone login route
- Uses AuthContext for authentication
- Can navigate to signup
- User registration form
- Validates password confirmation
- Navigates to login after successful signup
- Simple placeholder for second tab
- Can be customized for additional features
- Start backend:
cd backend && npm run dev - Start frontend:
cd frontend && npx expo start -c - Test on device/simulator
- Try login with test credentials
- Try uploading a file
"Cannot find module"
- Run
npm installagain - Clear cache with
npx expo start -c
"Network request failed"
- Check backend is running
- Verify IP address is correct
- Make sure device is on same network
"Unmatched Route"
- Ensure all route files have default exports
- Clear .expo folder and restart
- Update package.json versions
- Install dependencies
- Copy new files to their locations
- Update API URLs
- Test the app
Let me know if you encounter any other issues!