Skip to content
/ linky Public

Simple url shortener service with statistics for authenticated users

Notifications You must be signed in to change notification settings

prixladi/linky

Repository files navigation

Linky

Simple url shortener service with statistics for authenticated users.

Development

  1. Set up a instance of the PostgreSQL database. For example the Vercel postgres has a free tier.
  2. Set up .env.local file:
    • POSTGRES_URL=(PostgreSQL connection string)
    • TOKEN_SECRET=(Secret for token signature)
  3. Run:
pnpm install
pnpm dev

The application will start listening on port 3000.

Project Overview

The project is using classic Next.js app router structure with src folder. Pages are utilizing Server components and Server actions whenever possible.

Structure

  • /public - Web root assets
  • /src - Source code
    • ./app - Next.js app router root, following mandatory app router structure.
      • Folders ./**/_components include route scoped components.
    • ./components - Shared UI components
    • ./server - Server logic decoupled from Next.js frontend and backend
      • ./db - Db connection, client and models
      • ./utils - Server internal utils
      • ./methods - Front facing methods containing business logic
    • ./lib
      • ./server - Bindings to server logics (/src/server/methods)
        • ./actions - Next.js server actions
    • ./middleware.ts - Next.js middleware handling protected routes

Application images

Home Dashboard

About

Simple url shortener service with statistics for authenticated users

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages