# triledinh159/project-future-tech architecture

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

- Interactive diagram: https://gitdiagram.com/triledinh159/project-future-tech
- Repository: https://github.com/triledinh159/project-future-tech

## Overview

This project is a full-stack solution built for an innovation challenge – it combines a mobile app that reads NFC signals (built with React Native, as seen in the “nfc_xelvis64_1” directory with its Android, iOS, src, and configuration files) with a backend hosted on AWS. The backend code is split between directories such as “AWS-Cloud-Training” and “AWSLambda,” which contain Python scripts and Lambda functions that interact with AWS services (for example, DynamoDB, S3, and Amazon Rekognition). The README confirms that the idea was to provide a more “convenient” payment solution using NFC technology for parking transactions.

##### Main Components
a. Mobile Frontend:
- The React Native mobile application (located under “nfc_xelvis64_1”) that handles NFC signal reading and user interactions.
b. AWS Backend Services:
- AWS Lambda functions – the Python scripts in “AWSLambda” (and similar code in “AWS-Cloud-Training”) represent serverless functions.
- AWS DynamoDB – used for storing transaction or user data.
- AWS S3 (or similar storage) – for storing assets or intermediary data.
c. Data Flow & Integration:
- Possibly an API Gateway (or similar integration layer) that triggers the Lambda functions from the mobile app.
- Event processors that check or update data (evident from files such as “checkdata.py” and “putBasictoDB.py”).

- “AWS Lambda” block(s) – note that there might be multiple functions (e.g., “checkData”, “texttoDB”, “putBasictoDB”) that process the incoming data.
- Link the Lambda functions with the “DynamoDB” component (for data storage) and the “S3 Bucket/ Rekognition” component (for storage of artifacts and image processing).
- If applicable, include an “AWS Cloud Training” block to represent testing or additional backend training functions.
- Certificate component (the tech.pdf file under AWSLambda/cert) to show that the solution’s technical quality was recognized.

##### Architectural Patterns and Design Principles
- Use of a serverless architecture for the backend using AWS Lambda.
- That the frontend and backend are decoupled, where the mobile app does not need to manage server infrastructure.
- Use of event-driven integration, as the Lambda functions are triggered by data events from the mobile app (or API endpoints).
- Security and scalability aspects where appropriate (for instance, AWS managed services increase scalability and reliability).

##### Technologies & Frameworks
- For the mobile app, list “React Native”, along with supporting technologies like Redux or navigators if known.
- For the backend, show “AWS Lambda”, “DynamoDB”, “S3 Bucket”, and “Amazon Rekognition”. Optionally include “API Gateway” if used.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Mobile Frontend Subgraph
    subgraph "Mobile Frontend"
        MA["Mobile App (React Native)"]:::frontend
        SRC["src"]:::frontend
        COMP["Components"]:::frontend
        SCREENS["Screens"]:::frontend
    end

    %% API Gateway
    AG["API Gateway"]:::api

    %% AWS Lambda Functions Subgraph
    subgraph "AWS Lambda Functions"
        CD["checkData"]:::lambda
        TDB["texttoDB"]:::lambda
        PDB["putBasictoDB"]:::lambda
        CERT["Tech Certification"]:::lambda
    end

    %% AWS Cloud Training Block
    ACT["AWS Cloud Training"]:::cloud

    %% AWS Services
    DDB["DynamoDB"]:::aws
    S3["S3 Bucket"]:::aws
    REK["Amazon Rekognition"]:::aws

    %% Data Flow: Mobile to Backend
    MA -->|"sends NFC data"| AG
    AG -->|"triggers"| CD
    AG -->|"triggers"| TDB
    AG -->|"triggers"| PDB

    %% Mobile Internal Structure
    MA -->|"contains"| SRC
    SRC -->|"includes"| COMP
    SRC -->|"includes"| SCREENS

    %% Cloud Training Integration
    ACT -->|"tests/triggers"| CD
    ACT -->|"tests/triggers"| TDB
    ACT -->|"tests/triggers"| PDB

    %% Lambda Functions interacting with AWS Services
    CD -->|"updates"| DDB
    TDB -->|"updates"| DDB
    PDB -->|"updates"| DDB

    CD -->|"stores/retrieves"| S3
    TDB -->|"stores/retrieves"| S3
    PDB -->|"stores/retrieves"| S3

    CD -->|"processes"| REK
    TDB -->|"processes"| REK
    PDB -->|"processes"| REK

    %% Click Events
    click MA "https://github.com/triledinh159/project-future-tech/tree/main/nfc_xelvis64_1"
    click SRC "https://github.com/triledinh159/project-future-tech/tree/main/nfc_xelvis64_1/src"
    click COMP "https://github.com/triledinh159/project-future-tech/tree/main/nfc_xelvis64_1/src/Components"
    click SCREENS "https://github.com/triledinh159/project-future-tech/tree/main/nfc_xelvis64_1/src/Screens"
    
    click CD "https://github.com/triledinh159/project-future-tech/blob/main/AWSLambda/checkData.py"
    click TDB "https://github.com/triledinh159/project-future-tech/blob/main/AWSLambda/texttoDB.py"
    click PDB "https://github.com/triledinh159/project-future-tech/blob/main/AWSLambda/putBasictoDB.py"
    click CERT "https://github.com/triledinh159/project-future-tech/blob/main/AWSLambda/cert/tech.pdf"
    
    click ACT "https://github.com/triledinh159/project-future-tech/tree/main/AWS-Cloud-Training"

    %% Styles
    classDef frontend fill:#cfe2f3,stroke:#0b5394,stroke-width:2px;
    classDef lambda fill:#d9ead3,stroke:#38761d,stroke-width:2px;
    classDef api fill:#fff2cc,stroke:#bf9000,stroke-width:2px;
    classDef aws fill:#f4cccc,stroke:#cc0000,stroke-width:2px;
    classDef cloud fill:#ead1dc,stroke:#b85499,stroke-width:2px;
```
