close
Skip to content

VeriteIgiraneza/caddy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

caddy

A self-hosted media library and file management system with secure JWT authentication and TrueNAS storage integration.

Caddy App - Fix Instructions

Issues Fixed:

  1. ✅ Created missing FileUploader.tsx component
  2. ✅ Created missing login.tsx route
  3. ✅ Created missing signup.tsx route
  4. ✅ Created missing two.tsx tab route
  5. ⚠️ Package version updates needed

Steps to Fix:

1. Update Dependencies

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.10

Or 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"
  }
}

2. Copy Missing Files

I've created these files for you:

  • frontend/src/components/FileUploader.tsx - File upload component
  • frontend/app/login.tsx - Login screen
  • frontend/app/signup.tsx - Signup screen
  • frontend/app/(tabs)/two.tsx - Second tab

These files are in the /mnt/user-data/outputs/frontend/ directory.

3. Update API URLs

Make sure to update the API URL in these files to match your backend IP:

Files to update:

  • src/context/AuthContext.js - Line 12
  • src/components/FileUploader.tsx - Line 6
  • app/signup.tsx - Line 6

Replace 100.120.80.117 with your actual IP address.

4. Clean Start

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 -c

File Contents:

FileUploader.tsx

This component:

  • Uses expo-document-picker to select files
  • Uploads files to your backend using FormData
  • Shows upload progress with ActivityIndicator
  • Displays success/error alerts

login.tsx

  • Standalone login route
  • Uses AuthContext for authentication
  • Can navigate to signup

signup.tsx

  • User registration form
  • Validates password confirmation
  • Navigates to login after successful signup

two.tsx

  • Simple placeholder for second tab
  • Can be customized for additional features

Testing:

  1. Start backend: cd backend && npm run dev
  2. Start frontend: cd frontend && npx expo start -c
  3. Test on device/simulator
  4. Try login with test credentials
  5. Try uploading a file

Common Issues:

"Cannot find module"

  • Run npm install again
  • 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

Next Steps:

  1. Update package.json versions
  2. Install dependencies
  3. Copy new files to their locations
  4. Update API URLs
  5. Test the app

Let me know if you encounter any other issues!

About

A self-hosted media library and file management system with secure JWT authentication and TrueNAS storage integration.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors