Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kumpmati/pieni.link
Self-hostable URL shortener
https://github.com/kumpmati/pieni.link
netlify self-hosted shadcn-ui svelte sveltekit url-shortener
Last synced: 26 days ago
JSON representation
Self-hostable URL shortener
- Host: GitHub
- URL: https://github.com/kumpmati/pieni.link
- Owner: kumpmati
- License: gpl-3.0
- Created: 2024-01-20T21:03:55.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-06-07T20:42:28.000Z (7 months ago)
- Last Synced: 2024-12-07T17:41:47.194Z (about 1 month ago)
- Topics: netlify, self-hosted, shadcn-ui, svelte, sveltekit, url-shortener
- Language: Svelte
- Homepage: https://pieni.link
- Size: 465 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pieni
> A modern, minimal URL shortener
## Yet another URL shortener
Pieni.link is a simple sideproject, originally built to test out the development speed with the following stack: [SvelteKit](https://kit.svelte.dev/), [Drizzle ORM](https://orm.drizzle.team/), [Lucia](https://lucia-auth.com/) and [shadcn-svelte](https://www.shadcn-svelte.com/).
The [pieni.link](https://pieni.link) website is hosted on [Netlify](https://app.netlify.com/), and uses [Neon](https://neon.tech/) for the PostgreSQL database.
## Features
- [x] URL shortener (give long URL, get short URL in return)
- [x] Custom URLs
- [x] Basic per-link usage tracking
- [ ] Password-protected links (TODO)
- [x] Temporary links
- [ ] API
- [x] API Keys
- [x] Link API
- [ ] Link visits API
- [ ] User API
- [x] User accounts with roles (admin / member)
- [x] New users are invite-only (managed by admin users)## Deployment
There are two ways to deploy Pieni yourself:
### Using Docker
- [x] A server or service that can run Docker (AWS / DigitalOcean / etc.)
- [x] Google OAuth credentials1. Copy the contents of `.env.example` to a file called `.env`, then fill all the environment variables according to the comments in the file.
2. Run `docker compose up --build -d`### Serverless
You need the following:
- [x] A service that supports hosting SvelteKit projects (Vercel / Netlify / AWS / etc.)
- [x] An external PostgreSQL database (example: Neon)
- [x] Google OAuth credentialsTODO: netlify / vercel guide
## Development
Prerequisites:
- Git
- Node.js (`20` or above)
- PostgreSQL (`15`)### Setup
Install dependencies
```bash
npm install
```Copy the contents of `.env.example` to a file called `.env`, then fill all the environment variables according to the comments in the file.
```bash
cp .env.example .env
```Run the development server
```bash
npm run dev
# navigate to http://localhost:5173
```