Skip to content

PoliNetworkOrg/pnet.work

 
 

Repository files navigation

pnet.work - URL Shortener

A Next.js URL shortener application for polinetwork.org domains.

Features

  • 🔗 URL Shortening: Create short URLs for any polinetwork.org subdomain
  • 📊 Dashboard: Web interface to manage all shortened URLs
  • 🚀 RESTful API: Programmatic access for other services
  • 📈 Click Tracking: Monitor usage of your shortened URLs
  • 🗄️ PostgreSQL: Persistent storage with PostgreSQL database
  • 🎨 Vibe Coded: Claude wrote this, if it's broken blame him

Why?

This thing is dead simple, and other services can integrate with it via API to create a butload of shortened URLs. Very cool, very free, which makes it even cooler.

Yeah ok but why Next of all things???

No good reason really, but it works, the REST API is handled with ts-rest, UI with shadcn/ui, allowing me to autogenerate both an openapi.json file and the docs for it with @scalar/api-reference-react.

If I was to do it again I'd try Hono with SSG for the UI.

Setup

Prerequisites

  • Node.js 24+
  • PostgreSQL database
  • pnpm package manager

Installation

  1. Clone the repository and install dependencies:
pnpm install
  1. Edit .env and set your PostgreSQL connection string:
DATABASE_URL=postgresql://username:password@host:port/database_name
  1. Start the development server:
pnpm dev

The application will be available at http://localhost:6111.

License

MIT

About

URL shortener for PoliNetwork

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 81.3%
  • CSS 15.8%
  • Dockerfile 2.8%
  • JavaScript 0.1%