total_1ère

This commit is contained in:
2026-07-20 16:33:04 +02:00
parent dd49ba357b
commit d49cf88d99
275 changed files with 63607 additions and 5599 deletions

262
readme.html Normal file
View File

@@ -0,0 +1,262 @@
<h1 id="node.js">NODE.JS</h1>
<h1 id="modification-importante">MODIFICATION IMPORTANTE</h1>
<p>app.use(bodyparser.urlencoded({ extended: false}));</p>
<h2 id="démarrage-du-projet">DÉMARRAGE DU PROJET</h2>
<pre><code>cd /Users/juliechaumard/Documents/GitHub/Aduzuki_v2
npm start</code></pre>
<h1 id="documentation">DOCUMENTATION</h1>
<ul>
<li>Dans ce dossier sous /documentation</li>
<li>MindMap : GoogleDrive-juliechaumard@gmail.com/Mon
Drive/Projets/Suzuki/Adusuki/dev</li>
<li>Notion</li>
</ul>
<h1 id="domain">DOMAIN</h1>
<pre><code>inscription.afpedagogiesuzuki.fr</code></pre>
<h2 id="ovh-zone-dns">OVH ZONE DNS</h2>
<p>inscription.afpedagogiesuzuki.fr A 162.19.79.63
inscription.afpedagogiesuzuki.fr AAAA 2001:41d0:304:200::537f
www.inscription.afpedagogiesuzuki.fr CNAME
inscription.afpedagogiesuzuki.fr</p>
<h1 id="vps">VPS</h1>
<p>port = 8891 proxy_pass http://localhost:8891; proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection
upgrade; proxy_set_header Host $host; proxy_cache_bypass
$http_upgrade;</p>
<h1 id="db-sql">DB SQL</h1>
<p>CREATE USER sqladmin@37.170.212.144 IDENTIFIED BY
Squser1admin!; GRANT ALL PRIVILEGES ON <em>.</em> TO
sqladmin@37.170.212.144; FLUSH PRIVILEGES;</p>
<p>db_connection_host=“localhost” db_connection_port=3306
db_connection_user=“root” db_connection_password=“G1plumeverte!”
db_connection_database=“aduzuki”</p>
<h1 id="pm2">PM2</h1>
<p>/var/www/aduzuki pm2 start
/var/www/aduzuki/modules/adhesion/majgs_webhook.js name
majgs_webhook</p>
<h1 id="google-sheet">GOOGLE SHEET</h1>
<h2 id="partager-avec">Partager avec</h2>
<pre><code>- afpedagogiesuzuki@gmail.com
- al.sauvegrain@gmail.com
- userapi@inscriptionsafps.iam.gserviceaccount.com</code></pre>
<h1 id="site-de-dev">SITE DE DEV</h1>
<h2 id="new">NEW</h2>
<h3 id="url">URL</h3>
<p>aduzuki.darkweb.land</p>
<h3 id="ngninx-sites-available">NGNINX sites-available</h3>
<p>server {</p>
<pre><code> root /var/www/aduzuki;
index index.html index.htm index.nginx-debian.html;
server_name aduzuki.darkweb.land;
location / {
proxy_pass http://localhost:8893;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection &#39;upgrade&#39;;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
listen [::]:443 ssl; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/aduzuki.darkweb.land/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/aduzuki.darkweb.land/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot</code></pre>
<p>} server { if (<span class="math inline">$host =
aduzuki.darkweb.land) {
return 301 https://$</span>host$request_uri; } # managed by
Certbot</p>
<pre><code> listen 80;
listen [::]:80;
server_name aduzuki.darkweb.land;
return 404; # managed by Certbot</code></pre>
<p>}</p>
<p>vps-38339055.vps.ovh.net:49170 /var/www debian G1plumeverte!</p>
<h1 id="urls">URLs</h1>
<h2 id="accueil">ACCUEIL</h2>
<pre><code>https://www.adhesion.afpedagogiesuzuki.fr/inscription/accueil</code></pre>
<h2 id="formulaire-adhésion">FORMULAIRE ADHÉSION</h2>
<pre><code>http://localhost:8890/adhesion
https://www.adusuki.juliechaumard.paris/adhesion
https://inscription.afpedagogiesuzuki.fr/adhesion</code></pre>
<h3 id="gestion-des-adhésion">GESTION DES ADHÉSION</h3>
<pre><code>https://inscription.afpedagogiesuzuki.fr/adhesion/maj_googlesheet_auto
https://www.inscription.afpedagogiesuzuki.fr/adhesion/maj_googlesheet</code></pre>
<h2 id="envoie-carte-adhérent-et-justificatif-de-don-manuel">ENVOIE
CARTE ADHÉRENT ET JUSTIFICATIF DE DON MANUEL</h2>
<pre><code>http://localhost:8888/inscription/adhesion/carte_manuelle
https://www.adusuki.juliechaumard.paris/inscription/adhesion/carte_manuelle
https://inscription.afpedagogiesuzuki.fr/adhesion/carte_manuelle</code></pre>
<h2 id="stage-annuel">STAGE ANNUEL</h2>
<pre><code>http://localhost:8890/stagenational
https://adusuki.juliechaumard.paris/stagenational
https://inscription.afpedagogiesuzuki.fr/stagenational</code></pre>
<h3 id="gestion-du-stage">GESTION DU STAGE</h3>
<pre><code>https://www.inscription.afpedagogiesuzuki.fr/adhesion/admin</code></pre>
<h2 id="rassemblement-idf">RASSEMBLEMENT IDF</h2>
<pre><code>http://localhost:8890/rassemblementidf
https://www.adusuki.juliechaumard.paris/rassemblementidf
https://www.inscription.afpedagogiesuzuki.fr/rassemblementidf</code></pre>
<h2 id="rassemblement-idf-1">RASSEMBLEMENT IDF</h2>
<pre><code>http://localhost:8890/rassemblementra
https://adusuki.juliechaumard.paris/rassemblementidf
https://inscription.afpedagogiesuzuki.fr/rassemblementra</code></pre>
<h2 id="concert-unesco">CONCERT UNESCO</h2>
<pre><code>http://localhost:8890/concert
https://www.adusuki.juliechaumard.paris/concert
https://www.inscription.afpedagogiesuzuki.fr/concert
https://inscription.afpedagogiesuzuki.fr/
https://inscription.afpedagogiesuzuki.fr/concert/concert_paiement/annule?id={CHECKOUT_SESSION_ID}
https://inscription.afpedagogiesuzuki.fr/concert/concert_paiement/reussi?id={CHECKOUT_SESSION_ID}</code></pre>
<h2 id="boutique">BOUTIQUE</h2>
<h3 id="vidéos">VIDÉOS</h3>
<pre><code>https://inscription.afpedagogiesuzuki.fr/boutique/videos</code></pre>
<p>STRIPE_VENTEVIDEO_SUCCESSURL=https://inscription.afpedagogiesuzuki.fr/boutique/videos/paiement_reussi?id={CHECKOUT_SESSION_ID}
STRIPE_VENTEVIDEO_CANCELURL=https://inscription.afpedagogiesuzuki.fr/boutique/videos/paiement_annule?id={CHECKOUT_SESSION_ID}</p>
<p>STRIPE_PRIVATE_KEY_TEST=sk_test_51Kv1j8BAHsmvBJpQhGQV4hHbLEKGls7MMm5wuMRa3xBqYXtF5JP4RUPFyK0QBQwrrCPPF1l3dSW3KZ3AYDGEdwSd00uDYg3ACp
STRIPE_PUBLISHABLE_KEY_TEST=pk_test_51Kv1j8BAHsmvBJpQ8SVqXOMsgQs0slKAbtSUqUnqQZt4FBvr9t5TY5ZlEkQjWqTwTIhdx3H2iRCgQizqn1NN0BWU00239nRLYv</p>
<p>https://inscription.afpedagogiesuzuki.fr/wh_stripe Traitements après
paiement. Pour le moment effectif pour le paiement dun don via le
bouton “SOUTENIR” du site de lAFPS</p>
<p>checkout.session.async_payment_failed
checkout.session.async_payment_succeeded checkout.session.completed
checkout.session.expired</p>
<p>Version de lAPI : 2024-11-20.acacia</p>
<p>DOMAIN_EXTERNE=“https://inscription.afpedagogiesuzuki.fr/”</p>
<h1 id="variables-denvironnement-de-prod">VARIABLES DENVIRONNEMENT DE
PROD</h1>
<p>PORT=“8891” ENV=“production” COOKIE_SECRET=patapuf
DOMAIN=“http://localhost:8891/”</p>
<p>STRIPE_PRIVATE_KEY=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
STRIPE_PUBLISHABLE_KEY=pk_live_51L888YBaJ0SjyxPrhYkkZ0zTH54PQQlsnfmZQ7obB3HsZzvscNFssjVdDMyuH4fyRZEyybOg9UKoDfTn5JIuI6OI003bou1D3Y
STRIPE_SUCCESSURL=https://inscription.afpedagogiesuzuki.fr/adhesion/adhesion_paiement/reussi?id={CHECKOUT_SESSION_ID}
STRIPE_CANCELURL=https://inscription.afpedagogiesuzuki.fr/adhesion/adhesion_paiement/annule?id={CHECKOUT_SESSION_ID}
STRIPE_SN_SUCCESSURL=https://inscription.afpedagogiesuzuki.fr/stagenational/paiement_reussi?id={CHECKOUT_SESSION_ID}
STRIPE_SN_CANCELURL=https://inscription.afpedagogiesuzuki.fr/stagenational/paiement_annule?id={CHECKOUT_SESSION_ID}
STRIPE_RI_SUCCESSURL=https://inscription.afpedagogiesuzuki.fr/rassemblementidf/paiement_reussi?id={CHECKOUT_SESSION_ID}
STRIPE_RI_CANCELURL=https://inscription.afpedagogiesuzuki.fr/rassemblementidf/paiement_annule?id={CHECKOUT_SESSION_ID}
STRIPE_RI_PRIVATE_KEY=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
STRIPE_RI_PUBLISHABLE_KEY=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
STRIPE_CONCERT_SUCCESSURL=https://inscription.afpedagogiesuzuki.fr/concert/concert_paiement/reussi?id={CHECKOUT_SESSION_ID}
STRIPE_CONCERT_CANCELURL=https://inscription.afpedagogiesuzuki.fr/concert/concert_paiement/annule?id={CHECKOUT_SESSION_ID}</p>
<p>PDF_SERVICES_CLIENT_ID_julie=7596ed8f2a634c84a631d17e9d841844
PDF_SERVICES_CLIENT_SECRET_julie=p8e-Rf13NOjxHR1EUvlhhsn8aTwc2fHROSw0
PDF_SERVICES_CLIENT_ID=3f87412e36174973864e7c678c6fe918
PDF_SERVICES_CLIENT_SECRET=p8e-U5qFwt7VT7mUspkww9Tloj5kK4tVreDW</p>
<p>nodemailer_user=“afps.inscription@gmail.com” nodemailer_pass=“fuqw
qbtu mlly dcvu”</p>
<p>gsheet_adhesion=“1kk3w5yGnHxGb9dtUkTlizVSvnf40erk6zYzR2QTk16g”
gsheet_concertannuel=“1KHU5uIJnOWWs3xWifJGxalYG2fFsMzSec84ikU8dPcY”
gsheet_stagenat=“1STdRD5lXP316hgtdQfNqcqSQavzaoOXDMOqmfqPc3_0”</p>
<p>db_connection_host=“localhost” db_connection_port=3306
db_connection_user=“root” db_connection_password=“G1plumeverte!”
db_connection_database=“aduzuki”</p>
<p>weezevent_API_KEY=“17f7767ebe199c534b2cf1848dcb3490”
weezevent_API_KEY_AFPS=“17f7767ebe199c534b2cf1848dcb3490”
weezevent_USER_AFPS=“julie@parisweb.art”
weezevent_USER=“julie@parisweb.art” weezevent_PASSWORD=“testapi123”
weezevent_TOKEN_afps=“ecba0495a54cb69c10c34945a51abaec”
weezevent_TOKEN=“ecba0495a54cb69c10c34945a51abaec”
weezevent_id_event_concertiste=“1043199”
weezevent_id_event_encacrant=“1043198”
weezevent_id_event_spect=“1043050” weez_id_billet_concertiste=“3875316”
weez_id_billet_spectateur=“3874933”
weez_id_billet_encadrant_parent=“3875313”
weez_id_billet_encadrant_prof=“3875315”</p>
<p>spectateur_nb_places=1308 remiseenvente_spect=“non”
encadr_parent_nb_places=60 piano_nb_places=55 alto_nb_places=33
flute_nb_places=32 trompette_nb_places=15 harpe_nb_places=10
violon1_nb_places=220 violon2_nb_places=43 violoncelle1_nb_places=62
violoncelle2_nb_places=37</p>
<h2 id="dev">DEV</h2>
<pre><code>OVH WEB CLOUD
jivciei.cluster024.hosting.ovh.net
DOMAINE
adusuki.juliechaumard.paris
DOSSIER
adusuki
MOTEUR D&#39;EXECUTION
nodejs-14
SYNCHRO GOODSYNC
ADUZUKI DEV - OVH WebCloud Julie
BD
jivcieiadmin.mysql.db
CONNEXION TERMINAL
/usr/bin/ssh jivciei@sshcloud.cluster024.hosting.ovh.net -p 46057
password = uTpn9mcDAVsC
cd /home/jivciei/adusuki
GMAIL
nodemailer_user=&quot;juliechaumard@gmail.com&quot;
nodemailer_pass=&quot;etfq umof iwbx ltxk&quot;
### GNROK
https://bf89-2a01-e0a-5ee-1510-4021-f309-9a2c-823.ngrok-free.app/wh_stripe
https://9243-2a01-e0a-5ee-1510-4c7b-ac31-5c89-f077.ngrok-free.app</code></pre>
<h2 id="modules">MODULES</h2>
<pre><code>npm-node14 install htmltopdf-weasyprint</code></pre>
<h2 id="prod">PROD</h2>
<pre><code>GMAIL
nodemailer_user=&quot;afps.inscription@gmail.com&quot;
nodemailer_pass=&quot;fuqw qbtu mlly dcvu&quot;
</code></pre>
<h1 id="abbréviations">ABBRÉVIATIONS</h1>
<p>SN ou stn = STAGE NATIONAL</p>
<h1 id="logging">LOGGING</h1>
<p>Exemples de traces</p>
<pre><code>N&#39;importe où
logger.info(&quot;NOUS SOMMES DANS LE FICHIER : &quot; + __filename,</code></pre>
<p>{ label: __filename });</p>
<pre><code>Dans une fonction req res :
logger.info(&#39;bonjour Julie&#39;,</code></pre>
<p>{ numsession: req.session.id }); logger.info(process.env.PORT : +
process.env.PORT), { numsession: req.session.id }, { label: __filename
};</p>
<pre><code> logger.info(&quot;XXX&quot; + ZZZ, { numsession: req.session.id }, { label: __filename });</code></pre>
<h1 id="env">ENV</h1>
<p>Si on change une variable denvironnement, il faut redémarrer le
projet</p>
<h1 id="htaccess">HTACCESS</h1>
<p>ORIGINAL RewriteEngine On RewriteCond %{ENV:HTTPS} !on RewriteRule
(.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]</p>
<h1 id="pdf">PDF</h1>
<pre><code>try {
var pdf_html = fs.readFileSync(path.resolve(__dirname,&quot;../pdf/template/carte_adherent.html&quot;), &quot;utf8&quot;);
var pdf_buffer = await weasyprint(pdf_html);
fs.writeFileSync(&quot;juju.pdf&quot;, pdf_buffer);
} catch (error) {
logger.info(&quot;Erreur durant la création du PDF : &quot; + error, { numsession: req.session.id });
}</code></pre>
<h1 id="stripe">STRIPE</h1>
<p>TEST CARD</p>
<pre><code>ok normal
4242424242424242
4242 4242 4242 4242
ok 3DS
4000000000003063
pb
4000000000000002</code></pre>
<p>RETOUR
https://www.adusuki.afpedagogiesuzuki.fr/inscription/adhesion_paiement/reussi?id=cs_test_b1teU2a5wbTFwdPKGefvrKS1N6deBGPK86xFhdbxqKo9dtmgCzwoYZ8fJ6</p>
<h1 id="inscription-maj-google-sheet-automatique">INSCRIPTION MAJ Google
Sheet automatique</h1>
<p>CRON - le cron est lancé par la librairie cron de NodeJS - fichier
modules/adhesion/majgs_webhook.js - mise en prod - ne pas oublier de
changer lURL à lancer dans le fichier majgs_webhook.js : commenter
lURL de dev localhost et décommenter lURL de prod - pm2 start
/var/www/aduzuki/modules/adhesion/majgs_webhook.js name
majgs_webhook</p>
<p>/Users/juliechaumard/Documents/GitHub/Aduzuki_v2/controllers/vente_video/files</p>
<p>INSERT INTO ras_adherent ( identifiant, association_suzuki, lieu,
saison, date_maj, adherent_nom, adherent_prenom, adherent_telephone,
adherent_mail, adherent_adresse_rue, adherent_adresse_complement,
adherent_adresse_codepostal, adherent_adresse_ville,
adherent_adresse_pays, ras_commentaire, accompagnant_nom,
accompagnant_prenom, tarif_rassemblement, cout_total, statut_paiement,
statut_suppression ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?)</p>