# Media Aggregation and Sorting System This is my final-year mobile app project. It is an Expo/React Native app that pulls media from multiple sources (device storage, Google Photos picker flow, and NAS) and shows everything in one timeline-style view. ## What This Project Does - Local user accounts (register/login) - Local SQLite database on-device (`PhotosApp.db`) - Service onboarding for: - Google Photos - NAS - iCloud placeholder - Unified media view with source badges - Collections/albums screen - Search screen - Settings screen for theme, services, and backup options ## Current Architecture ### App entry and navigation - Entrypoint is `App.js` - `App.js` initializes the database, then mounts navigation - Stack flow: - `Login` - `Register` - `Onboarding` - `MainTabs` - `Settings` - Bottom tabs in `MainTabs`: - `Library` (`HomeScreen`) - `Search` (`SearchScreen`) - `Collections` (`AlbumsScreen`) ### Data layer Database setup lives in `src/services/DatabaseService.js`. Tables currently used: - `users` - `linked_accounts` - `media` Passwords are hashed with SHA-256 via `src/services/CredentialEncryption.js`. Linked account payloads are stored as Base64-encoded JSON strings. ### Service/auth layer Auth services are in `src/AUTH/`: - `GoogleAUTH.js` - `NASAUTH.js` - `IOSAUTH.js` (placeholder) Common interface base: `src/AUTH/AuthServiceBase.js`. API client wrappers are in `src/API/`. ### Backend (NAS side) There is a separate Node/Express backend in `ServerFiles/server.js`. It handles NAS connection and file operations for the mobile app. ## Project Structure ```text Media-Aggregation-and-Sorting-System/ ├── App.js ├── app.json ├── package.json ├── src/ │ ├── API/ │ ├── AUTH/ │ ├── components/ │ ├── screens/ │ └── services/ ├── ServerFiles/ │ ├── server.js │ └── package.json └── TEST/ ``` ## Running the Project Useful scripts: ```bash expo run:android ``` ### NAS backend ```bash cd ./ServerFiles npm i npm start ```