# fossas/post_sales_scripts architecture

> Architecture diagram of the GitHub repository fossas/post_sales_scripts, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fossas/post_sales_scripts
- Repository: https://github.com/fossas/post_sales_scripts

## Overview

##### Main Components

a. Language-Specific Utilities Layer
- Python Scripts Module
- JavaScript Tools Module
- Bash Scripts Module

b. API Integration Layer
- FOSSA API Interface
- Postman Collections
- API Walkthroughs

c. Pipeline Integration Layer
- Multiple CI/CD Platform Configurations
- Build Specifications

d. Core Functionality Groups
- License Management
- Security Scanning
- Project Management
- Dependency Analysis

##### Specific Components to Highlight

a. Utility Modules:
- Python Scripts (/python/scripts/)
- JavaScript Tools (/js/)
- Bash Scripts (/bash/)

b. Integration Points:
- API Utilities (/python/utils/api.py)
- Pipeline Templates (/sample-pipelines/)
- Postman Collections (/APIs/postman/)

c. Core Features:
- Ignore Rules Management
- Dependency Analysis
- Security Vulnerability Scanning
- License Management
- Team Management

##### Implementation Details

1. Core Infrastructure
- FOSSA API connection
- Authentication handling
- Base utilities

2. Tool Categories
- By language (Python/JS/Bash)
- Relationships between tools
- Shared resources

3. Integration Points
- CI/CD pipeline connections
- API documentation
- External system interfaces

b. Annotations for:
- Configuration requirements
- Environmental dependencies
- API endpoints
- Authentication flows

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "User Interface Layer"
        CLI[CLI/Scripts Interface]
    end

    subgraph "Language-Specific Utilities"
        PythonScripts["Python Scripts"]:::python
        JavaScriptTools["JavaScript Tools"]:::javascript
        BashScripts["Bash Scripts"]:::bash
    end

    subgraph "Core Functionality"
        LicenseMgmt["License Management"]:::core
        SecurityScan["Security Scanning"]:::core
        ProjectMgmt["Project Management"]:::core
        DependencyAnalysis["Dependency Analysis"]:::core
        IgnoreRules["Ignore Rules Management"]:::core
        OrgManagement["Organization Management"]:::core
    end

    subgraph "Core Utilities"
        APIUtils["API Utilities"]:::utils
        URLMgmt["URL Management"]:::utils
        ProjectUtils["Project Utilities"]:::utils
        ScriptUtils["Script Utilities"]:::utils
    end

    subgraph "Integration Layer"
        APIInterface["FOSSA API Interface"]:::api
        PostmanCol["Postman Collections"]:::api
        APIWalkthroughs["API Walkthroughs"]:::api
    end

    subgraph "Pipeline Integration"
        AWSCodeBuild["AWS CodeBuild"]:::pipeline
        AzurePipelines["Azure Pipelines"]:::pipeline
        GithubActions["GitHub Actions"]:::pipeline
        Jenkins["Jenkins"]:::pipeline
    end

    CLI --> PythonScripts
    CLI --> JavaScriptTools
    CLI --> BashScripts

    PythonScripts --> APIUtils
    JavaScriptTools --> APIUtils
    BashScripts --> APIUtils

    APIUtils --> APIInterface
    URLMgmt --> APIInterface
    ProjectUtils --> APIInterface
    ScriptUtils --> APIInterface

    APIInterface -.-> PostmanCol
    APIInterface -.-> APIWalkthroughs

    PythonScripts --> LicenseMgmt
    PythonScripts --> SecurityScan
    PythonScripts --> ProjectMgmt
    PythonScripts --> DependencyAnalysis
    PythonScripts --> IgnoreRules

    JavaScriptTools --> DependencyAnalysis
    JavaScriptTools --> OrgManagement

    BashScripts --> LicenseMgmt
    BashScripts --> OrgManagement

    APIInterface --> AWSCodeBuild
    APIInterface --> AzurePipelines
    APIInterface --> GithubActions
    APIInterface --> Jenkins

    %% Click Events
    click PythonScripts "https://github.com/fossas/post_sales_scripts/tree/main/python/scripts/"
    click JavaScriptTools "https://github.com/fossas/post_sales_scripts/tree/main/js/"
    click BashScripts "https://github.com/fossas/post_sales_scripts/tree/main/bash/"
    click APIInterface "https://github.com/fossas/post_sales_scripts/blob/main/python/utils/api.py"
    click PostmanCol "https://github.com/fossas/post_sales_scripts/tree/main/APIs/postman/"
    click APIWalkthroughs "https://github.com/fossas/post_sales_scripts/tree/main/APIs/walkthroughs/"
    click AWSCodeBuild "https://github.com/fossas/post_sales_scripts/tree/main/sample-pipelines/aws-codebuild/"
    click AzurePipelines "https://github.com/fossas/post_sales_scripts/tree/main/sample-pipelines/azure/"
    click GithubActions "https://github.com/fossas/post_sales_scripts/tree/main/sample-pipelines/github-actions/"
    click Jenkins "https://github.com/fossas/post_sales_scripts/tree/main/sample-pipelines/jenkins/"
    click LicenseMgmt "https://github.com/fossas/post_sales_scripts/blob/main/python/scripts/get_licenses.py"
    click SecurityScan "https://github.com/fossas/post_sales_scripts/blob/main/python/scripts/security/vulnerability-data-dump.py"
    click ProjectMgmt "https://github.com/fossas/post_sales_scripts/blob/main/python/scripts/list_project_teams_CSV.py"
    click DependencyAnalysis "https://github.com/fossas/post_sales_scripts/blob/main/python/scripts/projects_by_dependency.py"
    click IgnoreRules "https://github.com/fossas/post_sales_scripts/tree/main/python/IgnoreRules/"
    click APIUtils "https://github.com/fossas/post_sales_scripts/blob/main/python/utils/api.py"
    click URLMgmt "https://github.com/fossas/post_sales_scripts/blob/main/python/utils/urls.py"
    click ProjectUtils "https://github.com/fossas/post_sales_scripts/blob/main/python/utils/projects.py"
    click ScriptUtils "https://github.com/fossas/post_sales_scripts/blob/main/python/utils/scripts.py"
    click OrgManagement "https://github.com/fossas/post_sales_scripts/tree/main/js/org-report/"

    %% Styling
    classDef python fill:#3776AB,color:white
    classDef javascript fill:#F7DF1E,color:black
    classDef bash fill:#4EAA25,color:white
    classDef api fill:#6236FF,color:white
    classDef pipeline fill:#808080,color:white
    classDef core fill:#FF6B6B,color:white
    classDef utils fill:#4CAF50,color:white
```
