Urania Dev Snapp Save

Yet Another Url Shortner. A simple excercise to learn Svelte.

Project README

Snapp

Are you looking for a reliable solution for self-hosted URL shortening? Look no further! Snapp is the perfect tool for individuals and businesses seeking control over their URL management.

Our Features

  • Intuitive User Interface: Snapp provides an intuitive user interface for seamless link shortening. Learn how to get started!
  • Secure Authentication: Enjoy a secure experience with authentication sessions and hashed passwords. Your information is in safe hands.
  • Custom Short Codes: Create personalized short codes for your links to make them memorable and easy to share.
  • Expiration: Control the lifespan of your links with expiration dates. Set expiry dates for added security or let them stay active indefinitely.
  • Secret Links: Add an extra layer of protection with secret links. Choose to share links with a selected audience using unique secrets.
  • Usage Analytics: Empower yourself with detailed analytics for every link you create. Snapp gathers metrics anonymously, providing insights into link engagements.
  • Extend Metrics: Integrate your Snapp Instance with your self-hosted or cloud Umami Analytics instance for advanced metrics of your Snapp.
  • Check URL Reputation: Secure the links passing through your Snapp instance with a check on VirusTotal API reputation.
  • REST API: Community requested features that enable REST API endpoints to create and manage your Snapps remotely. Read all Swagger Docs here.

Getting Started

Snapp is a self-hostable open-source platform.

Manual Installation

To run Snapp, you need an environment with NodeJS installed and available.

  1. Clone the git repository:
    git clone https://github.com/urania-dev/snapp.git
    
  2. Install dependencies:
    npm install
    
  3. Copy and edit the .env.example file:
    cp .env.example .env && nano .env
    
  4. Develop and extend Snapp on your server (optional):
    npm run dev
    
  5. Build the application:
    npm run build
    
  6. Run and enjoy!
    node -r dotenv/config build
    

Using Docker Container

Simply type in your terminal:

docker run -p 3000:3000 uraniadev/snapp:latest

If you run into CORS errors, remember to set the PUBLIC_URL and ORIGIN environment variables:

docker run -p 3000:3000 \
-e ORIGIN=https://example.com \
-e PUBLIC_URL=https://example.com \
uraniadev/snapp:latest

Testing 0.7.test version

At the moment the 0.7.test has major changes and need to migrate shortened url with CSV Exporter from old to this version: Read more and have docker compose in announcement discussion.

version: '3'
services:
  redis:
    image: redis/redis-stack:latest
    # ports: # you can specify LOCAL_IP OR VPN_IP to make db or redis insight available privately
    # - (LOCAL_IP or VPN_IP):6379:6379/tcp
    # - (LOCAL_IP or VPN_IP):8001:8001
    volumes:
      - /home/snapp/redis/test:/data:rw
      # this make sure to enable persistance through docker restarts
      # and shutdowns or updates -- change it to a folder of your choise
      - /etc/localtime:/etc/localtime:ro
    networks:
      - snapp-stack
    environment:
      REDIS_ARGS: '--save 60 1 --appendonly yes' # Optional: `--requirepass mypassword`

  snapp:
    image: uraniadev/snapp:0.7
    ports:
      - 3000:3000
    volumes:
      # provide origin json downloadable
      # from github if you intend to use it
      #
      # - /home/snapp/app/translations:/app/translations:ro 
      # - /home/snapp/redis/theme/theme.css:/app/static/custom-theme.css
      # See (Discussion about theming)[https://github.com/urania-dev/snapp/discussions/18]
    networks:
      - snapp-stack
    environment:
      AUTH_SECRET: very-secure-and-long-pass-words # random string, generate it with bash: openssl rand -base64 32
      DB_HOST: redis
      # DB_PASS: # Optional: Requires `--requirepass mypassword` in REDIS_ARGS
      # DB_PORT: 6379
      # DB_IDX: 0
      # ALLOW_UNSECURE_HTTP: false
      # ENABLE_LIMITS: false
      # ENABLE_SIGNUP: true
      # ENABLE_HOME: false
      # DEFAULT_THEME: dark
      # DEFAULT_LANG: en
      # LOCALIZATION_FOLDER: /app/translations
      # MAX_SHORT_URL: 10
      # MAX_USAGES: 0
      # MAX_RPM: 0
      # MAX_RPD: 0
      # UMAMI_WEBSITE_ID:
      # UMAMI_URL:
      # VIRUSTOTAL_API_KEY:
      # PUBLIC_URL: http://host:5173
      # ORIGIN: http://host:5173
      ## all commented vars are optional.
      ## Note that omitting PUBLIC_URL and ORIGIN
      ## app expects to be used from http://localhost:3000

networks:
  snapp-stack: # Snapp Network so Snapp and redis can communicate but redis is isolated from the wan
    external: false

Migration

The latest versions of Snapp include CSV Export to facilitate migration. Simply log in and import your URLs from the dashboard, and continue from where you left.

The Stack

The technology involved:

  • Svelte Kit
  • Redis
  • Auth.js
  • Skeleton
  • MaxMind
  • Lucide
Open Source Agenda is not affiliated with "Urania Dev Snapp" Project. README Source: urania-dev/snapp
Stars
122
Open Issues
0
Last Commit
3 weeks ago
Repository
Homepage

Open Source Agenda Badge

Open Source Agenda Rating