Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"env": {
"browser": true,
"es2020": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended"
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"plugins": [
"react",
"react-hooks",
"react-refresh"
],
"rules": {
"react/react-in-jsx-scope": "off",
"react/prop-types": "warn",
"react-refresh/only-export-components": [
"warn",
{ "allowConstantExport": true }
]
},
"settings": {
"react": {
"version": "detect"
}
}
}
128 changes: 128 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
name: CI/CD Pipeline

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]

jobs:
test:
name: Test & Lint
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run linter
run: npm run lint

- name: Run tests
run: npm run test:coverage

- name: Upload coverage reports to Codecov
if: matrix.node-version == '20.x'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/lcov.info
fail_ci_if_error: false

build:
name: Build Application
runs-on: ubuntu-latest
needs: test

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build application
run: npm run build

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: dist/
retention-days: 30

- name: Check build size
run: |
echo "Build completed successfully!"
du -sh dist/
ls -la dist/

deploy-preview:
name: Deploy Preview
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'pull_request'

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build-artifacts
path: dist/

- name: Deploy to GitHub Pages (Preview)
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
destination_dir: preview/${{ github.event.number }}

- name: Comment PR with preview link
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '🚀 Preview deployed! View at: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/preview/${{ github.event.number }}/'
})

security-scan:
name: Security Scan
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run npm audit
run: |
npm audit --audit-level=high
continue-on-error: true

- name: Run dependency review
uses: actions/dependency-review-action@v4
if: github.event_name == 'pull_request'
52 changes: 46 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,51 @@
The `index.html` file is a comprehensive HTML document for the "CORTEX Anomaly Detection" application. Here's an explanation of its structure and functionality:

### General Overview:
- **Purpose**: This file is the main interface for a cyberpunk-inspired anomaly detection application. It utilizes AI and facial recognition technologies.
- **Key Features**:
- Real-time video feed with face and anomaly detection.
- User interaction through buttons and settings.
- Integration with AI models and Google API for advanced functionality.
# CORTEX Anomaly Detector

[![CI/CD Pipeline](https://github.com/GizzZmo/CoreTex/workflows/CI/CD%20Pipeline/badge.svg)](https://github.com/GizzZmo/CoreTex/actions)

Cyberpunk-inspired facial recognition and anomaly detection system built with React.

## 🚀 Quick Start

### Prerequisites
- Node.js 18.x or 20.x
- npm

### Development
```bash
git clone https://github.com/GizzZmo/CoreTex.git
cd CoreTex
npm install
npm run dev
```

### Building
```bash
npm run build
```

### Testing
```bash
npm run test
npm run test:coverage
```

### Linting
```bash
npm run lint
npm run lint:fix
```

## 📦 Build Artifacts

The CI/CD pipeline automatically builds the following artifacts:
- Optimized React application bundle
- Static assets for deployment
- Test coverage reports
- Linting reports

Artifacts are available for download from GitHub Actions runs and can be deployed to any static hosting service.

---

Expand Down
37 changes: 26 additions & 11 deletions filstruktur.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CoreTex/
├── public/
│ ├── index.html
│ ├── favicon.ico
│ ├── index.html (moved to root for Vite)
│ ├── favicon.ico (planned)
│ └── assets/
│ └── logo.png
├── src/
Expand All @@ -13,21 +13,36 @@
│ ├── styles/
│ │ └── main.css
│ ├── App.jsx
│ ├── main.js
│ └── i18n.js
│ ├── main.jsx (renamed from main.js)
│ ├── i18n.js
│ └── setupTests.js
├── tests/
│ ├── App.test.js
│ └── FaceRecognition.test.js
│ ├── App.integration.test.js
│ ├── Dashboard.test.js
│ ├── FaceRecognition.test.js
│ ├── AnomalyLog.test.js
│ ├── LanguageSwitcher.test.js
│ ├── i18n.test.js
│ └── smoke.test.js
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ └── feature_request.md
│ │ ├── bug_report.md (planned)
│ │ └── feature_request.md (planned)
│ ├── workflows/
│ │ └── ci.yml
│ └── PULL_REQUEST_TEMPLATE.md
├── .env.example
│ │ └── ci.yml ✅
│ ├── PULL_REQUEST_TEMPLATE.md (planned)
│ └── CONTRIBUTING.md
├── dist/ (build output)
├── node_modules/ (dependencies)
├── .env.example (planned)
├── .gitignore
├── package.json
├── .eslintrc.json ✅
├── package.json ✅
├── package-lock.json ✅
├── vite.config.js ✅
├── index.html ✅ (Vite entry point)
├── index_legacy.html (original standalone version)
├── README.md
├── CONTRIBUTING.md
└── LICENSE
Loading