first commit
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
# Photomaton — Interface de gestion
|
||||
|
||||
Interface web Python au-dessus de [photobooth-app](https://photobooth-app.org/) pour Raspberry Pi 4.
|
||||
|
||||
## Architecture
|
||||
|
||||
```
|
||||
photomaton/
|
||||
│
|
||||
├── backend/ # Serveur Python (FastAPI)
|
||||
│ ├── api/ # Routes REST & WebSocket
|
||||
│ │ ├── gallery.py # - Galerie publique & admin
|
||||
│ │ ├── print.py # - Modes d'impression
|
||||
│ │ ├── leds.py # - Contrôle anneau WS2812b
|
||||
│ │ ├── button.py # - Gestion bouton GPIO
|
||||
│ │ └── system.py # - Ressources système (CPU, RAM…)
|
||||
│ ├── services/ # Logique métier
|
||||
│ │ ├── photobooth.py # - Intégration photobooth-app
|
||||
│ │ ├── printer.py # - Gestion impression
|
||||
│ │ ├── led_service.py # - Effets LED (ring WS2812b)
|
||||
│ │ └── button_service.py # - Détection clic / double-clic / long
|
||||
│ ├── models/ # Schémas de données (Pydantic)
|
||||
│ └── utils/ # Helpers divers
|
||||
│
|
||||
├── frontend/ # Interface web
|
||||
│ ├── static/
|
||||
│ │ ├── css/ # Styles
|
||||
│ │ ├── js/ # Scripts (galerie, admin, live LED…)
|
||||
│ │ └── img/ # Assets statiques
|
||||
│ └── templates/
|
||||
│ ├── public/ # Galerie visiteurs (QR code / URL simple)
|
||||
│ ├── gallery/ # Galerie plein écran
|
||||
│ └── admin/ # Dashboard admin (impression, ressources)
|
||||
│
|
||||
├── hardware/
|
||||
│ ├── gpio/ # Gestion bouton physique (RPi.GPIO / gpiozero)
|
||||
│ └── leds/ # Anneau WS2812b (rpi_ws281x)
|
||||
│
|
||||
├── config/
|
||||
│ ├── settings.yaml # Config principale (GPIO pins, nb LEDs…)
|
||||
│ └── profiles.yaml # Profils photomaton (normal, fun, N&B…)
|
||||
│
|
||||
├── data/
|
||||
│ ├── photos/ # Photos produites (lien ou copie depuis photobooth-app)
|
||||
│ ├── thumbnails/ # Miniatures générées automatiquement
|
||||
│ ├── sessions/ # Métadonnées sessions
|
||||
│ └── logs/ # Journaux applicatifs
|
||||
│
|
||||
├── scripts/
|
||||
│ ├── install.sh # Installation dépendances
|
||||
│ ├── start.sh # Démarrage du service
|
||||
│ └── setup_service.sh # Création service systemd
|
||||
│
|
||||
└── docs/ # Documentation technique
|
||||
```
|
||||
|
||||
## Fonctionnalités
|
||||
|
||||
### Gestion bouton GPIO
|
||||
| Action | Effet |
|
||||
|--------|-------|
|
||||
| 1 clic | Photo profil par défaut |
|
||||
| 2 clics | Photo profil alternatif |
|
||||
| Long clic | Impression de la dernière photo |
|
||||
|
||||
### LEDs WS2812b (anneau)
|
||||
- Effets de veille, décompte, capture, succès, erreur
|
||||
- Configurable : nombre de LEDs, PIN GPIO, luminosité
|
||||
- Contrôle via API REST en temps réel
|
||||
|
||||
### Galerie
|
||||
- **Publique** : accès par QR code ou URL locale, visualisation et téléchargement
|
||||
- **Admin** : sélection et impression, filtrage par session
|
||||
|
||||
### Modes d'impression
|
||||
1. **Direct** : impression immédiate après capture
|
||||
2. **Galerie admin** : impression manuelle depuis le dashboard
|
||||
3. **Validation** : confirmation requise avant impression
|
||||
|
||||
### Dashboard admin
|
||||
- Ressources système en temps réel (CPU, RAM, température, disque)
|
||||
- Contrôle LED live
|
||||
- Historique des sessions
|
||||
- Configuration des profils
|
||||
|
||||
## Stack technique
|
||||
- **Backend** : Python 3.11+, FastAPI, WebSocket
|
||||
- **Frontend** : HTML/CSS/JS vanilla (léger, pas de framework lourd)
|
||||
- **LED** : `rpi_ws281x`
|
||||
- **GPIO** : `gpiozero`
|
||||
- **Intégration** : API REST de photobooth-app
|
||||
- **Proxy** : Zoraxy (SSL)
|
||||
- **Wifi** : RaspAP
|
||||
Reference in New Issue
Block a user