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
13 changes: 10 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# Changelog

## [1.0.7] - 2025-04-22
### Added
- Customizable application title and description through environment variables
- New build arguments in Dockerfile: VITE_APP_TITLE and VITE_APP_DESCRIPTION
- Support for title and description customization in docker-compose configuration

### [1.0.6]
* `cmd/server/main.go`: Added rate limiting to POST requests.
* `ui/src/pages/Create.vue`: Added error handling for 429 responses.
Expand All @@ -6,15 +14,15 @@
UI Enhancements:

* `ui/index.html`: Added a link to the Animate.css library for animation effects.
* [`ui/src/App.vue`: Integrated animation classes into various elements, including the header logo, buttons, and alerts.
* [`ui/src/App.vue`: Integrated animation classes into various elements, including the header logo, buttons, and alerts.

Password Management Enhancements:
* `ui/src/pages/Create.vue`: Added functionality to toggle password visibility and generate random passwords, along with corresponding tooltips and animations.
404 Error Page Improvements:
* `ui/src/pages/Error404.vue`: Redesigned the 404 error page with a more user-friendly card layout, including an icon, message, and a button to navigate back home.

Other Enhancements:
* `ui/src/pages/Create.vue`, `ui/src/pages/View.vue`: Applied animation classes to various elements to provide a more dynamic user experience.
* `ui/src/pages/Create.vue`, `ui/src/pages/View.vue`: Applied animation classes to various elements to provide a more dynamic user experience.

### [1.0.4]
- Reworked CD pipelines to follow semver tagging
Expand Down Expand Up @@ -54,4 +62,3 @@ Other Enhancements:
- Improved project documentation and added sections for installation, configuration, and deployment.

---

13 changes: 9 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,22 @@ RUN if [ "$DEBUG" = "true" ]; then \
fi

# Stage 2: Build the Vue.js Frontend
FROM node:18-alpine AS frontend-builder
FROM node:23-alpine AS frontend-builder

WORKDIR /app
COPY ui/package.json ui/package-lock.json ./
COPY ui/package.json ui/package-lock.json ./
RUN npm install --legacy-peer-deps

# Add build argument for the API URL and versioning
# Add build arguments for customization
ARG VITE_API_URL="/api"
ARG VITE_APP_TITLE="GopherDrop"
ARG VITE_APP_DESCRIPTION="Secure one-time secret and file sharing"

ENV VITE_API_URL=${VITE_API_URL}
ENV VITE_APP_TITLE=${VITE_APP_TITLE}
ENV VITE_APP_DESCRIPTION=${VITE_APP_DESCRIPTION}

COPY ui ./
COPY ui ./
RUN npm run build

# Stage 3: Combine Backend and Frontend into a Single Image
Expand Down
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@

# Default build (production)
build:
docker-compose build
docker compose build

# Build in debug mode
build-debug:
docker-compose build --build-arg DEBUG=true --build-arg GIN_MODE=debug
docker compose build --build-arg DEBUG=true --build-arg GIN_MODE=debug

up:
docker-compose up -d
docker compose up -d

down:
docker-compose down
docker compose down

logs:
docker-compose logs -f app
docker compose logs -f app

dbshell:
docker-compose exec db psql -U $(DB_USER) -d $(DB_NAME)
docker compose exec db psql -U $(DB_USER) -d $(DB_NAME)

start-db:
docker-compose up -d db
docker compose up -d db

stop-db:
docker-compose stop db
docker compose stop db

test:
go test ./... -v
Expand Down
59 changes: 35 additions & 24 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,27 @@ GopherDrop is a secure, self-hostable REST API and UI for sharing encrypted one-

## 📋 **Table of Contents**

1. [Features](#-features)
2. [Installation](#-installation)
3. [Build and Run](#-build-and-run)
4. [Configuration](#-configuration)
5. [Endpoints](#-endpoints)
6. [Docker Deployment](#-docker-deployment)
7. [Contributing](#-contributing)
8. [License](#-license)
9. [Community and Support](#-community-and-support)
1. [Features](#-features)
2. [Installation](#-installation)
3. [Build and Run](#-build-and-run)
4. [Configuration](#-configuration)
5. [Endpoints](#-endpoints)
6. [Docker Deployment](#-docker-deployment)
7. [Contributing](#-contributing)
8. [License](#-license)
9. [Community and Support](#-community-and-support)

---

## 🌟 **Features**

- **Send Text or Files**: Share sensitive information securely.
- **Password Protection**: Encrypt your secrets with a password.
- **One-Time Retrieval**: Automatically delete secrets after a single access.
- **Expiration Settings**: Define how long a secret remains available.
- **Responsive UI**: Built with Vue.js and Vuetify for a modern user experience.
- **Dockerized Deployment**: Simple setup with Docker and Docker Compose.
- **Production and Debug Modes**: Easily switch between production and debug builds.
- **Send Text or Files**: Share sensitive information securely.
- **Password Protection**: Encrypt your secrets with a password.
- **One-Time Retrieval**: Automatically delete secrets after a single access.
- **Expiration Settings**: Define how long a secret remains available.
- **Responsive UI**: Built with Vue.js and Vuetify for a modern user experience.
- **Dockerized Deployment**: Simple setup with Docker and Docker Compose.
- **Production and Debug Modes**: Easily switch between production and debug builds.


---
Expand All @@ -55,8 +55,8 @@ GopherDrop is a secure, self-hostable REST API and UI for sharing encrypted one-

### **Prerequisites**

- **Docker**: [Install Docker](https://docs.docker.com/get-docker/)
- **Docker Compose**: [Install Docker Compose](https://docs.docker.com/compose/install/)
- **Docker**: [Install Docker](https://docs.docker.com/get-docker/)
- **Docker Compose**: [Install Docker Compose](https://docs.docker.com/compose/install/)

### **Clone the Repository**

Expand Down Expand Up @@ -129,6 +129,17 @@ MAX_FILE_SIZE=10485760
| `STORAGE_PATH` | Path for storing uploaded files | `/app/storage` |
| `MAX_FILE_SIZE` | Maximum file size in bytes | `10485760` (10 MB) |

### **Build Arguments**

| Argument | Description | Default Value |
|----------------------|--------------------------------------|----------------------------------------------|
| `VITE_API_URL` | API endpoint URL | `/api` |
| `VITE_APP_TITLE` | Custom application title | `GopherDrop` |
| `VITE_APP_DESCRIPTION` | Custom application description | `Secure one-time secret and file sharing` |
| `DEBUG` | Enable debug mode | `false` |
| `GIN_MODE` | Gin framework mode | `release` |
| `VERSION` | Application version | `-` |

---

## 🖥️ **Endpoints**
Expand All @@ -146,10 +157,10 @@ MAX_FILE_SIZE=10485760

## 🤝 **Contributing**

1. Fork the repository.
2. Create a new branch: `git checkout -b my-feature-branch`
3. Make your changes and add tests.
4. Submit a pull request.
1. Fork the repository.
2. Create a new branch: `git checkout -b my-feature-branch`
3. Make your changes and add tests.
4. Submit a pull request.

---

Expand All @@ -161,5 +172,5 @@ GopherDrop is licensed under the [MIT License](LICENSE).

## 💬 **Community and Support**

- **Issues**: [GitHub Issues](https://github.com/kek-Sec/gopherdrop/issues)
- **Discussions**: [GitHub Discussions](https://github.com/kek-Sec/gopherdrop/discussions)
- **Issues**: [GitHub Issues](https://github.com/kek-Sec/gopherdrop/issues)
- **Discussions**: [GitHub Discussions](https://github.com/kek-Sec/gopherdrop/discussions)
4 changes: 3 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ services:
- gopherdrop

app:
build:
build:
context: .
dockerfile: Dockerfile
args:
- VITE_API_URL=/api
- VITE_APP_TITLE=TEST
- VITE_APP_DESCRIPTION=TEST_DESCR
container_name: gopherdrop_app
environment:
DB_HOST: db
Expand Down
10 changes: 5 additions & 5 deletions ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"
/>
/>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="GopherDrop - Secure one-time secret and file sharing" />
<meta name="description" content="__DESCRIPTION__" />
<meta name="keywords" content="secure, secret sharing, file sharing, encryption, one-time link" />
<meta name="author" content="GopherDrop Community" />

<!-- Favicon -->
<link rel="icon" href="/src/assets/Images/favicon.ico" type="image/x-icon" />

<!-- Open Graph Meta Tags for Social Media Sharing -->
<meta property="og:title" content="GopherDrop" />
<meta property="og:description" content="Secure one-time secret and file sharing." />
<meta property="og:title" content="__TITLE__" />
<meta property="og:description" content="__DESCRIPTION__" />
<meta property="og:image" content="/src/assets/Images/banner.png" />
<meta property="og:type" content="website" />

<title>GopherDrop</title>
<title>__TITLE__</title>

<!-- Preload critical assets -->
<link rel="preload" href="/src/main.js" as="script" />
Expand Down
22 changes: 21 additions & 1 deletion ui/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@ import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vuetify from 'vite-plugin-vuetify'

// Create HTML plugin instance with template parameters
const htmlPlugin = () => {
return {
name: 'html-transform',
transformIndexHtml(html) {
return html.replace(
/__TITLE__/g,
process.env.VITE_APP_TITLE || 'GopherDrop'
).replace(
/__DESCRIPTION__/g,
process.env.VITE_APP_DESCRIPTION || 'Secure one-time secret and file sharing'
)
}
}
}

export default defineConfig({
plugins: [vue(), vuetify()],
plugins: [vue(), vuetify(), htmlPlugin()],
define: {
'process.env.VITE_APP_TITLE': JSON.stringify(process.env.VITE_APP_TITLE || 'GopherDrop'),
'process.env.VITE_APP_DESCRIPTION': JSON.stringify(process.env.VITE_APP_DESCRIPTION || 'Secure one-time secret and file sharing')
}
})
2 changes: 1 addition & 1 deletion version.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#Application version following https://semver.org/
version: 1.0.6
version: 1.0.7
Loading