The flow for a the link to be shortened is as follows:
- The user enters a URL and submits it.
- The URL is validated and if it is valid, the link is created.
- If the link is created successfully:
- Metadata is fetched from the URL (if failed, the link is created as
Untitled link
). - The link is updated with the title and the key.
- Metadata is fetched from the URL (if failed, the link is created as
- The link is displayed to the user.
Fill in the required env vars in a .env
file.
DATABASE_URL=sqlite_url
DATABASE_TOKEN=secret
Just do
pnpm dev (or --turbo)