Skip to content

Commit 4f446a0

Browse files
Merge pull request #25 from vijaythecoder/feature/macos-permissions-integration
Feature/macos permissions integration
2 parents 78bf00d + 1588af4 commit 4f446a0

File tree

79 files changed

+10245
-1791
lines changed

Some content is hidden

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

79 files changed

+10245
-1791
lines changed

.claude/settings.local.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"mcp__sequential-thinking__sequentialthinking"
5+
],
6+
"deny": []
7+
}
8+
}

.github/workflows/lint.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,14 @@ jobs:
2525
php-version: '8.4'
2626

2727
- name: Install Dependencies
28+
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
29+
30+
- name: Install Node Dependencies
2831
run: |
29-
composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
30-
npm install
32+
# Workaround for npm optional dependencies bug
33+
# https://github.com/npm/cli/issues/4828
34+
rm -rf node_modules package-lock.json
35+
npm install --no-optional
3136
3237
- name: Run Pint
3338
run: vendor/bin/pint

.github/workflows/tests.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,13 @@ jobs:
2929
uses: actions/setup-node@v4
3030
with:
3131
node-version: '22'
32-
cache: 'npm'
3332

3433
- name: Install Node Dependencies
35-
run: npm ci
34+
run: |
35+
# Workaround for npm optional dependencies bug
36+
# https://github.com/npm/cli/issues/4828
37+
rm -rf node_modules package-lock.json
38+
npm install --no-optional
3639
3740
- name: Install Dependencies
3841
run: composer install --no-interaction --prefer-dist --optimize-autoloader

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@ yarn-error.log
2424
/.zed
2525
/dist
2626
.DS_Store
27+
28+
# NativePHP local development
29+
nativephp-electron/

CLAUDE.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,4 +232,33 @@ This project uses MIT License with Commons Clause:
232232
- NativePHP allows running as desktop application
233233
- Concurrently runs multiple processes in development (server, queue, logs, vite)
234234
- Built primarily for macOS desktop usage
235-
- Uses Pusher for additional real-time features
235+
- Uses Pusher for additional real-time features
236+
237+
## AI Team Configuration (autogenerated by team-configurator, 2025-01-30)
238+
**Important: YOU MUST USE subagents when available for the task.**
239+
240+
### Detected Technology Stack
241+
- **Backend Framework**: Laravel 12.0 (PHP 8.2+)
242+
- **Frontend Framework**: Vue 3.5.13 with TypeScript and Inertia.js
243+
- **CSS Framework**: Tailwind CSS 4.1.1
244+
- **Build Tool**: Vite 6
245+
- **Desktop Platform**: NativePHP/Electron
246+
- **Test Framework**: Pest PHP
247+
- **Database**: SQLite (dual database setup)
248+
- **Real-time Features**: OpenAI Realtime API, WebSockets
249+
- **State Management**: Pinia
250+
- **Additional Tools**: Prettier, ESLint, Laravel Pint
251+
252+
### Assigned AI Specialists
253+
254+
| Task | Agent | Notes |
255+
|------|-------|-------|
256+
| Laravel backend development | @agent-laravel-backend-expert | Controllers, services, models, Inertia.js integration |
257+
| Database and Eloquent queries | @agent-laravel-eloquent-expert | ORM optimization, complex queries, migrations |
258+
| Vue component development | @agent-vue-component-architect | Vue 3 Composition API, component patterns |
259+
| State management (Pinia) | @agent-vue-state-manager | Pinia stores, state architecture |
260+
| Frontend styling and UI | @agent-tailwind-frontend-expert | Tailwind CSS, responsive design, Reka UI components |
261+
| API design and architecture | @agent-api-architect | RESTful design, API best practices |
262+
| Documentation updates | @agent-documentation-specialist | README, API docs, architecture guides |
263+
| Code review | @agent-code-reviewer | Security, quality, maintainability checks |
264+
| Performance optimization | @agent-performance-optimizer | Bottleneck identification, optimization |

NATIVEPHP_BUILD_FIX.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# NativePHP Build Fix Guide
2+
3+
## Problem Summary
4+
When building the NativePHP/Electron app, frontend assets weren't being properly included, causing "Vite not found" errors on fresh installations.
5+
6+
## Root Causes Identified
7+
8+
1. **Hot Reload File**: The `public/hot` file was being included in builds, causing Laravel to look for Vite dev server
9+
2. **Missing npm install**: Build process wasn't installing npm dependencies before building
10+
3. **Build artifacts**: Development artifacts were interfering with production builds
11+
12+
## Fixes Applied
13+
14+
### 1. Updated `config/nativephp.php`
15+
16+
- Added `public/hot` to `cleanup_exclude_files` to prevent it from being included in builds
17+
- Added `npm install --omit=dev` to prebuild commands before `npm run build`
18+
19+
### 2. Created Build Preparation Script
20+
21+
Created `build-prepare.sh` to ensure clean builds:
22+
- Removes development artifacts (hot file, .vite cache)
23+
- Installs production npm dependencies
24+
- Builds frontend assets
25+
- Verifies manifest.json exists
26+
- Optimizes Laravel for production
27+
28+
## Build Process
29+
30+
### For Development
31+
```bash
32+
# Start development environment
33+
composer dev
34+
35+
# Or for NativePHP development
36+
composer native:dev
37+
```
38+
39+
### For Production Build
40+
41+
1. **Prepare the build** (run this before building):
42+
```bash
43+
./build-prepare.sh
44+
```
45+
46+
2. **Build the application**:
47+
```bash
48+
php artisan native:build mac arm64
49+
```
50+
51+
3. **Test the build** on a fresh machine:
52+
- Copy the built app from `dist/` directory
53+
- Install and run - it should work without any Vite errors
54+
55+
## Important Notes
56+
57+
1. **Always run build-prepare.sh** before building for production
58+
2. **Never commit the `public/hot` file** to version control
59+
3. **Ensure `public/build/manifest.json` exists** after building
60+
4. The prebuild commands in `config/nativephp.php` will automatically:
61+
- Install npm dependencies
62+
- Build frontend assets
63+
- Optimize Laravel
64+
65+
## Troubleshooting
66+
67+
If you still see "Vite not found" errors:
68+
69+
1. Check if `public/hot` file exists in the built app - it shouldn't
70+
2. Verify `public/build/manifest.json` exists in the built app
71+
3. Ensure the app is running in production mode (`APP_ENV=production`)
72+
4. Check Laravel logs for any asset-related errors
73+
74+
## Testing on Fresh Machine
75+
76+
When testing on a new machine:
77+
1. The app should work immediately after installation
78+
2. No need to run `npm install` or `npm run dev`
79+
3. All assets should be pre-built and included

0 commit comments

Comments
 (0)