AmoabaKelvin / ishortn.ink

URL Shortening, Link Analytics & QR Code Platform
https://ishortn.ink
MIT License
66 stars 9 forks source link

replace `hono` and revert to just api routes #100

Closed AmoabaKelvin closed 3 months ago

AmoabaKelvin commented 6 months ago

Hono was intended to be used, but as things stand, we rarely use anything specific to the library, with the exception of the middleware, when checking a user's authentication status when using the dynamic links API.

To make things much simpler and more beginner-friendly, we intend to return to using only Nextjs API route handlers.

BreakTos commented 6 months ago

Hi, I want to take this issue up. Just need to get the project running locally for which i apparently need CLERK KEY and UNKEY?? Also, the project seems to be having a docker. Do i just have to run that to open up the project?

AmoabaKelvin commented 6 months ago

@BreakTos The Docker image is to help set up the database that you will need to get things up and running.

I wrote some documentation about how to set things up, but there needs to be some updates in the docs. You can find the link here: https://ishortn.ink/docs. I'm working very hard to improve the whole DX so hopefully things get better.

One thing you might not see however is the part related to UPSTASH. So you will need to follow this walkthrough to help set it up: https://upstash.com/docs/redis/overall/getstarted

Please let me know if you need further assistance at any point, I'm here to help.

SEQUENCE OF STEPS

BreakTos commented 6 months ago

Cool, i managed to set the variables and sign up with clerk is working. However weirdly the /dashboard of original site deployed and mine is way too different at same route somehow. Attaching screenshots

image

AmoabaKelvin commented 6 months ago

the reason is that there is no user in the database by your ID.

The way this is resolved is to go to your clerk dashboard, and to the users section, you then click on the user and then copy the user ID.

CleanShot 2024-03-28 at 06 51 13@2x

The next thing will be to run prisma db push and then prisma studio.

Once prisma studio launches, please go ahead to the users table and create a new user with the ID you copied. Once done, it should work very fine.