How ponozka153/smash-or-pass works
Smash or Pass is a Tauri/React app for browsing randomly selected anime images, choosing Smash or Pass, and optionally uploading an image. On startup, the UI restores counters and requests an image; the Rust command chooses an endpoint and response-field mapping, then the UI fetches and displays the image. User reactions update counters persisted in browser storage. The upload modal sends an image and NSFW flag to the hosted upload service. The supplied source shows the PHP JSON and image proxies, but not the hosted service implementation or modal styling.
Main entry points: App.jsx Main app · main.jsx React entry · modal.jsx Upload modal · main.rs Tauri command
Components 11
App interface
- React entry
src/main.jsx - Main app
src/App.jsx - Upload modal
src/component/modal.jsx
Image selection
- Tauri command
src-tauri/src/main.rs
Remote services
- Image APIs
- Hosted random images
- JSON CORS proxy
proxy/index.php - Image proxy
proxy/image.php - Hosted upload service
User state
- Browser localStorage
Other components
- User
Connections 12
- User → React entry: opens app
- React entry → Main app: renders
- User → Main app: interacts
- Main app → Tauri command: invokes selector
- Tauri command → Main app: returns endpoint mapping
- Main app → Image APIs: fetches image data
- Main app → Hosted random images: fetches fallback image
- Main app → JSON CORS proxy: fetches via proxy
- Main app → Image proxy: loads proxied image
- Main app → Browser localStorage: reads and writes counters
- Main app → Upload modal: shows modal
- Upload modal → Hosted upload service: posts image and flag