Skip to content

Repository files navigation

Halden: a product catalog on Appwrite DocumentsDB

Halden is a small storefront where every category carries its own attributes. Sneakers have a size and a material, laptops have RAM and a screen size, coffee has an origin and a roast. All of them live in one DocumentsDB collection, and the owner adds a new category by typing new attribute keys into a form.

The app is the companion to the Appwrite blog post on building a product catalog with DocumentsDB.

What is inside

  • src/routes: the storefront (/, /c/$category, /p/$slug), the owner sign-in, and the /admin pages.
  • src/lib/catalog.ts: every DocumentsDB call the app makes, plus facet discovery.
  • src/components/ProductForm.tsx: the owner form with the attribute editor.
  • seed/: 30 products across three categories and the script that inserts them.

Run it

  1. Create an Appwrite project with a DocumentsDB database and a products collection. The blog post walks through the indexes, permissions, and the owner label.

  2. Copy .env.example to .env and fill in the endpoint, project ID, database ID, and an API key with the databases.read, collections.read, documents.read, and documents.write scopes. The key is used only by the seed script.

  3. Install and seed:

    pnpm install
    pnpm seed
    pnpm dev
  4. Open http://localhost:4300. Sign in at /sign-in with a user that carries the owner label to add or edit products.

License

MIT

About

A product catalog storefront built on Appwrite DocumentsDB. Schemaless per-category attributes, owner-managed products, faceted search.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages