Skip to content

FukuInTheCode/AREA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AREA - Action REAction Platform

An automation platform that connects services and automates workflows

License Epitech

3rd Year Project - Epitech


πŸ“‹ Table of Contents


🎯 Overview

AREA (Action REAction) is a comprehensive automation platform that enables users to create custom workflows connecting multiple services through triggers (Actions) and automated responses (Reactions). The platform supports both legacy predefined automations (V1) and a fully dynamic, server-driven automation system (V2).

Key Features

  • πŸ”„ Dynamic Automation System: Create custom workflows by combining any available trigger with any reaction
  • πŸ”Œ Multiple Service Integrations: Gmail, Outlook, OneDrive, GitHub, Google Calendar, Weather
  • 🎨 Visual Node Editor: Drag-and-drop interface for building workflows
  • πŸ“± Cross-Platform Mobile App: Flutter-based application for iOS, Android, and Web
  • 🌐 Modern Web Interface: Next.js-based responsive web application
  • πŸ” OAuth 2.0 Integration: Secure authentication with all supported services
  • β™Ώ Accessibility First: Full accessibility support with colorblind modes, high contrast, and font scaling
  • πŸ‘₯ Role-Based Access Control: User, Admin, and Super Admin roles
  • πŸ“Š Admin Dashboard: Comprehensive administrative interface with user management and system monitoring

πŸ—οΈ Project Architecture

AREA/
β”œβ”€β”€ web-app/              # Next.js Web Application
β”œβ”€β”€ Server/               # ASP.NET Core API Server
β”œβ”€β”€ Mobile/               # Flutter Mobile Application
β”œβ”€β”€ Docs/                 # Comprehensive Documentation
β”œβ”€β”€ Tests/                # Test Suites
β”œβ”€β”€ scripts/              # Utility Scripts
β”œβ”€β”€ docker-compose.yaml   # Docker Compose Configuration
└── .github/              # CI/CD Workflows

System Flow

User Interface (Web/Mobile)
    ↓
API Gateway (Server)
    ↓
Service Integrations (OAuth 2.0)
    ↓
Automation Engine (AREA V2)
    ↓
External Services (Gmail, GitHub, etc.)

🧩 Components

Web Application

Location: web-app/
Tech Stack: Next.js 15.5.4, React 19, TypeScript, Tailwind CSS

A modern, responsive web application providing the primary interface for creating and managing automations.

Features:

  • Dynamic AREA V2 creation interface (form-based and visual node editor)
  • Service integration management (OAuth 2.0)
  • Admin dashboard with user management
  • Real-time statistics and monitoring
  • Full accessibility support

Quick Start:

cd web-app
npm install
npm run dev
# Access at http://localhost:8081

Documentation: Docs/Web/README.md


Server API

Location: Server/
Tech Stack: ASP.NET Core 8.0, C#, MongoDB

RESTful API server providing the backend infrastructure for authentication, service integrations, and automation execution.

Features:

  • RESTful API with JWT authentication
  • OAuth 2.0 integration with multiple providers
  • AREA V2 dynamic system with pattern-based validation
  • Background job processing (scheduled automations)
  • MongoDB data persistence
  • Role-based access control

Endpoints:

  • /api/auth/* - Authentication and user management
  • /api/area/v2/* - AREA V2 automation management
  • /api/gmail/*, /api/outlook/*, /api/github/*, etc. - Service-specific endpoints
  • /api/admin/* - Administrative endpoints

Quick Start:

cd Server
dotnet restore
dotnet run
# API available at http://localhost:5001

Documentation: Docs/Server/


Mobile Application

Location: Mobile/
Tech Stack: Flutter 3.x, Dart

Cross-platform mobile application supporting iOS, Android, and Web platforms.

Features:

  • Full AREA V2 system integration
  • Service authentication (OAuth 2.0)
  • Automation creation and management
  • Push notifications (planned)
  • Offline support

Quick Start:

cd Mobile
flutter pub get
flutter run

Documentation: Docs/Mobile/README.md


Automation System

AREA supports two automation systems:

V1 Legacy System

Predefined automation types:

  • Gmail Timer (recurring email sending)
  • Outlook Timer (recurring email sending)
  • Gmail β†’ OneDrive (attachment backup)
  • Outlook β†’ OneDrive (attachment backup)

V2 Dynamic System

Fully dynamic, server-driven automation platform:

  • Actions (Triggers): Events that start automations
    • Gmail email received
    • GitHub issue created
    • Timer events
    • Weather data updates
    • Google Calendar events
  • Reactions: Automated responses
    • Send emails
    • Create GitHub issues/PRs
    • Upload files to OneDrive
    • Create calendar events
  • Dynamic Mapping: Connect trigger outputs to reaction inputs
  • Filters: Conditional logic for automation execution

Documentation:


πŸš€ Quick Start

Prerequisites

  • Node.js 18+ and npm 9+
  • .NET SDK 8.0
  • Flutter SDK 3.x
  • Docker and Docker Compose (optional)
  • MongoDB (local or remote instance)

Running with Docker Compose

The easiest way to get started:

# Clone the repository
git clone <repository-url>
cd AREA

# Start all services
docker-compose up --build

# Services will be available at:
# - Web: http://localhost:8081
# - API: http://localhost:8080

Manual Setup

  1. Start MongoDB (if not using Docker)
  2. Start the Server:
    cd Server
    dotnet restore
    dotnet run
  3. Start the Web App:
    cd web-app
    npm install
    cp .env.example .env
    # Edit .env with your API URL
    npm run dev
  4. Start Mobile App (optional):
    cd Mobile
    flutter pub get
    flutter run

πŸ“š Documentation

Comprehensive documentation is available in the Docs/ directory:

Key Documentation Files


πŸ› οΈ Technology Stack

Frontend

  • Web: Next.js 15.5.4, React 19.1.0, TypeScript 5.x, Tailwind CSS 4.x
  • Mobile: Flutter 3.x, Dart
  • UI Components: Radix UI, React Flow (node editor)

Backend

  • API: ASP.NET Core 8.0, C#
  • Database: MongoDB
  • Authentication: JWT, OAuth 2.0
  • Background Jobs: ASP.NET Core Hosted Services

Infrastructure

  • Containerization: Docker, Docker Compose
  • CI/CD: GitHub Actions
  • Version Control: Git

Integrations

  • Google: Gmail, Google Calendar
  • Microsoft: Outlook, OneDrive
  • GitHub: Repository, Issues, Pull Requests
  • Weather: OpenWeatherMap (or similar)

πŸ’» Development

Development Workflow

  1. Create a feature branch:

    git checkout -b feature/your-feature-name
  2. Make changes and test locally

  3. Follow code standards:

    • TypeScript/JavaScript: ESLint + Prettier
    • C#: Follow .NET coding conventions
    • Dart: Follow Flutter style guide
  4. Run tests:

    # Server tests
    cd Server
    dotnet test
    
    # Web tests (if available)
    cd web-app
    npm test
  5. Commit and push:

    git add .
    git commit -m "feat: your feature description"
    git push origin feature/your-feature-name
  6. Create a Pull Request

Code Quality

  • TypeScript: Strict mode enabled
  • ESLint: Configured for Next.js and React
  • Prettier: Code formatting
  • Git Hooks: Pre-commit checks (if configured)

Environment Variables

Each component uses environment variables for configuration. See:

⚠️ Important: Never commit .env files or hardcode sensitive information.


🚒 Deployment

Docker Deployment

The project includes Docker configurations for easy deployment:

# Build and start all services
docker-compose up --build -d

# View logs
docker-compose logs -f

# Stop services
docker-compose down

Production Checklist

  • Environment variables configured
  • MongoDB connection string set
  • OAuth client IDs and secrets configured
  • HTTPS enabled
  • CORS properly configured
  • Rate limiting enabled
  • Monitoring and logging setup

CI/CD

The project uses GitHub Actions for continuous integration and deployment:

  • CI: Automated testing on push
  • CD: Automatic deployment to production on merge to main
  • Docker: Automated image building and pushing
  • Security: Code signing

🎁 Bonus Features

Kubernetes Deployment with Load Balancing

While the project primarily uses Docker Compose, it can be deployed to Kubernetes with advanced load balancing capabilities. Example deployment manifests:

# Kubernetes deployment structure (not included in repo)
# Would include:
# - Deployment manifests for each service
# - Service definitions with LoadBalancer type
# - Ingress configuration with load balancing rules
# - ConfigMaps and Secrets
# - PersistentVolumeClaims for MongoDB
# - HorizontalPodAutoscaler for automatic scaling

Features:

  • Horizontal Pod Autoscaling: Automatically scales based on CPU/memory usage
  • Rolling Updates: Zero-downtime deployments
  • Service Mesh Integration: Optional Istio/Linkerd integration for advanced traffic management
  • Load Balancing: Distributes traffic across multiple pods for high availability
  • Health Checks: Liveness and readiness probes for automatic pod management
  • Monitoring: Prometheus/Grafana integration for real-time metrics

Conditional Execution System

Advanced conditioning system for action outputs and reaction execution based on output validation (see AreaService.cs):

Features:

  • Output Validation: Verify conditions on action/reaction outputs before executing downstream reactions
  • Dynamic Filtering: Filter workflows based on runtime data (email subjects, sender addresses, weather conditions, etc.)
  • Multi-Source Conditions: Apply conditions to both action outputs and previous reaction outputs
  • Flexible Operators: Support for various comparison operators (equals, contains, greater than, etc.)

Example Use Cases:

  • Only send email if weather temperature is above a threshold
  • Only create GitHub issue if email is from specific sender
  • Only forward email if it contains specific keywords

Implementation: VerifyCoditions() method in AreaService.cs validates conditions against outputs before proceeding

Reaction Chaining System

Sophisticated reaction chaining system that allows reactions to depend on outputs from previous reactions (see AreaService.cs):

Features:

  • Dependency Resolution: Automatically sorts reactions based on their dependencies using topological sorting (Kahn's algorithm)
  • Multi-Source References: Reactions can reference outputs from the trigger action or any previous reaction
  • Cycle Detection: Detects and handles circular dependencies gracefully
  • Named Reactions: Each reaction can be named for easy reference by downstream reactions
  • Output Propagation: Reaction outputs are stored and made available to subsequent reactions

Example Workflow:

  1. Action: Gmail receives email with attachment
  2. Reaction 1 ("SaveFile"): Save attachment to OneDrive β†’ outputs FileId, FilePath
  3. Reaction 2 ("NotifyGitHub"): Create GitHub issue referencing FileId from "SaveFile" reaction
  4. Reaction 3 ("ConfirmEmail"): Send Gmail reply confirming file saved, using FilePath from "SaveFile"

Implementation: SortReactionsByDependencies() method in AreaService.cs handles dependency graph construction and topological sorting

Dynamic Data Flow Between Actions and Reactions

Advanced information passage system that enables dynamic data flow from actions to reactions and between reactions (see AreaService.cs):

Features:

  • Complex Value Composition: Combine constant values with dynamic outputs in a single parameter
  • Multi-Source Output Resolution: Reference outputs from the trigger action or any named previous reaction
  • List Handling: Support for list-type parameters that can map to list-type outputs
  • Dynamic Concatenation: Build complex strings by concatenating constants and output values
  • Null-Safe Resolution: Gracefully handles missing sources or outputs

Example Scenarios:

  • Email Template: Build email body combining constant text ("Issue created: ") with action output (issue title)
  • File Naming: Create OneDrive filename using email subject and timestamp
  • Chained Data: Use GitHub issue URL from first reaction in subsequent email notification
  • Attachment Processing: Pass email attachments (list) directly to OneDrive save operation

Implementation:

  • ConvertToReactionInput(): Converts reaction parameters to inputs by resolving output references
  • ProcessComplexeValues(): Handles concatenation of constant and dynamic values
  • outputsBySource: Dictionary maintaining outputs from action and all reactions for downstream reference

Node Visualization

The web application includes a visual node editor powered by React Flow:

Features:

  • Drag-and-drop workflow construction
  • Visual connection between triggers and reactions
  • Real-time validation
  • Export/import workflows

Usage:

  1. Navigate to "Create AREA" page
  2. Click "Node Editor" mode
  3. Drag actions and reactions onto canvas
  4. Connect nodes to create workflows
  5. Configure parameters in node properties

Documentation: Web Components - NodeAreaEditor

Advanced Monitoring

  • Real-time statistics dashboard
  • User activity tracking
  • Automation execution logs
  • System health monitoring

API Documentation

Interactive API documentation available at /api/about endpoint (if implemented).


🀝 Contributing

We welcome contributions! This is a 3rd year Epitech project, and we appreciate any help.

How to Contribute

  1. Fork the repository

  2. Read the documentation:

  3. Pick an issue or create a new one:

    • Check existing issues
    • Create a new issue for bugs or features
    • Wait for assignment before starting work
  4. Follow the development workflow (see Development section)

  5. Write tests for your changes

  6. Update documentation if needed

  7. Submit a Pull Request:

    • Clear description of changes
    • Reference related issues
    • Ensure all checks pass
    • Request review from maintainers

Contribution Guidelines

  • Code Style: Follow existing code conventions
  • Commits: Use conventional commit messages (feat:, fix:, docs:, etc.)
  • Testing: Write tests for new features
  • Documentation: Update relevant documentation
  • Accessibility: Ensure new UI components are accessible
  • Security: Never commit secrets or sensitive data

Areas for Contribution

  • πŸ› Bug Fixes: Help us fix issues
  • ✨ New Features: Implement new automation types or services
  • πŸ“š Documentation: Improve or translate documentation
  • 🎨 UI/UX: Enhance user interface and experience
  • β™Ώ Accessibility: Improve accessibility features
  • 🌍 Internationalization: Add new languages
  • ⚑ Performance: Optimize code and queries
  • πŸ§ͺ Testing: Add more test coverage

Code of Conduct

  • Be respectful and inclusive
  • Provide constructive feedback
  • Help others learn and grow
  • Follow the project's coding standards

πŸ‘₯ Authors

This project was developed as part of the 3rd year curriculum at Epitech.

Project Team:

Institution: EPITECH - Lille

Year: 2025

Acknowledgments

  • Epitech: For the educational framework and support
  • Open Source Community: For the amazing tools and libraries
  • Service Providers: Google, Microsoft, GitHub for their APIs

πŸ“„ License

This project is developed as part of the Epitech curriculum. Please refer to your institution's policies regarding code sharing and licensing.

Note: This is an academic project. Please respect intellectual property and only use for educational purposes unless otherwise specified.


πŸ”— Useful Links


πŸ“Š Project Status

Current Version: 2.0 (AREA V2 Dynamic System)

Status:

  • βœ… Web Application: Production Ready
  • βœ… Server API: Production Ready
  • βœ… Mobile Application: Production Ready
  • βœ… AREA V2 System: Active Development
  • πŸ”„ Additional Services: Planned
  • πŸ”„ Advanced Features: In Progress

Built with ❀️ by the AREA Team

Empowering automation, one workflow at a time

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 5