Skip to content
/ Nova Public

Nova is a fast, minimal and modern URL shortener built with Next.js & bun. Turn long links into clean, shareable URLs - at the speed of light πŸš€

License

Notifications You must be signed in to change notification settings

Libnaus/Nova

Repository files navigation

Nova Logo

Nova - URL Shortener

A modern and elegant URL shortener built with Next.js 16, offering an intuitive user interface and advanced features to manage your shortened links.

Next.js TypeScript License

✨ Features

  • πŸ”— URL Shortening: Transform your long links into short and memorable ones
  • 🎨 Custom Links: Create short links with a custom alias (reserved for premium users)
  • πŸ” Secure Authentication: Sign up and login system with JWT
  • πŸ“Š User Dashboard: Manage all your links from a dedicated interface
  • πŸŒ“ Dark/Light Mode: Adaptive interface with customizable themes
  • ⚑ Optimal Performance: Integration with Vercel Analytics and Speed Insights
  • 🎯 Premium: Advanced features for premium users

πŸ› οΈ Tech Stack

  • Framework: Next.js 16 with App Router
  • Language: TypeScript
  • Database: MySQL with mysql2
  • Authentication: JWT (jsonwebtoken) with bcryptjs
  • UI/UX:
    • Tailwind CSS 4
    • Radix UI (accessible components)
    • Lucide React (icons)
    • next-themes (theme management)
  • ID Generation: nanoid
  • Analytics: Vercel Analytics & Speed Insights

πŸ“‹ Prerequisites

Before you begin, make sure you have installed:

  • Node.js 20.x or higher
  • Bun (recommended package manager) or npm
  • MySQL 8.x or higher

πŸš€ Installation

1. Clone the repository

git clone https://github.com/libnaus/nova.git
cd nova

2. Install dependencies

bun install

3. Configure the database

Create a MySQL database:

mysql -u root -p
CREATE DATABASE nova;
USE nova;

Import the database schema:

mysql -u root -p nova < nova_schema.sql

4. Environment variables configuration

Create a .env.local file at the root of the project:

# MySQL Database
DB_HOST=localhost
DB_PORT=3306
DB_USER=root
DB_PASSWORD=your_password
DB_NAME=nova

# JWT Secret (generate a secure random key)
JWT_SECRET=your_very_secure_jwt_secret

Important: Generate a secure JWT_SECRET:

# With Node.js
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"

5. Launch the application

In development mode:

bun dev

The application will be accessible at http://localhost:3000

In production mode:

bun build
bun start

πŸ”‘ Environment Variables

Variable Description Required Default
DB_HOST MySQL database host Yes localhost
DB_PORT MySQL port No 3306
DB_USER MySQL user Yes root
DB_PASSWORD MySQL password Yes -
DB_NAME Database name No nova
JWT_SECRET Secret to sign JWT tokens Yes -

🎯 Usage

Shorten a link (anonymous user)

  1. Paste your long URL in the input field
  2. Click "Shorten"
  3. Copy and share your short link!

Create a custom link (premium user)

  1. Log in with a premium account
  2. Enter your URL
  3. Customize the alias in the "Custom link" field
  4. Shorten and share!

Manage your links

  1. Log in to your account
  2. Click on the dashboard icon
  3. View, copy, or delete your links

🀝 Contributing

Contributions are welcome! Feel free to:

  1. Fork the project
  2. Create a branch (git checkout -b feature/improvement)
  3. Commit your changes (git commit -m 'Add a feature')
  4. Push to the branch (git push origin feature/improvement)
  5. Open a Pull Request

πŸ“ License

All contents located in the /public/ directory, including files, assets, and media, are Β© 2025 Timeo Bavart. All rights reserved. No part of these materials may be copied, distributed, or used without explicit permission from the copyright holder.

This project is licensed under the GNU General Public License v3.0. See the LICENSE file for more details.

About

Nova is a fast, minimal and modern URL shortener built with Next.js & bun. Turn long links into clean, shareable URLs - at the speed of light πŸš€

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published