tier-vercel-openai icon indicating copy to clipboard operation
tier-vercel-openai copied to clipboard

Running Locally - Documentation Issues - Improvement Suggestions.

Open sonicviz opened this issue 1 year ago • 6 comments

Hi,

This looks really interesting so I gave it a shot to try out.

Initially I got a bunch of build version errors (iirc svelte mismatch from ai package) so I just --forced them for now.

I eventually got it running filling in some of the .env variables, but the documentation isn't very clear between what is needed for running locally and what is needed for running on vercel. I'd like to get it running locally before doing a test deploy, as that's a basic test you need to pass.

So I'd like to request more clarity in the documentation that makes clear what exactly needs to be filled in the .env local for a local development vs a remote install. You can't make assumptions here, documentation needs to be clear and really spell it out. I think if you do this it will also be a great value add to the app by bringing clarity to the two deployment pathways. At the moment they're both mashed up in one set of bullet points. Confusing.

eg: It implies postgre env variables are not needed for local dev but I get errors, as shown below. The obvious implication here is you do need the postgre db set up for local dev, but on the linked Vercel page https://vercel.com/docs/storage/vercel-postgres/quickstart it says you need an existing vercel project. But, we're still at the local testing stage, not deployed, so we don't have a vercel project. I am familiar with Vercel, I have a number of projects there, but this is confusing to me! Things might sound obvious to you if you're had your head in the technical weeds developing this, but for fresh eyes you really need to assume someone knows nothing, so spell it out in more detail is what I would recommend.

A good example of this would be the local dev setup instuctions here: https://github.com/a16z-infra/ai-getting-started , which you can see break it out more explicitly into steps for obtaining the API keys and where to put them, then for running locally, then for doing a test deploy.

Errors:

┌ GET /?_rsc=17aedda 200 in 163ms │ └──── GET https://api.github.com/repos/tierrun/tier-verc.. 200 in 6ms (cache: HIT)

[next-auth][error][adapter_error_getUserByAccount] https://next-auth.js.org/errors#adapter_error_getuserbyaccount Invalid p.account.findUnique() invocation in /mnt/e/Source Control/AI Apps/Frameworks/tier-vercel-openai2/node_modules/@next-auth/prisma-adapter/dist/index.js:211:45

208 getUserByEmail: (email) => p.user.findUnique({ where: { email } }), 209 async getUserByAccount(provider_providerAccountId) { 210 var _a; → 211 const account = await p.account.findUnique( error: Error validating datasource db: the URL must start with the protocol postgresql:// or postgres://.

I also tried to sign up locally with the github auth keys I set up for the app, but it got rejected as well.

On the .env as well, I thought infisical was going to be used for this anyway, so also found that a little confusing. Is the infisical integraiton not set up atm?

Thanks, Paul

sonicviz avatar Jul 10 '23 08:07 sonicviz