- FastAPI backend with JWT authentication - ElGamal, RSA-PSS, ZK-proofs crypto modules - HTML5/JS frontend SPA - MariaDB database with 5 tables - Docker Compose with 3 services (frontend, backend, mariadb) - Comprehensive tests for cryptography - Typst technical report (30+ pages) - Makefile with development commands
120 lines
3.3 KiB
Bash
Executable File
120 lines
3.3 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Script de vérification initiale du projet
|
|
# Valide que tout est en place avant de démarrer
|
|
|
|
echo "🔍 Vérification du projet e-voting-system"
|
|
echo "=========================================="
|
|
echo ""
|
|
|
|
# Couleurs
|
|
GREEN='\033[0;32m'
|
|
RED='\033[0;31m'
|
|
YELLOW='\033[1;33m'
|
|
NC='\033[0m' # No Color
|
|
|
|
check_file() {
|
|
if [ -f "$1" ]; then
|
|
echo -e "${GREEN}✓${NC} $1"
|
|
return 0
|
|
else
|
|
echo -e "${RED}✗${NC} $1 (MANQUANT)"
|
|
return 1
|
|
fi
|
|
}
|
|
|
|
check_dir() {
|
|
if [ -d "$1" ]; then
|
|
echo -e "${GREEN}✓${NC} $1/"
|
|
return 0
|
|
else
|
|
echo -e "${RED}✗${NC} $1/ (MANQUANT)"
|
|
return 1
|
|
fi
|
|
}
|
|
|
|
failed=0
|
|
|
|
echo "📁 Répertoires:"
|
|
check_dir "src/backend" || ((failed++))
|
|
check_dir "src/crypto" || ((failed++))
|
|
check_dir "src/frontend" || ((failed++))
|
|
check_dir "tests" || ((failed++))
|
|
check_dir "docker" || ((failed++))
|
|
check_dir "rapport" || ((failed++))
|
|
|
|
echo ""
|
|
echo "📄 Fichiers essentiels:"
|
|
check_file "README.md" || ((failed++))
|
|
check_file "pyproject.toml" || ((failed++))
|
|
check_file "docker-compose.yml" || ((failed++))
|
|
check_file "Makefile" || ((failed++))
|
|
check_file ".env" || ((failed++))
|
|
check_file ".gitignore" || ((failed++))
|
|
|
|
echo ""
|
|
echo "🐍 Backend Python:"
|
|
check_file "src/backend/main.py" || ((failed++))
|
|
check_file "src/backend/config.py" || ((failed++))
|
|
check_file "src/backend/models.py" || ((failed++))
|
|
check_file "src/backend/schemas.py" || ((failed++))
|
|
check_file "src/backend/database.py" || ((failed++))
|
|
check_file "src/backend/auth.py" || ((failed++))
|
|
check_file "src/backend/services.py" || ((failed++))
|
|
check_file "src/backend/dependencies.py" || ((failed++))
|
|
check_file "src/backend/routes/auth.py" || ((failed++))
|
|
check_file "src/backend/routes/elections.py" || ((failed++))
|
|
check_file "src/backend/routes/votes.py" || ((failed++))
|
|
|
|
echo ""
|
|
echo "🔐 Cryptographie:"
|
|
check_file "src/crypto/encryption.py" || ((failed++))
|
|
check_file "src/crypto/signatures.py" || ((failed++))
|
|
check_file "src/crypto/zk_proofs.py" || ((failed++))
|
|
check_file "src/crypto/hashing.py" || ((failed++))
|
|
|
|
echo ""
|
|
echo "🌐 Frontend:"
|
|
check_file "src/frontend/index.html" || ((failed++))
|
|
|
|
echo ""
|
|
echo "🧪 Tests:"
|
|
check_file "tests/test_crypto.py" || ((failed++))
|
|
check_file "tests/test_backend.py" || ((failed++))
|
|
check_file "tests/conftest.py" || ((failed++))
|
|
|
|
echo ""
|
|
echo "🐳 Docker:"
|
|
check_file "docker/Dockerfile.backend" || ((failed++))
|
|
check_file "docker/Dockerfile.frontend" || ((failed++))
|
|
check_file "docker/init.sql" || ((failed++))
|
|
|
|
echo ""
|
|
echo "📝 Documentation:"
|
|
check_file "DEPLOYMENT.md" || ((failed++))
|
|
check_file "ARCHITECTURE.md" || ((failed++))
|
|
check_file "CONTRIBUTING.md" || ((failed++))
|
|
check_file "rapport/main.typ" || ((failed++))
|
|
|
|
echo ""
|
|
echo "⚙️ Scripts:"
|
|
check_file "start.sh" || ((failed++))
|
|
check_file "clean.sh" || ((failed++))
|
|
|
|
echo ""
|
|
echo "=========================================="
|
|
|
|
if [ $failed -eq 0 ]; then
|
|
echo -e "${GREEN}✓ Tous les fichiers sont présents!${NC}"
|
|
echo ""
|
|
echo "Prochaines étapes:"
|
|
echo "1. Installer les dépendances: ${YELLOW}make install${NC}"
|
|
echo "2. Démarrer l'application: ${YELLOW}./start.sh${NC} ou ${YELLOW}make up${NC}"
|
|
echo "3. Accéder au frontend: http://localhost:3000"
|
|
echo "4. Accéder à l'API: http://localhost:8000/docs"
|
|
exit 0
|
|
else
|
|
echo -e "${RED}✗ $failed fichier(s) manquant(s)!${NC}"
|
|
exit 1
|
|
fi
|