A personal NAS (Network Attached Storage) solution for photo management with automatic metadata extraction, face detection, and web-based interface.
- 📤 Photo Upload: Drag & drop or click to upload multiple photos
- 📊 Metadata Extraction: Automatic EXIF data extraction (date, location, camera info)
- 👤 Face Detection: AI-powered face detection using OpenCV
- 📱 Mobile Friendly: Responsive web interface that works on phones and tablets
- 🗂️ Organization: View photos with detailed metadata
- 🖼️ Thumbnails: Automatic thumbnail generation for fast browsing
- 📍 GPS Support: Location data extraction and Google Maps integration
- Python 3.8+
- Node.js 16+
- Install Python dependencies:
pip install -r requirements.txt- Run the FastAPI server:
python main.pyThe API server will be available at http://localhost:8000
- Navigate to the frontend directory:
cd frontend- Install dependencies:
npm install- Start the development server:
npm run devThe frontend will be available at http://localhost:3000
To build the frontend for production:
cd frontend
npm run buildPOST /upload- Upload photos (supports multiple files)GET /photos- Get list of photos with paginationGET /photo/{photo_id}- Get detailed photo informationGET /uploads/photos/{filename}- Access full-size photosGET /uploads/thumbnails/{filename}- Access photo thumbnails
pyNas/
├── main.py # FastAPI application
├── models.py # Database models
├── photo_service.py # Photo processing service
├── requirements.txt # Python dependencies
├── uploads/ # Photo storage directory
│ ├── photos/ # Full-size photos
│ └── thumbnails/ # Generated thumbnails
└── frontend/ # React frontend
├── src/
│ ├── components/ # React components
│ ├── App.jsx # Main app component
│ └── main.jsx # Entry point
├── package.json
└── vite.config.js
Backend:
- FastAPI (Python web framework)
- SQLAlchemy (Database ORM)
- Pillow (Image processing)
- OpenCV (Face detection)
- ExifRead (Metadata extraction)
Frontend:
- React 18
- Vite (Build tool)
- React Dropzone (File upload)
- CSS3 with responsive design
The application uses SQLite by default for simplicity. You can modify models.py to use PostgreSQL or other databases for production use.
The web interface is fully responsive and optimized for mobile devices. You can access your NAS from your phone by navigating to your server's IP address.
- Photo organization by date/location
- Album creation
- Photo search functionality
- User authentication
- Backup and sync features
- Advanced face recognition
- Memory/moment recommendations"# pyNas"