{"id":19901379,"url":"https://github.com/lissy93/cso","last_synced_at":"2025-05-02T23:31:45.015Z","repository":{"id":209893163,"uuid":"725203698","full_name":"Lissy93/cso","owner":"Lissy93","description":"🍩 Chief Snack Officer - A platform for requesting, voting and managing office snacks","archived":false,"fork":false,"pushed_at":"2023-12-04T20:52:44.000Z","size":1040,"stargazers_count":17,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-07T08:33:14.049Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lissy93.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-11-29T16:46:24.000Z","updated_at":"2024-07-28T03:32:57.000Z","dependencies_parsed_at":"2023-12-02T16:42:49.562Z","dependency_job_id":null,"html_url":"https://github.com/Lissy93/cso","commit_stats":null,"previous_names":["lissy93/cso"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lissy93%2Fcso","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lissy93%2Fcso/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lissy93%2Fcso/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lissy93%2Fcso/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lissy93","download_url":"https://codeload.github.com/Lissy93/cso/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252122273,"owners_count":21698305,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T20:14:50.688Z","updated_at":"2025-05-02T23:31:44.191Z","avatar_url":"https://github.com/Lissy93.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003ch1 align=\"center\"\u003eChief Snack Officer\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n  \u003ci\u003eOffice snack requests, like never before!\u003c/i\u003e\u003cbr\u003e\n  \u003c!-- \u003ca align=\"center\" href=\"https://cso.as93.net\"\u003e🌐 \u003cb\u003ecso.as93.net\u003c/b\u003e\u003c/a\u003e\u003cbr /\u003e --\u003e\n  \u003ca href=\"https://snack-champion.as93.net\"\u003e\n    \u003cimg width=\"240\" src=\"https://i.ibb.co/d43WK4Z/snack-champ-robot-transparent.png\" /\u003e\n  \u003c/a\u003e\n  \u003cbr\u003e\n\u003c/p\u003e\n\n\u003e I built this in order to learn (the basics) of how to use Solid.js\u003cbr /\u003e\n\u003e And because for work, my job is to order in office snacks, and sending out surveys is boring.\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003ch4\u003eContents\u003c/h4\u003e\u003c/summary\u003e\n  \n- [About](#about)\n- [Deployment](#deployment)\n- [Config Options](#config-options)\n- [Data Structures](#data-structures)\n- [Development](#development)\n- [Contributing](#contributing)\n- [License](#license)\n\u003c/details\u003e\n\n## About\n\nA platform for real-time requesting and voting on snacks for the office.\nSo that the fridge is always well stocked with food people actually love.\n\n### Features\n- View current, upcoming and past snack orders\n- Request snacks\n- Vote (up/down) on snacks\n- View stats, like most loved, hated, controversial snacks\n- SSO login, with access restricted by email domain\n- Admin portal, where snack inventory can be managed\n\n### Screenshots\n\nhttps://github.com/Lissy93/cso/assets/1862727/a3fd8f11-3156-4c1e-8124-771ce2d872f2\n\n\u003cdetails\u003e\n\n  \u003csummary\u003eScreenshot\u003c/summary\u003e\n\n  \u003cp align=\"center\"\u003e\n  \u003cimg width=\"700\" src=\"https://i.ibb.co/xHbTtSF/snack-champion-home.png\" /\u003e\n  \u003c/p\u003e\n  \n\u003c/details\u003e\n\n\n### Info\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003eTech Stack\u003c/b\u003e\u003c/summary\n\nBuilt using Solid.js \u003csup\u003e[[1]](https://www.solidjs.com/)\u003c/sup\u003e on the frontend (along with TS \u003csup\u003e[[2]](https://www.typescriptlang.org/)\u003c/sup\u003e and SCSS \u003csup\u003e[[3]](https://sass-lang.com/)\u003c/sup\u003e), tested with Jest \u003csup\u003e[[4]](https://jestjs.io/)\u003c/sup\u003e, bundled with Vite \u003csup\u003e[[5]](https://vitejs.dev/)\u003c/sup\u003e. The data is stored using a Postgress \u003csup\u003e[[6]](https://www.postgresql.org/)\u003c/sup\u003e DB via Supabase \u003csup\u003e[[7]](https://supabase.com/)\u003c/sup\u003e, with the frontend deployed to Netlify \u003csup\u003e[[8]](https://www.netlify.com/)\u003c/sup\u003e and the code hosted on GitHub \u003csup\u003e[[9]](https://github.com)\u003c/sup\u003e and CI/CD workflows managed with GH Actions\u003csup\u003e[[10]](https://docs.github.com/en/actions)\u003c/sup\u003e.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003eStandards\u003c/b\u003e\u003c/summary\n\n- **Configurable:** Set your companies name, branding and terminology\n- **International:** No hard-coded copy, for easy language translations\n- **Tested:** Fully unit tested with Jest, joined together with E2E\n- **Documented:** In-code and MD docs, as well as strict typings for devs\n- **Accessible:** Meets AA accessibility standards, so no one is left out\n- **Performant:** Reactive, SSR, Caching\n- **Responsive:** Mobile-first UI, optimized for a variety of devices\n- **Secure:** Data is encrypted\n- **Open Source:** All source code and docs are freely available on GitHub\n- **Easy:** Super quick and simple to deploy your own instance on a range of architectures\n- **Observable:** Easy monitoring, with errors tracked via GlitchTip and basic analytics via Plausible\n- **Automated:** New releases are automatically tested and deployed by the CI/CD pipeline\n- **SEO** SSR, meta\n- **Compatible:** Consistent across all modern browser and devices, with fallback polyfills to support legacy environments\n- **Privacy Respecting:** No invasive tracking, and the user can export or delete their data at any time\n- **Neat:** Consistent coding standards are implemented with Prettier and ESLint \n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003eFuture plans\u003c/b\u003e\u003c/summary\n                                \nI think it would be pretty fun to extend this, to automate as much of the process as possible. Based on snack ratings and user requests, use AI to generate a varied list of snacks that's within budget. Hook up to Slack to get approval from HR, use a supermarket API to make the order, generate the invoice and submit that to our companies expenses API, insert the arrival time into my calendar with Google API, and then collect employee snack feedback, and iterate for the next week.\n\nThat would basically be my whole job, automated.\n  \n\u003c/details\u003e\n\n\n---\n\n## Deployment\n\nTo deploy the app, follow the [development instructions](#development) to get the code + dependencies, then run `yarn build` to build the production app, and use a web server of your choice to serve up the `/dist` directory.\nYou'll also need to deploy a Postgres DB, it's recommended to use Supabase. For setup instructions, see the [Data](#data-structures) section below.\n\nThe frontend can also be deployed to a static hosting provider of your choice. You can use the 1-click deploys below for Netlify or Vercel.\n\n[![Deploy to Netlify](https://img.shields.io/badge/Deploy-Netlify-%2330c8c9?style=for-the-badge\u0026logo=netlify\u0026labelColor=1e0e41 'Deploy CSO to Netlify, via 1-Click Script')](https://app.netlify.com/start/deploy?repository=https://github.com/lissy93/cso)\n\n[![Deploy with Vercel](https://img.shields.io/badge/Deploy-Vercel-%23ffffff?style=for-the-badge\u0026logo=vercel\u0026labelColor=1e0e41)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FLissy93%2Fcso\u0026env=VITE_SUPABASE_URL,VITE_SUPABASE_ANON_KEY\u0026envDescription=Login%20%2F%20create%20a%20Supabase%20account%2C%20then%20navigate%20to%20Settings%20--%3E%20API%20copy%20the%20URL%20and%20Anon%20API%20key%20\u0026project-name=cso\u0026repository-name=cso-fork)\n\nDocker image coming soon...\n\n\u003c!-- Run `docker run -p 3000:3000 lissy93/cso`, then open [`localhost:3000`](http://localhost:3000)\n\n\u003cdetails\u003e\n\u003csummary\u003eDocker Options\u003c/summary\u003e\n\nYou can get the Docker image from:\n- DockerHub: [`lissy93/cso`](https://hub.docker.com/r/lissy93/cso)\n- GHCR: [`ghcr.io/lissy93/cso`](https://github.com/Lissy93/cso/pkgs/container/web-check)\n- Or build the image yourself by cloning the repo and running `docker build -t web-check .`\n\n\u003c/details\u003e --\u003e\n\n\n## Config Options\n\n## Data Structures\n\n\u003cimg src=\"https://github.com/Lissy93/cso/assets/1862727/866d2c52-685b-4a5d-ab96-f28b28194f3c\" alt=\"schema class diagram\" width=\"700\" /\u003e\n\n\n#### Snacks\n```sql\ncreate table\n  public.\"Snacks\" (\n    snack_id uuid not null default gen_random_uuid (),\n    snack_name character varying not null,\n    user_id uuid null,\n    created_at timestamp with time zone not null default now(),\n    snack_category public.snack_category null,\n    snack_meta json null,\n    constraint Snacks2_pkey primary key (snack_id),\n    constraint Snacks2_snack_name_key unique (snack_name),\n    constraint Snacks_user_id_fkey foreign key (user_id) references auth.users (id) on update cascade on delete set null\n  ) tablespace pg_default;\n```\n\n#### Votes\n```sql\ncreate table\n  public.\"Votes\" (\n    vote_id bigint generated by default as identity,\n    created_at timestamp with time zone not null default now(),\n    snack_id uuid null,\n    user_id uuid null,\n    vote public.vote_type not null,\n    constraint Votes_pkey primary key (vote_id),\n    constraint Votes_snack_id_fkey foreign key (snack_id) references \"Snacks\" (snack_id),\n    constraint Votes_user_id_fkey foreign key (user_id) references auth.users (id)\n  ) tablespace pg_default;\n```\n\n#### Enums\n```\nsnack_category: sweet, savory, healthy, drink\t\nvote_type: up, down\n```\n\n## Development\n\n- `git clone git@github.com:Lissy93/cso.git \u0026\u0026 cd cso` - Grab the code\n- `yarn install` - Install dependencies\n- `cp .env.sample .env` - Then paste your Supabase URL and anon key\n- `yarn dev` - Start the dev server. Then pop open [`localhost:5173`](http://localhost:5173)\n\nYou'll also need to create a Supabase project, and run the import script listed in [above](#data-structures).\n\n\n## Contributing\n\nContributions of any kind are very welcome, and would be much appreciated.\nFor Code of Conduct, see [Contributor Convent](https://www.contributor-covenant.org/version/2/1/code_of_conduct/).\n\nTo get started, fork the repo, follow the [development](#development) steps above, add, commit and push the code, then come back here to open a pull request. If you're new to GitHub or open source, I have some guides in [Lissy93/git-into-open-source](https://github.com/Lissy93/git-into-open-source/) which might help - but feel free to ask if you need any help.\n\n## License\n\n\u003e _**[Lissy93/CSO](https://github.com/Lissy93/cso)** is licensed under [MIT](https://github.com/Lissy93/cso/blob/HEAD/LICENSE) © [Alicia Sykes](https://aliciasykes.com) 2023._\u003cbr\u003e\n\u003e \u003csup align=\"right\"\u003eFor information, see \u003ca href=\"https://tldrlegal.com/license/mit-license\"\u003eTLDR Legal \u003e MIT\u003c/a\u003e\u003c/sup\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eExpand License\u003c/summary\u003e\n\n```\nThe MIT License (MIT)\nCopyright (c) Alicia Sykes \u003calicia@omg.com\u003e \n\nPermission is hereby granted, free of charge, to any person obtaining a copy \nof this software and associated documentation files (the \"Software\"), to deal \nin the Software without restriction, including without limitation the rights \nto use, copy, modify, merge, publish, distribute, sub-license, and/or sell \ncopies of the Software, and to permit persons to whom the Software is furnished \nto do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included install \ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANT ABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n```\n\n\u003c/details\u003e\n\n\n\u003c!-- License + Copyright --\u003e\n\u003cp  align=\"center\"\u003e\n  \u003ci\u003e© \u003ca href=\"https://aliciasykes.com\"\u003eAlicia Sykes\u003c/a\u003e 2023\u003c/i\u003e\u003cbr\u003e\n  \u003ci\u003eLicensed under \u003ca href=\"https://gist.github.com/Lissy93/143d2ee01ccc5c052a17\"\u003eMIT\u003c/a\u003e\u003c/i\u003e\u003cbr\u003e\n  \u003ca href=\"https://github.com/lissy93\"\u003e\u003cimg src=\"https://i.ibb.co/4KtpYxb/octocat-clean-mini.png\" /\u003e\u003c/a\u003e\u003cbr\u003e\n  \u003csup\u003eThanks for visiting :)\u003c/sup\u003e\n\u003c/p\u003e\n\n\u003c!-- Dinosaurs are Awesome --\u003e\n\u003c!-- \n                        . - ~ ~ ~ - .\n      ..     _      .-~               ~-.\n     //|     \\ `..~                      `.\n    || |      }  }              /       \\  \\\n(\\   \\\\ \\~^..'                 |         }  \\\n \\`.-~  o      /       }       |        /    \\\n (__          |       /        |       /      `.\n  `- - ~ ~ -._|      /_ - ~ ~ ^|      /- _      `.\n              |     /          |     /     ~-.     ~- _\n              |_____|          |_____|         ~ - . _ _~_-_\n--\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flissy93%2Fcso","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flissy93%2Fcso","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flissy93%2Fcso/lists"}