Skip to content

Commit 9dcaeaa

Browse files
authored
feat(admin): modernize interface with React dashboard and API explorer
- Migrate admin UI from legacy JavaScript to React + TypeScript + Vite - Add interactive Live API Explorer for testing JWT endpoints with real calls - Implement enhanced configuration dashboard with real-time health monitoring - Consolidate dashboard API calls into a single endpoint for better performance - Add professional UI components with a modern card-based layout
1 parent 5333094 commit 9dcaeaa

File tree

226 files changed

+27254
-18285
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

226 files changed

+27254
-18285
lines changed

.distignore

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# Directories
2+
/.wordpress-org
3+
/.git
4+
/.github
5+
/.husky
6+
/node_modules
7+
/admin/ui/node_modules
8+
/tests
9+
/scripts
10+
/.vscode
11+
/.idea
12+
/stubs
13+
14+
# Hidden files
15+
.distignore
16+
.gitignore
17+
.gitattributes
18+
.editorconfig
19+
.eslintrc
20+
.eslintignore
21+
.prettierrc
22+
.prettierignore
23+
.phpunit.result.cache
24+
.actrc
25+
.secrets
26+
.env
27+
.DS_Store
28+
29+
# Development files
30+
CLAUDE.md
31+
CLAUDE.local.md
32+
.claude
33+
DEVELOPMENT.md
34+
README.md
35+
CHANGELOG.md
36+
CONTRIBUTING.md
37+
38+
# Configuration files
39+
composer.json
40+
composer.lock
41+
package.json
42+
package-lock.json
43+
phpunit.xml
44+
phpunit.xml.dist
45+
phpcs.xml
46+
phpcs.xml.dist
47+
.wp-env.json
48+
vite.config.ts
49+
tsconfig.json
50+
tsconfig.node.json
51+
tailwind.config.js
52+
postcss.config.js
53+
vitest.config.ts
54+
components.json
55+
eslint.config.js
56+
57+
# Build tools
58+
Gruntfile.js
59+
gulpfile.js
60+
webpack.config.js
61+
62+
# Testing
63+
/tests
64+
phpunit.xml
65+
phpunit.xml.dist
66+
67+
# Documentation
68+
/docs
69+
*.md
70+
71+
# Logs
72+
*.log
73+
npm-debug.log*
74+
yarn-debug.log*
75+
yarn-error.log*
76+
77+
# Temporary files
78+
*.tmp
79+
*.temp
80+
*.swp
81+
*~
82+
.tmp
83+
84+
# Archives
85+
*.zip
86+
*.tar
87+
*.gz
88+
89+
# OS files
90+
Thumbs.db
91+
Desktop.ini
92+
93+
# Editor files
94+
*.sublime-project
95+
*.sublime-workspace
96+
97+
# PHP files that shouldn't be in frontend dist
98+
admin/ui/dist/class-jwt-auth-public.php
99+
admin/ui/dist/index.php

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
9+
[*.{js,jsx,ts,tsx,json,css,scss}]
10+
indent_style = space
11+
indent_size = 2
12+
13+
[*.md]
14+
trim_trailing_whitespace = false
15+
16+
[*.{yml,yaml}]
17+
indent_style = space
18+
indent_size = 2

.github/workflows/deploy.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Deploy Test Release
2+
3+
on:
4+
push:
5+
branches:
6+
- test-release
7+
workflow_dispatch: # Allow manual triggering
8+
9+
jobs:
10+
build-and-test:
11+
name: Build and Test Release
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup PHP
18+
uses: shivammathur/setup-php@v2
19+
with:
20+
php-version: '7.4'
21+
tools: composer
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: '18'
27+
cache: 'npm'
28+
29+
- name: Install PHP dependencies (production only)
30+
run: composer install --no-dev --optimize-autoloader --prefer-dist --no-interaction
31+
32+
- name: Install Node.js dependencies
33+
run: npm ci
34+
35+
- name: Build frontend assets
36+
run: npm run build
37+
38+
- name: Run tests
39+
run: |
40+
chmod +x scripts/run-tests.sh
41+
./scripts/run-tests.sh
42+
43+
- name: Reinstall production dependencies
44+
run: |
45+
echo "Reinstalling production-only composer dependencies just in case..."
46+
composer install --no-dev --optimize-autoloader --prefer-dist --no-interaction
47+
48+
- name: Generate zip file
49+
run: |
50+
chmod +x scripts/create-release.sh
51+
./scripts/create-release.sh
52+
53+
- name: Create Release
54+
uses: softprops/action-gh-release@v1
55+
with:
56+
tag_name: test-${{ github.run_number }}
57+
name: JWT Auth Test Release #${{ github.run_number }}
58+
files: |
59+
wp-api-jwt-auth.zip
60+
draft: true
61+
prerelease: true
62+
generate_release_notes: true
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Test WordPress.org Deploy (Dry Run)
2+
3+
on:
4+
push:
5+
branches:
6+
- build-test
7+
workflow_dispatch: # Allow manual triggering
8+
9+
jobs:
10+
test-wordpress-deploy:
11+
name: Test WordPress Deploy (Dry Run)
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup PHP
18+
uses: shivammathur/setup-php@v2
19+
with:
20+
php-version: '7.4'
21+
tools: composer
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: '18'
27+
cache: 'npm'
28+
29+
- name: Install PHP dependencies (production only)
30+
run: composer install --no-dev --optimize-autoloader --prefer-dist --no-interaction
31+
32+
- name: Install Node.js dependencies
33+
run: npm ci
34+
35+
- name: Build frontend assets
36+
run: npm run build
37+
38+
- name: Run tests
39+
run: |
40+
chmod +x scripts/run-tests.sh
41+
./scripts/run-tests.sh
42+
43+
- name: Reinstall production dependencies
44+
run: |
45+
echo "Reinstalling production-only composer dependencies..."
46+
composer install --no-dev --optimize-autoloader --prefer-dist --no-interaction
47+
48+
- name: Build WordPress Plugin Zip
49+
uses: 10up/action-wordpress-plugin-build-zip@stable
50+
with:
51+
retention-days: 1
52+
env:
53+
SLUG: jwt-authentication-for-wp-rest-api
54+
55+
- name: Display build info
56+
run: |
57+
echo "📦 Plugin ZIP has been built and uploaded as an artifact"
58+
echo "🗓️ The artifact will be retained for 1 day"
59+
echo "ℹ️ Download the artifact to test the plugin package"

.github/workflows/trunk.yml renamed to .github/workflows/wordpress-assets-update.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ jobs:
88
name: Push to trunk
99
runs-on: ubuntu-latest
1010
steps:
11-
- name: Install Subversion
12-
run: sudo apt-get update && sudo apt-get install -y subversion
11+
- name: Install Subversion and rsync
12+
run: sudo apt-get update && sudo apt-get install -y subversion rsync
1313
- name: Checkout code
1414
uses: actions/checkout@master
1515
- name: WordPress.org plugin asset/readme update
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Deploy to WordPress.org
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
jobs:
9+
tag:
10+
name: New tag
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Setup PHP
17+
uses: shivammathur/setup-php@v2
18+
with:
19+
php-version: '7.4'
20+
tools: composer
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: '18'
26+
cache: 'npm'
27+
28+
- name: Install PHP dependencies (production only)
29+
run: composer install --no-dev --optimize-autoloader --prefer-dist --no-interaction
30+
31+
- name: Install Node.js dependencies
32+
run: npm ci
33+
34+
- name: Build frontend assets
35+
run: npm run build
36+
37+
- name: Run tests
38+
run: |
39+
chmod +x scripts/run-tests.sh
40+
./scripts/run-tests.sh
41+
42+
- name: Reinstall production dependencies
43+
run: |
44+
echo "Reinstalling production-only composer dependencies..."
45+
composer install --no-dev --optimize-autoloader --prefer-dist --no-interaction
46+
47+
- name: Install Subversion and rsync
48+
run: sudo apt-get update && sudo apt-get install -y subversion rsync
49+
50+
- name: WordPress Plugin Deploy
51+
uses: 10up/action-wordpress-plugin-deploy@stable
52+
env:
53+
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
54+
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
55+
SLUG: jwt-authentication-for-wp-rest-api

.gitignore

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,35 @@
1-
.vscode
1+
# IDE settings (keep project-wide settings, ignore personal ones)
2+
.vscode/launch.json
3+
.vscode/tasks.json
4+
.vscode/*.code-workspace
5+
.idea/
6+
.claude/
7+
stubs
8+
9+
# Development documentation
10+
DEVELOPMENT.md
11+
.phpunit.result.cache
12+
13+
# System files
214
.DS_Store
3-
includes/vendor/bin
4-
includes/vendor/dealerdirect
5-
includes/vendor/squizlabs
6-
includes/vendor/wp-coding-standards
15+
Thumbs.db
16+
17+
# Dependencies
18+
includes/vendor/
719
admin/ui/node_modules
20+
node_modules
21+
22+
# Build outputs
23+
admin/ui/dist
24+
.tmp
25+
26+
# Logs
27+
*.log
28+
npm-debug.log*
29+
yarn-debug.log*
30+
yarn-error.log*
31+
32+
# Act (GitHub Actions local testing)
33+
.actrc
34+
.secrets
35+
.env

.husky/pre-commit

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
# Run linting before commit
3+
npm run lint:fix

0 commit comments

Comments
 (0)