π NOTE DE TRAVAIL β SITE LOCAL paristaime
- RΓGLES DE BASE
Nom du projet : paristaime (en un mot, minuscule)
Tous les fichiers en anglais
1 composant = 1 fichier = 1 Alex
Aucun fichier ne peut Γͺtre renommΓ©, dΓ©placΓ© ou supprimΓ© sans validation de LI Yongxin
Tous les composants vont dans le dossier : /components/
Aucun travail direct dans index.php
Tout script, style, ou image doit aller dans /public/
- STRUCTURE DU DOSSIER
/paristaime/
β
βββ index.php β Page dβaccueil principale
βββ config.php β Constantes globales (BASE_URL, API keysβ¦)
βββ README.md β Guide du projet pour les Alex
β
βββ /components/ β Tous les composants PHP
β βββ adopt-button.php β Bouton pour adopter un quartier et sβy engager
β βββ carousel-single.php β Carrousel horizontal 1 ligne (swiper)
β βββ contribute-button.php β Bouton appel Γ participation (tΓ©moignage, vidΓ©oβ¦)
β βββ filter-tags.php β Filtres interactifs (par langue, ambiance, typeβ¦)
β βββ footer-basic.php β Pied de page simple et responsive
β βββ form-quartier.php β GΓ©nΓ©rateur de code PHP pour quartiers
β βββ form-video.php β GΓ©nΓ©rateur de code PHP pour vidΓ©os
β βββ gallery-grid.php β Grille dβimages responsive (photos, street-art)
β βββ header-video.php β VidΓ©o plein Γ©cran (hero) avec lecture automatique
β βββ language-tags.php β Affiche les langues ou identitΓ©s culturelles locales
β βββ lang-switcher.php β SΓ©lecteur de langue (FR/EN/CNβ¦)
β βββ lightbox-video.php β Lecture de vidΓ©o dans une fenΓͺtre modale (overlay)
β βββ map-interactive.php β Carte interactive de Paris (survol quartiers)
β βββ progress-status.php β Affiche le niveau dβintΓ©gration Paris Tβaime par quartier
β βββ quartier-card.php β Encart de quartier (image, titre, lien)
β βββ quartier-page.php β Structure complΓ¨te dβune page quartier
β βββ quote-overlay.php β Citation poΓ©tique ou phrase-clΓ© en surimpression
β βββ search-bar.php β Barre de recherche (vidΓ©os ou quartiers)
β βββ seo-meta.php β Meta-tags dynamiques pour SEO (title, descβ¦)
β βββ stats-block.php β Statistiques clΓ©s dβun quartier (surface, pop., langues)
β βββ testimonial-block.php β Bloc de tΓ©moignages texte/vidΓ©o
β βββ video-detail.php β Page ou bloc avec infos dΓ©taillΓ©es dβune vidΓ©o
β βββ video-sticky-click.php β VidΓ©o sticky aprΓ¨s clic
β βββ video-sticky-scroll.php β VidΓ©o sticky dΓ©clenchΓ©e au scroll
β
βββ /data/ β DonnΓ©es centralisΓ©es
β βββ quartier-video-data.php β Liste des 80 quartiers avec vidΓ©o, couleur, texteβ¦
β βββ video-data.php β Liste des vidΓ©os (titre, ID, description, quartierβ¦)
β
βββ /public/ β Fichiers statiques
β βββ /css/
β β βββ tlt-custom.css β CSS principal du site
β β βββ [autres fichiers] β Un CSS optionnel par composant si nΓ©cessaire
β β
β βββ /js/
β β βββ header-video.js β JS pour lecture vidΓ©o hero
β β βββ carousel.js β JS pour le carrousel swiper
β β βββ video-player.js β ContrΓ΄le des lecteurs
β β βββ [autres fichiers]
β β
β βββ /img/
β β βββ logo.png
β β βββ play-icon.svg β IcΓ΄ne personnalisΓ©e lecture
β β βββ quartier-[slug].jpg β Miniatures manuelles si besoin
β β
β βββ /fonts/ β Polices personnalisΓ©es (si utilisΓ©es)
β
βββ /tools/ β GΓ©nΓ©rateurs manuels de contenu (dev only)
β βββ formulaire-quartier.php β Interface de gΓ©nΓ©ration de blocsquartier-video-data
β βββ formulaire-video.php β Interface de gΓ©nΓ©ration de blocsvideo-data
β
βββ /dev/ β Tests non publics / prototypes
β βββ quartier.php β Page prototype pour afficher un quartier
β βββ test-sticky.php β Test du player sticky en scroll
β βββ [autres fichiers] - AVANT DE CODER
Chaque Alex doit :
Lire cette note
Demander validation du nom du composant (fichier PHP)
Sβengager Γ ne jamais modifier de fichier existant
Noter son nom et sa mission dans la liste de suivi
- STANDARD DE FICHIER PHP
Chaque fichier .php doit commencer par :
php
Copier
Modifier
<?php
/**
- Component: [Nom du composant en anglais]
- File: [nom-du-fichier.php]
- Author: Alex [numΓ©ro]
- Created: [date]
- Description: [fonction courte]
- DO NOT RENAME β validated by LI Yongxin.
*/
?>
- SPΓCIFICITΓS VIDΓO YOUTUBE
Les miniatures YouTube doivent Γͺtre rΓ©cupΓ©rΓ©es via YouTube Data API pour Γ©viter les miniatures cassΓ©es
On utilise un proxy dβimage ou une requΓͺte serveur si besoin
On prΓ©pare une icΓ΄ne personnalisΓ©e (lecture) pour remplacer celle par dΓ©faut de YouTube
Toutes les vidΓ©os doivent Γͺtre intΓ©grΓ©es avec iframe, autoplay contrΓ΄lΓ© et fallback mobile
- PRΓCAUTIONS TECHNIQUES (mise Γ jour continue)
Pas de require() entre composants
Centraliser les constantes dans config.php
Aucune inclusion de script directement dans un composant
Aucun style inline : tout dans /public/css/
Chaque JS doit Γͺtre modulaire et unique (ex : carousel.js, video-player.js)
Fichier video-data.php (dans /data/) sert de base pour toutes les vidΓ©os
ProblΓ¨mes Γ prΓ©voir : navigateur bloque autoplay son β prΓ©voir fallback (bouton “lancer”)
- EN CAS DβINCERTITUDE
Toujours demander Γ Alex Coordination (LI Yongxin)
Ne jamais improviser un nom de fichier
Ne jamais toucher un autre composant sans accord
Les dossiers /tools/ et /dev/ ne seront jamais mis en production.
Les donnΓ©es dans /data/ doivent rester simples, bien formatΓ©es, et documentΓ©es.
Toute inclusion dans index.php ou quartier.php se fait via include ‘components/xxx.php’;
βToute proposition de nouveau nom ou nouveau composant doit Γͺtre validΓ©e par lβΓ©quipe avant ajoutβ
π Note: Lessons Learned from File Naming and Structure Mistakes
During the setup of our custom forms and components for Paris Tβaime, we encountered major difficulties due to unclear file naming, misplaced directories, and inconsistent path references. These issues led to errors, white pages, broken links, and confusion between local vs. production environments.
β οΈ What Went Wrong
- CSS, PHP, and data files were scattered without clear logic (some in
/tools/
, others in/dev/
, or even root). - File names were inconsistent (e.g.,
form-video.php
vsform-video-meta.php
), making it hard to remember or reference them. - Components referred to nonexistent paths or wrong directories (e.g., writing to
/data/
instead of/dev/data/
). - Files were edited without central config constants, causing hardcoded paths to break on different machines or servers.
- French and English were mixed in code and comments, further complicating collaboration.
π‘ What We Learned
- Structure is sacred. Without a clear file system, even small forms become fragile.
- Naming must follow logic β use consistent, descriptive English names like
form-video-meta.php
,video-data.php
,form-quartier.php
. - Centralize path definitions in one place (
config.php
) and never use relative paths manually. - Data files must not be directly edited by scripts β always use a dump system (
*-dump.txt
) and verify before merging. - Protect your future self β every shortcut now creates long-term maintenance costs.
- Work modularly β every component (PHP, CSS, data) should be clean, independent, and testable alone.
β Moving Forward
- All new forms will follow the structure:
/tools/
β logic/dev/data/
β data/public/css/
β style - Every file will be named in English, with purpose-first clarity.
- We will version and track data changes through dumps and backups.
β¨ Conclusion
This experience reminded us that clarity beats speed, and that a creative project like Paris Tβaime deserves technical foundations that are as elegant and poetic as its message.
We document this moment not as a failure β but as a milestone in maturity.
Appendix:
π README.md
β Paris Tβaime Site Structure (2025)
markdownCopierModifier# π Paris Tβaime β Site Structure Guide
This project follows a modular and human-centric architecture inspired by the values of *Paris Tβaime*.
All components, tools, and data follow strict naming and folder placement rules to ensure clarity, collaboration, and long-term maintainability.
---
## π Root Tree Overview
/paristaime/
β
βββ components/ # π¨ Public-facing UI components (reusable)
β βββ form-video.php
β βββ header-video.php
β
βββ tools/ # π§ Admin tools for block generation or testing
β βββ form-video-meta.php
β βββ form-quartier.php
β
βββ data/ # π¦ Final PHP data blocks (editable but versioned)
β βββ video-data.php
β βββ quartier-video-data.php
β
βββ dev/ # π§ͺ Temporary test files and staging scripts
β βββ quartier.php
β βββ test-thumbnails.php
β
βββ public/ # ποΈ Assets: styles, images, JS
β βββ css/
β βββ tlt-custom.css # Global site design
β βββ form-video.css # Video form-specific layout
β
βββ config.php # π Central path config (defines BASE_URL, ROOT_PATH, etc.)
βββ index.php # π Default page (can be replaced by router)
yamlCopierModifier
---
## π Folder Roles & Philosophy
### `components/`
> Modular, reusable parts of the site β visual, semantic, and styled.
- π’ Public use
- π‘ Uses data from `/data/`
- β Example: forms, cards, headers, swipers
---
### `tools/`
> Internal use only. Meant for data generation, testing, injection.
- π Not intended for public visitors
- βοΈ Admin interface for creating PHP array blocks
- β Example: `form-video-meta.php` writes to `video-dump.txt`
---
### `data/`
> All final project data in PHP array format.
- π¦ Canonical source
- π Never placed in `/dev/`
- π Read by both `/components/` and `/tools/`
---
### `dev/`
> Testing environment. Temporary pages, scripts, prototypes.
- π§ͺ Do not deploy to production
- π Can be cleaned regularly
- π§ Use for A/B tests, debug views, etc.
---
### `public/`
> All frontend static assets.
- π¨ CSS, JS, images
- π Always referenced using `BASE_URL`
---
## β Rules to Follow
1. π **NEVER place final data in `/dev/data/`** β always use `/data/`
2. π **Use English file names** only β no accents or underscores
3. π **One function = one file** β clear component identity
4. π **All tools must be optional** β core site works without them
5. π **All paths must use `config.php` constants** (`BASE_URL`, `ROOT_PATH`)
6. π Document each component if it's reused
---
## π Contact
Project by LI Yongxin, Founder of *Paris Tβaime*
In collaboration with the 12 Alex of the AI Constellation
Last updated: 2025-05-23

π Full Project Structure Map β Paris Tβaime
Generated on 2025-05-23
============================================================
π /paristaime/
βββ components/ # π¨ Public-facing UI components (reusable)
β βββ adopt-button.php β Button to adopt a quartier
β βββ carousel-single.php β Carousel displaying single row of videos
β βββ contribute-button.php β CTA button for contributing content
β βββ filter-tags.php β UI filter for tags
β βββ footer-basic.php β Footer displayed across all pages
β βββ form-quartier.php β User-facing form for quartier (used in public)
β βββ form-video.php β Public form for adding new video metadata
β βββ gallery-grid.php β Photo gallery block
β βββ header-video.php β Video hero banner for quartier
β βββ lang-switcher.php β Language switcher interface
β βββ language-tags.php β Display tags for languages
β βββ lightbox-video.php β Lightbox video popup display
β βββ map-interactive.php β Interactive map of Paris quartiers
β βββ progress-status.php β Project progress visual indicator
β βββ quartier-card.php β Card UI block for displaying quartier
β βββ quartier-page.php β Full quartier detail page
β βββ quote-overlay.php β Overlay quote section for testimonials
β βββ search-bar.php β Search bar interface
β βββ seo-meta.php β Meta info for SEO
β βββ stats-block.php β Statistics visualization block
β βββ testimonial-block.php β Visitor/local testimonial component
β βββ video-detail.php β Detail view for single video
β βββ video-sticky-click.php β Sticky video triggered on click
β βββ video-sticky-scroll.php β Sticky video triggered on scroll
βββ tools/ # π οΈ Admin tools for internal content/data creation
β βββ form-video-meta.php β Admin-only: generates block for video-data.php
β βββ form-quartier.php β Admin-only: generates block for quartier-video-data.php
β βββ preview-blocks.php β Optional test for rendering PHP array blocks
β βββ test-thumbnails.php β Tests YouTube ID and retrieves thumbnail
β βββ test-header-video.php β Standalone test for header-video layout
βββ data/ # π¦ Final structured PHP arrays (version-controlled)
β βββ video-data.php β Final block of video entries (used on frontend)
β βββ quartier-video-data.php β Final quartier entries (used in quartier display)
βββ dev/ # π§ͺ Temporary tests, staging, experiments
β βββ quartier.php β Quartier display test using header-video
β βββ test-scroll-fullscreen.php β Prototype sticky fullscreen video on scroll
β βββ test-thumbnails.php β Same as tools/test-thumbnails.php (temp duplicate)
βββ public/css/ # π¨ Component-specific CSS files
β βββ adopt-button.css
β βββ carousel-single.css
β βββ contribute-button.css
β βββ filter-tags.css
β βββ footer-basic.css
β βββ form-quartier.css
β βββ form-video.css
β βββ gallery-grid.css
β βββ header-video.css
β βββ lang-switcher.css
β βββ language-tags.css
β βββ lightbox-video.css
β βββ map-interactive.css
β βββ progress-status.css
β βββ quartier-card.css
β βββ quartier-page.css
β βββ quote-overlay.css
β βββ search-bar.css
β βββ seo-meta.css
β βββ stats-block.css
β βββ testimonial-block.css
β βββ video-detail.css
β βββ video-sticky-click.css
β βββ video-sticky-scroll.css
βββ public/js/ # π Component-specific JS files
β βββ adopt-button.js
β βββ carousel-single.js
β βββ contribute-button.js
β βββ filter-tags.js
β βββ footer-basic.js
β βββ form-quartier.js
β βββ form-video.js
β βββ gallery-grid.js
β βββ header-video.js
β βββ lang-switcher.js
β βββ language-tags.js
β βββ lightbox-video.js
β βββ map-interactive.js
β βββ progress-status.js
β βββ quartier-card.js
β βββ quartier-page.js
β βββ quote-overlay.js
β βββ search-bar.js
β βββ seo-meta.js
β βββ stats-block.js
β βββ testimonial-block.js
β βββ video-detail.js
β βββ video-sticky-click.js
β βββ video-sticky-scroll.js
βββ config.php # π§ Global constants (paths, BASE_URL, etc.)
βββ index.php # π Homepage or launcher
βββ README.md # π Technical readme
βββ README-PARISTAIME # β¨ Human/cinematic project manifest
============================================================
β
RULE: Only tools/
can modify data/
files.
β
RULE: Only components/
are shown to the public.
β
RULE: Each component can have its own CSS + JS in /public/
β
RULE: No duplication of components/tools by name (e.g. form-video)
π§© Example: components/form-video.php
phpCopierModifier<?php require_once __DIR__ . '/../config.php'; ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Add a New Video</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="<?php echo BASE_URL; ?>/public/css/tlt-custom.css">
<link rel="stylesheet" href="<?php echo BASE_URL; ?>/public/css/form-video.css">
</head>
<body>
<?php include __DIR__ . '/form-video-html.php'; ?>
<script src="<?php echo BASE_URL; ?>/public/js/form-video.js"></script>
</body>
</html>
π§ Global JS Example (shared)
File: /public/js/sticky-player.js
Used in:
video-sticky-click.php
video-sticky-scroll.php
htmlCopierModifier<script src="<?php echo BASE_URL; ?>/public/js/sticky-player.js"></script>
β Summary Rules
File Type | Folder | Example |
---|---|---|
Component HTML | /components/ | form-video.php |
Component CSS | /public/css/ | form-video.css |
Component JS | /public/js/ | form-video.js |
Shared CSS/JS | /public/css/ + /js/ | tlt-custom.css , sticky-player.js |
Letβs generate a complete starter kit for the form-video
component, with:
- β
PHP file (
form-video.php
) - π¨ CSS file (
form-video.css
) - βοΈ JS file (
form-video.js
) - π Proper folder placement according to your architecture
β
1. components/form-video.php
phpCopierModifier<?php require_once __DIR__ . '/../config.php'; ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Add a New Video</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="<?php echo BASE_URL; ?>/public/css/tlt-custom.css">
<link rel="stylesheet" href="<?php echo BASE_URL; ?>/public/css/form-video.css">
</head>
<body>
<div class="form-video-wrapper">
<h2>Add a New Video</h2>
<form class="form-video" method="post" action="save-video.php">
<label>Title<input type="text" name="title" required></label>
<label>Slug<input type="text" name="slug"></label>
<label>Year<input type="number" name="year" value="2025"></label>
<label>YouTube ID<input type="text" name="video_id" required></label>
<label>Intro<textarea name="intro"></textarea></label>
<label>Status
<select name="status">
<option value="ready">Ready</option>
<option value="draft">Draft</option>
</select>
</label>
<button type="submit">Save Video</button>
</form>
</div>
<script src="<?php echo BASE_URL; ?>/public/js/form-video.js"></script>
</body>
</html>
π¨ 2. public/css/form-video.css
cssCopierModifier.form-video-wrapper {
max-width: 700px;
margin: 2rem auto;
padding: 2rem;
background: #fff;
border-radius: 12px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
.form-video label {
display: block;
margin-bottom: 1rem;
font-weight: 600;
}
.form-video input,
.form-video select,
.form-video textarea {
width: 100%;
padding: 0.6rem;
margin-top: 0.3rem;
border: 1px solid #ccc;
border-radius: 6px;
font-size: 1rem;
}
.form-video button {
margin-top: 1rem;
padding: 0.75rem 1.5rem;
background: #001944;
color: #fff;
border: none;
border-radius: 6px;
cursor: pointer;
}
@media (max-width: 600px) {
.form-video-wrapper {
padding: 1rem;
}
}
βοΈ 3. public/js/form-video.js
jsCopierModifierdocument.addEventListener('DOMContentLoaded', function () {
console.log("β
form-video.js loaded");
});
π Folder Placement (Recap)
cssCopierModifier/paristaime
βββ /components
β βββ form-video.php
βββ /public
β βββ /css
β β βββ form-video.css
β βββ /js
β βββ form-video.js
π FILE: files-map-components.txt
π LOCATION: /paristaime/docs/files-map-components.txt
π
VERSION: 2025-05-23
π§ PURPOSE: Prevent naming conflicts, ensure consistent placement, and clarify CSS/JS associations for each PHP component.
ββββββββββββββββββββββββββββββββββββββββββββββ
π¬ COMPONENT: form-video.php
π PATH: /paristaime/components/form-video.php
π¨ CSS: /public/css/form-video.css
βοΈ JS: /public/js/form-video.js
π¬ COMPONENT: form-quartier.php
π PATH: /paristaime/tools/form-quartier.php
π¨ CSS: /public/css/form-quartier.css
βοΈ JS: /public/js/form-quartier.js
π¬ COMPONENT: video-detail.php
π PATH: /paristaime/components/video-detail.php
π¨ CSS: /public/css/video-detail.css
βοΈ JS: /public/js/video-detail.js
π¬ COMPONENT: header-video.php
π PATH: /paristaime/components/header-video.php
π¨ CSS: /public/css/header-video.css
βοΈ JS: /public/js/header-video.js
π¬ COMPONENT: carousel.php
π PATH: /paristaime/components/carousel.php
π¨ CSS: /public/css/carousel.css
βοΈ JS: /public/js/carousel.js
π¬ COMPONENT: video-sticky-click.php
π PATH: /paristaime/components/video-sticky-click.php
π¨ CSS: /public/css/video-sticky.css
βοΈ JS: /public/js/sticky-player.js
π¬ COMPONENT: video-sticky-scroll.php
π PATH: /paristaime/components/video-sticky-scroll.php
π¨ CSS: /public/css/video-sticky.css
βοΈ JS: /public/js/sticky-player.js
π¬ COMPONENT: quartier.php (dynamic quartier page)
π PATH: /paristaime/dev/quartier.php
π DATA: /paristaime/dev/data/quartier-video-data.php
π¨ CSS: /public/css/quartier.css
βοΈ JS: /public/js/quartier.js
π¬ COMPONENT: video-form.php (DEPRECATED: replaced by form-video.php)
π DO NOT USE: Was replaced due to naming conflict
ββββββββββββββββββββββββββββββββββββββββββββββ
π¦ SHARED CSS FILES
β
/public/css/tlt-custom.css β global styles, fonts, colors, layout base
β
/public/css/tlt-grid.css β optional shared layout grid system
β
/public/css/tlt-buttons.css β shared UI button styles (if split later)
π¦ SHARED JS FILES
β
/public/js/tlt-global.js β global JS helpers, like scroll effects, modals
β
/public/js/sticky-player.js β sticky player used in multiple components
β
/public/js/swiper-init.js β if Swiper is used in carousels or sliders
ββββββββββββββββββββββββββββββββββββββββββββββ
π NAMING CONVENTIONS
- PHP:
form-x.php
,video-x.php
,header-x.php
, etc. - CSS:
form-x.css
,video-x.css
, β¦ - JS:
form-x.js
,video-x.js
, β¦ - Shared files start with:
tlt-*.css
,tlt-*.js
ββββββββββββββββββββββββββββββββββββββββββββββ
π FUTURE ADVICE
- Always check this file before naming a new component.
- All new PHP files should live in
/components/
unless used for tools or admin. - Do not mix
tools/
andcomponents/
logic. - All styles should live in
/public/css/
, never inline or in PHP files. - JS files must be in
/public/js/
, never embedded.
ββββββββββββββββββββββββββββββββββββββββββββββ
β
Maintained by: Paris Tβaime Development Team