GoofyChain est une application web permettant de gérer vos portefeuilles Ethereum via l'API Etherscan. Elle offre une interface moderne et sécurisée pour suivre vos transactions et soldes.
- Node.js (v18 ou supérieur)
- PostgreSQL (v14 ou supérieur)
- Un compte Etherscan pour obtenir une clé API
- Naviguez vers le dossier api :
cd api
- Installez les dépendances :
npm install
- Configurez les variables d'environnement :
cp .env.example .env
- Modifiez le fichier
.env
avec vos configurations :
# Application
APP_URL=http://localhost:3000
# Base de données
DB_HOST=localhost
DB_PORT=5432
DB_USERNAME=votre_username
DB_PASSWORD=votre_password
DB_DATABASE=goofychain
# JWT
JWT_SECRET=votre_secret_jwt
# Email
MAIL_HOST=votre_serveur_smtp
MAIL_PORT=587
MAIL_USER=votre_email
MAIL_PASSWORD=votre_mot_de_passe
MAIL_FROM=noreply@votre_domaine.com
# Etherscan
ETHERSCAN_API_KEY=votre_cle_api_etherscan
- Lancez les migrations :
npm run migration:run
- Démarrez le serveur de développement :
npm run start:dev
- Naviguez vers le dossier client :
cd client
- Installez les dépendances :
npm install
- Démarrez l'application :
npm run dev
GoofyChain/
├── api/ # Backend NestJS
│ ├── src/
│ │ ├── modules/ # Modules de l'application
│ │ │ ├── auth/ # Authentification
│ │ │ ├── users/ # Gestion des utilisateurs
│ │ │ ├── wallet/ # Gestion des portefeuilles
│ │ │ └── mail/ # Service d'emails
│ │ └── config/ # Configuration
│ └── test/ # Tests
└── client-main/ # Frontend React
├── src/
│ ├── components/ # Composants React
│ ├── pages/ # Pages de l'application
│ └── services/ # Services API
└── public/ # Fichiers statiques
# Inscription
curl -X POST http://localhost:3000/auth/register \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"password": "password123",
"firstName": "John",
"lastName": "Doe"
}'
# Activation du compte
curl -X GET http://localhost:3000/auth/activate/:token
# Connexion
curl -X POST http://localhost:3000/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"password": "password123"
}'
# Obtenir le solde d'un portefeuille
curl -X GET http://localhost:3000/wallet/balance/:address \
-H "Authorization: Bearer votre_token_jwt"
# Obtenir les transactions d'un portefeuille
curl -X GET http://localhost:3000/wallet/transactions/:address \
-H "Authorization: Bearer votre_token_jwt"
cd api
npm run test # Tests unitaires
npm run test:e2e # Tests end-to-end
cd client
npm run test
Le projet peut également être exécuté avec Docker :
# Développement
docker-compose up -d
# Production
docker-compose -f prod.docker-compose.yml up -d
- Authentification JWT
- Vérification par email obligatoire
- Hachage des mots de passe avec bcrypt
- Protection CSRF
- Rate limiting sur les endpoints sensibles
- Fork le projet
- Créez votre branche (
git checkout -b feature/AmazingFeature
) - Committez vos changements (
git commit -m 'Add some AmazingFeature'
) - Push vers la branche (
git push origin feature/AmazingFeature
) - Ouvrez une Pull Request