A URL shortener using Next.js 14 server actions, Postgres or SurrealDB, Shadcn/ui, and Tailwind.
Find a file
2025-03-20 12:02:07 -07:00
.github/workflows github actions docker 2024-02-19 11:44:10 -08:00
src chore: update dependencies 2025-03-20 12:02:07 -07:00
.dockerignore makefile and update dependencies 2024-08-06 22:53:06 -07:00
.gitignore init 2024-02-15 13:23:35 -08:00
.prettierignore init 2024-02-15 13:23:35 -08:00
biome.json chore: format 2025-03-06 01:33:58 -08:00
components.json chore: format 2025-03-06 01:33:58 -08:00
CONTRIBUTING.md makefile and update dependencies 2024-08-06 22:53:06 -07:00
docker-compose-postgres.dev.yml chore: update dependencies 2025-03-06 00:56:20 -08:00
docker-compose-postgres.yml makefile and update dependencies 2024-08-06 22:53:06 -07:00
docker-compose-surrealdb.dev.yml chore: update dependencies 2025-03-06 00:56:20 -08:00
docker-compose-surrealdb.yml makefile and update dependencies 2024-08-06 22:53:06 -07:00
Dockerfile chore: update dependencies 2025-03-06 00:56:20 -08:00
LICENSE-Apache init 2024-02-15 13:23:35 -08:00
LICENSE-MIT init 2024-02-15 13:23:35 -08:00
Makefile makefile and update dependencies 2024-08-06 22:53:06 -07:00
next.config.js chore: format 2025-03-06 01:33:58 -08:00
package.json chore: update dependencies 2025-03-20 12:02:07 -07:00
pnpm-lock.yaml chore: update dependencies 2025-03-20 12:02:07 -07:00
postcss.config.js chore: format 2025-03-06 01:33:58 -08:00
README.md chore: update dependencies 2025-03-06 00:56:20 -08:00
tailwind.config.ts chore: format 2025-03-06 01:33:58 -08:00
tsconfig.json chore: format 2025-03-06 01:33:58 -08:00

next-url-shortener

A URL shortener using Next.js 14 server actions, Postgres or SurrealDB, Shadcn/ui and Tailwind.

Install

Copy one

Create data folder next to docker-compose.yml and .env, and set the data type in .env

├── data
│	├── postgres
│   └── surrealdb
├── Makefile
├── docker-compose-postgres.yml
└── .env

Then run:

  • make up-postgres
  • make up-surrealdb

Then exit with:

  • make down-postgres
  • make down-surrealdb

Example .env

# postgres or surrealdb
DB_TYPE=postgres

# For surrealdb: If using docker surrealdb:8000, if not use 0.0.0.0:8000
# For postgres: If using docker postgres:5432, if not use 0.0.0.0:5432
DB_URL_PORT=postgres:5432

# postgres
POSTGRES_USER=root
POSTGRES_PASSWORD=root
POSTGRES_DB=url

# surrealdb
DB_USER=root
DB_PASSWORD=root

# Enter your website url here
# OVERRIDE_URL=s.nexv.dev

License

All code in this repository is dual-licensed under either License-MIT or LICENSE-APACHE at your option. This means you can select the license you prefer. Why dual license