Skip to content

Latest commit

 

History

History
101 lines (71 loc) · 1.82 KB

README.md

File metadata and controls

101 lines (71 loc) · 1.82 KB

NOTE: This document is AI-generated

URL Shortener Frontend

A modern, responsive frontend for the URL shortener application built with Next.js, Tailwind CSS, and TypeScript.

Features

  • 🎨 Modern UI with Tailwind CSS
  • 📱 Fully responsive design
  • 🔒 Password protection for shortened URLs
  • ⚡ Fast page loads with Next.js
  • 🧪 Comprehensive test suite with Playwright

Tech Stack

  • Framework: Next.js 14
  • Styling: Tailwind CSS
  • Language: TypeScript
  • Testing: Playwright
  • UI Components: shadcn/ui

Getting Started

Prerequisites

  • Node.js 20.x or later
  • npm

Installation

  1. Clone the repository

  2. Install dependencies:

    npm install
  3. Create a .env file based on sample.env:

    cp sample.env .env
  4. Start the development server:

    npm run dev

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

Development

Running Tests

# Run Playwright tests
npm run test

Building for Production

npm run build

Docker Support

Build the Docker image:

docker build -t url-shortener-frontend .

# or use the docker compose file at project root

Run the container:

docker run -p 3000:3000 url-shortener-frontend

# or use the docker compose file at project root

Project Structure

frontend/
├── app/              # Next.js app directory
├── components/       # Reusable UI components
├── lib/             # Utility functions and shared code
├── public/          # Static assets
└── tests/           # E2E tests

Contributing

  1. Create a feature branch
  2. Make your changes
  3. Run tests
  4. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.