Implement creator studio and upload updates
This commit is contained in:
98
docs/deployment.md
Normal file
98
docs/deployment.md
Normal file
@@ -0,0 +1,98 @@
|
||||
# Deployment
|
||||
|
||||
This repository uses a Bash-based production deploy flow.
|
||||
|
||||
## Normal deploy
|
||||
|
||||
Run the existing entrypoint:
|
||||
|
||||
```bash
|
||||
bash sync.sh
|
||||
```
|
||||
|
||||
If you launch `bash sync.sh` from WSL against this Windows checkout, the script will automatically run the frontend build with `npm.cmd` on Windows so Rollup/Vite use the correct optional native package set.
|
||||
|
||||
This will:
|
||||
|
||||
- build frontend assets locally with `npm run build`
|
||||
- rsync the application files to production
|
||||
- run `composer install --no-dev` on the server
|
||||
- run `php artisan migrate --force`
|
||||
- clear and rebuild Laravel caches
|
||||
- restart queue workers with `php artisan queue:restart`
|
||||
|
||||
## Deploy options
|
||||
|
||||
```bash
|
||||
bash sync.sh --skip-build
|
||||
bash sync.sh --skip-migrate
|
||||
bash sync.sh --no-maintenance
|
||||
```
|
||||
|
||||
Environment overrides:
|
||||
|
||||
```bash
|
||||
REMOTE_SERVER=user@example.com REMOTE_FOLDER=/var/www/app bash sync.sh
|
||||
```
|
||||
|
||||
You can also override the local build command explicitly:
|
||||
|
||||
```bash
|
||||
LOCAL_BUILD_COMMAND='npm run build' bash sync.sh
|
||||
LOCAL_BUILD_COMMAND='pnpm build' bash sync.sh
|
||||
```
|
||||
|
||||
## Replace production database from local
|
||||
|
||||
This is intentionally separate from a normal deploy because it overwrites production data.
|
||||
|
||||
```bash
|
||||
bash scripts/push-db-to-prod.sh --force
|
||||
```
|
||||
|
||||
Or combine it with deploy:
|
||||
|
||||
```bash
|
||||
bash sync.sh --with-db-from=local
|
||||
```
|
||||
|
||||
When run interactively, the deploy script will ask you to confirm the exact remote server and type a confirmation phrase before replacing production data.
|
||||
|
||||
For non-interactive use, pass both confirmations explicitly:
|
||||
|
||||
```bash
|
||||
bash sync.sh --with-db-from=local \
|
||||
--confirm-db-sync-target=klevze@server3.klevze.si \
|
||||
--confirm-db-sync-phrase='replace production db from local'
|
||||
```
|
||||
|
||||
Legacy compatibility still exists for:
|
||||
|
||||
```bash
|
||||
bash sync.sh --with-db --force-db-sync
|
||||
```
|
||||
|
||||
But the safer `--with-db-from=local` flow should be preferred.
|
||||
|
||||
The database sync script will:
|
||||
|
||||
- read local DB credentials from the local `.env`
|
||||
- create a local `mysqldump` export
|
||||
- upload the dump to the production server
|
||||
- create a backup of the current production database under `storage/app/deploy-backups`
|
||||
- import the local dump into the production database
|
||||
- run `php artisan migrate --force` unless `--skip-migrate` is passed
|
||||
|
||||
If you run the deploy from WSL while your local MySQL server is running on Windows with `DB_HOST=127.0.0.1` or `localhost`, the DB sync script will automatically use Windows `mysqldump.exe` so it can still reach the local database.
|
||||
|
||||
You can override the dump command explicitly if needed:
|
||||
|
||||
```bash
|
||||
LOCAL_MYSQLDUMP_COMMAND='mysqldump --host=10.0.0.5 --port=3306 --user=app dbname' bash scripts/push-db-to-prod.sh --force
|
||||
```
|
||||
|
||||
## Safety notes
|
||||
|
||||
- Normal deployments should use `bash sync.sh` without `--with-db`.
|
||||
- Use database replacement only for first-time bootstrap, staging, or an intentional full production reset.
|
||||
- This project should not use `php artisan route:cache` in deploy automation because the route file contains closure routes.
|
||||
112
docs/seo-audit-system-v1-summary.md
Normal file
112
docs/seo-audit-system-v1-summary.md
Normal file
@@ -0,0 +1,112 @@
|
||||
# SEO Audit System v1 Summary
|
||||
|
||||
## Changed Areas
|
||||
|
||||
- Added shared SEO support under `app/Support/Seo/`
|
||||
- Added shared Blade SEO renderer in `resources/views/partials/seo/head.blade.php`
|
||||
- Added shared Inertia SEO renderer in `resources/js/components/seo/SeoHead.jsx`
|
||||
- Updated layout integration in `resources/views/layouts/nova.blade.php` and `resources/views/layouts/_legacy.blade.php`
|
||||
- Wired major public controllers and views across homepage, artworks, browse/discover, categories, tags, profiles, collections, leaderboard, blog, stories, news, Nova Cards, community/gallery pages, and static/footer pages
|
||||
- Added and updated feature tests for key public SEO surfaces
|
||||
|
||||
## SEO Architecture Introduced
|
||||
|
||||
### Core files
|
||||
|
||||
- `config/seo.php`
|
||||
- `app/Support/Seo/SeoData.php`
|
||||
- `app/Support/Seo/BreadcrumbTrail.php`
|
||||
- `app/Support/Seo/SeoDataBuilder.php`
|
||||
- `app/Support/Seo/SeoFactory.php`
|
||||
- `resources/views/partials/seo/head.blade.php`
|
||||
- `resources/js/components/seo/SeoHead.jsx`
|
||||
|
||||
### Contract
|
||||
|
||||
- Controllers and pages can pass a normalized `seo` payload explicitly
|
||||
- Blade layouts can also normalize legacy `page_*` and `meta.*` data through `SeoFactory::fromViewData()`
|
||||
- `useUnifiedSeo` is the opt-in switch for the shared renderer
|
||||
- JSON-LD, Open Graph, Twitter tags, canonical tags, robots, breadcrumbs, and optional keywords are emitted from one place
|
||||
|
||||
## Supported Page Types
|
||||
|
||||
Explicitly covered or normalized through the shared system:
|
||||
|
||||
- Homepage
|
||||
- Artwork detail pages
|
||||
- Explore / browse / discover pages
|
||||
- Category pages
|
||||
- Tag pages
|
||||
- Creator / profile pages
|
||||
- Collection listing and collection detail pages
|
||||
- Leaderboard pages
|
||||
- Blog pages
|
||||
- Stories pages
|
||||
- News pages
|
||||
- Public Nova Cards pages
|
||||
- FAQ, rules, privacy, terms, about/help/contact/legal, staff, RSS feeds, and other public static/footer pages
|
||||
- Community / gallery-style public pages such as latest uploads, featured artworks, member photos, downloads today, comments latest, and monthly commentators
|
||||
|
||||
## Title / Description / Canonical / OG Strategy
|
||||
|
||||
- Title and description generation is page-type-aware where the app has a dedicated resolver
|
||||
- Legacy pages still normalize cleanly through fallback mapping of `page_title`, `page_meta_description`, `page_canonical`, `page_robots`, and `meta.*`
|
||||
- Canonicals are generated with Laravel route and URL helpers rather than hardcoded hosts
|
||||
- Open Graph and Twitter tags are standardized through the shared renderer
|
||||
- Fallback OG images resolve from page data first, then from configured defaults
|
||||
- Search and low-value pages can be marked noindex through the same DTO/builder contract
|
||||
|
||||
## Structured Data Added
|
||||
|
||||
JSON-LD is emitted centrally and currently supports the main public shapes used by the site:
|
||||
|
||||
- `WebSite`
|
||||
- `BreadcrumbList`
|
||||
- `CollectionPage`
|
||||
- `ProfilePage`
|
||||
- `FAQPage`
|
||||
- `ImageObject`
|
||||
- `CreativeWork`
|
||||
- `Article`
|
||||
|
||||
Schema is added only where it matches visible page content.
|
||||
|
||||
## Indexing / Robots Decisions
|
||||
|
||||
- Public canonical pages default to `index,follow`
|
||||
- Search and similar low-value surfaces can be marked noindex through the shared builder
|
||||
- Private/internal pages remain outside the shared public SEO rollout
|
||||
- The system is structured to align with future sitemap generation through canonical/indexable page types
|
||||
|
||||
## Breadcrumb / Internal Linking Fixes
|
||||
|
||||
- Added `BreadcrumbTrail` normalization
|
||||
- Removed duplicate `Home > Home` style breadcrumb issues
|
||||
- Ensured breadcrumb JSON-LD is emitted once through the shared renderer when breadcrumbs exist
|
||||
|
||||
## Tests Added / Updated
|
||||
|
||||
Key coverage includes:
|
||||
|
||||
- `tests/Feature/HomePageTest.php`
|
||||
- `tests/Feature/FooterPagesTest.php`
|
||||
- `tests/Feature/Collections/CollectionsV5FeatureTest.php`
|
||||
- `tests/Feature/LeaderboardPageTest.php`
|
||||
- `tests/Feature/RoutingUnificationTest.php`
|
||||
- `tests/Feature/Stories/CreatorStoryWorkflowTest.php`
|
||||
- `tests/Feature/NovaCards/NovaCardPublicPagesTest.php`
|
||||
- `tests/Feature/ArtworkJsonLdTest.php`
|
||||
- `tests/Feature/TagPageTest.php`
|
||||
- `tests/Feature/BrowseApiTest.php`
|
||||
|
||||
These tests cover canonical tags, JSON-LD, OG output, no-duplicate-head regressions, and core public page availability.
|
||||
|
||||
## Follow-up Recommendations
|
||||
|
||||
### SEO v2
|
||||
|
||||
- Add a formal sitemap generator built directly from the canonical/indexable page-type contract
|
||||
- Expand explicit page-type resolver methods for the remaining lower-value legacy pages that still rely on fallback normalization
|
||||
- Add broader page-family assertions for static pages, news/tag/category pages, and community gallery pages
|
||||
- Add snapshot-style tests for the shared head output if head regressions become frequent
|
||||
- Consider central reporting for pages with fallback-only metadata so future migrations are easier to track
|
||||
Reference in New Issue
Block a user