Skip to content

Commit 7f66167

Browse files
committed
✨Added i18N, Hello World!
1 parent 05117d6 commit 7f66167

16 files changed

+107
-149
lines changed

README.md

+52-76
Original file line numberDiff line numberDiff line change
@@ -1,117 +1,93 @@
1-
# 🔗 Real-Time Local Sharing App
21

3-
[中文版](./documents/README-CN.md)
2+
# LetShare – Effortless File & Text Sharing Across Devices 🚀
43

5-
![React](https://img.shields.io/badge/React-18.x-blue?logo=react)
6-
![WebRTC](https://img.shields.io/badge/WebRTC-P2P-brightgreen?logo=webrtc)
7-
![WebSocket](https://img.shields.io/badge/WebSocket-Connected-orange?logo=websocket)
8-
![License](https://img.shields.io/badge/License-MIT-yellow)
9-
![Platform](https://img.shields.io/badge/Platform-LAN%20only-lightgrey)
104

5+
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
6+
[![Website](https://img.shields.io/badge/Website-letshare.fun-blue)](https://letshare.fun)
7+
[![Built with Vite](https://img.shields.io/badge/built%20with-vite-646cff)](https://vitejs.dev)
8+
[![MUI](https://img.shields.io/badge/UI-MUI-007FFF)](https://mui.com)
9+
[![Capacitor](https://img.shields.io/badge/Native-Capacitor-4ECDC4)](https://capacitorjs.com)
1110

12-
A lightweight real-time collaboration and file-sharing app designed for seamless communication within the same local network. Built with **React**, **WebRTC**, and **WebSocket**, it supports sharing **files**, **text**, and **clipboard content** with nearby users.
11+
[中文版](./documents/README-CN.md)
1312

14-
---
13+
LetShare is a blazing-fast, lightweight tool for sharing files, text, images, and clipboard content between devices — no login, no cloud, no nonsense.
1514

16-
## ✨ Features
15+
Share anywhere. Phone to laptop. Android to browser. Clipboard to clipboard.
1716

18-
- 📁 **File Transfer**: Send files peer-to-peer without uploading to a server.
19-
- 📝 **Text & Clipboard Sharing**: Share custom text or clipboard content instantly.
20-
- 🌐 **LAN Peer Discovery**: Automatically find other users connected to the same Wi-Fi.
21-
- 🔄 **Reconnection Mechanism**: Auto-reconnect to disconnected users.
22-
- 🔥 **Drag & Drop Upload**: Easily drag files into the app window to share.
23-
- 🚫 **Abort Transfer**: Cancel file sending in real-time.
24-
- 🧊 **Material UI Components**: Clean, responsive interface using MUI.
17+
![alt text](documents/googleplay/pc-images/green.png)
2518

2619
---
2720

28-
## 📦 Technologies Used
21+
## ✨ Features
2922

30-
- **React (TypeScript)**
31-
- **Material UI (MUI)**
32-
- **WebSocket** for signaling and peer discovery
33-
- **WebRTC** for direct peer-to-peer data transfer
34-
- **Clipboard API** for sharing copied content
35-
- **Custom Utility Kit** for delay, ID management, etc.
23+
- 📡 **Peer-to-peer** local sharing via WebRTC
24+
- 💻 **Cross-platform** support: browser & native Android app
25+
- 🔒 **Private & offline-first** – no cloud upload, all local
26+
- 🧾 **Text, file, image, clipboard** – share anything instantly
27+
- 🌐 **Multi-language UI** (English / 中文 / Bahasa Melayu / Indonesia)
28+
- 🖼️ **QR-code based pairing** – scan & connect
29+
- 🎨 **Clean Material UI**, responsive design
30+
- ⚙️ **Built with Vite**, React, MobX, Capacitor
3631

3732
---
3833

39-
## 🚀 Getting Started
34+
## 🧪 Tech Stack
4035

41-
### Prerequisites
36+
- React + Vite + TypeScript
37+
- MUI 5 (Material Design UI)
38+
- WebRTC + Ably for real-time messaging
39+
- MobX for state management
40+
- Capacitor for Android native support
41+
- i18next + detector for language handling
42+
- JSZip, Clipboard API, react-qrcode-logo
4243

43-
- Node.js (v16+ recommended)
44-
- Yarn or npm
44+
---
4545

46-
### Installation
46+
## 🔧 Scripts (via Yarn)
4747

4848
```bash
49-
# Install dependencies
50-
npm install
51-
52-
# Or
53-
yarn install
54-
```
55-
56-
### Start the Development Server
57-
58-
```bash
59-
npm run dev
60-
61-
# Or
62-
yarn dev
49+
yarn dev # Run development server
50+
yarn build # Build production web app
51+
yarn app # Build & sync Android app (via Capacitor)
52+
yarn app-start # Open Android Studio
53+
yarn preview # Preview built site
6354
```
6455

6556
---
6657

67-
## 🌍 Usage
68-
69-
1. Open the app in two different tabs or devices connected to the same network.
70-
2. Click **"Search Nearby Users"** to discover peers.
71-
3. Choose a file, input some text, or select clipboard mode.
72-
4. Click a discovered user to send your content.
73-
5. A dialog will appear on the receiver's screen to accept or decline.
58+
## 🌍 Try It Now
7459

75-
---
60+
Visit the live app at:
61+
👉 **https://letshare.fun**
7662

77-
## 📁 File Transfer Notes
78-
79-
- File transfer uses WebRTC **DataChannels**.
80-
- Signaling is handled via a lightweight **WebSocket server**.
81-
- Large files are chunked and transferred with progress feedback.
63+
No install. No login. Works on any modern browser.
8264

8365
---
8466

85-
## 🧪 Developer Notes
86-
87-
- `colabLib.ts` handles all WebRTC + signaling logic.
88-
- The app automatically cleans up disconnected users.
89-
- Auto-reconnect checks run every ~3.5 seconds.
90-
- Clipboard support may vary depending on browser permissions.
67+
## 📲 Android App
9168

92-
---
93-
94-
## ⚙️ Configuration
69+
Build native Android app:
9570

96-
The signaling server URL is defined in the code:
97-
```ts
98-
const url = "wss://your-server-url";
71+
```bash
72+
yarn app-create
73+
yarn app
74+
yarn app-start
9975
```
10076

101-
You can switch to a local server for development:
102-
```ts
103-
const url = "ws://localhost:9000";
104-
```
77+
Requires Android Studio & Capacitor CLI.
10578

10679
---
10780

108-
## 📷 Screenshots
81+
## 📄 License
10982

110-
> _Add your screenshots here to visualize the app's UX_
83+
MIT © 2025 Onion
11184

11285
---
11386

114-
## 📜 License
87+
## ⭐️ Contribute
88+
89+
Found it useful? Give us a ⭐ at
90+
https://github.com/LiWeny16/LetShare
11591

116-
MIT License © 2025
92+
Pull requests welcome. Let’s build frictionless sharing together!
11793

docs/icons/216.png

29.4 KB
Loading

docs/icons/512x512_trans.png

76.1 KB
Loading

docs/icons/512x512_副本.png

76.1 KB
Loading

docs/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919

2020
<link rel="manifest" href="./4dhVlCNC.manifest.json">
21-
<script type="module" crossorigin src="./static/index-DTyIf1h_.js"></script>
21+
<script type="module" crossorigin src="./static/index-B-d6cSpH.js"></script>
2222
<link rel="modulepreload" crossorigin href="./static/@babel-LAXhhp6N.js">
2323
<link rel="modulepreload" crossorigin href="./static/react-B4V_vTrs.js">
2424
<link rel="modulepreload" crossorigin href="./static/scheduler-CzFDRTuY.js">

docs/static/index-DTyIf1h_.js renamed to docs/static/index-B-d6cSpH.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

docs/sw.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

documents/README-CN.md

+51-69
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,89 @@
1-
# 🔗 局域网实时分享工具
21

3-
一个基于 **React + WebRTC + WebSocket** 的轻量级实时协作与分享平台,专为同一 Wi-Fi 局域网内的设备之间快速传输设计。支持 **文件传输****文本分享****剪贴板同步**,无需登录、无需服务器中转。
2+
# LetShare – 跨设备极速文件与文本共享工具 🚀
43

5-
---
4+
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
5+
[![Website](https://img.shields.io/badge/Website-letshare.fun-blue)](https://letshare.fun)
6+
[![Built with Vite](https://img.shields.io/badge/built%20with-vite-646cff)](https://vitejs.dev)
7+
[![MUI](https://img.shields.io/badge/UI-MUI-007FFF)](https://mui.com)
8+
[![Capacitor](https://img.shields.io/badge/Native-Capacitor-4ECDC4)](https://capacitorjs.com)
69

7-
## ✨ 功能亮点
10+
LetShare 是一款极速、轻量、安全的文件、文本、图片与剪贴板共享工具,支持多设备互联 —— 无需登录,无需云端,真正一触即发。
11+
12+
无论是手机对电脑、Android 对浏览器、剪贴板对剪贴板,一切只需局域网内打开即可连接共享。
813

9-
- 📁 **文件发送**:点对点直传,速度快、隐私强。
10-
- 📝 **文本 / 剪贴板内容分享**:随时粘贴、发送文字。
11-
- 🌐 **局域网用户发现**:一键搜索同一 Wi-Fi 下的设备。
12-
- 🔄 **断线自动重连**:连接丢失后自动恢复。
13-
- 🔥 **拖拽上传文件**:直接拖到界面中即可分享。
14-
-**传输中断**:可随时取消文件发送。
15-
- 🎨 **MUI 界面组件**:响应式设计,简洁美观。
14+
![alt text](./googleplay/pc-images/green.png)
1615

1716
---
1817

19-
## 📦 技术栈
18+
## ✨ 功能亮点
2019

21-
- **React + TypeScript**
22-
- **Material UI (MUI)**
23-
- **WebSocket**:用于用户发现和信令通信
24-
- **WebRTC**:用于点对点数据传输
25-
- **Clipboard API**:实现剪贴板读取/写入
26-
- **自定义工具库 bigonion-kit**:处理 ID、延迟等常用逻辑
20+
- 📡 **WebRTC 局域网直连**,点对点传输,隐私安全
21+
- 💻 **全平台支持**:浏览器 & 原生 Android 应用
22+
- 🔒 **无需登录、无云同步**,完全本地运行
23+
- 🧾 支持 **文本、文件、图片、剪贴板** 即时共享
24+
- 🌐 **多语言界面**(支持中文、英文、马来语、印尼语)
25+
- 🖼️ **二维码配对连接**,扫码即连,快速上手
26+
- 🎨 使用 **Material UI** 构建,响应式设计,简洁美观
27+
- ⚙️ 技术栈现代:Vite + React + MobX + Capacitor
2728

2829
---
2930

30-
## 🚀 快速开始
31-
32-
### 环境要求
31+
## 🧪 技术栈
3332

34-
- Node.js v16+
35-
- Yarn 或 npm
33+
- React + Vite + TypeScript
34+
- MUI 5(Material Design UI)
35+
- WebRTC + Ably 实时通信
36+
- MobX 轻量状态管理
37+
- Capacitor 原生 Android 打包
38+
- i18next + 浏览器语言自动识别
39+
- JSZip、Clipboard API、二维码生成
3640

37-
### 安装依赖
38-
39-
```bash
40-
npm install
41-
#
42-
yarn install
43-
```
41+
---
4442

45-
### 启动项目
43+
## 🔧 项目脚本(使用 Yarn)
4644

4745
```bash
48-
npm run dev
49-
#
50-
yarn dev
46+
yarn dev # 启动开发服务器
47+
yarn build # 构建生产环境 Web 应用
48+
yarn app # 构建并同步 Android 应用(使用 Capacitor)
49+
yarn app-start # 打开 Android Studio
50+
yarn preview # 预览构建结果
5151
```
5252

5353
---
5454

55-
## 🌍 使用说明
55+
## 🌍 在线体验
5656

57-
1. 在局域网中打开两个页面或设备访问该应用。
58-
2. 点击「搜索同WIFI下用户」,发现其他在线用户。
59-
3. 可选择文件、文本或剪贴板内容作为发送对象。
60-
4. 点击对方设备,即可发起传输。
61-
5. 对方会收到确认弹窗,接受后完成分享。
57+
访问地址:
58+
👉 **https://letshare.fun**
6259

63-
---
64-
65-
## 📁 文件传输说明
66-
67-
- 使用 WebRTC 的 `DataChannel` 实现点对点传输。
68-
- 使用 WebSocket 实现信令连接和发现其他设备。
69-
- 大文件采用分片方式发送,并支持实时进度显示。
60+
无需安装、无需注册,支持现代浏览器即开即用。
7061

7162
---
7263

73-
## ⚙️ 配置说明
74-
75-
在代码中设置信令服务器地址:
76-
77-
```ts
78-
const url = "wss://your-server-url"; // 推荐使用 wss
79-
```
64+
## 📲 Android 原生应用
8065

81-
开发调试可切换为本地
66+
构建原生 Android 应用
8267

83-
```ts
84-
const url = "ws://localhost:9000";
68+
```bash
69+
yarn app-create
70+
yarn app
71+
yarn app-start
8572
```
8673

87-
---
88-
89-
## 🧪 开发者注意事项
90-
91-
- 所有 P2P 逻辑集中在 `colabLib.ts`
92-
- 自动剔除断开的用户。
93-
- 每 3.5 秒自动检查连接状态,确保稳定传输。
94-
- 剪贴板读取需浏览器授权。
74+
需安装 Android Studio 与 Capacitor CLI。
9575

9676
---
9777

98-
## 📷 示例截图
78+
## 📄 授权协议
9979

100-
> _(你可以放上几张 UI 或使用流程的截图)_
80+
MIT 开源许可证 © 2025 Onion
10181

10282
---
10383

104-
## 📜 授权许可
84+
## ⭐️ 欢迎贡献
10585

106-
MIT License © 2025
86+
觉得项目不错?欢迎给个 Star:
87+
https://github.com/LiWeny16/LetShare
10788

89+
欢迎提交 PR,一起打造极致丝滑的跨平台共享体验!

public/icons/216.png

29.4 KB
Loading

public/icons/512x512_trans.png

76.1 KB
Loading

public/icons/512x512_副本.png

76.1 KB
Loading

src/components/StartupPage.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const StartupPage: React.FC<StartupPageProps> = ({ open }) => {
4444
<Fade in={imgLoaded} timeout={600}>
4545
<Box
4646
component="img"
47-
src="/icons/512x512.png"
47+
src="/icons/512x512_trans.png"
4848
alt="Logo"
4949
onLoad={() => setImgLoaded(true)}
5050
sx={{

0 commit comments

Comments
 (0)