mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 11:09:18 +02:00
fix: remove Post-ERG branding → XAMXAM; drop legacy posterg nginx symlink in deploy script; rename posterg.db → xamxam.db
This commit is contained in:
3
TODO.md
3
TODO.md
@@ -47,6 +47,9 @@
|
||||
- [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 `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
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# 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
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ if ($section === 'formulaire') {
|
||||
'encryption' => $_POST['smtp_encryption'] ?? 'tls',
|
||||
'username' => $_POST['smtp_username'] ?? '',
|
||||
'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.
|
||||
$pwd = $_POST['smtp_password'] ?? '';
|
||||
|
||||
@@ -32,16 +32,16 @@ if (!SmtpRelay::isConfigured($db)) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$subject = 'Test SMTP — Post-ERG';
|
||||
$subject = 'Test SMTP — XAMXAM';
|
||||
$sentDate = date('d/m/Y à H:i:s');
|
||||
$toSafe = htmlspecialchars($to);
|
||||
$body = <<<HTML
|
||||
<html>
|
||||
<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;">
|
||||
Test d'envoi SMTP — Post-ERG
|
||||
Test d'envoi SMTP — XAMXAM
|
||||
</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>
|
||||
<hr style="border:none; border-top:1px solid #ddd; margin: 24px 0;">
|
||||
<p style="font-size: 0.85rem; color: #666;">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?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
|
||||
* Supports both singleton (front-backend) and direct instantiation (formulaire)
|
||||
*/
|
||||
|
||||
@@ -34,7 +34,7 @@ class SmtpRelay {
|
||||
'username' => '',
|
||||
'password' => '',
|
||||
'from_email' => '',
|
||||
'from_name' => 'Post-ERG',
|
||||
'from_name' => 'XAMXAM',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Database Documentation
|
||||
|
||||
Complete documentation for the Post-ERG thesis database.
|
||||
Complete documentation for the XAMXAM thesis database.
|
||||
|
||||
## 📚 Available Documentation
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- Post-ERG Thesis Database Schema
|
||||
-- XAMXAM Thesis Database Schema
|
||||
-- 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 '',
|
||||
password TEXT NOT NULL DEFAULT '', -- stored in clear for now; encrypt later
|
||||
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
|
||||
);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -145,7 +145,7 @@ just reset-db
|
||||
Successful test run:
|
||||
```
|
||||
╔════════════════════════════════════════════╗
|
||||
║ Post-ERG Test Suite ║
|
||||
║ XAMXAM Test Suite ║
|
||||
╚════════════════════════════════════════════╝
|
||||
|
||||
┌─────────────────────────────────────────┐
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
* Post-ERG Test Runner
|
||||
* XAMXAM Test Runner
|
||||
* Runs all tests in the tests/ directory
|
||||
*/
|
||||
|
||||
echo "╔════════════════════════════════════════════╗\n";
|
||||
echo "║ Post-ERG Test Suite ║\n";
|
||||
echo "║ XAMXAM Test Suite ║\n";
|
||||
echo "╚════════════════════════════════════════════╝\n\n";
|
||||
|
||||
$testFiles = [
|
||||
|
||||
3
justfile
3
justfile
@@ -1,4 +1,4 @@
|
||||
# Post-ERG Justfile
|
||||
# XAMXAM Justfile
|
||||
|
||||
default:
|
||||
@just --list
|
||||
@@ -77,7 +77,6 @@ deploy-nginx:
|
||||
@echo "Files uploaded. SSH into the server and run:"
|
||||
@echo ""
|
||||
@echo " sudo bash /tmp/deploy-server.sh"
|
||||
@echo " sudo systemctl reload nginx"
|
||||
@echo ""
|
||||
|
||||
[group('deploy')]
|
||||
|
||||
@@ -25,7 +25,6 @@ just deploy-nginx
|
||||
# Then on the server:
|
||||
ssh xamxam
|
||||
sudo bash /tmp/deploy-server.sh
|
||||
sudo systemctl reload nginx
|
||||
```
|
||||
|
||||
The deployment script will:
|
||||
|
||||
@@ -22,7 +22,6 @@ just deploy-nginx
|
||||
```bash
|
||||
ssh xamxam
|
||||
sudo bash /tmp/deploy-server.sh
|
||||
sudo systemctl reload nginx
|
||||
```
|
||||
|
||||
### 3. Set admin password (first time only)
|
||||
|
||||
@@ -114,7 +114,7 @@ server {
|
||||
# Admin panel - password protected
|
||||
location ^~ /admin/ {
|
||||
# HTTP Basic Authentication (first layer)
|
||||
auth_basic "Admin Access - Post-ERG";
|
||||
auth_basic "Admin Access - XAMXAM";
|
||||
auth_basic_user_file /etc/nginx/.htpasswd-xamxam;
|
||||
|
||||
# Rate limiting for admin
|
||||
|
||||
@@ -20,8 +20,8 @@ warn() { printf "${YELLOW}!${NC} %s\n" "$*"; }
|
||||
|
||||
[ "$EUID" -eq 0 ] || { err "Run as root (sudo)"; exit 1; }
|
||||
|
||||
printf "🚀 Post-ERG Production Deployment\n"
|
||||
printf "==================================\n\n"
|
||||
printf "🚀 XAMXAM Production Deployment\n"
|
||||
printf "================================\n\n"
|
||||
|
||||
# ── Step 1: Permissions ───────────────────────────────────────────────────────
|
||||
printf "📋 Step 1: Fixing file permissions...\n"
|
||||
@@ -66,6 +66,12 @@ fi
|
||||
cp /tmp/xamxam.conf /etc/nginx/sites-available/xamxam
|
||||
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
|
||||
ln -s /etc/nginx/sites-available/xamxam /etc/nginx/sites-enabled/xamxam
|
||||
ok "Created sites-enabled symlink"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Manage admin users for Post-ERG nginx basic authentication
|
||||
# Manage admin users for XAMXAM nginx basic authentication
|
||||
|
||||
set -e
|
||||
|
||||
@@ -28,7 +28,7 @@ fi
|
||||
show_menu() {
|
||||
echo ""
|
||||
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 ""
|
||||
echo "1. List all users"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
echo "🔄 Migrating Post-ERG repository structure"
|
||||
echo "🔄 Migrating XAMXAM repository structure"
|
||||
echo "==========================================="
|
||||
echo ""
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/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.
|
||||
# Usage:
|
||||
# scripts/migrate.sh # xamxam.db (default)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
echo "🛠️ Setting up Post-ERG development environment"
|
||||
echo "🛠️ Setting up XAMXAM development environment"
|
||||
echo "=============================================="
|
||||
echo ""
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/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).
|
||||
#
|
||||
# Usage: just setup-server
|
||||
@@ -30,8 +30,8 @@ APP_GROUP="xamxam"
|
||||
WEB_USER="www-data"
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
printf "🔧 Post-ERG Server Setup\n"
|
||||
printf "========================\n\n"
|
||||
printf "🔧 XAMXAM Server Setup\n"
|
||||
printf "====================\n\n"
|
||||
|
||||
# ── 1. Create xamxam group ───────────────────────────────────────────────────
|
||||
if ! getent group "$APP_GROUP" >/dev/null; then
|
||||
|
||||
Reference in New Issue
Block a user