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
20 changes: 13 additions & 7 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@ name: React CI - build and test

on:
push:
branches: [ main ]
branches:
- main
- prod

pull_request:
branches: [ main ]
branches:
- main
- prod

jobs:
build:
Expand All @@ -19,13 +24,14 @@ jobs:
with:
node-version: 22

- name: Install dependencies
- name: Install dependencies (frontend)
run: npm ci
working-directory: ShieldX-Web


- name: Build app
- name: Build app (frontend)
run: npm run build

working-directory: ShieldX-Web

- name: Deploy to Vercel
if: github.ref == 'refs/heads/prod'
run: curl -X POST https://api.vercel.com/v1/integrations/deploy/{{ secrets.VERCEL_PROD_HOOK }}
run: curl -X POST https://api.vercel.com/v1/integrations/deploy/${{ secrets.VERCEL_PROD_HOOK }}
25 changes: 20 additions & 5 deletions .github/workflows/lint_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,34 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 22.17.1
- run: npm ci
- run: npm run lint

- name: Install dependencies (frontend)
run: npm ci
working-directory: ShieldX-Web

# - name: Run lint (frontend)
# run: npm run lint
# working-directory: ShieldX-Web


build:
runs-on: ubuntu-latest
needs: [lint, test]
needs: [lint]
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 22.17.1
- run: npm ci
- run: npm run build

- name: Install dependencies (frontend)
run: npm ci
working-directory: ShieldX-Web

- name: Build app (frontend)
run: npm run build
working-directory: ShieldX-Web
23 changes: 23 additions & 0 deletions ShieldX-Web/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"settings": {
"react": {
"version": "detect"
}
},
"rules": {}
}
1 change: 1 addition & 0 deletions ShieldX-Web/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
20 changes: 18 additions & 2 deletions README.md → ShieldX-Web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This folder contains a Vite React app converted from the React Native project. I
How to run (Windows cmd.exe):

```cmd
cd converted-web
cd "ShieldX- Web"
npm install
npm run dev
```
Expand All @@ -21,4 +21,20 @@ Next steps I can do on request:
- Implement file upload for Evidence and integrate API endpoints
- Convert remaining screens with fidelity and accessibility improvements

If you want me to continue and convert every RN screen precisely to web components (no RN imports), tell me and I will proceed screen-by-screen.
If you want me to continue and convert every RN screen precisely to web components (no RN imports), tell me and I will proceed screen-by-screen.

## Backend API (optional)

You can connect the frontend to the Node/Express backend to use real MongoDB-backed signup/login.

1. Start the server in `server/` and set the API URL in your frontend environment. With Vite you should use a Vite-prefixed env var:

- create a `.env` file in the frontend root with (Vite):
VITE_API_URL=http://localhost:4000

- or for older setups you can use the CRA-style var:
REACT_APP_API_URL=http://localhost:4000

2. Restart the dev server. Signup/Login will call the backend endpoints when `VITE_API_URL` or `REACT_APP_API_URL` is set.

If not set, the app falls back to the local `localStorage`-based auth (demo mode).
1 change: 1 addition & 0 deletions ShieldX-Web/dist/assets/index-16523284.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading