field-guide / README.md
pngwn
fix
a8898de
metadata
title: Build Small
emoji: 🛠️
colorFrom: green
colorTo: gray
sdk: docker
app_port: 7860
pinned: false

Build Small · Hackathon Field Guide

The field guide and partner directory for the Build Small hackathon — a SvelteKit site listing each sponsor's models, capabilities, prizes, starter Spaces and support channels.

Configuration reference for the Spaces metadata above: https://huggingface.co/docs/hub/spaces-config-reference

Deployment (Hugging Face Spaces · Docker)

This Space runs as a Docker SDK Space. On every push, Hugging Face builds the Dockerfile and runs the resulting container, which serves the app on the port declared by app_port (7860).

The image is a multi-stage build:

  1. build stage — installs dependencies with pnpm and runs pnpm run build. The app uses @sveltejs/adapter-node, which emits a standalone Node server at build/index.js.
  2. run stage — installs production dependencies only, copies the built server, and launches it as a non-root user (UID 1000, as Spaces requires).

The server reads PORT and HOST from the environment; the Dockerfile sets PORT=7860 and HOST=0.0.0.0 so it binds correctly inside the Space.

Note: the site is fully prerendered (prerender = true), so the Node server is mostly serving static HTML today. Docker + adapter-node leaves room to add server-side routes or SSR later without changing the deploy path.

Local development

pnpm install
pnpm run dev

Production build

pnpm run build      # outputs build/ via adapter-node
node build/index.js # runs the server (defaults to PORT=3000)

Build the container locally

docker build -t build-small .
docker run --rm -p 7860:7860 build-small
# open http://localhost:7860