Clothinv is a minimalist application for clothing inventory management. It allows cataloging and browsing your wardrobe. By default, Clothinv operates entirely within your browser, using private, configuration-free local storage.
- Catalog clothing items with images and essential metadata (e.g., owner, category, location).
- Interface for browsing and searching your inventory.
- Responsive design for desktop and mobile screen sizes.
- Data export and import functionality (as a ZIP file) for backup and migration.
- Modular data provider architecture supporting different data storage options:
- Browser-local IndexedDB (default, zero-configuration).
- Self-hosted Datasette backend.
- Self-hosted PostgREST backend (with PostgreSQL).
There are several ways to use Clothinv:
Clothinv can be used via the publicly hosted version:
https://teekuningas.github.io/clothinv
No setup is required. All data is stored locally in your web browser's IndexedDB and localStorage. This provides a private and client-side solution.
For users who prefer to host their own instance, Clothinv is available as a Docker image. This image serves the static application files using Nginx.
-
Pull the Docker image:
- The official image is hosted on GitHub Container Registry (ghcr.io). You can use the
latesttag for the most recent version or a specific version tag. - Example:
docker pull ghcr.io/teekuningas/clothinv:latest
- The official image is hosted on GitHub Container Registry (ghcr.io). You can use the
-
Run the container:
- Example:
docker run -d -p 8080:80 ghcr.io/teekuningas/clothinv:latest - Access Clothinv at
http://localhost:8080.
- Example:
By default, this self-hosted version also uses browser-local storage (IndexedDB). For advanced local development or building the image yourself, refer to the Makefile.
Clothinv can connect to external database backends via Datasette or PostgREST. This enables persistent storage beyond a single browser session and allows for data sharing across multiple devices or users. Configure the connection details in the application's "Settings" page.
a. Datasette Backend
Datasette provides a web interface and API for SQLite databases.
- Important: Clothinv requires Datasette version 1.0-alpha or newer. Earlier versions (0.x) have a JSON API incompatible with Clothinv's requirements. The
Makefileuses1.0a19by default. - To run a local Datasette instance for development or personal use (refer to the
Makefilefor full command details and configuration):make start-backend-datasette ENV=dev
- This command will set up a Datasette instance using a SQLite database (
inventory.dbby default), initialize the schema, and output the Datasette URL and an API token. - Enter the provided Datasette Base URL and API Token into Clothinv's settings page under the "Datasette" provider.
b. PostgreSQL + PostgREST Backend
PostgREST serves a RESTful API directly from a PostgreSQL database.
- To run local PostgreSQL and PostgREST instances for development or personal use (refer to the
Makefilefor full command details and configuration):make start-backend-postgrest ENV=dev
- This command performs the following:
- Starts a PostgreSQL Docker container.
- Initializes the database (e.g.,
inventory_db_dev) with the required schema frombackend/schema_postgres.sql. This schema defines tables for items, locations, categories, owners, and images. - Starts a PostgREST Docker container connected to the PostgreSQL database.
- Outputs the PostgREST API URL (e.g.,
http://localhost:4000) and a JWT token for authentication.
- Enter the provided PostgREST API URL and JWT Token into Clothinv's settings page under the "PostgREST" provider.
- The
Makefileuses default credentials (e.g., userinventory_user_dev, passwordsupersecretpassword). For any deployment beyond local testing, ensure you use strong, unique credentials and manage your PostgreSQL instance securely. The schema (backend/schema_postgres.sql) is designed for a dedicated user (e.g.,inventory_user_dev) who owns the tables.
Clothinv allows you to export your entire inventory (metadata and images) as a single .zip file. This file can be used for:
- Backing up your data.
- Migrating your inventory to another Clothinv instance or a different backend.
The import function allows restoring data from such a .zip file. This feature is available regardless of the chosen storage backend.
When Clothinv is configured to use a persistent backend (Datasette or PostgREST), you can share access to your inventory:
- Set up Clothinv with your chosen persistent backend.
- Navigate to the "Settings" page.
- Under the "Share Configuration" section, a shareable URL can be generated.
- Copy this URL and open it on another device, or share it with others.
Opening this URL will pre-configure their Clothinv instance to connect to the same backend, enabling shared access to the inventory data.
Note: Clothinv does not implement user accounts, fine-grained permissions, or user groups. All users accessing a shared backend via the configuration URL will have the same level of access to the data.
