More Premium Hugo Themes Premium Svelte Themes

Svelte Shortener

An open-source URL Shortener written in SvelteKit with PocketBase.

Svelte Shortener

An open-source URL Shortener written in SvelteKit with PocketBase.

Author Avatar Theme by germanheim
Github Stars Github Stars: 19
Last Commit Last Commit: Jan 9, 2023 -
First Commit Created: Dec 18, 2023 -
Svelte Shortener screenshot

Overview

Svelte Shortener is a web application built with SvelteKit and PocketBase. It allows users to shorten URLs and manage them within a database. The application provides authentication for users and ensures that only verified users can create links. With the ability to deploy the application using Vercel or manually, Svelte Shortener offers flexibility in hosting options.

Features

  • URL Shortening: Users can shorten long URLs into shorter, more manageable links.
  • Authentication: Verified users can create and manage links securely.
  • PocketBase Integration: Utilizes PocketBase as the database for storing user and link data.
  • Deployment Options: Can be deployed using Vercel or manually, giving users flexibility in hosting.

Installation

To install and run Svelte Shortener:

  1. Clone the repository:
git clone [repository-url]
  1. Install dependencies:
npm install
  1. Set up PocketBase:

    • Download the PocketBase executable from [download-link] and move it to the pocketbase directory.
    • Run the PocketBase instance locally by executing the command:
    ./pocketbase serve
    

    This will start a PocketBase instance at 127.0.0.1:8090.

  2. Import the schema in PocketBase:

    • Go to your PocketBase instance and navigate to “Import collections” in the settings.
    • Import the schema located in the pocketbase folder.
  3. Create a new verified user in PocketBase:

    • After importing the schema, create a new verified user. This user will be used for authentication.
  4. Create an .env file in the project’s root directory and add the following variable:

POCKETBASE_URL - The URL of your PocketBase instance (without /_/ or /api/)
  1. Run SvelteKit:
npm run dev

This will start the SvelteKit instance.

Summary

Svelte Shortener is a web application that allows users to shorten URLs securely. Built with SvelteKit and PocketBase, it offers features such as URL shortening, authentication, and flexible deployment options. By following the installation guide, users can set up their own instance of Svelte Shortener and start managing their shortened links.