Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cliplet 📋⚡

Cliplet is a privacy-first, lightweight web application that enables users to transfer text between devices instantly using a 6-digit unique code instead of long, shareable URLs.

No accounts. No signups. No installation. No tracking. Just a fast, secure, and elegant way to move text between devices.


🚀 Key Features

  • Instant Share: Paste text, select expiration, toggle "Burn After Read", and get a 6-digit code.
  • Auto-Advancing Retrieval: Enter the 6-digit code on another device to pull the text instantly. Focus auto-advances as you type or paste.
  • Burn After Read: Enabled by default. Automatically deletes the text from database storage immediately after the first retrieval.
  • Custom Rate Limiting: Embedded sliding-window rate limit per client IP (30 requests/min for generation, 120 requests/min for retrieval) to prevent brute-forcing.
  • Automatic Expiration: Background scheduler clears expired and soft-deleted/burned records every minute.
  • Security-First: Integrated Content Security Policy (CSP), Same-Origin frame mapping (protecting H2 console), and escaping layers.
  • Premium Beige UI: Sleek, distraction-free single-page application design that adapts beautifully to Desktop (two-column), Tablet, and Mobile (stacked-column) layouts.

📸 Visual Flow & Screenshots

Here is the visual flow of sending and retrieving text on Cliplet:

1. Initial Page Layout

A clean, premium beige-and-white theme layout: Initial Page Layout

2. Generating Code

Paste your text, choose expiration parameters, and generate the unique 6-digit code: Code Generated

3. Retrieving Stored Text

Type the code (focus jumps automatically across inputs) and retrieve your clip instantly: Retrieved Clipboard Content


🛠️ Tech Stack

Backend

  • Java 21/23 (LTS)
  • Spring Boot 3.5.16
  • Spring Security (Custom minimal authorization & security headers config)
  • Spring Data JPA (Hibernate mapping)
  • H2 Database (Local development profile)
  • PostgreSQL (Production database profile)
  • Maven

Frontend

  • HTML5
  • CSS3 (Vanilla styling variables, grids, flexbox, and sliding animations)
  • Vanilla JavaScript (ES6 modules, focus listeners, and toast notifications)

📁 Project Structure

cliplet/
├── frontend/             # Single-Page Application assets
│   ├── index.html        # Main HTML entry point
│   ├── css/              # Main, layout, components, and utility styling sheets
│   ├── js/               # API, toast, send, retrieve modules
│   └── assets/           # logo.svg
├── backend/              # Spring Boot backend app
│   ├── pom.xml           # Maven config
│   ├── src/main/java/    # Java sources (controllers, services, filters, etc.)
│   └── src/main/resources/
│       └── application.yml
├── Dockerfile            # Multi-stage production container build
├── docker-compose.yml    # Composes Postgres and the Spring app
└── README.md             # Project documentation

⚙️ Local Development Setup

Prerequisites

  • Java 21 or higher installed.
  • Maven 3.9+ installed.

Running Backend & Frontend Locally

  1. Clone this repository (or navigate to the project directory).
  2. Change directory into the backend project:
    cd backend
  3. Run the Spring Boot application using Maven:
    mvn spring-boot:run
    The application starts on port 8085 by default to prevent port conflicts.
  4. Open your web browser to:
    http://localhost:8085/
    
    The local running instance runs on the dev profile using an in-memory H2 database. H2 console is available at http://localhost:8085/h2-console.

Running Automated Tests

Run unit tests for service layers and REST controllers:

mvn test

🐳 Docker Deployment

To launch the complete PostgreSQL database and Spring Boot application stack:

  1. Ensure Docker is running.
  2. From the project root, run:
    docker-compose up --build
  3. Access the application on http://localhost:8080/.

🔒 Environment Variables

Variable Description Default
SERVER_PORT Port number the application listens on 8080 (prod), 8085 (dev)
SPRING_PROFILES_ACTIVE Active spring profile (dev or prod) dev
DB_HOST Database server host localhost
DB_PORT Database server port 5432
DB_NAME Database catalog name cliplet
DB_USERNAME Database username postgres
DB_PASSWORD Database user password postgres
APP_EXPIRATION_DEFAULT Default lifespan of clipboards 10m
LOG_LEVEL Application logging detail INFO

🤝 Contributing

Feel free to open issues or submit pull requests for new feature proposals on GitHub.


👤 Author

About

A lightweight, code-based online clipboard for instantly transferring text between devices using a unique 6-digit code. Built with Spring Boot and Vanilla JavaScript.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages