UI enhancements, i18n, history drawer, and requested features
This commit is contained in:
@@ -203,12 +203,11 @@ without losing the original.
|
||||
|
||||
### Recent generations
|
||||
|
||||
The last 6 successful generations are saved in `localStorage` under
|
||||
`melodymuse-history`. Click any entry to restore both the **input form
|
||||
The last 500 successful generations are saved on the server. Click any entry to restore both the **input form
|
||||
values** AND the full **generated assets** — handy for comparing two
|
||||
generations of the same idea.
|
||||
|
||||
Individual entries have an ✕ button to remove them. There's a **Clear all**
|
||||
Individual entries have an ✕ button to remove them. There's a **Clear history**
|
||||
button at the bottom of the history panel.
|
||||
|
||||
### Download the ZIP
|
||||
@@ -393,6 +392,43 @@ provider, the key, or the prompts.
|
||||
| `LLM_MODEL` | | `MiniMax-M3` | |
|
||||
| `PORT` | | `3000` | |
|
||||
| `CORS_ORIGIN` | | `*` | Lock this down in production |
|
||||
| `DATA_DIR` | | `data` | Directory for persistent storage (e.g. `history.json`) |
|
||||
|
||||
### Docker and History Persistence
|
||||
|
||||
The application saves recent generations (history) to a file named `history.json` inside the directory specified by the `DATA_DIR` environment variable (defaults to `data` in the project root).
|
||||
|
||||
If you are running the application using Docker, any files written inside the container will be lost when the container is rebuilt or restarted. To ensure your history survives a Docker rebuild, you **must set up a Docker volume** mapped to the `DATA_DIR`.
|
||||
|
||||
**Example using `docker run`:**
|
||||
```sh
|
||||
docker run -d \
|
||||
-p 3000:3000 \
|
||||
-e LLM_ENDPOINT="https://api.minimax.chat/v1" \
|
||||
-e LLM_API_KEY="sk-..." \
|
||||
-e DATA_DIR="/app/data" \
|
||||
-v melodymuse-data:/app/data \
|
||||
melodymuse-image
|
||||
```
|
||||
|
||||
**Example using `docker-compose.yml`:**
|
||||
```yaml
|
||||
services:
|
||||
melodymuse:
|
||||
image: melodymuse-image
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
- LLM_ENDPOINT=https://api.minimax.chat/v1
|
||||
- LLM_API_KEY=sk-...
|
||||
- DATA_DIR=/app/data
|
||||
volumes:
|
||||
- melodymuse-data:/app/data
|
||||
|
||||
volumes:
|
||||
melodymuse-data:
|
||||
```
|
||||
This ensures the `history.json` file is securely stored on your host machine and persists across rebuilds.
|
||||
|
||||
### Environment variables (Vite, dev only)
|
||||
|
||||
@@ -435,7 +471,7 @@ Response: `{ "style": "…", "mode": "…" }`.
|
||||
- The API key is held by the Node process via `process.env`. It's never
|
||||
sent to the browser in any response, not even in the health check.
|
||||
- The `localStorage` keys the SPA writes:
|
||||
- `melodymuse-history` — last 6 generations
|
||||
- `melodymuse-draft` — current unsaved input draft
|
||||
- `melodymuse-theme` — `'dark'` or `'light'`
|
||||
- `melodymuse-config` — reserved, currently unused (kept for future
|
||||
client-side server-URL override)
|
||||
|
||||
Reference in New Issue
Block a user