feat: serve static upload app from axum

Introduce the first PLAN.md milestone: replace the hello-world binary with
an Axum server that binds to localhost by default, exposes a health endpoint,
and serves the static browser UI from the repository's static directory. The
router is available through the library crate so integration tests can exercise
server behavior without opening a network listener.

Add a justfile for routine validation and document the initial project shape,
configuration knobs, and reusable test checklist. The rustfmt config now uses
only stable options so the new formatting recipe runs without nightly warnings.

The upload API and resumable chunk behavior are intentionally left for later
milestones; the UI currently handles file selection only.

Test Plan:
- just check

Refs: PLAN.md milestone 1
This commit is contained in:
2026-05-30 16:54:42 +02:00
parent 4527e23b8b
commit a3f369f437
13 changed files with 1578 additions and 5 deletions
+43
View File
@@ -0,0 +1,43 @@
# upl
`upl` is a small personal resumable upload service. The intended deployment is:
```text
browser -> nginx -> upl Rust server -> local filesystem
```
The first implementation milestone provides the Rust server shell and static
browser UI. Upload metadata, chunk persistence, resume state, and completion
assembly are tracked in `PLAN.md` and will be added in later coherent slices.
## Project Structure
```text
upl
Rust server
src/main.rs binary entrypoint and listener setup
src/app.rs Axum router, health endpoint, static file service
src/lib.rs library surface used by integration tests
Browser UI
static/index.html upload tool markup
static/styles.css responsive tool styling
static/app.js file-selection behavior
Validation
tests/ integration tests for server behavior
TESTS.md reusable manual and automated test checklist
```
## Configuration
- `UPL_BIND` sets the listen address. It defaults to `127.0.0.1:3000`.
- `UPL_STATIC_DIR` sets the static asset directory. It defaults to `static/`
inside this repository.
## Common Commands
Use the `justfile` for routine tasks:
```sh
just check
just run
```