# nikhil9490/file-access-control architecture

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

- Interactive diagram: https://gitdiagram.com/nikhil9490/file-access-control
- Repository: https://github.com/nikhil9490/file-access-control

## Overview

##### Project type and purpose
- From the README and file list, this is a standalone desktop security tool (an open-source “file and app locking” utility) written in Python. Its goal is to detect and recognize faces via webcam (using OpenCV), then grant or deny access to specific files or applications based on the recognized user.

##### File structure
- Top-level files:
- README.md – overall description and features
- lets try6.py – the main Python script containing the application logic
- report new[1].pdf – presumably a design or evaluation report (not part of the executable system)
- No frontend/backend directories; this is a single-process desktop app. Configuration is likely embedded in the script or loaded at runtime.

##### README for additional insights
- Key features: face detection, access control per recognized user, file & app locking, forced sleep on unauthorized access.
- Technologies called out: Python, OpenCV (for face detection/recognition), basic image processing routines, OS-level file/app lock & power management calls.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Input
    CameraInput["Camera Input"]:::processing
    click CameraInput "https://github.com/nikhil9490/file-access-control/blob/main/lets try6.py"

    %% Image Processing Layer
    subgraph "Image Processing"
        PreProc["Image Pre-Processing Module"]:::processing
        click PreProc "https://github.com/nikhil9490/file-access-control/blob/main/lets try6.py"
        Recog["Face Recognition Engine"]:::processing
        click Recog "https://github.com/nikhil9490/file-access-control/blob/main/lets try6.py"
    end

    %% Core Controller
    Controller["Main Controller"]:::controller
    click Controller "https://github.com/nikhil9490/file-access-control/blob/main/lets try6.py"

    %% Storage
    DB["User Database"]:::database
    click DB "https://github.com/nikhil9490/file-access-control/blob/main/lets try6.py"

    %% Access Logic
    ACL["Access Control Logic"]:::processing
    click ACL "https://github.com/nikhil9490/file-access-control/blob/main/lets try6.py"

    %% Enforcement Modules
    subgraph "Enforcement Modules"
        Lock["File/App Locking Module"]:::enforcement
        click Lock "https://github.com/nikhil9490/file-access-control/blob/main/lets try6.py"
        Power["Power Management Module"]:::enforcement
        click Power "https://github.com/nikhil9490/file-access-control/blob/main/lets try6.py"
    end

    %% Logging
    Logger["Logger/Audit Trail"]:::processing
    click Logger "https://github.com/nikhil9490/file-access-control/blob/main/lets try6.py"

    %% Documentation
    README["Project Overview & Features"]:::doc
    click README "https://github.com/nikhil9490/file-access-control/blob/main/README.md"
    Report["Design/Evaluation Report"]:::doc
    click Report "https://github.com/nikhil9490/file-access-control/blob/main/report new[1].pdf"

    %% Data Flows
    CameraInput -->|"frame"| PreProc
    PreProc -->|"normalized frame"| Recog
    Recog -->|"user ID"| Controller
    Controller -->|"fetch templates"| DB
    Controller -->|"user ID"| ACL
    ACL -->|"allow/deny decision"| Controller
    Controller -->|"lock/unlock calls"| Lock
    Controller -->|"trigger sleep"| Power
    Controller -->|"log event"| Logger

    %% References
    README -.-> CameraInput
    Report -.-> PreProc

    %% Styles
    classDef processing fill:#D0E8FF,stroke:#0284C7,color:#000;
    classDef controller fill:#E8D0FF,stroke:#8000C7,color:#000;
    classDef database fill:#D0FFD6,stroke:#008F3C,color:#000;
    classDef enforcement fill:#FFE5B4,stroke:#C76A00,color:#000;
    classDef doc fill:#F0F0F0,stroke:#999,color:#000;
```
