Skip to content

Commit f2ea244

Browse files
authored
Patches (#36)
fixes #35 #24 #33 #32 #27
1 parent 03ca026 commit f2ea244

24 files changed

+1691
-197
lines changed

README.md

Lines changed: 34 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,22 @@
99

1010
---
1111

12-
A simple self-hosted app for sharing text snippets and files within your local network across any device. It also includes and a notepad to throw rough notes in. Think of this as a simple and elegant alternative to airdrop, local-pastebin and a scratchpad. The primary features are:
13-
14-
- Make plain text snippets available to view/share on any device in the local network
15-
- Upload files and make them available to view/download on any device in the local network
16-
- Built-in Notepad with both Markdown and Rich Text editing capabilities
17-
- Rename text snippets and files uploaded to easily find them in the UI
18-
- Edit text snippets to modify their content as needed
19-
- Multi-file drag-n-drop (drop into the text area) support for uploading files
20-
- Configurable expiration per file or snippet for 1 hour, 4 hours, or 1 day
21-
22-
From a technology perspective, the app boasts the following:
23-
24-
- Pure HTTP API, i.e., *no use of websockets* - this is good because it means *no external communications needed* for the sharing aspect
25-
- Available as a binary for MacOS, Windows, and Linux for both x86-64 and ARM64 architectures
26-
- Multi-arch (x86-64 and ARM64) Docker image for homelab deployments
27-
- Works well with reverse proxies in the mix (tested with Cloudflare tunnels and Nginx Proxy Manager)
28-
- Frontend available over browsers and as a PWA (so it shows as an app with an icon on the mobile home screens)
29-
- Clean, modern interface with dark mode support that looks good on mobile too
12+
A simple & elegant self-hosted app for **storing/sharing text snippets and files** in your **local network** with **no setup on client devices**. Think of this as an *all-in-one alternative* to **airdrop**, **local-pastebin**, and a **scratchpad**. The primary features are:
13+
14+
- Make plain text **snippets** available to **view/share** on any device in the local network
15+
- **Upload files** and make them available to **view/download** on any device in the local network
16+
- Built-in **Notepad** with both **Markdown** and **Rich Text** editing capabilities
17+
- **Rename** text snippets and files uploaded to easily find them in the UI
18+
- **Edit** text snippets to modify their content as needed
19+
- **Multi-file** **drag-n-drop** (drop into the text area) support for uploading files
20+
- Configurable **expiration (or TTL, i.e., time to live)** per file/snippet for Never, 1 hour, 4 hours, 1 day, or Custom
21+
- Use of **SSE** to automatically inform all clients of new/deleted/edited files
22+
- Completely **local assets**, so the app works in your network even without internet
23+
- **Multi-arch** (x86-64 and ARM64) **Docker image** for **homelab** deployments
24+
- Frontend available over **browsers** and as a **PWA** (progressive web apps)
25+
- Clean, modern interface with **automatic light/dark** UI that looks good on mobile too
26+
27+
Make sure to look into [Tips & Notes](#tips-and-notes) if you have questions about individual functionalities.
3028

3129
> [!NOTE]
3230
> This application is meant to be deployed within your homelab only. There is no authentication mechanism implemented. If you are exposing to the public, ensure there is authentication fronting it and non-destructive users using it.
@@ -56,7 +54,7 @@ From a technology perspective, the app boasts the following:
5654

5755
## Installation and Usage
5856

59-
### Using Docker (Recommended)
57+
### Using Docker (Recommended for Self-Hosting)
6058

6159
Use `docker` CLI one liner and setup a persistence directory (so a container failure does not delete your data):
6260

@@ -70,7 +68,7 @@ docker run --name local-content-share \
7068
tanq16/local-content-share:main
7169
```
7270

73-
The application will be available at `http://localhost:8080`
71+
The application will be available at `http://localhost:8080` (or your server IP).
7472

7573
You can also use the following compose file with container managers like Portainer and Dockge (remember to change the mounted volume):
7674

@@ -91,7 +89,7 @@ Download the appropriate binary for your system from the [latest release](https:
9189
9290
Make the binary executable (for Linux/macOS) with `chmod +x local-content-share-*` and then run the binary with `./local-content-share-*`. The application will be available at `http://localhost:8080`.
9391

94-
### Using Go
92+
### Local development
9593

9694
With `Go 1.23+` installed, run the following to download the binary to your GOBIN:
9795

@@ -131,17 +129,29 @@ go build .
131129
- To delete content, click the trash icon
132130
- To set expiration for a file or snippet
133131
- Click the clock icon with the "Never" text (signifying no expiry) to cycle between times
134-
- Set the cycling button to 1 hour, 4 hours, or 1 day before adding a snippet or file
135132
- For a non-"Never" expiration, the file will automatically be removed after the specified period
133+
- Set the cycling button to 1 hour, 4 hours, 1 day, or Custom before adding a snippet or file
134+
- The Custom option will prompt to ask for the expiry after you click submit/upload
135+
- The value for custom expiration can be of the format `NT` (eg. `34m`, `3w`, `2M`, `11d`)
136+
- N is the number and T is the time denomination (m=minute, h=hour, d=day, w=week, M=month, y=year)
137+
- Use the `DEFAULT_EXPIRY` environment variable to set a default expiration
138+
- This value will be set as default on the home page instead of `Never`
139+
- The other options will still be available by cycling if needed
136140
- The Notepad is for writing something quickly and getting back to it from any device
137141
- It supports both markdown and richtext modes
138142
- Content is automatically saved upon inactivity in the backend and will load as is on any device
139143

140-
A quick note of the data structure: the application creates a `data` directory to store all uploaded files, uploaded text snippets, notepad notes (in `files`, `text`, and `notepad` subfolders respectively). File expirations are saved in an `expiration.json` file in the data directory. Make sure the application has write permissions for the directory where it runs.
144+
### A Note on Reverse Proxies
145+
146+
Reverse proxies are fairly common in homelab settings to assign SSL certificates
147+
148+
### Backend Data Structure
149+
150+
The application creates a `data` directory to store all uploaded files, uploaded text snippets, notepad notes (in `files`, `text`, and `notepad` subfolders respectively). File expirations are saved in an `expiration.json` file in the data directory. Make sure the application has write permissions for the directory where it runs.
141151

142152
## Acknowledgements
143153

144154
The following people have contributed to the project:
145155

146156
- [TheArktect](https://github.com/TheArktect) - Added CLI argument for listen address.
147-
- Several other users who created feature requests via GitHub issues.
157+
- A lot of other users who created feature requests via GitHub issues.

0 commit comments

Comments
 (0)