# carsoftwaresystems/ev.carsoftwaresystems architecture

> Architecture diagram of the GitHub repository carsoftwaresystems/ev.carsoftwaresystems, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/carsoftwaresystems/ev.carsoftwaresystems
- Repository: https://github.com/carsoftwaresystems/ev.carsoftwaresystems

## Overview

1. **Repository shape**
   - This repo is a **Vue 3 + TypeScript frontend** with an **AWS Amplify backend** defined alongside it.
   - It is not a single-purpose app repo: it also contains a large amount of **static site content, PDFs, images, and legacy HTML/CSS/JS assets**.

2. **Primary runtime path**
   - The main application entry is `src/main.ts`, which mounts `src/App.vue`.
   - The Vue source is built with **Vite** (`vite.config.ts`) and uses shared styles from `src/assets/`.
   - `src/components/Todos.vue` plus the `Icon*.vue` files are the only clear app components in the tree, so the Vue app is still a **starter/template-level UI**.

3. **Frontend boundaries**
   - `src/` is the modern application boundary: Vue components, app bootstrap, and app-local CSS.
   - `public/` is the static asset boundary for the frontend build output: downloadable documents, PDFs, video, and test fixtures.
   - The root-level `index.html` is the browser entry page for the Vite app.

4. **Amplify backend boundary**
   - `amplify/` is a separate backend workspace with its own `package.json` and TypeScript config.
   - `amplify/backend.ts` is the composition point for backend resources.
   - `amplify/auth/resource.ts` defines the authentication subsystem.
   - `amplify/data/resource.ts` defines the data/API subsystem.

5. **Backend capabilities**
   - The README states the backend is meant to provide:
     - **Amazon Cognito** for auth
     - **AWS AppSync** for GraphQL API access
     - **Amazon DynamoDB** for persistent data
   - So the expected data flow is: browser UI → Amplify client/runtime → AppSync API → DynamoDB, with Cognito guarding access.

6. **Deployment and environment**
   - `amplify.yml` indicates the repo is intended for **Amplify-based deployment/hosting**.
   - `env.d.ts` and the Vite/TS config files suggest the app is set up for type-safe environment and build-time integration.

7. **Static content library**
   - The `public/` tree is unusually large and contains many domain-specific assets: EV, battery, telematics, AI, engineering, and market research PDFs, plus a test video and JSON.
   - Architecturally, this looks like a **content/document distribution layer** rather than dynamic application state.

8. **Legacy or parallel website assets**
   - The root-level `css/`, `js/`, `fonts/`, `img/`, `php/`, and additional HTML files (`index_1.html`, `index_original.html`, `ev/index.html`, `doc-sample/index.html`) form a **separate static website/marketing-site surface**.
   - `php/form-process.php` and `js/contact-form-script.js` imply an older contact-form flow that is distinct from the Vue/Amplify stack.
   - For diagramming, treat this as a **parallel static/legacy presentation layer**, not part of the core Vue app unless explicitly wired in.

9. **Styling system**
   - There are two styling tracks:
     - `src/assets/*.css` for the Vue app
     - root `css/` and `scss/` for the broader site templates/themes
   - This suggests the repository may be carrying both the current Vue app and older theme assets in one codebase.

10. **Content and navigation emphasis**
   - The repo appears optimized around **document-heavy EV/engineering content** and downloadable assets rather than data-intensive UI flows.
   - The application likely serves as a **portal or brochure site** with authenticated/backend-enabled capabilities available as the project grows.

11. **Practical architecture summary**
   - **Client layer:** Vue/Vite app in `src/`
   - **Backend layer:** Amplify-defined auth + data services in `amplify/`
   - **Static delivery layer:** `public/` for documents/media and root legacy assets for older pages
   - **Deployment layer:** Amplify hosting/deploy pipeline via `amplify.yml`

12. **Key diagram boundary to capture**
   - The most important architectural boundary is between the **browser-rendered Vue app** and the **Amplify-managed cloud backend**.
   - A second important boundary is between the **modern app source** and the **legacy/static site content**, since both coexist in the repo but serve different purposes.

Main entry points: [`src/main.ts`](https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/src/main.ts) (Main boot), [`src/App.vue`](https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/src/App.vue) (App shell), [`amplify/backend.ts`](https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/amplify/backend.ts) (Backend comp), [`amplify/data/resource.ts`](https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/amplify/data/resource.ts) (Data resource)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Modern frontend"]
  node_root_index["Index page<br/>html entry<br/>[index.html]"]
  node_src_main["Main boot<br/>vue bootstrap<br/>[main.ts]"]
  node_src_app["App shell<br/>vue root<br/>[App.vue]"]
  node_src_todos["Todos UI<br/>[Todos.vue]"]
  node_src_icons["Icon set<br/>components"]
  node_src_assets["App styles<br/>css assets"]
end

subgraph group_backend["Amplify backend"]
  node_amplify_backend["Backend comp<br/>amplify compose<br/>[backend.ts]"]
  node_amplify_auth["Auth resource<br/>cognito auth<br/>[resource.ts]"]
  node_amplify_data["Data resource<br/>appsync api<br/>[resource.ts]"]
  node_amplify_pkg["Backend package<br/>workspace pkg<br/>[package.json]"]
  node_amplify_tsconfig["Backend TS config<br/>tsconfig<br/>[tsconfig.json]"]
end

subgraph group_legacy["Legacy site"]
  node_legacy_html["Legacy pages<br/>static site<br/>[index_1.html]"]
  node_legacy_assets["Theme assets<br/>css/js assets"]
  node_legacy_php["Form handler<br/>php backend<br/>[form-process.php]"]
end

subgraph group_content["Static content"]
  node_public_docs[("Docs library<br/>static content")]
  node_public_test["Test media<br/>static asset"]
end

subgraph group_build["Build and deploy"]
  node_vite_config["Vite config<br/>build config<br/>[vite.config.ts]"]
  node_amplify_yml["Deploy config<br/>hosting config<br/>[amplify.yml]"]
end

node_root_index -->|"loads"| node_src_main
node_src_main -->|"mounts"| node_src_app
node_src_app -->|"renders"| node_src_todos
node_src_app -->|"uses"| node_src_icons
node_src_app -->|"styles"| node_src_assets
node_src_main -->|"built by"| node_vite_config
node_amplify_backend -->|"includes"| node_amplify_auth
node_amplify_backend -->|"includes"| node_amplify_data
node_amplify_auth -.->|"guards"| node_amplify_data
node_src_main -.->|"client backend"| node_amplify_backend
node_amplify_data -.->|"serves"| node_public_docs
node_public_docs -->|"contains"| node_public_test
node_legacy_html -->|"depends on"| node_legacy_assets
node_legacy_html -.->|"posts to"| node_legacy_php
node_legacy_assets -.->|"supports"| node_legacy_php
node_amplify_yml -->|"deploys"| node_amplify_backend
node_amplify_yml -->|"hosts"| node_root_index
node_vite_config -->|"bundles"| node_src_assets
node_amplify_pkg -.->|"configures"| node_amplify_tsconfig

click node_root_index "https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/index.html"
click node_src_main "https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/src/main.ts"
click node_src_app "https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/src/App.vue"
click node_src_todos "https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/src/components/Todos.vue"
click node_src_icons "https://github.com/carsoftwaresystems/ev.carsoftwaresystems/tree/main/src/components/icons"
click node_src_assets "https://github.com/carsoftwaresystems/ev.carsoftwaresystems/tree/main/src/assets"
click node_vite_config "https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/vite.config.ts"
click node_amplify_backend "https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/amplify/backend.ts"
click node_amplify_auth "https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/amplify/auth/resource.ts"
click node_amplify_data "https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/amplify/data/resource.ts"
click node_amplify_pkg "https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/amplify/package.json"
click node_amplify_tsconfig "https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/amplify/tsconfig.json"
click node_public_docs "https://github.com/carsoftwaresystems/ev.carsoftwaresystems/tree/main/public"
click node_public_test "https://github.com/carsoftwaresystems/ev.carsoftwaresystems/tree/main/public/test"
click node_legacy_html "https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/index_1.html"
click node_legacy_assets "https://github.com/carsoftwaresystems/ev.carsoftwaresystems/tree/main/css"
click node_legacy_php "https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/php/form-process.php"
click node_amplify_yml "https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/amplify.yml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_root_index,node_src_main,node_src_app,node_src_todos,node_src_icons,node_src_assets toneBlue
class node_amplify_backend,node_amplify_auth,node_amplify_data,node_amplify_pkg,node_amplify_tsconfig toneAmber
class node_legacy_html,node_legacy_assets,node_legacy_php toneMint
class node_public_docs,node_public_test toneRose
class node_vite_config,node_amplify_yml toneIndigo
```

## Components

### Modern frontend

Vue 3 + Vite application surface

- [Index page](https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/index.html): html entry · Browser entry page for the Vite app · `index.html`
- [Main boot](https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/src/main.ts): vue bootstrap · Mounts the Vue application · `src/main.ts`
- [App shell](https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/src/App.vue): vue root · Top-level application component · `src/App.vue`
- [Todos UI](https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/src/components/Todos.vue): Primary visible app component · `src/components/Todos.vue`
- [Icon set](https://github.com/carsoftwaresystems/ev.carsoftwaresystems/tree/main/src/components/icons): components · Template icon components used by the starter UI · `src/components/icons`
- [App styles](https://github.com/carsoftwaresystems/ev.carsoftwaresystems/tree/main/src/assets): css assets · Shared styles for the modern frontend · `src/assets`

### Amplify backend

Cloud resources defined in the Amplify workspace

- [Backend comp](https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/amplify/backend.ts): amplify compose · Backend resource composition point · `amplify/backend.ts`
- [Auth resource](https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/amplify/auth/resource.ts): cognito auth · Authentication subsystem definition · `amplify/auth/resource.ts`
- [Data resource](https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/amplify/data/resource.ts): appsync api · GraphQL data/API subsystem definition · `amplify/data/resource.ts`
- [Backend package](https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/amplify/package.json): workspace pkg · Separate package manifest for the Amplify workspace · `amplify/package.json`
- [Backend TS config](https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/amplify/tsconfig.json): tsconfig · TypeScript configuration for the Amplify workspace · `amplify/tsconfig.json`

### Legacy site

Older static website and form-processing assets

- [Legacy pages](https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/index_1.html): static site · Older HTML surfaces and alternate landing pages · `index_1.html`
- [Theme assets](https://github.com/carsoftwaresystems/ev.carsoftwaresystems/tree/main/css): css/js assets · Legacy styles, scripts, fonts, and images · `css`
- [Form handler](https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/php/form-process.php): php backend · Old contact-form processing endpoint · `php/form-process.php`

### Static content

Downloadable documents and media served from public/

- [Docs library](https://github.com/carsoftwaresystems/ev.carsoftwaresystems/tree/main/public): static content · Large document set for EV and engineering topics · `public`
- [Test media](https://github.com/carsoftwaresystems/ev.carsoftwaresystems/tree/main/public/test): static asset · Sample JSON and video fixtures · `public/test`

### Build and deploy

Tooling and hosting configuration

- [Vite config](https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/vite.config.ts): build config · Frontend build and dev server configuration · `vite.config.ts`
- [Deploy config](https://github.com/carsoftwaresystems/ev.carsoftwaresystems/blob/main/amplify.yml): hosting config · Amplify deployment and hosting pipeline definition · `amplify.yml`

## Connections

- Index page → Main boot: loads · The browser entry page boots the Vue app
- Main boot → App shell: mounts · Application bootstrap mounts the root component
- App shell → Todos UI: renders · Main app composition uses the starter todo component
- App shell → Icon set: uses · Template UI icon components support the app shell
- App shell → App styles: styles · App shell pulls in shared frontend styles
- Main boot → Vite config: built by · Frontend runtime is bundled through Vite
- Backend comp → Auth resource: includes · Backend composition includes authentication resources
- Backend comp → Data resource: includes · Backend composition includes data/API resources
- Auth resource → Data resource: guards · Authenticated access constrains the data/API layer
- Main boot → Backend comp: client backend · Frontend is designed to consume the Amplify backend
- Data resource → Docs library: serves · Backend-enabled app sits alongside document-heavy content distribution
- Docs library → Test media: contains · Static content area also includes media/test fixtures
- Legacy pages → Theme assets: depends on · Older pages rely on the legacy theme assets
- Legacy pages → Form handler: posts to · Legacy contact flow is processed by the PHP endpoint
- Theme assets → Form handler: supports · Legacy presentation layer coexists with the old form flow
- Deploy config → Backend comp: deploys · Amplify hosting pipeline deploys the backend workspace
- Deploy config → Index page: hosts · Deployment also serves the Vite frontend entry
- Vite config → App styles: bundles · Vite build includes the modern app styles and assets
- Backend package → Backend TS config: configures · Amplify workspace package and TypeScript setup are paired
