{"repo":"typeonce-dev/calories-tracker-local-only-app","free":true,"listed":false,"github":"https://github.com/typeonce-dev/calories-tracker-local-only-app","clone":"git clone https://github.com/typeonce-dev/calories-tracker-local-only-app.git","description":"A local-only calories tracker app made with TanStack Router, PGlite, Effect, XState and drizzle. The app is all client-side, fast, private, and reactive using a local postgres database ⚡️","language":"TypeScript","stars":64,"topics":["drizzle","drizzle-orm","effect","effect-ts","local-only","pglite","postgres","privacy","reactive","tanstack"],"license":null,"category":"databases-storage","readme_excerpt":"Local-only calories tracker app You can read a full overview of the project: Local-only calories tracker app A new paradigm of building apps is coming to the web: Local-first . One of the key components of a local-first app is having a local data store . PGlite brings the database to the client, allowing you to build apps completely offline. In this project template we implement the first step before local-first: Local-only . The project is a Vite app completely on the client. It uses PGlite as local postgres database to make the app work end-to-end on the user device. Tech stack The project is built with TanStack Router , which offers complete type-safe routing on the client for React. A local postgres database is created and managed using PGlite in combination with drizzle as ORM. The app includes the live extension of PGlite, which allow writing reactive queries as normal React hooks . drizzle is also responsible to manage migrations for local databases using drizzle-kit The state of the app is managed using xstate . Each functionality is defined in a separate machine. The app makes heavy use of the actor model to combine reusable actors. The structure and logic of the app is implemented using effect . All the logic is contained in isolated services that are combined inside layers and executed as part of TanStack Router loaders and xstate actors. All the validation and serialization logic is also implemented using Schema from effect . The app is styled using tailwindcss (v","default_branch":null,"files":null,"tree":[],"storefront":"/r/typeonce-dev","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/typeonce-dev/calories-tracker-local-only-app/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}