Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,6 @@ dist
# Vite logs files
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

# Wrangler local state
.wrangler/
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ Compressly is a **privacy-first file compression tool** that lets you reduce fil
| Layer | Technology |
| ------------- | ---------------------------------------- |
| Frontend | TypeScript, Vite, HTML/CSS |
| API / Backend | Cloudflare Workers (via `functions/api`) |
| Deployment | Cloudflare Pages |
| API / Backend | Cloudflare Workers (via `worker/`) |
| Deployment | Cloudflare Workers (static assets) |
| Config | `wrangler.toml` for Cloudflare settings |

---
Expand Down Expand Up @@ -86,22 +86,23 @@ The output will be in the `dist/` folder.

---

## ☁️ Deployment (Cloudflare Pages)
## ☁️ Deployment (Cloudflare Workers)

Compressly is designed to deploy on **Cloudflare Pages** with **Cloudflare Workers** handling the API routes.
Compressly deploys as a **Cloudflare Worker with static assets**: the Vite build in `dist/` is served as static files, and `/api/*` requests are handled by the Worker in `worker/`. Configuration lives in `wrangler.toml`.

```bash
# Install Wrangler CLI globally (if you haven't already)
npm install -g wrangler
npm run build
npx wrangler deploy
```

# Authenticate with Cloudflare
wrangler login
With Workers Builds (Git integration), use `npm run build` as the build command and `npx wrangler deploy` (or `npx wrangler versions upload`) as the deploy command.

# Deploy
wrangler pages deploy dist
```
To run the production setup locally, including the API and KV stats:

The `functions/api` directory is automatically picked up by Cloudflare Pages as serverless API routes.
```bash
npm run build
npx wrangler dev
```

---

Expand All @@ -111,15 +112,14 @@ The `functions/api` directory is automatically picked up by Cloudflare Pages as
compressly/
├── docs/
│ └── screenshots/ # README images (not deployed)
├── functions/
│ └── api/ # Cloudflare Worker API routes
├── worker/ # Cloudflare Worker: /api/* routes
├── public/ # Static assets
├── src/
│ ├── components/ # UI components
│ └── lib/ # Compression logic, loaded on demand per file type
├── index.html # App entry point
├── vite.config.ts # Vite configuration
├── wrangler.toml # Cloudflare Workers/Pages config
├── wrangler.toml # Cloudflare Worker config
└── package.json
```

Expand All @@ -133,7 +133,7 @@ Compressly is built with privacy as a core principle:
- **No tracking** — No analytics or telemetry are attached to your files.
- **Edge processing** — API functions run on Cloudflare's edge network, meaning processing happens ephemerally and close to you.

You can verify this by inspecting the source code in `functions/api` and `src/`.
You can verify this by inspecting the source code in `worker/` and `src/`.

---

Expand Down
8 changes: 0 additions & 8 deletions functions/api/health.ts

This file was deleted.

Loading
Loading