A modern, minimal URL shortener
Pieni.link is a simple sideproject, originally built to test out the development speed with the following stack: SvelteKit, Drizzle ORM, Lucia and shadcn-svelte.
The pieni.link website is hosted on Netlify, and uses Neon for the PostgreSQL database.
- URL shortener (give long URL, get short URL in return)
- Custom URLs
- Basic per-link usage tracking
- Password-protected links (TODO)
- Temporary links
- API
- API Keys
- Link API
- Link visits API
- User API
- User accounts with roles (admin / member)
- New users are invite-only (managed by admin users)
There are two ways to deploy Pieni yourself:
- A server or service that can run Docker (AWS / DigitalOcean / etc.)
- Google OAuth credentials
- Copy the contents of
.env.example
to a file called.env
, then fill all the environment variables according to the comments in the file. - Run
docker compose up --build -d
You need the following:
- A service that supports hosting SvelteKit projects (Vercel / Netlify / AWS / etc.)
- An external PostgreSQL database (example: Neon)
- Google OAuth credentials
TODO: netlify / vercel guide
Prerequisites:
- Git
- Node.js (
20
or above) - PostgreSQL (
15
)
Install dependencies
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.
cp .env.example .env
Run the development server
npm run dev
# navigate to http://localhost:5173