{"id":22740216,"url":"https://github.com/a-type/packing-list","last_synced_at":"2025-03-30T03:41:27.181Z","repository":{"id":195064554,"uuid":"692125018","full_name":"a-type/packing-list","owner":"a-type","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-16T19:42:42.000Z","size":7909,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-05T06:12:21.124Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://packing-list.gfor.rest","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/a-type.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-09-15T16:02:41.000Z","updated_at":"2023-10-12T13:23:33.000Z","dependencies_parsed_at":"2023-09-16T11:09:52.184Z","dependency_job_id":"879ffb7f-9258-4474-8b17-fb383448dba7","html_url":"https://github.com/a-type/packing-list","commit_stats":null,"previous_names":["a-type/packing-list"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-type%2Fpacking-list","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-type%2Fpacking-list/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-type%2Fpacking-list/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-type%2Fpacking-list/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a-type","download_url":"https://codeload.github.com/a-type/packing-list/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246273519,"owners_count":20750904,"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-12-10T23:07:55.705Z","updated_at":"2025-03-30T03:41:27.153Z","avatar_url":"https://github.com/a-type.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# packing-list\n\nWelcome to your lo-fi PWA!\n\nThis is a very opinionated starter aimed at getting you working on your idea on day 1, not fussing with tools or doing bootstrapping work like OAuth.\n\nIt comes with a bunch of things out of the box. Some stuff you may not want to keep, but it should serve as a guide on what to build in replacement.\n\n# 👀 Your Checklist 👀\n\nHere's what you need to do before your app is ready to use:\n\n- [ ] Create a Google Cloud project for your app and configure the OAuth consent screen\n- [ ] Create a Stripe project for your app and create an API key\n- [ ] Fill in the missing values in `./apps/api/.env`\n- [ ] Edit `./packages/lo-fi/src/schema.ts` and add your first lo-fi schema\n- [ ] Run `pnpm generate` to generate the lo-fi client\n- [ ] Run `pnpm prisma migrate dev` to set up the database\n\nFinally, run `pnpm dev` to start the API and PWA in parallel.\n\n## How this app is designed to work\n\nThe app works offline-first. Users can use it anonymously for free, storing all data on their local device and never touching the server.\n\nThe built-in business model is simple: to sync to other devices or collaborate with other people, users must create an account and subscribe to your product in Stripe. Currently, the model is set up so that only one subscription is required per \"plan,\" which can include any number of collaborators.\n\nYou can build your features with lo-fi, and they'll work in a limited, on-device way for free users. You can then add upsells to convert your free, anonymous users to paid subscribers. Your server load will only scale as your paid userbase does.\n\n## What's inside\n\n### A lo-fi client monorepo package\n\nAll your generated lo-fi client code can be imported from `@packing-list/lo-fi`\n\n### A Vite PWA\n\nThe PWA can be installed to user devices and will automatically update itself in the background when new code is deployed. A basic component is included to notify users of updates and request that they reload.\n\nYou should supply some icons in `/apps/web/public` for your app, and check out `/apps/web/vite.config.ts` for more manifest options.\n\n### A Node server\n\nThe server handles user management and lo-fi syncing.\n\n- uses Prisma (`/packages/prisma`) to manage storing user accounts in SQLite\n- authenticates users with Google OAuth\n- integrates with Stripe to restrict lo-fi sync to only users with a valid subscription\n\n## How to deploy\n\nI recommend deploying the frontend app on Vercel and the backend on Fly.io.\n\n### Frontend + Vercel\n\nVisit [https://vercel.com/new](https://vercel.com/new) to create a new project. Select this repo. Vercel will probably detect the Vite app automatically. You still want to specify some command overrides:\n\n- **Build**: `cd ../.. \u0026\u0026 pnpm --filter @packing-list/web run build`\n- **Output**: `dist`\n- **Install**: `cd ../.. \u0026\u0026 pnpm install --frozen-lockfile --filter @packing-list/web...`\n\nSet your `VITE_API_HOST` environment variable to the domain you plan to host the server on, and the `VITE_PUBLIC_URL` environment variable to the domain you plan to host the frontend on.\n\nDeploy the app!\n\n### Backend + Fly.io\n\n#### First time setup\n\nVisit [https://fly.io](https://fly.io) and create a new project. Install their CLI.\n\nOpen `/apps/api/fly.toml` and review the values. Particularly, set the `HOST` build variable to the domain you plan to host your server on.\n\nYou'll need to create a persistent volume for your app's data. By default this should be named `packing-list_data` (see `fly.toml`). You can do that with `fly volumes create packing-list_data --region lhr --size 10` (adjust `--region` and `--size` to your needs). Volume must be in the same region you plan to deploy the app.\n\nBefore deploying you may want to [set your secrets](https://fly.io/docs/reference/secrets/), so the app doesn't crash on first run. All variables from `/apps/api/.env` should be supplied as secrets.\n\nRun `flyctl launch --dockerfile` in the `/apps/api` directory to launch your app.\n\n#### Redeploying from Github\n\nIncluded is a Github action which will detect changes to the server code or any of the shared packages and redeploy for you. You'll need to set a `FLY_API_TOKEN` secret in Github.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-type%2Fpacking-list","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa-type%2Fpacking-list","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-type%2Fpacking-list/lists"}