AREA / AreaTek3
2025/11
AreaTek3 — modern platform (TypeScript, APIs, integrations).
Tech: TypeScript, Node, APIs
AreaTek3 - Automation Platform
Plateforme d'automatisation moderne inspirée d'IFTTT/Zapier
Architecture • API • Contribuer
🚀 Démarrage ULTRA-RAPIDE
Une seule commande pour tout lancer :
git clone https://github.com/Angel-42/AreaTek3.git && cd AreaTek3 && ./start.sh
Ou avec Make :
make start # Démarrer
make logs # Voir les logs
make stop # Arrêter
make help # Voir toutes les commandes
Le script start.sh fait tout automatiquement :
- ✅ Vérifie Docker et Docker Compose
- ✅ Crée le fichier
.envautomatiquement - ✅ Lance tous les services (Web + API + DB + Redis)
- ✅ Vérifie que tout fonctionne
- ✅ Affiche les URLs d'accès
Accès après démarrage :
- 🌐 Web : http://localhost:8081
- 🔧 API : http://localhost:8080
- 📊 Docs : http://localhost:8080/docs
- �� APK : http://localhost:8081/client.apk
📋 Table des matières
- Vue d'ensemble
- Architecture
- Services disponibles
- API Documentation
- Configuration
- Diagrammes
- Documentation
🎯 Vue d'ensemble
AreaTek3 permet de créer des Areas (automatisations) en combinant :
- Actions (triggers) : Événements qui déclenchent
- Reactions : Actions exécutées en réponse
Fonctionnalités
✅ Multi-plateforme (Web + Mobile + API)
✅ OAuth 2.0 (Google, Discord, GitHub, Microsoft, Spotify)
✅ 6 services intégrés
✅ Architecture microservices (Fastify + PostgreSQL + Redis + BullMQ)
✅ Temps réel avec queues et workers
✅ Déploiement en 1 commande
Exemples
"Quand il pleut (OpenWeather) → Message Discord"
"Nouvel email (Outlook) → Événement Calendar"
"Musique Spotify → Post Slack"
🏗 Architecture
┌─────────────────────────────────────────────┐
│ CLIENTS (Web + Mobile) │
└────────────────┬────────────────────────────┘
│
┌────────────────▼────────────────────────────┐
│ API Gateway (Fastify) │
│ • Auth (JWT + OAuth2) │
│ • REST API │
│ • Webhooks │
└────────┬────────────┬────────────┬──────────┘
│ │ │
PostgreSQL Redis External
(DB) (Queue) Services
Stack
Frontend Web : Next.js 15 + React 19 + TailwindCSS + TypeScript
Mobile : Flutter 3.35.5 + Dart
Backend : Fastify 5.6 + Node.js (ES Modules)
Database : PostgreSQL 15 + Prisma ORM
Queue : Redis 7 + BullMQ
Container : Docker + Docker Compose
🔌 Services disponibles
| Service | OAuth | Actions | Reactions | |---------|-------|---------|-----------| | Discord | ✅ | 6 | 2 | | Slack | ✅ | 3 | 2 | | Google Calendar | ✅ | 1 | 2 | | Spotify | ✅ | 1 | 1 | | Microsoft Outlook | ✅ | 1 | 1 | | OpenWeather | ❌ | 4 | 0 |
📚 API Documentation
Base URL : http://localhost:8080/api/v1
Swagger : http://localhost:8080/docs
Endpoints
# Auth
POST /api/v1/register
POST /api/v1/login
GET /api/v1/login/{provider}
# Services
GET /api/v1/services
POST /api/v1/services/link/{id}
# Areas
GET /api/v1/areas
POST /api/v1/areas
PUT /api/v1/areas/{id}/toggle
DELETE /api/v1/areas/{id}
# Actions & Reactions
GET /api/v1/actions
GET /api/v1/reactions
⚙️ Configuration
Le fichier backend/.env est créé automatiquement par ./start.sh
Clés OAuth essentielles :
# Google
GOOGLE_CLIENT_ID="your-id"
GOOGLE_CLIENT_SECRET="your-secret"
# Discord
DISCORD_CLIENT_ID="your-id"
DISCORD_CLIENT_SECRET="your-secret"
# OpenWeather
OPENWEATHER_API_KEY="your-key"
Voir backend/.env.example pour la liste complète.
📊 Diagrammes
Classes
classDiagram
User "1" --> "*" Area
Area "*" --> "1" Action
Area "*" --> "1" Reaction
Service "1" --> "*" Action
Service "1" --> "*" Reaction
Séquence
sequenceDiagram
User->>API: POST /areas
API->>DB: Create Area
API->>BullMQ: Register job
BullMQ->>Worker: Check action (3 min)
Worker->>BullMQ: Execute reaction
�� Commandes utiles
# Avec le script
./start.sh # Tout démarrer
./stop.sh # Tout arrêter
# Avec Make
make start # Démarrer
make stop # Arrêter
make logs # Logs temps réel
make status # Statut services
make help # Aide
# Avec Docker Compose
docker compose up --build
docker compose logs -f app
docker compose down
📚 Documentation
🤝 Contribuer
# Fork + branche
git checkout -b feature/new-service
# Développer (voir HOWTOCONTRIBUTE.md)
# Commit
git commit -m "feat: Add new service"
# Pull Request
📝 License
MIT License - Voir LICENSE