Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
176 changes: 47 additions & 129 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,161 +4,79 @@ Easily share text snippets and images between your phone, tablet, and computer i

![Demo](assets/copy-paste.space-demo.gif)

## 📖 Introduction
## Introduction

**copy-paste.space** is a minimal web tool built with **TypeScript**, **Node.js**, and a lightweight frontend for instant **cross-device text sharing** — no sign-ups or logins required. Switch between devices or share notes quickly with a secure, rate-limited backend, deployed on **Railway** for privacy-focused use.
**copy-paste.space** is a minimal web tool built with **TypeScript** and **Node.js**, along with a lightweight frontend for instant cross-device text sharing.
No sign-ups or logins are required. You can quickly switch between devices or share notes using a secure, rate-limited backend.

---

## ✨ Features
- 📱 **copy-paste.space support** – Works on mobile, tablet, and desktop
- ⚡ **Instant transfer** – Send and receive within seconds
- 🔒 **Secure** – End-to-end encryption for privacy
- 🌐 **No login required** – Just open the app and start sharing
- 🖼 **Image & text support** – Share notes, messages, or pictures effortlessly
## Features

- Cross-device support for mobile, tablet, and desktop
- Instant transfer of text and images
- Secure communication with encryption
- No authentication required
- Simple and minimal user experience

---

## 📸 How It Works
- Visit https://copy-paste.space on both devices.
- Paste your text or upload an image.
- Instantly access the content from your other device.
## How It Works

- Visit https://copy-paste.space on both devices
- Paste text or upload an image
- Instantly access the content on your other device

---
## 🚀 Tech Stack

### 🎨 Frontend
- React with TypeScript
- react-router-dom
## Tech Stack

### Frontend
- React
- TypeScript
- react-router-dom

### 🛠️ Backend
### Backend
- Node.js
- TypeScript
- Express.js (assumed based on structure and middleware usage)
- Express.js
- dotenv for environment variable management

### ☁️ DevOps & Deployment
- Vercel (for frontend hosting and CI/CD)
- Railway (for backend infrastructure and environment management)
- Other Tools: dotenv, rate-limiting middleware, tsconfig, REST API
- REST APIs

---

## 📦 Installation
## CI/CD Workflow

To set up and run the project on your local machine:
This project uses **GitHub Actions** for Continuous Integration.

### Prerequisites
The CI workflow automatically runs on:
- Every push
- Every pull request

- **Node.js** (version 18 or higher)
- **npm** or **yarn**
- **Git**
- **MongoDB** (for local development)
The workflow ensures:
- Dependencies install correctly
- Code passes linting checks
- The project builds successfully

### 1️⃣ Fork and Clone

1. Fork the repository on GitHub

2. Clone your fork locally:
```bash
git clone https://github.com/YOUR_USERNAME/copy-paste.space.git
cd copy-paste.space
```
3. Add the original repository as upstream:
```bash
git remote add upstream https://github.com/rshdhere/copy-paste.space.git
```
### 2️⃣ Backend Setup

1. Navigate to the backend directory:
```bash
cd backend
```

2. Install dependencies:
```bash
npm install
```

3. Create environment variables:
```bash
cp .env.example .env
```

Configure the following variables in your `.env` file:
```
PORT=8080
NODE_ENV=development
AWS_REGION=ap-south-1
S3_BUCKET_NAME=<your-aws-bucket-name>
AWS_ACCESS_KEY_ID=<your-aws-access-key>
AWS_SECRET_ACCESS_KEY=<your-aws-secret>
FRONTEND_ORIGIN=http://localhost:5173
MONGODB_URI=mongodb://localhost:27017/
OPTIONS=ABC123
```

4. Start the development server:
```bash
npm run dev
```
This helps maintain code quality and prevents unstable changes from being merged.

The backend will be available at `http://localhost:8080`
### 3️⃣ Frontend Setup

1. Navigate to the frontend directory:
```bash
cd frontend
```

2. Install dependencies:
```bash
npm install
```

3. Create environment variables:
```bash
cp .env.example .env
```

Configure the following variables in your `.env` file:
```
VITE_POSTHOG_API_KEY=<your-posthog-api-key>
VITE_POSTHOG_SECURE_PATH=<your-posthog-secure-path>
VITE_PUBLIC_POSTHOG_HOST=https://us.i.posthog.com
VITE_BACKEND_URI=http://localhost:8086
```

4. Start the development server:
```bash
npm run dev
```

The frontend will be available at `http://localhost:5173`
### 4️⃣ Running Both Services

You can run both services simultaneously by opening two terminal windows:

**Terminal 1 (Backend):**
```bash
cd backend
npm run dev
```

**Terminal 2 (Frontend):**
```bash
cd frontend
npm run dev
```
---

## Image Sharing Overview V1.5
## Installation

### Prerequisites

![Demo](assets/copy-paste.space-V1.5.gif)
- Node.js (version 18 or higher)
- npm or yarn
- Git
- MongoDB (for local development)

---

## 🤝Contributions
Contributors are welcome!
### 1. Fork and Clone

See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
1. Fork the repository on GitHub
2. Clone your fork locally:
```bash
git clone https://github.com/YOUR_USERNAME/copy-paste.space.git
cd copy-paste.space