Skip to content

joybiswas007/linkshort

Repository files navigation

LinkShort

A no-nonsense URL shortener built with Go & React.

Getting Started

Follow these steps to set up the project for development or production.

Database

LinkShort uses SQLite: No manual database installation required. The SQLite database file is created automatically on first run, and migrations are applied at startup.


Installation

You can run LinkShort with Docker or manually.

Docker (Recommended)

Prerequisites

  • Docker & Docker Compose

Check your environment:

# use the setup checker
make docker-setup

Steps

  1. Prepare environment variables

    Copy and edit the configuration files:

    # Backend config
    cp example.linkshort.yaml .linkshort.yaml
    # Edit .linkshort.yaml as needed
    
    # Frontend config
    cp web/env.example web/.env
    # Edit web/.env to match your environment
  2. Build and start

    make build-docker
  3. Rebuild (if needed)

    make re-build-docker
  4. Stop

    make down-docker

Notes:

  • Ensure .linkshort.yaml is in your working directory and mounted into the container
  • Database migrations run automatically on container startup
  • Access the app at http://localhost:8000

Manual Setup

Frontend

  1. Install dependencies

    Requires Node.js and npm.

    cd web
    npm install
  2. Configure environment

    cp env.example .env
    # Edit .env as needed
  3. Development mode

    npm run dev

    Access at http://localhost:3001

  4. Production build

    npm run build

Backend

  1. Prerequisites

    Install Go 1.25+ and ensure it's in your PATH.

  2. Configure

    cp example.linkshort.yaml .linkshort.yaml
    # Edit .linkshort.yaml as needed
  3. Build

    make build
  4. Run

    ./linkshort --conf .linkshort.yaml

Makefile

View all available commands:

make help

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

About

No-nonsense url shortener.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors