FormidableLabs / nextjs-sanity-fe

NextJS Demo site with Sanity CMS
https://nextjs-sanity.formidable.dev/
29 stars 6 forks source link

Provide better sanity setup experience for repo cloners #124

Closed Burnett2k closed 2 years ago

Burnett2k commented 2 years ago

Currently, if someone from the public cloned our repo and attempted to run it locally using the instructions, the application wouldn't work for the following reasons:

My recommendation to fix these issues would be as follows:

binoy14 commented 2 years ago

We can export our current dataset which exports the schema as well as the data in it and than have that tar file in the repo.

sanity dataset export production production.tar.gz

The users can run sanity dataset import production production.tar.gz on their sanity account and can start with our dataset and schema

Burnett2k commented 2 years ago

https://www.sanity.io/docs/export This also outlines a option which uses JSON files

Burnett2k commented 2 years ago

https://www.sanity.io/docs/migrating-data#1-export

Burnett2k commented 2 years ago

Jeremy thoughtfully provided the following notes which should be reviewed and addressed:

next-js-sanity-fe Notes

  1. README.md getting started link to demo site does not work https://sanity- nextjs.formidable.dev/ should be https://nextjs-sanity.formidable.dev/
  2. Mental note: Check if there is instructions for how to make this project their own. Ie, how to use this as a starter project. Is it a project you should fork, or just clone and change origin or ..
  3. We’re using PNPM for dependency management, and the two next steps are how to install sanity cli w/ yarn or npm. Maybe reorder and do cli install before pnpm and install deps? Or can we make pnpm install the cli?
  4. Note: I took the use formidable sanity project path
  5. I literally tried vi /packag [tab] to autocomplete the path, and realized I needed to use relative path vi ./pack [tab] . Maybe change /packages/nextjs to ./packages/nextjs ?
  6. It wasn’t clear that using the formidable sanity project would mean I wouldn’t have access to sanity studio. Makes sense when I thought hard about it, but just following the tutorial I had a false (pre)expectation. Maybe specify up front that you need to use option 2 if you want to play with sanity studio. PS. I found a little later in docs “If you want to look at the Studio site, you will need to go through the steps of creating your own Sanity account and project. Instructions for that are in the Getting Started section above.”
  7. Environment variables section, maybe specify the location ( ./packages/ nextjs/.env.sample )
  8. I would kind of like a section near the top (maybe part of the first section) that lays clearly the services (and their purpose) and mentions pricing model if I want to take this project to production. It doesn’t have to provide exact pricing (and probably shouldn’t) but it couldshould probably disclose the pricing model for each service. Ie, availability of free tiers, priced by teams or usage or both, etc. f we could provide example pricing we’ve seen among clients (ie 1mil req day ~= $100 / mo) that would be super useful. Example (I made these up). I
  9. Fastly is used for content delivery, it makes the delivery of your app to all regions super fast. Its priced w/ a free tier, and then by usage. See [link to pricing page] for more details.
  10. Vercel is the service we use to actually deploy the app (think like managed AWS). Priced by team size with generous quotas and priced for overages. See [link to pricing page] for more details.
  11. Sanity is your content management utility. It’s priced by team size (for managing content) and by usage. See [link to pricing page] for more details.
Burnett2k commented 2 years ago

Did my best to update the readme and add instructions for seeding the project with data, so I will be closing this out. Will be up to the rest of the team to take this to the finish line 🏁 . We're almost there though!

Burnett2k commented 2 years ago

Did my best to update the readme and add instructions for seeding the project with data, so I will be closing this out. Will be up to the rest of the team to take this to the finish line 🏁 . We're almost there though!