From f1b1bf0c4c0690d7a00993196603d2ae5a7b6990 Mon Sep 17 00:00:00 2001 From: Lucas Developer <94740402+Lucas-Developer-Off@users.noreply.github.com> Date: Wed, 15 Oct 2025 22:15:25 +0200 Subject: [PATCH 1/5] Create package.json file with project configuration --- package.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 package.json diff --git a/package.json b/package.json new file mode 100644 index 0000000..223ab6d --- /dev/null +++ b/package.json @@ -0,0 +1 @@ +{\n "name": "arcane-system",\n "version": "2.0.0",\n "description": "Advanced Discord & Steam synchronization system with web authentication",\n "main": "src/index.js",\n "scripts": {\n "start": "node src/index.js",\n "dev": "nodemon src/index.js",\n "test": "echo \"Error: no test specified\" && exit 1"\n },\n "keywords": ["discord", "steam", "authentication", "synchronization", "bot"],\n "author": "Lucas-Developer-Off",\n "license": "MIT",\n "dependencies": {\n "axios": "^1.6.5",\n "discord.js": "^14.14.1",\n "dotenv": "^16.3.1",\n "express": "^4.18.2",\n "express-session": "^1.17.3",\n "mysql2": "^3.6.5"\n },\n "devDependencies": {\n "nodemon": "^3.0.2"\n }\n} \ No newline at end of file From eed6a61c5c67e64a78bdf330ff96fc1f3bdfa0b0 Mon Sep 17 00:00:00 2001 From: Lucas Developer <94740402+Lucas-Developer-Off@users.noreply.github.com> Date: Wed, 15 Oct 2025 22:18:51 +0200 Subject: [PATCH 2/5] Add .gitignore file with standard configurations --- .gitignore | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e078a85 --- /dev/null +++ b/.gitignore @@ -0,0 +1,55 @@ +# Environment variables +.env +.env.local +.env.*.local + +# Logs +logs/ +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Dependencies +node_modules/ +jspm_packages/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Output of 'npm pack' +*.tgz + +# yarn +.yarn-integrity + +# parcel-bundler cache +.cache +.parcel-cache + +# Next.js build output +.next +out + +# IDE +.idea/ +.vscode/ +*.swp +*.swo +*~ + +# OS +.DS_Store +Thumbs.db + +# Database +*.sqlite +*.sqlite3 +*.db + +# Backup files +*.bak +*.backup From 9c598e3767c7ba7b66ca460b16942a3af72096a5 Mon Sep 17 00:00:00 2001 From: Lucas Developer <94740402+Lucas-Developer-Off@users.noreply.github.com> Date: Wed, 15 Oct 2025 22:25:27 +0200 Subject: [PATCH 3/5] Delete version.txt --- version.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 version.txt diff --git a/version.txt b/version.txt deleted file mode 100644 index 3eefcb9..0000000 --- a/version.txt +++ /dev/null @@ -1 +0,0 @@ -1.0.0 From e15f67490719dc8487414c708d181723d9449685 Mon Sep 17 00:00:00 2001 From: Lucas Developer <94740402+Lucas-Developer-Off@users.noreply.github.com> Date: Wed, 15 Oct 2025 22:25:35 +0200 Subject: [PATCH 4/5] Delete install.sh --- install.sh | 157 ----------------------------------------------------- 1 file changed, 157 deletions(-) delete mode 100644 install.sh diff --git a/install.sh b/install.sh deleted file mode 100644 index cd847d2..0000000 --- a/install.sh +++ /dev/null @@ -1,157 +0,0 @@ -#!/usr/bin/env bash -# Arcane-System : Installateur simplifié -# Met à jour le système avec une barre de progression - -set -Eeo pipefail - -# ---------- Configuration (minimale) ---------- -readonly SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" - -set -u - -# ---------- Couleurs ---------- -if command -v tput >/dev/null 2>&1 && [[ -t 1 ]]; then - readonly BOLD=$(tput bold) RESET=$(tput sgr0) - readonly GREEN=$(tput setaf 2) RED=$(tput setaf 1) - readonly CYAN=$(tput setaf 6) YELLOW=$(tput setaf 3) -else - readonly BOLD=$'\033[1m' RESET=$'\033[0m' - readonly GREEN=$'\033[32m' RED=$'\033[31m' - readonly CYAN=$'\033[36m' YELLOW=$'\033[33m' -fi - -# ---------- Fonctions ---------- -log() { printf "${CYAN}[%s]${RESET} %s\n" "$(date '+%T')" "$*"; } -error_exit() { echo "${RED}✗ $1${RESET}" >&2; exit "${2:-1}"; } - -usage() { - cat </dev/null 2>&1 || missing+=("$cmd") - done - [[ ${#missing[@]} -gt 0 ]] && error_exit "Commandes manquantes: ${missing[*]}" 2 -} - -# Affiche une barre de progression animée pendant l'exécution d'une commande -run_with_progress() { - # Exige au moins 2 arguments: message + commande - if [[ $# -lt 2 ]]; then - error_exit "run_with_progress: arguments insuffisants" 9 - fi - - local message="$1"; shift - local cmd="$*" - - # Choisit une sortie visible même si stdout n'est pas un TTY (cas: wget | bash) - local prog_fd - if [[ -w /dev/tty ]]; then - # Utilise le terminal directement - exec {prog_fd}<>/dev/tty - else - # Fallback sur stdout - exec {prog_fd}>&1 - fi - - printf "%s\n" "${BOLD}${message}${RESET}" >&${prog_fd} - - # Lance la commande en arrière-plan avec redirection complète - bash -c "$cmd" >/dev/null 2>&1 & - local cmd_pid=$! - - # Prépare l'affichage - local width=40 - local i=0 - tput civis 2>/dev/null || true - printf "\n" >&${prog_fd} # ligne dédiée à la barre - # Affiche un premier état de barre immédiatement - printf "\r[%s]" "$(printf "%${width}s" | tr ' ' ' ')" >&${prog_fd} - # Petite pause pour garantir au moins une frame visible - sleep 0.1 - - # Animation tant que la commande tourne - while kill -0 "$cmd_pid" 2>/dev/null; do - i=$(( (i + 1) % (width * 2) )) - local filled=$(( i <= width ? i : (2*width - i) )) - local bar - bar=$(printf "%${filled}s" | tr ' ' '#') - local spaces - spaces=$(printf "%$((width - filled))s") - printf "\r[%s%s]" "$bar" "$spaces" >&${prog_fd} - sleep 0.08 - done - - # Attend la fin et fixe l'état (ne pas quitter sur set -e) - set +e - wait "$cmd_pid" - local status=$? - set -e - printf "\r[%s]\n" "$(printf "%${width}s" | tr ' ' '#')" >&${prog_fd} - tput cnorm 2>/dev/null || true - # Ferme le descripteur si ouvert sur /dev/tty - exec {prog_fd}>&- - return "$status" -} - -# (Téléchargement et verrou supprimés dans la version simplifiée) - -# ---------- Bannière ---------- -show_banner() { - cat << 'EOF' - -╔═════════════════════════════════════════════════════════════════════════════════════╗ -║ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ I N S T A L L E R ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ║ -╠═════════════════════════════════════════════════════════════════════════════════════╣ -║ ┌─────────────────────────────────────────────────────────────────────────────────┐ ║ -║ │ │ ║ -║ │ █████╗ ██████╗ ██████╗ █████╗ ███╗ ██╗███████╗ ███████╗██╗ ██╗ │ ║ -║ │ ██╔══██╗██╔══██╗██╔════╝██╔══██╗████╗ ██║██╔════╝ ██╔════╝██║ ██║ │ ║ -║ │ ███████║██████╔╝██║ ███████║██╔██╗ ██║█████╗ ███████╗███████║ │ ║ -║ │ ██╔══██║██╔══██╗██║ ██╔══██║██║╚██╗██║██╔══╝ ╚════██║██╔══██║ │ ║ -║ │ ██║ ██║██║ ██║╚██████╗██║ ██║██║ ╚████║███████╗ ██╗ ███████║██║ ██║ │ ║ -║ │ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═══╝╚══════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝ │ ║ -║ │ │ ║ -║ └─────────────────────────────────────────────────────────────────────────────────┘ ║ -╚═════════════════════════════════════════════════════════════════════════════════════╝ - -EOF -} - -# (Parsing d'arguments supprimé) - -# ---------- Main ---------- -main() { - show_banner - - require_root - require_cmd apt-get - - # Mise à jour du système avec barre de progression - log "Préparation de la mise à jour du système" - local apt_log="/tmp/arcane_apt_update.log" - if run_with_progress "Exécution: apt-get update && apt-get upgrade -y" "apt-get update -y >$apt_log 2>&1 && apt-get upgrade -y >>$apt_log 2>&1"; then - log "${GREEN}✓ Système à jour${RESET}" - else - log "${YELLOW}⚠ La mise à jour du système a rencontré des erreurs${RESET}" - log "Consulte le journal: ${apt_log}" - fi - - echo - cat << EOF -${BOLD}${GREEN}✓ Fin de l'installation simplifiée${RESET} -EOF -} - -main "$@" \ No newline at end of file From 4c006d6478c31b01c4c9cee853925e7328a6388c Mon Sep 17 00:00:00 2001 From: Lucas Developer <94740402+Lucas-Developer-Off@users.noreply.github.com> Date: Wed, 15 Oct 2025 22:25:39 +0200 Subject: [PATCH 5/5] Create .env.example file with configuration details --- .env.example | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..8b71aac --- /dev/null +++ b/.env.example @@ -0,0 +1,21 @@ +# Discord Configuration +TOKEN=your_discord_bot_token_here +CLIENT_ID=your_discord_client_id_here + +# Web Server Configuration +WEB_PORT=50000 +WEB_URL=http://localhost:50000 +SESSION_SECRET=change-this-to-a-random-secure-string + +# MySQL Database Configuration +MYSQL_HOST=localhost +MYSQL_PORT=3306 +MYSQL_USER=root +MYSQL_PASSWORD=your_mysql_password_here +MYSQL_DATABASE=arcane_system + +# Steam API Configuration +STEAM_API_KEY=your_steam_api_key_here + +# Environment +NODE_ENV=development