Skip to content
drewbittPublic

About

Self-hosted application for completing daily goals & to-dos

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

Someplice

Someplice logo

A self-hosted app for goals, daily intentions, and progress reviews.

Run with Docker

The published image supports amd64 and arm64.

docker run -d --name someplice --restart unless-stopped --stop-timeout 35 \
  --read-only --tmpfs /tmp --cap-drop ALL --security-opt no-new-privileges \
  -v someplice-data:/app/data -p 127.0.0.1:3000:3000 ghcr.io/drewbitt/someplice

Open http://localhost:3000. To run a local build, use docker build -t someplice . and substitute someplice for the image name above.

There is no built-in authentication. Keep access local or use an authenticated reverse proxy.

Your data is stored in the someplice-data volume. If you use a bind mount instead, its directory must be writable by UID/GID 1000.

Configuration

Pass environment variables with Docker's -e, or set them before starting the Node server.

Variable Purpose
DATABASE_PATH SQLite file; defaults to ./data/db.sqlite, or /app/data/db.sqlite in Docker.
SOMEPLICE_TIMEZONE Initial IANA timezone, e.g. America/New_York; otherwise detected on the first browser visit. A stored setting takes precedence.
PORT Node server port; defaults to 3000.

The database initializes automatically. Older development databases aren't migrated to the current schema.

Integration API

Set SOMEPLICE_API_TOKEN to a randomly generated secret to enable GET /api/v1/today. The token grants read access to this installation's active goals, today's intentions, and the current timer. Send it in the Authorization header.

curl -H "Authorization: Bearer $SOMEPLICE_API_TOKEN" http://localhost:3000/api/v1/today

The JSON response includes the installation's current day, goals, intentions, and timer. timer is null when idle or expired. A running timer includes an ISO UTC endsAt timestamp. A paused timer has endsAt: null and retains its remainingSeconds. The API returns 404 while disabled and 401 for missing or invalid credentials.

Use HTTPS when calling the API over a network. When using an authenticated reverse proxy, make sure it forwards the bearer header for this route. Continue to use the proxy to protect the app and /api/trpc.

Development

From a checkout with pnpm installed:

pnpm install
pnpm dev

For a production server without Docker, run pnpm build, then NODE_ENV=production pnpm exec node build/index.js.

Run pnpm db:reset to recreate the local development database and pnpm db:seed to add sample data.

See package.json for available scripts and CI for validation.

License

MIT. Report an issue.

About

Self-hosted application for completing daily goals & to-dos

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages