Skip to content

Workbench #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
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
15 changes: 2 additions & 13 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// https://aka.ms/devcontainer.json
{
"name": "Existing Docker Compose (Extend)",
"dockerComposeFile": [
Expand All @@ -9,18 +8,8 @@
"settings": {},
"extensions": [
"editorconfig.editorconfig",
"ryannaddy.laravel-artisan",
"amiralizadeh9480.laravel-extra-intellisense",
"stef-k.laravel-goto-controller",
"codingyu.laravel-goto-view",
"mikestead.dotenv",
"christian-kohler.path-intellisense",
"esbenp.prettier-vscode",
"CoenraadS.bracket-pair-colorizer"
],
"remoteUser": "sail",
"postCreateCommand": "chown -R 1000:1000 /var/www/html && composer install && php artisan key:generate",
"forwardPorts": [80]
// "runServices": [],
// "shutdownAction": "none",
"postCreateCommand": "chown -R 1000:1000 /var/www/html && composer install",
"forwardPorts": [8000]
}
104 changes: 104 additions & 0 deletions .github/instructions/instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
---
applyTo: '**'
---

# Waterline Development Quick Reference

## Prerequisites
- PHP 8.0.2+
- Node.js & npm
- Composer
- Chrome/Chromium (for browser debugging)

## Setup & Development
1. Install dependencies:
```bash
composer install
npm install
```
2. Build assets:
```bash
npm run production
```
3. Publish assets to testbench:
```bash
./vendor/bin/testbench waterline:publish
```
4. Run migrations:
```bash
./vendor/bin/testbench workbench:create-sqlite-db
./vendor/bin/testbench migrate:fresh --database=sqlite
```
5. Start server:
```bash
composer run serve
```
6. Access dashboard:
- Local: http://localhost:8000/waterline
7. Create test workflow:
```bash
./vendor/bin/testbench workflow:create-test
```
8. Run queue worker:
```bash
./vendor/bin/testbench queue:work
```

## Asset Management
- Source: `resources/js/`, `resources/sass/`
- Build: `npm run production`
- Publish: `./vendor/bin/testbench waterline:publish`

## Key Commands
- Build workbench: `composer run build`
- Start server: `composer run serve`
- Publish assets: `./vendor/bin/testbench waterline:publish`
- Run tests: `composer test`
- Debug browser: `node .github/tools/browser.js`

## Troubleshooting
- Mix manifest not found: rebuild and publish assets
- Blank dashboard: check JS errors, publish assets, run debug script
- Connection issues: ensure server is running, check URL
- Puppeteer/browser errors: install Chrome/Chromium, check debug script

## File Structure
- `app/` - PHP source
- `config/` - Package config
- `resources/` - JS, Sass, Blade
- `public/` - Built assets
- `routes/` - Package routes
- `tests/` - Test suite
- `.github/tools/` - Debugging scripts

## Config Files
- `testbench.yaml` - Testbench config
- `webpack.mix.js` - Asset build config
- `composer.json` - Dependencies/scripts
- `config/waterline.php` - Package config

## Checklist
- composer install && npm install
- npm run production
- ./vendor/bin/testbench waterline:publish
- ./vendor/bin/testbench workbench:create-sqlite-db
- ./vendor/bin/testbench migrate:fresh --database=sqlite
- composer run serve
- ./vendor/bin/testbench workflow:create-test
- ./vendor/bin/testbench queue:work
- node .github/tools/browser.js

## Success Output
Working install should show:
```
{
"title": "Waterline - Dashboard",
"elementExists": true,
"hasVueInstance": true,
"windowWaterline": true,
"waterlineConfig": {
"path": "waterline",
"basePath": "/waterline"
}
}
```
Loading