67 lines
2.7 KiB
Markdown
67 lines
2.7 KiB
Markdown
# NativePHP Rebuild Progress (Retraced)
|
|
|
|
## Confirmed source folders
|
|
|
|
- Backend: `../dewemoji-api`
|
|
- Chrome extension: `../dewemoji-chrome-ext`
|
|
- Website: `../dewemoji-site` (currently scaffold/empty)
|
|
|
|
## Current baseline
|
|
|
|
- Active backend logic exists in `dewemoji-api`.
|
|
- Active extension logic exists in `dewemoji-chrome-ext`.
|
|
- `dewemoji-site` currently has structure but no implemented content (mostly 0-byte files).
|
|
- New rebuild app scaffold now exists at `app/` (Laravel + NativePHP Desktop installed).
|
|
|
|
## Phase checklist
|
|
|
|
### Phase 0 - Retrace and documentation
|
|
- [x] Revalidated source folders with corrected names.
|
|
- [x] Rebuilt docs against corrected folders.
|
|
- [x] Marked `dewemoji-site` as scaffold status.
|
|
|
|
### Phase 1 - Foundation
|
|
- [x] Initialize NativePHP app in `dewemoji` (`app/` folder).
|
|
- [x] Install NativePHP Desktop scaffolding (`config/nativephp.php`, `NativeAppServiceProvider`).
|
|
- [x] Define initial env/config strategy (documented in `phase-1-foundation.md`).
|
|
- [x] Decide canonical data source: start from `dewemoji-api/data/emojis.json`.
|
|
|
|
### Phase 2 - API parity (extension first)
|
|
- [x] Implement `GET /v1/emojis`.
|
|
- [x] Implement `GET /v1/categories`.
|
|
- [x] Implement `POST /v1/license/verify`.
|
|
- [x] Preserve response/header compatibility (`X-Dewemoji-Tier`).
|
|
- [x] Support both `q` and `query` inputs.
|
|
|
|
### Phase 3 - Website rebuild
|
|
- [x] Build website pages in new app (index, emoji detail, api docs, legal pages).
|
|
- [ ] Replace scaffold in `dewemoji-site` via new NativePHP output.
|
|
|
|
### Phase 4 - Extension integration
|
|
- [ ] Point `dewemoji-chrome-ext` API base to new app endpoint.
|
|
- [ ] Validate free/pro flow, insert mode, and tone behavior.
|
|
|
|
### Phase 5 - Quality and release
|
|
- [ ] Add endpoint tests + regression checks for extension-critical fields.
|
|
- [ ] Add migration and rollback checklist.
|
|
|
|
## Critical risks to address early
|
|
|
|
- Backend mismatch: `q` vs `query`.
|
|
- Backend tier validation stubs in legacy PHP.
|
|
- Contract differences between current `/api/*` and extension `/v1/*`.
|
|
- Website source currently split (`dewemoji-api` active pages vs `dewemoji-site` empty scaffold).
|
|
|
|
## Implementation notes (Phase 2)
|
|
|
|
- Routes are now available at `/v1/*` (no `/api` prefix) for extension compatibility.
|
|
- License verification is currently environment-driven (`DEWEMOJI_LICENSE_ACCEPT_ALL` / `DEWEMOJI_PRO_KEYS`) as a safe stub before real provider integration.
|
|
- Test coverage added for `v1` endpoints in `app/tests/Feature/ApiV1EndpointsTest.php`.
|
|
|
|
## Implementation notes (Phase 3)
|
|
|
|
- Added website routes/pages in Laravel app:
|
|
- `/`, `/emoji/{slug}`, `/api-docs`, `/pricing`, `/privacy`, `/terms`
|
|
- Home page now consumes `/v1/categories` and `/v1/emojis` directly.
|
|
- Added page tests in `app/tests/Feature/SitePagesTest.php`.
|