|
|
@@ -4,8 +4,8 @@ This file is the single source of truth for the project plan and status.
|
|
4
|
4
|
Update it at the end of every work session.
|
|
5
|
5
|
|
|
6
|
6
|
**Last updated:** 2026-11-14
|
|
7
|
|
-**Current step:** Step 3 — AI generation (built; waiting for a real test with API keys)
|
|
8
|
|
-**Next action:** In `.env.local` (keys are already added), switch the two providers from `fake` to `claude` and `deepseek`, and test a real generation and a real edit. Then start Step 4
|
|
|
7
|
+**Current step:** Step 4 — Commerce (Step 3 is done and tested with real AI)
|
|
|
8
|
+**Next action:** Merge `feature/ai-generation` into `main`, then start Step 4 on a new branch: products (create, edit, images, price, stock)
|
|
9
|
9
|
|
|
10
|
10
|
Status marks: `[ ]` not started · `[~]` in progress · `[x]` done
|
|
11
|
11
|
|
|
|
@@ -77,7 +77,7 @@ Changing from Claude to another AI model (or back) must be a settings change, no
|
|
77
|
77
|
### How AI generation works (added in Step 3)
|
|
78
|
78
|
|
|
79
|
79
|
- All AI calls go through `AiManager`. It reads `config/ai.php`, which reads `.env.local`.
|
|
80
|
|
-- Three providers exist: `claude`, `deepseek`, and `fake`. The `fake` one needs no key and costs nothing: it returns the built-in sample design. `.env.local` uses `fake` until the real test.
|
|
|
80
|
+- Three providers exist: `claude`, `deepseek`, and `fake`. The `fake` one needs no key and costs nothing: it returns the built-in sample design. Use `fake` for free development work.
|
|
81
|
81
|
- The DeepSeek driver speaks a common format that many providers share, so most new providers need only a few lines in `config/ai.php`.
|
|
82
|
82
|
- A full design: the AI gets our rules (built from `PlanSchema.php`) and the brand description, and answers with a store plan.
|
|
83
|
83
|
- A chat edit: the AI gets the current plan and the request, and answers with only what to change. We apply that to the plan.
|
|
|
@@ -131,13 +131,13 @@ Changing from Claude to another AI model (or back) must be a settings change, no
|
|
131
|
131
|
|
|
132
|
132
|
- [x] Swappable AI layer: one interface, one driver per provider, provider and model chosen per task in the settings file
|
|
133
|
133
|
- [x] Test: switch the generation model in settings and confirm it works with no code change (automated test)
|
|
134
|
|
-- [x] Claude Sonnet 5.5 for first store generation (built with Anthropic's official PHP package; not yet run against the real service)
|
|
135
|
|
-- [x] DeepSeek for small edits (built; not yet run against the real service)
|
|
|
134
|
+- [x] Claude Sonnet 5.5 for first store generation (built with Anthropic's official PHP package)
|
|
|
135
|
+- [x] DeepSeek for small edits
|
|
136
|
136
|
- [x] Run generation as a background job with a progress screen
|
|
137
|
137
|
- [x] Check the AI result is a valid store plan before saving (one automatic correction, then fail and leave the store unchanged)
|
|
138
|
138
|
- [x] Edit by chat ("make the banner darker")
|
|
139
|
139
|
- [x] Count and limit regenerations and edits per plan
|
|
140
|
|
-- [ ] Real test with API keys: one generation with Claude, one edit with DeepSeek, then tune the prompts if needed
|
|
|
140
|
+- [x] Real test with API keys (2026-11-14): two stores generated with Claude Sonnet 5.5 in 13 to 19 seconds each, about 4,000 tokens in and 2,000 to 2,600 out (roughly US$0.03 per store). Two edits with DeepSeek in 1 to 2 seconds each. All answers passed the checker first time. Prompt tuned once so layouts differ between brands
|
|
141
|
141
|
|
|
142
|
142
|
### Step 4 — Commerce
|
|
143
|
143
|
|
|
|
@@ -209,7 +209,7 @@ Then, from the project folder:
|
|
209
|
209
|
- Settings files: `.env` is uploaded to the repository and holds only basic, non-secret settings (secrets and all AI settings are blank). `.env.local` is never uploaded and holds everything needed to run, including keys. When `.env.local` exists the app reads it instead of `.env`, so it must be complete. This is set up in `bootstrap/app.php`.
|
|
210
|
210
|
- Database: MySQL, database `ai_commerce`, settings in `.env.local`.
|
|
211
|
211
|
- Local test login: created by `php artisan db:seed`. Email is in `database/seeders/DatabaseSeeder.php`, password in `database/factories/UserFactory.php`.
|
|
212
|
|
-- AI: `.env.local` currently uses the `fake` provider. To use real AI, set `AI_GENERATE_PROVIDER=claude` and `AI_EDIT_PROVIDER=deepseek`, and fill in `ANTHROPIC_API_KEY` and `DEEPSEEK_API_KEY`.
|
|
|
212
|
+- AI: `.env.local` now uses the real providers (`claude` and `deepseek`), so every generation and edit costs a little money. To work for free, set both providers to `fake`. For real AI, set `AI_GENERATE_PROVIDER=claude` and `AI_EDIT_PROVIDER=deepseek`, and fill in `ANTHROPIC_API_KEY` and `DEEPSEEK_API_KEY`.
|
|
213
|
213
|
- AI jobs need the background worker. `composer run dev` starts it. Without it, a job waits and is marked failed after 10 minutes.
|
|
214
|
214
|
- Emails (such as verification links) are written to `storage/logs/laravel.log`, not sent.
|
|
215
|
215
|
- Code repository: `https://git.mirfalah.my/mirfalah-tech/ai_commerce.git` (remote name `origin`). The `.env.local` file is never uploaded.
|
|
|
@@ -264,3 +264,4 @@ Add one line per work session: date, what was done, what is next.
|
|
264
|
264
|
| 2026-11-14 | First commit made and pushed to the private repository on git.mirfalah.my (branch `feature/store-sections-renderer`). | Step 3: swappable AI layer and store generation |
|
|
265
|
265
|
| 2026-11-14 | Step 3 built on branch `feature/ai-generation`: swappable AI layer (Claude, DeepSeek, fake), full store generation, chat edits, background job with progress screen, plan limits. 92 tests pass; whole flow checked in the browser with the fake provider. Not yet run against real Claude or DeepSeek. | Add API keys, run the real test, then Step 4 |
|
|
266
|
266
|
| 2026-11-14 | Split settings into `.env` (uploaded, no secrets, AI settings blank) and `.env.local` (private, complete). Removed `.env.example`. | Real AI test, then Step 4 |
|
|
|
267
|
+| 2026-11-14 | Real AI test passed: Claude Sonnet 5.5 generated two stores, DeepSeek made two chat edits. Tuned the prompt for more varied layouts. Step 3 done. | Merge into `main`, then Step 4: products |
|