Skip to content

lkbm/grocery-list

Repository files navigation

Don't forget the oatmeal

A simple grocery list application built with preeact, TypeScript, Vite, and Cloudflare Workers.

You can create a list by visiting a given hash: https://grocery-list.lkbm.workers.dev/#your-list-name It will be saved to Cloudflare KV.

The "Standard items" list will be empty by default. You can create a second list, https://grocery-list.lkbm.workers.dev/#your-list-name-options and populate it with items you frequently purchase, and that will then populate the Standard items section of your main list.

Typically, after a shopping trip, I'll use "Prune Purchases" to clear out anything I bought (hopefully everything!) -- the "Remove Items" button will put you in a mode where you can select items to delete individually, but I find that's rarely needed.

This is not vibe coded, but was my first "almost vibe coded" project. Prior to this, I mostly used Copilot autocompletion and the occasional "write me a script".

Run locally

  • nvm use
  • nvm install
  • npm run dev (Vite, no backend)
  • npx wrangler dev (Includes a local backend)

Deploy

  • wrangler deploy

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

  • Configure the top-level parserOptions property like this:
export default tseslint.config({
  languageOptions: {
    // other options...
    parserOptions: {
      project: ['./tsconfig.node.json', './tsconfig.app.json'],
      tsconfigRootDir: import.meta.dirname,
    },
  },
})
  • Replace tseslint.configs.recommended to tseslint.configs.recommendedTypeChecked or tseslint.configs.strictTypeChecked
  • Optionally add ...tseslint.configs.stylisticTypeChecked
  • Install eslint-plugin-react and update the config:
// eslint.config.js
import react from 'eslint-plugin-react'

export default tseslint.config({
  // Set the react version
  settings: { react: { version: '18.3' } },
  plugins: {
    // Add the react plugin
    react,
  },
  rules: {
    // other rules...
    // Enable its recommended rules
    ...react.configs.recommended.rules,
    ...react.configs['jsx-runtime'].rules,
  },
})

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages