Add TypeScript frontend integration documentation, repository agent guidance files, Go-served frontend routing, and an advanced Docker Compose setup with watch mode plus BuildKit cache configuration. Made-with: Cursor
This commit is contained in:
@@ -32,7 +32,7 @@ Optional environment variables:
|
||||
Build and run the backend service:
|
||||
|
||||
```bash
|
||||
docker compose up --build -d
|
||||
COMPOSE_BAKE=true docker compose up --build -d
|
||||
```
|
||||
|
||||
Stop the service:
|
||||
@@ -44,20 +44,26 @@ docker compose down
|
||||
For local development with auto-rebuild on file changes:
|
||||
|
||||
```bash
|
||||
docker compose up --watch
|
||||
COMPOSE_BAKE=true docker compose --profile dev up --watch
|
||||
```
|
||||
|
||||
Notes:
|
||||
|
||||
- `api` service uses the production `runtime` image target.
|
||||
- `api-dev` profile uses the `dev` image target and Docker Compose watch.
|
||||
- Build cache is persisted at `.docker/buildx-cache` via `cache_from`/`cache_to`.
|
||||
|
||||
## Frontend
|
||||
|
||||
Open `web/index.html` through a static server (recommended) or browser file URL.
|
||||
Frontend is served by the Go backend at runtime.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
python -m http.server 4173
|
||||
go run ./cmd/api
|
||||
```
|
||||
|
||||
Then visit `http://localhost:4173/web/`.
|
||||
Then visit `http://localhost:8080/web/`.
|
||||
|
||||
## API client library
|
||||
|
||||
@@ -70,6 +76,10 @@ bun test
|
||||
bun run build
|
||||
```
|
||||
|
||||
Frontend TypeScript integration guide:
|
||||
|
||||
- `docs/typescript-frontend-integration.md`
|
||||
|
||||
## CI
|
||||
|
||||
Workflow: `.gitea/workflows/ci.yml`
|
||||
|
||||
Reference in New Issue
Block a user