{"id":14240246,"url":"https://github.com/urania-dev/snapp","last_synced_at":"2025-08-11T16:31:46.750Z","repository":{"id":211158633,"uuid":"728366482","full_name":"urania-dev/snapp","owner":"urania-dev","description":"Yet Another Url Shortner. A simple excercise to learn Svelte.","archived":false,"fork":false,"pushed_at":"2024-10-19T08:59:37.000Z","size":36551,"stargazers_count":188,"open_issues_count":0,"forks_count":12,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-19T10:49:38.926Z","etag":null,"topics":["shortener","url","url-shortener"],"latest_commit_sha":null,"homepage":"https://snapp.li","language":"Svelte","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/urania-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-06T19:38:38.000Z","updated_at":"2024-10-19T08:59:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"3de7ec95-369f-449c-9b2d-e11e8560982d","html_url":"https://github.com/urania-dev/snapp","commit_stats":null,"previous_names":["urania-dev/snapp"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urania-dev%2Fsnapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urania-dev%2Fsnapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urania-dev%2Fsnapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urania-dev%2Fsnapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/urania-dev","download_url":"https://codeload.github.com/urania-dev/snapp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229559925,"owners_count":18092226,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["shortener","url","url-shortener"],"created_at":"2024-08-21T10:00:36.475Z","updated_at":"2024-12-13T15:30:31.823Z","avatar_url":"https://github.com/urania-dev.png","language":"Svelte","funding_links":[],"categories":["Apps","10、基础服务架构"],"sub_categories":["Tools","9、效率工具集合"],"readme":"# Snapp\n\nIf you're seeking a self-hosted URL shortening solution, Snapp might be what you need. It's designed for those who value control over their URL management and want to explore various technologies.\n\n## A Brief Introduction\n\nThis project began as a personal endeavor to explore new technologies and make use of free time. With version 0.7, some development issues emerged, prompting a complete redesign and rebuild. By version 0.8, we've laid the groundwork for what will become the first version 1.\n\nCurrently, you can migrate URLs between versions using a CSV export tool. Note that these files are only valid for direct transitions from one version to the next; for example, exports from version 0.6 to 0.7 won't work for moving from 0.7 to 0.8. We’ve reverted to using Prisma to ensure a more stable and maintainable platform going forward.\n\nThis latest version supports multiple architectures, including ARM and ARM64 platforms, and offers integration with various databases, now accessible with just a ENV Variable.\n\n## Features\n\n- **Intuitive User Interface:** Snapp offers a user-friendly interface for easy link shortening.\n- **Secure Authentication:** Enjoy secure sessions for your user. Their information is protected.\n- **Custom Short Codes:** Personalize your short codes to make your links memorable and easy to share.\n- **Expiration Dates:** Manage link lifespans with expiration dates. You can set expiry dates for added security or let links remain active indefinitely.\n- **Secret Links:** Enhance security with secret links, allowing you to share with a select audience using unique secrets.\n- **Usage Analytics:** Access detailed, anonymous analytics for your links. Snapp provides insights into link engagements.\n- **Extended Metrics:** Integrate Snapp with your self-hosted or cloud-based Umami Analytics for advanced metrics.\n- **URL Reputation Check:** Ensure the safety of links with VirusTotal API reputation checks.\n- **REST API:** Community-requested REST API endpoints enable remote management of your Snapp instance. Find all Swagger Docs [here](https://snapp.li/docs).\n\n## Getting Started\n\nSnapp is an open-source platform you can host yourself.\n\n## Always backup before attempting any update\n\nFor the 0.8 version, you’ll need to migrate URLs using the CSV Exporter. Here’s a sample configuration:\n\n```yml\nservices:\n  snapp:\n    image: uraniadev/snapp:latest\n    ports:\n      - 3000:3000\n    environment:\n      DATABASE_URL: 'file:./db.sqlite'\n      DATABASE_PROVIDER: sqlite # mysql | sqlite | postgres\n      TOKEN_SECRET: # openssl rand -base64 32\n      ORIGIN: https://example.com\n```\n\n**Note**: SQLite database is located in /app/prisma/sqlite/{DATABASE_URL} if you want to mount it\n\n**_Update8.1_**: In order to make it actually work it ended up requiring better specification of schemas for Prisma Clients,\nthe combinations are:\n\n```yml\nDATABASE_PROVIDER: sqlite\nDATABASE_URL: file:./db.sqlite\n```\n\n```yml\nDATABASE_PROVIDER: mysql\nDATABASE_MYSQL_URL: mysql://root:password@mariadb:3306/snappdb\n```\n\n```yml\nDATABASE_PROVIDER: postgres\nDATABASE_MYSQL_URL: postgres://root:password@postgres:5432/snappdb\n```\n\n## Default Admin Authentication\n\nIf ENV variables ADMIN_USERNAME and ADMIN_PASSWORD are not set it defaults to the very secure:\n\n```\n  username: admin\n  password: password\n```\n\nYou can always set a SMTP server and use password recovery process to change it later. (not very secure tho...)\n\n## I18N\n\nSnapp at his version 0.8 includes from start Italian, English, German, French, Spanish and Galician. This are very amateurish translation with the help of ChatGPT, so errors are to be expected, feel free to open a related issue if any\n\n## Migration\n\nThe 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. \n\n\n## ENV Variables\n\nSome configuration moved from envs variable to settings page in-app, thou there are some ENV that could be set as default on first launch:\n\n```\nDATABASE_URL= # \"file:./db.sqlite\"\nDATABASE_POSTGRES_URL= # \"postgresql://root:password@postgres:5432/snappdb\"\nDATABASE_MYSQL_URL= # \"mysql://root:password@mariadb:3306/snappdb\"\nDATABASE_PROVIDER= # sqlite | postgres | mysql\nTOKEN_SECRET= # openssl rand -base64 32\nORIGIN=https://example.com # to avoid CROSS ORIGIN on Form Submission\nADMIN_USERNAME= # must be specified on first launch as it initiate the database\nADMIN_EMAIL= # must be specified on first launch as it initiate the database\nADMIN_PASSWORD= # must be specified on first launch as it initiate the database\nPORT=3000 # app port\nPUBLIC_UMAMI_WEBSITE_ID= # uuid\nPUBLIC_UMAMI_URL= # https://umami.example.com/script.js\nDISABLE_HOME=false\nENABLE_SIGNUP=false\nVTAPI_KEY= # VIRUSTOTAL API KEY\nSMTP_HOST= # host smtp.example.com\nSMTP_USER= # info@example.com\nSMTP_PASS= # account password\nSMTP_FROM= # no-reply@example.com\nSMTP_PORT= # 465\nSMTP_SSL=true# true\nAUTH_PROVIDERS=              # AUTHELIA, GOOGLE, KEYCLOAK\nAUTH_AUTHELIA_ISSUER=        # https://authelia.example.com/\nAUTH_AUTHELIA_CLIENT_ID=     # snapp\nAUTH_AUTHELIA_CLIENT_SECRET= # your-oidc-client-secret\nAUTH_GOOGLE_ISSUER=          # https://accounts.google.com\nAUTH_GOOGLE_CLIENT_ID=       # snapp\nAUTH_GOOGLE_CLIENT_ID=       # your-oidc-client-secret\nAUTH_KEYCLOAK_ISSUER=        # https://keycloak.example.com/realms/realm-name\nAUTH_KEYCLOAK_CLIENT_ID=     # snapp\nAUTH_KEYCLOAK_CLIENT_SECRET= # your-oidc-client-secret\nAUTH_KEYCLOAK_CLIENT_SCOPE=  # basic email\n```\n## OAUTH2.0 \u0026 OIDC\n\nSnapp can now integrate Oauth \u0026 OIDC compatible SSO. It requires env variables prefixed with AUTH as the example above \nUsers are checked on email, unregistered user will rejected if sign ups are disabled.\nRegistered callback URI at `/auth/oauth/{provider}/callback`\n\n## SMTP Configuration\n\nIf you find yourself limited by the UI configuration for your SMTP Server should be enough to change `smtp.config.cjs` file\n\n```yml\nservices:\n  snapp:\n    image: uraniadev/snapp:latest\n    ports:\n      - 3000:3000\n    volumes:\n      - ./smtp.config.cjs:/app/smtp.config.cjs\n```\n\nThe file should export a promise that returns a Nodemailer's TransportOptions type, the original one requires the promise to pick up config from db.\n\n```js\nmodule.exports = async () =\u003e ({\n\thost: 'smtp.example.com',\n\tport: '587',\n\tsecure: false,\n\tauth: {\n\t\tuser: 'username',\n\t\tpass: 'password'\n\t},\n  tls:{\n    ...\n  }\n});\n```\n\nThis could lead to trouble, so test carefully.\n\n## The Stack\n\nThe technology involved:\n\n- Svelte Kit\n- Prisma\n- Lucia Auth\n- Tailwind CSS\n- MaxMind\n- Phosphor Icons\n- SwaggerUI\n- AMCharts\n- ChartJS\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furania-dev%2Fsnapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Furania-dev%2Fsnapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furania-dev%2Fsnapp/lists"}