fix: remove Post-ERG branding → XAMXAM; drop legacy posterg nginx symlink in deploy script; rename posterg.db → xamxam.db

This commit is contained in:
Pontoporeia
2026-04-30 11:10:07 +02:00
parent c949cf9481
commit 68e30abb56
20 changed files with 36 additions and 30 deletions

View File

@@ -47,6 +47,9 @@
- [x] Update `nginx/README.md`, `nginx/SETUP.md`, and all `nginx/docs/*.md` - [x] Update `nginx/README.md`, `nginx/SETUP.md`, and all `nginx/docs/*.md`
- [x] Update PHP source: `Database.php`, `SystemController.php`, `MediaController.php`, `LiveReloadController.php`, `SmtpRelay.php`, `live-reload.php`, export actions - [x] Update PHP source: `Database.php`, `SystemController.php`, `MediaController.php`, `LiveReloadController.php`, `SmtpRelay.php`, `live-reload.php`, export actions
- [x] Update `app/migrations/run.php`, `app/tests/README.md`, `app/storage/README.md` - [x] Update `app/migrations/run.php`, `app/tests/README.md`, `app/storage/README.md`
- [x] Replace all remaining "Post-ERG" branding with "XAMXAM" (scripts, PHP source, schema, docs)
- [x] `deploy-server.sh`: remove legacy `sites-enabled/posterg` symlink to fix duplicate `limit_req_zone` nginx error
- [x] Rename local `storage/posterg.db``storage/xamxam.db`
## CSS refactor ## CSS refactor

View File

@@ -1,6 +1,6 @@
# Admin Panel Structure # Admin Panel Structure
This directory contains the admin panel for managing Post-ERG thesis database. This directory contains the admin panel for managing XAMXAM thesis database.
## Directory Structure ## Directory Structure

View File

@@ -39,7 +39,7 @@ if ($section === 'formulaire') {
'encryption' => $_POST['smtp_encryption'] ?? 'tls', 'encryption' => $_POST['smtp_encryption'] ?? 'tls',
'username' => $_POST['smtp_username'] ?? '', 'username' => $_POST['smtp_username'] ?? '',
'from_email' => $_POST['smtp_from_email'] ?? '', 'from_email' => $_POST['smtp_from_email'] ?? '',
'from_name' => $_POST['smtp_from_name'] ?? 'Post-ERG', 'from_name' => $_POST['smtp_from_name'] ?? 'XAMXAM',
]; ];
// Only update password when user actually typed something. // Only update password when user actually typed something.
$pwd = $_POST['smtp_password'] ?? ''; $pwd = $_POST['smtp_password'] ?? '';

View File

@@ -32,16 +32,16 @@ if (!SmtpRelay::isConfigured($db)) {
exit; exit;
} }
$subject = 'Test SMTP — Post-ERG'; $subject = 'Test SMTP — XAMXAM';
$sentDate = date('d/m/Y à H:i:s'); $sentDate = date('d/m/Y à H:i:s');
$toSafe = htmlspecialchars($to); $toSafe = htmlspecialchars($to);
$body = <<<HTML $body = <<<HTML
<html> <html>
<body style="font-family: sans-serif; color: #222; max-width: 600px; margin: 0 auto; padding: 24px;"> <body style="font-family: sans-serif; color: #222; max-width: 600px; margin: 0 auto; padding: 24px;">
<h1 style="font-size: 1.4rem; border-bottom: 2px solid #c00; padding-bottom: 8px;"> <h1 style="font-size: 1.4rem; border-bottom: 2px solid #c00; padding-bottom: 8px;">
Test d'envoi SMTP — Post-ERG Test d'envoi SMTP — XAMXAM
</h1> </h1>
<p>Ceci est un e-mail de test envoyé depuis l'interface d'administration de <strong>Post-ERG</strong>.</p> <p>Ceci est un e-mail de test envoyé depuis l'interface d'administration de <strong>XAMXAM</strong>.</p>
<p>Si vous recevez ce message, la configuration du relay SMTP est correcte.</p> <p>Si vous recevez ce message, la configuration du relay SMTP est correcte.</p>
<hr style="border:none; border-top:1px solid #ddd; margin: 24px 0;"> <hr style="border:none; border-top:1px solid #ddd; margin: 24px 0;">
<p style="font-size: 0.85rem; color: #666;"> <p style="font-size: 0.85rem; color: #666;">

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Unified Database connection class for Post-ERG thesis database * Unified Database connection class for XAMXAM thesis database
* Combines functionality from both front-backend and formulaire * Combines functionality from both front-backend and formulaire
* Supports both singleton (front-backend) and direct instantiation (formulaire) * Supports both singleton (front-backend) and direct instantiation (formulaire)
*/ */

View File

@@ -34,7 +34,7 @@ class SmtpRelay {
'username' => '', 'username' => '',
'password' => '', 'password' => '',
'from_email' => '', 'from_email' => '',
'from_name' => 'Post-ERG', 'from_name' => 'XAMXAM',
]; ];
} }

View File

@@ -1,6 +1,6 @@
# Database Documentation # Database Documentation
Complete documentation for the Post-ERG thesis database. Complete documentation for the XAMXAM thesis database.
## 📚 Available Documentation ## 📚 Available Documentation

View File

@@ -1,4 +1,4 @@
-- Post-ERG Thesis Database Schema -- XAMXAM Thesis Database Schema
-- SQLite Database for managing final thesis projects (TFE) and doctoral theses -- SQLite Database for managing final thesis projects (TFE) and doctoral theses
-- ============================================================================ -- ============================================================================
@@ -359,7 +359,7 @@ CREATE TABLE IF NOT EXISTS smtp_settings (
username TEXT NOT NULL DEFAULT '', username TEXT NOT NULL DEFAULT '',
password TEXT NOT NULL DEFAULT '', -- stored in clear for now; encrypt later password TEXT NOT NULL DEFAULT '', -- stored in clear for now; encrypt later
from_email TEXT NOT NULL DEFAULT '', from_email TEXT NOT NULL DEFAULT '',
from_name TEXT NOT NULL DEFAULT 'Post-ERG', from_name TEXT NOT NULL DEFAULT 'XAMXAM',
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP updated_at DATETIME DEFAULT CURRENT_TIMESTAMP
); );

View File

@@ -1,6 +1,6 @@
# Post-ERG Test Suite # XAMXAM Test Suite
Centralized test suite for the Post-ERG thesis management system. Centralized test suite for the XAMXAM thesis management system.
## 📁 Structure ## 📁 Structure
@@ -145,7 +145,7 @@ just reset-db
Successful test run: Successful test run:
``` ```
╔════════════════════════════════════════════╗ ╔════════════════════════════════════════════╗
Post-ERG Test Suite ║ XAMXAM Test Suite ║
╚════════════════════════════════════════════╝ ╚════════════════════════════════════════════╝
┌─────────────────────────────────────────┐ ┌─────────────────────────────────────────┐

View File

@@ -1,12 +1,12 @@
#!/usr/bin/env php #!/usr/bin/env php
<?php <?php
/** /**
* Post-ERG Test Runner * XAMXAM Test Runner
* Runs all tests in the tests/ directory * Runs all tests in the tests/ directory
*/ */
echo "╔════════════════════════════════════════════╗\n"; echo "╔════════════════════════════════════════════╗\n";
echo "Post-ERG Test Suite ║\n"; echo "XAMXAM Test Suite ║\n";
echo "╚════════════════════════════════════════════╝\n\n"; echo "╚════════════════════════════════════════════╝\n\n";
$testFiles = [ $testFiles = [

View File

@@ -1,4 +1,4 @@
# Post-ERG Justfile # XAMXAM Justfile
default: default:
@just --list @just --list
@@ -77,7 +77,6 @@ deploy-nginx:
@echo "Files uploaded. SSH into the server and run:" @echo "Files uploaded. SSH into the server and run:"
@echo "" @echo ""
@echo " sudo bash /tmp/deploy-server.sh" @echo " sudo bash /tmp/deploy-server.sh"
@echo " sudo systemctl reload nginx"
@echo "" @echo ""
[group('deploy')] [group('deploy')]

View File

@@ -25,7 +25,6 @@ just deploy-nginx
# Then on the server: # Then on the server:
ssh xamxam ssh xamxam
sudo bash /tmp/deploy-server.sh sudo bash /tmp/deploy-server.sh
sudo systemctl reload nginx
``` ```
The deployment script will: The deployment script will:

View File

@@ -22,7 +22,6 @@ just deploy-nginx
```bash ```bash
ssh xamxam ssh xamxam
sudo bash /tmp/deploy-server.sh sudo bash /tmp/deploy-server.sh
sudo systemctl reload nginx
``` ```
### 3. Set admin password (first time only) ### 3. Set admin password (first time only)

View File

@@ -114,7 +114,7 @@ server {
# Admin panel - password protected # Admin panel - password protected
location ^~ /admin/ { location ^~ /admin/ {
# HTTP Basic Authentication (first layer) # HTTP Basic Authentication (first layer)
auth_basic "Admin Access - Post-ERG"; auth_basic "Admin Access - XAMXAM";
auth_basic_user_file /etc/nginx/.htpasswd-xamxam; auth_basic_user_file /etc/nginx/.htpasswd-xamxam;
# Rate limiting for admin # Rate limiting for admin

View File

@@ -20,8 +20,8 @@ warn() { printf "${YELLOW}!${NC} %s\n" "$*"; }
[ "$EUID" -eq 0 ] || { err "Run as root (sudo)"; exit 1; } [ "$EUID" -eq 0 ] || { err "Run as root (sudo)"; exit 1; }
printf "🚀 Post-ERG Production Deployment\n" printf "🚀 XAMXAM Production Deployment\n"
printf "==================================\n\n" printf "================================\n\n"
# ── Step 1: Permissions ─────────────────────────────────────────────────────── # ── Step 1: Permissions ───────────────────────────────────────────────────────
printf "📋 Step 1: Fixing file permissions...\n" printf "📋 Step 1: Fixing file permissions...\n"
@@ -66,6 +66,12 @@ fi
cp /tmp/xamxam.conf /etc/nginx/sites-available/xamxam cp /tmp/xamxam.conf /etc/nginx/sites-available/xamxam
ok "Installed new nginx config" ok "Installed new nginx config"
# Remove legacy posterg symlink if it exists (causes duplicate limit_req_zone)
if [ -L "/etc/nginx/sites-enabled/posterg" ]; then
rm /etc/nginx/sites-enabled/posterg
ok "Removed legacy sites-enabled/posterg symlink"
fi
if [ ! -L "/etc/nginx/sites-enabled/xamxam" ]; then if [ ! -L "/etc/nginx/sites-enabled/xamxam" ]; then
ln -s /etc/nginx/sites-available/xamxam /etc/nginx/sites-enabled/xamxam ln -s /etc/nginx/sites-available/xamxam /etc/nginx/sites-enabled/xamxam
ok "Created sites-enabled symlink" ok "Created sites-enabled symlink"

View File

@@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
# Manage admin users for Post-ERG nginx basic authentication # Manage admin users for XAMXAM nginx basic authentication
set -e set -e
@@ -28,7 +28,7 @@ fi
show_menu() { show_menu() {
echo "" echo ""
echo -e "${BLUE}════════════════════════════════════════${NC}" echo -e "${BLUE}════════════════════════════════════════${NC}"
echo -e "${BLUE} Post-ERG Admin User Management${NC}" echo -e "${BLUE} XAMXAM Admin User Management${NC}"
echo -e "${BLUE}════════════════════════════════════════${NC}" echo -e "${BLUE}════════════════════════════════════════${NC}"
echo "" echo ""
echo "1. List all users" echo "1. List all users"

View File

@@ -3,7 +3,7 @@
set -e set -e
echo "🔄 Migrating Post-ERG repository structure" echo "🔄 Migrating XAMXAM repository structure"
echo "===========================================" echo "==========================================="
echo "" echo ""

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Initialise the Post-ERG SQLite database from schema.sql. # Initialise the XAMXAM SQLite database from schema.sql.
# Safe to run on existing databases — schema uses IF NOT EXISTS / INSERT OR IGNORE. # Safe to run on existing databases — schema uses IF NOT EXISTS / INSERT OR IGNORE.
# Usage: # Usage:
# scripts/migrate.sh # xamxam.db (default) # scripts/migrate.sh # xamxam.db (default)

View File

@@ -3,7 +3,7 @@
set -e set -e
echo "🛠️ Setting up Post-ERG development environment" echo "🛠️ Setting up XAMXAM development environment"
echo "==============================================" echo "=============================================="
echo "" echo ""

View File

@@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
# One-time server setup for Post-ERG # One-time server setup for XAMXAM
# Run this before the first deploy (or after a permission reset). # Run this before the first deploy (or after a permission reset).
# #
# Usage: just setup-server # Usage: just setup-server
@@ -30,8 +30,8 @@ APP_GROUP="xamxam"
WEB_USER="www-data" WEB_USER="www-data"
# ───────────────────────────────────────────────────────────────────────────── # ─────────────────────────────────────────────────────────────────────────────
printf "🔧 Post-ERG Server Setup\n" printf "🔧 XAMXAM Server Setup\n"
printf "========================\n\n" printf "====================\n\n"
# ── 1. Create xamxam group ─────────────────────────────────────────────────── # ── 1. Create xamxam group ───────────────────────────────────────────────────
if ! getent group "$APP_GROUP" >/dev/null; then if ! getent group "$APP_GROUP" >/dev/null; then