35e03d6d17cc3df7b5a71f0230397668e4e10684
EU Media Guide CMS
CMS basato su Grav per la gestione dei contenuti multilingua della media guide.
Struttura del Progetto
grav-cms-mediaguide/
├── docker-compose.yml # Config Docker per Coolify
├── config/
│ ├── system.yaml # Config sistema (24 lingue EU)
│ └── site.yaml # Config sito
├── blueprints/
│ └── station.yaml # Blueprint per le stazioni/moduli
├── pages/
│ └── stations/
│ └── test-module/ # Modulo di test
├── plugins/
│ └── json-export/ # Plugin per export JSON + API
└── README.md
Deploy su Coolify
1. Crea Repository Git
cd grav-cms-mediaguide
git init
git add .
git commit -m "Initial CMS setup"
git remote add origin <your-repo-url>
git push -u origin main
2. Deploy su Coolify
- In Coolify, crea un nuovo servizio Docker Compose
- Collega il repository Git
- Imposta la porta pubblica su
8080 - Deploy!
3. Setup Iniziale Grav
Dopo il primo deploy, accedi al container e crea l'utente admin:
# Accedi al container
docker exec -it mediaguide-cms bash
# Crea utente admin
bin/plugin login new-user
4. Installa Plugin Admin
bin/gpm install admin
API Endpoints
Il plugin json-export espone questi endpoint:
| Endpoint | Descrizione |
|---|---|
GET /api/stations?lang=en |
Lista tutte le stazioni |
GET /api/station/{id}?lang=en |
Contenuto singola stazione |
GET /api/translations?lang=en |
Traduzioni UI |
GET /api/export |
Esporta tutto in file JSON |
Esempio Risposta /api/station/test-welcome?lang=en
{
"id": "test-welcome",
"type": "intro",
"language": "en",
"title": "Welcome to the European Parliament",
"description": "Your interactive guide to European democracy",
"components": [
{
"id": "welcome-heading",
"type": "heading",
"level": "h1",
"content": "Welcome to the European Parliament"
},
{
"id": "intro-text",
"type": "text",
"content": "<p>Welcome to the heart of European democracy...</p>"
},
{
"id": "welcome-video",
"type": "video",
"src": "/media/videos/welcome-en.mp4",
"poster": "/media/images/video-poster.jpg",
"caption": "A brief introduction to the European Parliament"
}
]
}
Lingue Supportate (Ordine Protocollo UE)
| Codice | Lingua |
|---|---|
| bg | български |
| es | español |
| cs | čeština |
| da | dansk |
| de | Deutsch |
| et | eesti |
| el | ελληνικά |
| en | English |
| fr | français |
| ga | Gaeilge |
| hr | hrvatski |
| it | italiano |
| lv | latviešu |
| lt | lietuvių |
| hu | magyar |
| mt | Malti |
| nl | Nederlands |
| pl | polski |
| pt | português |
| ro | română |
| sk | slovenčina |
| sl | slovenščina |
| fi | suomi |
| sv | svenska |
Gestione Contenuti
Creare una Nuova Stazione
- Accedi all'admin panel:
http://your-domain:8080/admin - Vai su Pages → Add → Station
- Compila i campi multilingua
- Aggiungi i componenti (heading, text, video, audio, tabs, slideshow)
- Salva
Struttura File Markdown
Ogni stazione è un file .md con frontmatter YAML:
---
title: Station Title
station_id: unique-id
station_type: exhibit
active: true
order: 1
title_translations:
en: English Title
fr: Titre français
components:
- type: heading
id: heading-1
level: h1
content:
en: English Heading
fr: Titre français
---
Prossimi Passi
- Deploy del CMS su Coolify
- Configurare l'admin panel
- Creare il container React per l'app
- Collegare l'app agli endpoint API del CMS
Description
Languages
PHP
96.9%
Dockerfile
3.1%