Skip to content

Ayan-Bain/Local-text-sharing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DropZone Hub - Local Text Sharing App

DropZone Hub is a lightweight, responsive Node.js web application designed for fast and easy text sharing across devices on a local network. Built with Express and EJS, and styled with Tailwind CSS, it allows you to quickly push and pull text, code snippets, or links without the need for an internet-based service or complex setup.

Features

  • Local Network Sharing: Server binds to 0.0.0.0, making it accessible to any device on your local network (Wi-Fi or LAN).
  • Auto-Sync: Provides a manual refresh button and automatically fetches new text drops every 30 seconds.
  • Copy to Clipboard: One-click copy functionality for quick retrieval of shared texts.
  • Soft Deletion: Safely remove items from the feed (marks them as deleted instead of permanently destroying data directly).
  • Clean UI: A modern, dark-mode, responsive user interface powered by Tailwind CSS.
  • No Database Setup: Stores data locally in a simple database.json file.

Tech Stack

  • Backend: Node.js, Express
  • Frontend: EJS (Embedded JavaScript templating), HTML, and plain JavaScript
  • Styling: Tailwind CSS (via CDN)
  • Database: Local JSON File System (database.json)

Prerequisites

Installation & Setup

  1. Open your terminal and navigate to the project directory:

    cd text-sharing-app
  2. Install Dependencies

    npm install
  3. Start the Server

    npm start

    (This script uses node --watch server.js to automatically reload the app during development)

Usage

  1. Access Locally (Same Machine): Open your browser and go to http://localhost:3000.
  2. Access from Other Devices:
    • Find your computer's local IP address (e.g., using ipconfig on Windows or ip a / ifconfig on Linux/macOS).
    • On your phone or another computer connected to the same Wi-Fi network, navigate to http://<YOUR_LOCAL_IP>:3000.
  3. Drop Text: Paste or type your text (including multi-line snippets) and click "Share Text" or press Ctrl + Enter.
  4. Copy & Delete: Use the buttons on each shared item to copy it to your clipboard or remove it from the view.

Project Structure

text-sharing-app/
├── server.js          # Core Express server logic and API routes
├── database.json      # Local JSON store for text entries
├── package.json       # Project dependencies and npm scripts
└── views/             # Folder containing frontend templates
    └── index.ejs      # Main Single-Page Application view

API Routes Overview

If you want to interact programmatically:

  • GET / - Renders the main dashboard.
  • GET /texts - Retrieves the list of the last 20 active text entries (JSON).
  • POST /share - Adds a new text entry (Expects JSON body { "text": "..." } or raw text).
  • POST /delete/:id - Soft-deletes a specific text entry.
  • GET /download - Download the database.json store file.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors