Skip to Content
Potik Docs

Run your first application

This walkthrough creates a disposable Projects application named fieldwork. You will create a record through the web interface and confirm that PostgreSQL keeps it across a restart.

Get the tools

Use Linux or macOS with Git access to the starter repository, Python 3.10 or newer, and a running Docker engine with Compose v2. Docker downloads the compiler and web build tools on first use. Check the local tools before starting:

python3 --version
docker compose version
docker info

Generate and start

Choose a parent directory in which fieldwork does not already exist. From that directory:

git clone https://github.com/roski/potik-starter.git
cd potik-starter
./tools/starter create ../fieldwork --template projects
cd ../fieldwork
docker compose up --build -d --wait
docker compose ps -a

The migration container should exit successfully. The database, API and web service should stay running. Check the API with curl -fsS http://localhost:8080/readyz. Open the Projects page, create a project named Trail survey, and open its detail page.

Run docker compose restart, wait for readiness, then reload the page. The record should still be there. docker compose down stops the services and leaves the PostgreSQL volume available for your next run.

If the application does not open

  • Port already allocated: stop the conflicting local process, or set WEB_PORT=3100 API_PORT=8180 for Compose and use those ports in the URLs.
  • API is starting: run docker compose logs migrate api. A failed migration prevents the API from starting. Inspect the first database or migration error.
  • Projects returns 404: check potik-template.json in your application. Generate a fresh application with --template projects to follow this walkthrough.
  • No sign-in prompt: this walkthrough uses demo mode. Configure the identity profile before inviting other people.

Next, add field notes to the same application.

On this page