# Technology Stack

**Analysis Date:** 2026-04-02

## Languages

**Primary:**
- PowerShell 5.1+ - All application logic, UI, and SharePoint integration

## Runtime

**Environment:**
- Windows PowerShell 5.1+ or PowerShell Core 7.0+
- .NET Framework (built-in with PowerShell)

**Execution Model:**
- Desktop application (WinForms GUI)
- Synchronous runspace threading for async operations without blocking UI

## Frameworks

**UI:**
- System.Windows.Forms (native .NET, bundled with PowerShell)
- System.Drawing (native .NET for graphics and colors)

**SharePoint/Cloud Integration:**
- PnP.PowerShell (latest version) - All SharePoint Online API interactions
- Azure AD App Registration for authentication (required)

**Testing:**
- No dedicated test framework detected (manual testing assumed)

**Build/Dev:**
- No build system (single .ps1 script file executed directly)

## Key Dependencies

**Critical:**
- PnP.PowerShell - Required for all SharePoint Online operations
  - Location: Installed via `Install-Module PnP.PowerShell`
  - Used for: Site enumeration, permissions scanning, storage metrics, file search, templating, bulk operations
  - Connection: Interactive authentication via Azure AD App (ClientId required)

**Infrastructure:**
- System.Windows.Forms - Desktop UI framework
- System.Drawing - UI graphics and rendering
- Microsoft.SharePoint.Client - Underlying SharePoint CSOM (via PnP.PowerShell)

## Configuration

**Environment:**
- `Sharepoint_Settings.json` - User preferences (data folder location, language)
- `Sharepoint_Export_profiles.json` - Saved connection profiles (Tenant URL, Client ID)
- `Sharepoint_Templates.json` - Site structure templates (captured and reapplied)

**Build:**
- Single executable: `Sharepoint_ToolBox.ps1`
- Launched directly: `.\Sharepoint_Toolbox.ps1`

**Localization:**
- File: `lang/fr.json` - French translations
- Default: English (en)
- Loaded dynamically at runtime

## Platform Requirements

**Development:**
- Windows Operating System (WinForms is Windows-only)
- PowerShell 5.1+
- Internet connection for Azure AD authentication
- Access to SharePoint Online tenant

**Production:**
- Windows 10/11 (or Windows Server 2016+)
- PowerShell 5.1 minimum
- Azure AD tenant with properly configured app registration
- Network access to target SharePoint Online sites

## Data Persistence

**Local Storage:**
- JSON files in configurable data folder (default: `Sharepoint_Export_profiles.json`, `Sharepoint_Templates.json`, `Sharepoint_Settings.json`)
- CSV exports of reports and bulk operation results
- HTML reports with interactive UI

**No external databases** - All storage is file-based and local

## Authentication

**Method:**
- Azure AD Interactive Login (user-initiated browser-based auth)
- Client ID (App Registration ID) required
- No client secrets or certificates (interactive auth flow only)
- PnP.PowerShell handles Azure AD token acquisition

## Known Versions

- PowerShell: 5.1 (minimum requirement stated in README)
- PnP.PowerShell: Not pinned (latest version recommended)

---

*Stack analysis: 2026-04-02*
