Make just dev build Astro before starting the backend

This commit is contained in:
2026-03-29 21:41:55 -04:00
parent 98055c586f
commit f47a61a9ea
5 changed files with 21 additions and 14 deletions

View File

@@ -14,7 +14,7 @@ All common tasks are in the `justfile` — use `just` as the task runner.
### Development
```bash
just dev # Backend (watch) + frontend dev server concurrently
just dev # Build frontend assets, then start the backend
just run # Backend only
just web # Frontend dev server only
```

View File

@@ -33,7 +33,7 @@ Alchemist is an automated media library optimization tool written in Rust. It mo
The project uses `just` to simplify common tasks.
### Development
- `just dev`: Starts both the backend (watch mode) and frontend dev server.
- `just dev`: Builds the frontend assets, then starts the backend.
- `just run`: Runs the Rust backend directly.
- `just web`: Starts the frontend development server only.

View File

@@ -18,7 +18,7 @@ frontend tooling.
```bash
git clone https://github.com/bybrooklyn/alchemist.git
cd alchemist
just dev # backend watch mode + frontend dev server
just dev # build frontend assets, then start the backend
```
## Common tasks

View File

@@ -23,15 +23,9 @@ default:
# DEVELOPMENT
# ─────────────────────────────────────────
# Start backend (watch mode) + frontend dev server concurrently
dev:
@echo "Starting Alchemist dev servers..."
@trap 'kill 0' INT EXIT; \
(cd web && bun run dev) & WEB_PID=$!; \
cargo watch -x run & RUST_PID=$!; \
wait -n 2>/dev/null || true; \
kill $WEB_PID $RUST_PID 2>/dev/null; \
wait
# Build frontend assets, then start the backend server
dev: web-build
@just run
# Start the backend only
run:

View File

@@ -21,7 +21,20 @@ To work on Alchemist, you'll need:
## Local Development
### 1. Back-end (Rust)
### 1. Full stack with `just`
```bash
# Clone the repository
git clone https://github.com/bybrooklyn/alchemist.git
cd alchemist
# Build the frontend and start the backend
just dev
```
`just dev` builds the Astro site into `web/dist` and then starts the Rust server.
### 2. Back-end (Rust)
The back-end handles the database, scanning files, and running FFmpeg.
```bash
@@ -36,7 +49,7 @@ cargo build
cargo run
```
### 2. Front-end (Web UI)
### 3. Front-end (Web UI)
The web interface is located in the `web/` directory.
```bash