diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml
index 031a7fc..6c64d49 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.yml
+++ b/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -5,7 +5,7 @@ body:
- type: markdown
attributes:
value: |
- Thanks for taking the time to suggest an idea for Shortify!
+ Thanks for taking the time to suggest an idea for Slash!
- type: textarea
attributes:
label: Is your feature request related to a problem?
diff --git a/.github/workflows/build-and-push-release-image.yml b/.github/workflows/build-and-push-release-image.yml
index 28513f5..df5fa96 100644
--- a/.github/workflows/build-and-push-release-image.yml
+++ b/.github/workflows/build-and-push-release-image.yml
@@ -41,4 +41,4 @@ jobs:
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
- tags: stevenlgtm/shortify:latest, stevenlgtm/shortify:${{ env.VERSION }}
+ tags: stevenlgtm/slash:latest, stevenlgtm/slash:${{ env.VERSION }}
diff --git a/.github/workflows/build-and-push-test-image.yml b/.github/workflows/build-and-push-test-image.yml
index bca4382..25f312d 100644
--- a/.github/workflows/build-and-push-test-image.yml
+++ b/.github/workflows/build-and-push-test-image.yml
@@ -34,4 +34,4 @@ jobs:
file: ./Dockerfile
platforms: linux/amd64
push: true
- tags: stevenlgtm/shortify:test
+ tags: stevenlgtm/slash:test
diff --git a/Dockerfile b/Dockerfile
index 1d0c4fb..46b7ef0 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -17,18 +17,18 @@ WORKDIR /backend-build
COPY . .
COPY --from=frontend /frontend-build/dist ./server/dist
-RUN go build -o shortify ./cmd/shortify/main.go
+RUN go build -o slash ./cmd/slash/main.go
# Make workspace with above generated files.
FROM alpine:3.16 AS monolithic
-WORKDIR /usr/local/shortify
+WORKDIR /usr/local/slash
RUN apk add --no-cache tzdata
ENV TZ="UTC"
-COPY --from=backend /backend-build/shortify /usr/local/shortify/
+COPY --from=backend /backend-build/slash /usr/local/slash/
# Directory to store the data, which can be referenced as the mounting point.
-RUN mkdir -p /var/opt/shortify
+RUN mkdir -p /var/opt/slash
-ENTRYPOINT ["./shortify", "--mode", "prod", "--port", "5231"]
+ENTRYPOINT ["./slash", "--mode", "prod", "--port", "5231"]
diff --git a/README.md b/README.md
index 650b748..eb0c1f4 100644
--- a/README.md
+++ b/README.md
@@ -1,15 +1,15 @@
-# Shortify
+# Slash
-**Shortify** is a bookmarking and short link service that allows you to save and share links easily. It lets you store and categorize links, generate short URLs for easy sharing, search and filter your saved links, and access them from any device. It simplifies link organization, management, and collaboration, making it effortless to navigate and share web resources.
+**Slash** is a bookmarking and short link service that allows you to save and share links easily. It lets you store and categorize links, generate short URLs for easy sharing, search and filter your saved links, and access them from any device. It simplifies link organization, management, and collaboration, making it effortless to navigate and share web resources.
-Let's Simplify, Share, and Save your links with **Shortify**.
+Let's Simplify, Share, and Save your links with **Slash**.
## Deploy with Docker in seconds
```bash
-docker run -d --name shortify -p 5231:5231 -v ~/.shortify/:/var/opt/shortify stevenlgtm/shortify:latest
+docker run -d --name slash -p 5231:5231 -v ~/.slash/:/var/opt/slash stevenlgtm/slash:latest
```
## Demo
diff --git a/api/v1/analytics.go b/api/v1/analytics.go
index 20a8dc7..24cdc28 100644
--- a/api/v1/analytics.go
+++ b/api/v1/analytics.go
@@ -6,7 +6,7 @@ import (
"net/http"
"strconv"
- "github.com/boojack/shortify/store"
+ "github.com/boojack/slash/store"
"github.com/labstack/echo/v4"
"github.com/mssola/useragent"
"golang.org/x/exp/slices"
diff --git a/api/v1/auth.go b/api/v1/auth.go
index b1b7461..9fc249f 100644
--- a/api/v1/auth.go
+++ b/api/v1/auth.go
@@ -5,8 +5,8 @@ import (
"fmt"
"net/http"
- "github.com/boojack/shortify/api/v1/auth"
- "github.com/boojack/shortify/store"
+ "github.com/boojack/slash/api/v1/auth"
+ "github.com/boojack/slash/store"
"github.com/labstack/echo/v4"
"golang.org/x/crypto/bcrypt"
diff --git a/api/v1/auth/auth.go b/api/v1/auth/auth.go
index 7e54331..a59a75a 100644
--- a/api/v1/auth/auth.go
+++ b/api/v1/auth/auth.go
@@ -5,14 +5,14 @@ import (
"strconv"
"time"
- "github.com/boojack/shortify/store"
+ "github.com/boojack/slash/store"
"github.com/golang-jwt/jwt/v4"
"github.com/labstack/echo/v4"
"github.com/pkg/errors"
)
const (
- issuer = "shortify"
+ issuer = "slash"
// Signing key section. For now, this is only used for signing, not for verifying since we only
// have 1 version. But it will be used to maintain backward compatibility if we change the signing mechanism.
keyID = "v1"
@@ -33,9 +33,9 @@ const (
// 2. The access token has already expired, we refresh the token so that the ongoing request can pass through.
CookieExpDuration = refreshTokenDuration - 1*time.Minute
// AccessTokenCookieName is the cookie name of access token.
- AccessTokenCookieName = "shortify.access-token"
+ AccessTokenCookieName = "slash.access-token"
// RefreshTokenCookieName is the cookie name of refresh token.
- RefreshTokenCookieName = "shortify.refresh-token"
+ RefreshTokenCookieName = "slash.refresh-token"
)
type claimsMessage struct {
diff --git a/api/v1/jwt.go b/api/v1/jwt.go
index cf5ad2f..6292646 100644
--- a/api/v1/jwt.go
+++ b/api/v1/jwt.go
@@ -7,9 +7,9 @@ import (
"strings"
"time"
- "github.com/boojack/shortify/api/v1/auth"
- "github.com/boojack/shortify/internal/util"
- "github.com/boojack/shortify/store"
+ "github.com/boojack/slash/api/v1/auth"
+ "github.com/boojack/slash/internal/util"
+ "github.com/boojack/slash/store"
"github.com/golang-jwt/jwt/v4"
"github.com/labstack/echo/v4"
"github.com/pkg/errors"
diff --git a/api/v1/redirector.go b/api/v1/redirector.go
index 2f5ea94..bb46981 100644
--- a/api/v1/redirector.go
+++ b/api/v1/redirector.go
@@ -6,7 +6,7 @@ import (
"net/http"
"net/url"
- "github.com/boojack/shortify/store"
+ "github.com/boojack/slash/store"
"github.com/labstack/echo/v4"
"github.com/pkg/errors"
)
diff --git a/api/v1/shortcut.go b/api/v1/shortcut.go
index f840c30..f3a6354 100644
--- a/api/v1/shortcut.go
+++ b/api/v1/shortcut.go
@@ -8,7 +8,7 @@ import (
"strconv"
"strings"
- "github.com/boojack/shortify/store"
+ "github.com/boojack/slash/store"
"github.com/pkg/errors"
"github.com/labstack/echo/v4"
diff --git a/api/v1/user.go b/api/v1/user.go
index 1c3774a..8b2718d 100644
--- a/api/v1/user.go
+++ b/api/v1/user.go
@@ -7,7 +7,7 @@ import (
"net/mail"
"strconv"
- "github.com/boojack/shortify/store"
+ "github.com/boojack/slash/store"
"github.com/labstack/echo/v4"
"golang.org/x/crypto/bcrypt"
diff --git a/api/v1/v1.go b/api/v1/v1.go
index 07b0783..ecc6080 100644
--- a/api/v1/v1.go
+++ b/api/v1/v1.go
@@ -1,8 +1,8 @@
package v1
import (
- "github.com/boojack/shortify/server/profile"
- "github.com/boojack/shortify/store"
+ "github.com/boojack/slash/server/profile"
+ "github.com/boojack/slash/store"
"github.com/labstack/echo/v4"
)
diff --git a/api/v1/workspace.go b/api/v1/workspace.go
index d91d766..3635311 100644
--- a/api/v1/workspace.go
+++ b/api/v1/workspace.go
@@ -5,8 +5,8 @@ import (
"fmt"
"net/http"
- "github.com/boojack/shortify/server/profile"
- "github.com/boojack/shortify/store"
+ "github.com/boojack/slash/server/profile"
+ "github.com/boojack/slash/store"
"github.com/labstack/echo/v4"
)
diff --git a/cmd/shortify/main.go b/cmd/slash/main.go
similarity index 94%
rename from cmd/shortify/main.go
rename to cmd/slash/main.go
index affbb34..1145e84 100644
--- a/cmd/shortify/main.go
+++ b/cmd/slash/main.go
@@ -12,10 +12,10 @@ import (
"github.com/spf13/viper"
_ "modernc.org/sqlite"
- "github.com/boojack/shortify/server"
- _profile "github.com/boojack/shortify/server/profile"
- "github.com/boojack/shortify/store"
- "github.com/boojack/shortify/store/db"
+ "github.com/boojack/slash/server"
+ _profile "github.com/boojack/slash/server/profile"
+ "github.com/boojack/slash/store"
+ "github.com/boojack/slash/store/db"
)
const (
@@ -36,7 +36,7 @@ var (
data string
rootCmd = &cobra.Command{
- Use: "shortify",
+ Use: "slash",
Short: "",
Run: func(_cmd *cobra.Command, _args []string) {
ctx, cancel := context.WithCancel(context.Background())
@@ -108,7 +108,7 @@ func init() {
viper.SetDefault("mode", "dev")
viper.SetDefault("port", 8082)
- viper.SetEnvPrefix("shortify")
+ viper.SetEnvPrefix("slash")
}
func initConfig() {
diff --git a/extension/background.js b/extension/background.js
index fc15c2d..4e9359e 100644
--- a/extension/background.js
+++ b/extension/background.js
@@ -1,4 +1,4 @@
-import { getShortifyData } from "./common.js";
+import { getSlashData } from "./common.js";
const urlRegex = /https?:\/\/s\/(.+)/;
@@ -6,16 +6,16 @@ chrome.tabs.onUpdated.addListener(async (tabId, changeInfo, tab) => {
if (typeof tab.url === "string") {
const matchResult = urlRegex.exec(tab.url);
if (matchResult) {
- const shortifyData = await getShortifyData();
+ const slashData = await getSlashData();
const name = matchResult[1];
- const url = `${shortifyData.domain}/s/${name}`;
- return chrome.tabs.update({ url });
+ const url = `${slashData.domain}/s/${name}`;
+ return chrome.tabs.update(tab.id, { url });
}
}
});
chrome.omnibox.onInputEntered.addListener(async (text) => {
- const shortifyData = await getShortifyData();
- const url = `${shortifyData.domain}/s/${text}`;
+ const slashData = await getSlashData();
+ const url = `${slashData.domain}/s/${text}`;
return chrome.tabs.update({ url });
});
diff --git a/extension/common.js b/extension/common.js
index 124a240..a071429 100644
--- a/extension/common.js
+++ b/extension/common.js
@@ -1,10 +1,10 @@
-export const getShortifyData = () => {
+export const getSlashData = () => {
return new Promise((resolve, reject) => {
- chrome.storage.local.get(["shortify"], (data) => {
- if (data?.shortify) {
- resolve(data.shortify);
+ chrome.storage.local.get(["slash"], (data) => {
+ if (data?.slash) {
+ resolve(data.slash);
} else {
- reject("shortify data not found");
+ reject("slash data not found");
}
});
});
diff --git a/extension/manifest.json b/extension/manifest.json
index 03eed63..3204b7d 100644
--- a/extension/manifest.json
+++ b/extension/manifest.json
@@ -1,5 +1,5 @@
{
- "name": "Shortify",
+ "name": "Slash",
"description": "",
"version": "0.1.0",
"manifest_version": 3,
diff --git a/extension/popup.html b/extension/popup.html
index 77907c4..cf23c3a 100644
--- a/extension/popup.html
+++ b/extension/popup.html
@@ -1,7 +1,7 @@
- Shortify is a bookmarking and short link service that allows you to save and share links + Slash is a bookmarking and short link service that allows you to save and share links easily.