Making a local economy: First principles + examples