first commit
This commit is contained in:
76
README.md
Normal file
76
README.md
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
# Rental Manager
|
||||||
|
|
||||||
|
Gestion comptable de biens locatifs — Go + SvelteKit + SQLite.
|
||||||
|
|
||||||
|
## Stack
|
||||||
|
|
||||||
|
- **Backend** : Go 1.22, gorilla/mux, mattn/go-sqlite3
|
||||||
|
- **Frontend** : SvelteKit + TailwindCSS + Chart.js
|
||||||
|
- **BDD** : SQLite (WAL mode)
|
||||||
|
- **Déploiement** : Docker Compose (ESXi / NAS)
|
||||||
|
|
||||||
|
## Lancement développement
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Backend
|
||||||
|
cd rental-manager
|
||||||
|
go mod tidy
|
||||||
|
go run ./cmd/server
|
||||||
|
|
||||||
|
# Frontend (autre terminal)
|
||||||
|
cd frontend
|
||||||
|
npm install
|
||||||
|
npm run dev
|
||||||
|
```
|
||||||
|
|
||||||
|
## Déploiement production (ESXi)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose up -d --build
|
||||||
|
```
|
||||||
|
|
||||||
|
L'application est accessible sur `http://<IP>:8080`
|
||||||
|
|
||||||
|
## Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
cmd/server/main.go Entrypoint Go
|
||||||
|
internal/
|
||||||
|
auth/ Authentification, sessions, middleware
|
||||||
|
property/ Biens immobiliers
|
||||||
|
transaction/ Revenus & dépenses
|
||||||
|
calendar/ Événements d'occupation
|
||||||
|
document/ Pièces jointes
|
||||||
|
fiscal/ Export CSV annuel
|
||||||
|
ical/ Sync flux iCal Airbnb (goroutine)
|
||||||
|
db/ SQLite init + migrations
|
||||||
|
data/
|
||||||
|
rental.db Base SQLite (créée au démarrage)
|
||||||
|
documents/ Fichiers uploadés (property_id/année/)
|
||||||
|
frontend/src/
|
||||||
|
routes/ Pages SvelteKit
|
||||||
|
lib/stores/api.js Client API + stores Svelte
|
||||||
|
```
|
||||||
|
|
||||||
|
## Variables d'environnement
|
||||||
|
|
||||||
|
| Variable | Défaut | Description |
|
||||||
|
|----------|--------|-------------|
|
||||||
|
| PORT | 9000 | Port d'écoute |
|
||||||
|
| TZ | Europe/Paris | Timezone |
|
||||||
|
|
||||||
|
## Premiers pas après démarrage
|
||||||
|
|
||||||
|
1. Créer le premier utilisateur (endpoint à ajouter ou via SQLite direct)
|
||||||
|
2. Ajouter les deux biens (apartement longue durée + Airbnb)
|
||||||
|
3. Renseigner l'URL iCal Airbnb dans la fiche du bien Airbnb
|
||||||
|
4. La sync démarre automatiquement toutes les heures
|
||||||
|
|
||||||
|
## Sync iCal Airbnb
|
||||||
|
|
||||||
|
Airbnb expose un flux iCal par annonce :
|
||||||
|
`Annonce → Paramètres → Calendrier → Exporter le calendrier`
|
||||||
|
|
||||||
|
Coller l'URL `.ics` dans la fiche du bien. La goroutine `ical.Service`
|
||||||
|
synchronise automatiquement toutes les heures et loggue les résultats
|
||||||
|
dans `ical_sync_log`.
|
||||||
Reference in New Issue
Block a user