P0 blockers: - Fix migration numbering conflict and duplicate indexes - Change comments.post_id FK to ON DELETE CASCADE - Restrict public post detail endpoint to published posts only - Fix rate-limiting IP extraction and fallback to ConnectInfo - Harden HTML sanitizer: deny unknown URL schemes, restrict data URIs - Remove session token from login response body - Enforce image pixel/dimension limits on upload and serving P1 high-risk: - Validate uploads by magic bytes and decode GIF/WebP - Add pagination/rate-limiting to search, tag posts, and comments - Make first-admin registration and slug uniqueness check atomic - HTML-escape comment author fields - Improve HTML minify cache key and skip admin/error responses - Add mobile navigation menu P2 accessibility/quality: - Associate form labels with inputs - Key PostDetail article by slug to re-init scripts on navigation - Improve image viewer keyboard accessibility - Make theme toggle SSR-friendly and add aria-label - Invalidate slug 404 cache on create and pending count on new comment - Deduplicate tags case-insensitively P3 cleanup: - Remove unused tower-http dependency, expand make clean - Configure DB pool timeouts and verified recycling - Run background cleanup tasks immediately on startup - Use SHA-256 for stable disk cache keys - Log DB errors with Display instead of Debug - Update README migration instructions All tests pass (321), clippy clean, dx check clean.
45 lines
1.2 KiB
Makefile
45 lines
1.2 KiB
Makefile
.PHONY: dev build build-linux css css-watch clean build-editor highlight-css test
|
|
|
|
build:
|
|
@$(MAKE) build-editor
|
|
@$(MAKE) highlight-css
|
|
@tailwindcss -i input.css -o public/style.css --minify
|
|
@dx build --release --debug-symbols=false
|
|
|
|
build-linux:
|
|
@$(MAKE) build-editor
|
|
@$(MAKE) highlight-css
|
|
@tailwindcss -i input.css -o public/style.css --minify
|
|
@dx build @client --release --debug-symbols=false --wasm-js-cfg false
|
|
@dx build @server --release --debug-symbols=false --target x86_64-unknown-linux-musl --wasm-js-cfg false --features server
|
|
|
|
highlight-css:
|
|
@cargo run --bin generate_highlight_css
|
|
|
|
build-editor:
|
|
@echo "Building Tiptap editor..."
|
|
@cd libs/tiptap-editor && npm ci --include=dev && npm run build
|
|
@echo "Tiptap editor built."
|
|
|
|
dev:
|
|
@echo "Starting tailwindcss watch and dx serve..."
|
|
@tailwindcss -i input.css -o public/style.css --watch & \
|
|
TAILWIND_PID=$$!; \
|
|
trap 'kill $$TAILWIND_PID 2>/dev/null; exit' INT TERM EXIT; \
|
|
dx serve --addr 0.0.0.0
|
|
|
|
css:
|
|
@tailwindcss -i input.css -o public/style.css
|
|
|
|
css-watch:
|
|
@tailwindcss -i input.css -o public/style.css --watch
|
|
|
|
test:
|
|
@cargo test
|
|
|
|
clean:
|
|
@cargo clean
|
|
@rm -f public/style.css public/highlight.css
|
|
@rm -rf public/tiptap
|
|
@rm -rf uploads/.cache
|