Giter VIP home page Giter VIP logo

briefkasten's Introduction

📮 Briefkasten

GitHub deployments GitHub issues Checkly GitHub Demo

Briefkasten (EN: Mailbox) - am Haus- oder Wohnungseingang angebrachter Behälter für die dem Empfänger zugestellten [Post]sendungen

Self-hosted bookmarking application. Works with any Prisma compatible database (MySQL, Postgres, SQLite, etc.)

Warning

Briefkasten v2 is currently available in beta at https://dev.briefkastenhq.com

After the beta period, the database will be dropped, so that we can migrate all existing data from the current (v1) briefkastenhq.com over to the new version. I'm working on the new docs already, but the v1 docs are of course still available. If you find any bugs, or otherwise want to help, you can contribute at ndom91/sveltekasten or ndom91/briefkasten-docs.

Free Instance: briefkastenhq.com [Docs]

📸 Screenshots

🎩 Features

  • Save by Browser Extension
  • Automatic title and description extraction
  • Drag-and-drop URLs on page to save
  • Keyboard shortcuts
  • Organise by categories and tags
  • Import and export bookmarks from standard HTML format
  • Bookmark image fetching background job
  • Multiple views
  • Fulltext search
  • REST API
  • OAuth + Email magic link login

🧺 Prerequisites

To self-host this application, you'll need the following thins:

  1. Server / hosting platform for a Next.js application (i.e. Vercel / Netlify)
  2. For OAuth login, a developer account at any one of the providers supported by NextAuth.js
  3. Database that works with Prisma (i.e. MySQL, Postgres, SQLite, etc.)
  4. Image hosting space (i.e. Supabase / ImageKit / Cloudinary) (optional)

These are all relatively straight forward, other than the image hoster. This was chosen to avoid putting the images in the database. The example application at briefkastenhq.com is using Supabase Storage, but any other similar provider like Cloudinary or a simple S3 Bucket would also do the job. I chose Supabase, because they have an easy to use SDK, a decent free tier, and I was already using their Postgres service.

After you've got an account setup at all of the above providers, or have your own infrastructure ready to go, you can continue on to the next steps below.

🚀 Getting Started

  1. Clone the repository
$ git clone [email protected]:ndom91/briefkasten.git && cd briefkasten
  1. Install dependencies
$ pnpm install
  1. Copy the .env.example file to .env, and open it with your favorite text editor to fill in your environment variables.
$ cp .env.example .env
$ vim .env

In this environment variables file, make sure to at least fill in the DATABASE_URL, NEXTAUTH_URL and NEXTAUTH_SECRET. The rest of the environment variables depend on the services / features you want to use. For example, Google/Github for OAuth login and/or Supabase for object storage.

  1. Start the server!
// First time only
$ pnpm db:push

// dev
$ pnpm dev

// prod
$ pnpm build
$ pnpm start

🐳 Docker

You can also self-host Briefkasten with Docker. To do so, you must:

  1. Install docker and docker-compose.
  2. Clone the repository and copy the .env.example to .env file.
    1. Here you also need to fill out the DATABASE_URL and NEXTAUTH_* environment variables at minimum.
    2. The DATABASE_URL for the postgres container should be DATABASE_URL=postgres://bkAdmin:briefkasten@postgres:5432/briefkasten?sslmode=disable
  3. Run docker-compose up -d in the root of the repository. This will start the application as well as the database for you.
  4. After the initial start, you still have to manually seed the database. This is most easily done through the app container (bk-app).
    1. Run docker exec -it bk-app /bin/bash to enter a terminal session inside the container.
    2. Then run pnpm db:push inside the container. This will push the database schema from prisma to the configured database.
  5. Now your application and database should be up and running at the default http://localhost:3000

More details can be found in the Docker section of the docs.

🕸 Related

📲 Save from Android Share Menu

With this open-source application HTTP Shortcuts, you can create a "Share Menu" item which executes a POST request with dynamic input, i.e. a web page's URL and title. This makes it super easy to share items from your phone to Briefkasten! More information in the docs.

🌍 Browser Extension

There is a companion browser extension in the works which you can use to add websites to your vault while browsing the web. It can be found at ndom91/briefkasten-extension and in the Chrome Extension Store. More details in that repository.

🧑‍🏭 Screenshot Job

There is also a background job to fill in bookmarks which do not have a valid image. It can be found in the ndom91/briefkasten-scrape repository. This job runs every 2 hours in a Github Action and processes 10 bookmarks at a time.

👷 Contributing

This project is open to any and all contributions! Please stick to the ESLint / Prettier settings and I'll be happy to take a look at your issue / PR 😀

📝 License

MIT

briefkasten's People

Contributors

celber avatar eldermael avatar ndom91 avatar sabirovrinat85 avatar shubhank-saxena avatar woolfyx avatar zackchadwick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

briefkasten's Issues

Unable to set up extension for docker deployment

Describe the bug

When attempting to set up the chrome extension for use with a docker instance, it instantly fails with a "Connection failed" error. The logs show an issue with SUPABASE, however:

today at 12:23:09 PMError: Missing env.SUPABASE_URL
today at 12:23:09 PM    at Object.671 (/app/.next/server/chunks/220.js:71:38)
today at 12:23:09 PM    at __webpack_require__ (/app/.next/server/webpack-api-runtime.js:25:42)
today at 12:23:09 PM    at Object.2726 (/app/.next/server/pages/api/bookmarks.js:102:77)
today at 12:23:09 PM    at __webpack_require__ (/app/.next/server/webpack-api-runtime.js:25:42)
today at 12:23:09 PM    at __webpack_exec__ (/app/.next/server/pages/api/bookmarks.js:483:39)
today at 12:23:09 PM    at /app/.next/server/pages/api/bookmarks.js:484:70
today at 12:23:09 PM    at Function.__webpack_require__.X (/app/.next/server/webpack-api-runtime.js:108:21)
today at 12:23:09 PM    at /app/.next/server/pages/api/bookmarks.js:484:47
today at 12:23:09 PM    at Object.<anonymous> (/app/.next/server/pages/api/bookmarks.js:487:3)
today at 12:23:09 PM    at Module._compile (node:internal/modules/cjs/loader:1126:14)

Expected Results - Using the base URL and the provided API key, extension would be set up. Based on documentation, Supabase was not a requirement.

Attempts to browse to the api (https://briefkasten.tld/api/*) are unsuccessful, as are test attempts at directly posting to the API through a direct POST request.

Reproduction

  1. Install official extension
  2. Put in base url (https://briefkasten.tld) and token
  3. Instant failure to connect

System Info

System:
    OS: Linux 5.4 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
    CPU: (2) x64 AMD PRO A4-8350B R5, 6 Compute Cores 2C+4G
    Memory: 25.79 GB / 30.32 GB
    Container: Yes
    Shell: 5.1.4 - /bin/bash
  Binaries:
    Node: 16.17.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 8.15.0 - /usr/local/bin/npm

Used Package Manager

n/a

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Route /auth/signin returns a 500 error

Describe the bug

Route /auth/signin returns a 500 error
Local build returns the page correctly
Sorry if this is an obvious one, I’m not familiar with Nextjs at all, just really curious about this app

Reproduction

https://briefkasten-error-auth-signin.vercel.app/

System Info

Vercel, node 16

Used Package Manager

npm

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Next-auth.js seem to don't work with authentik provider

Describe the bug

Hi,

I have issue with next-auth.js. I have configured a provider (authentik), but it's seem to not work. I have a 500 in frontend and my log show :

[next-auth][error][CLIENT_FETCH_ERROR] 
https://next-auth.js.org/errors#client_fetch_error fetch failed {
  error: {
    message: 'fetch failed',
    stack: 'TypeError: fetch failed\n' +
      '    at Object.fetch (node:internal/deps/undici/undici:11118:11)\n' +
      '    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)',
    name: 'TypeError'
  },
  url: 'http://localhost:3000/api/auth/providers',
  message: 'fetch failed'
}
[next-auth][error][CLIENT_FETCH_ERROR] 
https://next-auth.js.org/errors#client_fetch_error fetch failed {
  error: {
    message: 'fetch failed',
    stack: 'TypeError: fetch failed\n' +
      '    at Object.fetch (node:internal/deps/undici/undici:11118:11)\n' +
      '    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)',
    name: 'TypeError'
  },
  url: 'http://localhost:3000/api/auth/csrf',

My config is :

# REQUIRED - Prisma / Supabase
DATABASE_URL=postgres://briefkasten:[redacted]@localhost:5432/briefkasten

# REQUIRED - NextAuth.js
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=[redacted]


AUTHENTIK_ISSUER=https://auth.[redacted]/application/o/briefkasten/
AUTHENTIK_ID=[redacted]
AUTHENTIK_SECRET=[redacted]

GITHUB_ID=
GITHUB_SECRET=

GOOGLE_ID=
GOOGLE_SECRET=

# Optional - Only required if you want to use the Email Provider for NextAuth.js
SMTP_SERVER=
SMTP_FROM=

# Optional - Supabase
# Only required if you want to use cloud object storage for Bookmark screenshots
SUPABASE_KEY=
SUPABASE_URL=

Reproduction

Try to use authentik as next-auth.js provider.

System Info

System:
    OS: Linux 6.0 Fedora Linux 37 (Cloud Edition)
    CPU: (2) x64 Common KVM processor
    Memory: 1.42 GB / 1.92 GB
    Container: Yes
    Shell: 5.2.9 - /bin/bash
  Binaries:
    Node: 18.12.1 - /usr/bin/node

Used Package Manager

pnpm

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Build error in `e97580f96455fd690f57cf16f700dcae98f1c8d3`

Describe the bug

When running pnpm build, the following error occurred:

> [email protected] build /srv/briefkasten/briefkasten
> next build

info  - Loaded env from /srv/briefkasten/briefkasten/.env
warn  - Invalid next.config.js options detected: 
  - The root value has an unexpected property, sentry, which is not in the list of allowed properties (amp, analyticsId, assetPrefix, basePath, cleanDistDir, compiler, compress, crossOrigin, devIndicators, distDir, env, eslint, excludeDefaultMomentLocales, experimental, exportPathMap, generateBuildId, generateEtags, headers, httpAgentOptions, i18n, images, modularizeImports, onDemandEntries, optimizeFonts, output, outputFileTracing, pageExtensions, poweredByHeader, productionBrowserSourceMaps, publicRuntimeConfig, reactStrictMode, redirects, rewrites, sassOptions, serverRuntimeConfig, skipMiddlewareUrlNormalize, skipTrailingSlashRedirect, staticPageGenerationTimeout, swcMinify, trailingSlash, transpilePackages, typescript, useFileSystemPublicRoutes, webpack).

See more info here: https://nextjs.org/docs/messages/invalid-next-config

Failed to compile.

./src/components/banner.jsx
4:42  Error: Replace `y-3·px` with `x-3·py`  prettier/prettier

./src/components/bookmark-card.jsx
55:32  Error: Replace `top-3·right` with `right-3·top`  prettier/prettier

./src/components/categoryTableRow.jsx
107:87  Error: Replace `y-1·px-2` with `x-2·py-1`  prettier/prettier

./src/components/chip.jsx
3:96  Error: Replace `y-1·px-3` with `x-3·py-1`  prettier/prettier

./src/components/dashboard-header.jsx
73:67  Error: Replace `y-1·px-2` with `x-2·py-1`  prettier/prettier

./src/components/empty-dashboard.jsx
34:101  Error: Replace `y-0·md:space-x-1` with `x-1·md:space-y-0`  prettier/prettier
37:82  Error: Replace `y-2·px-6` with `x-6·py-2`  prettier/prettier

./src/components/footer.jsx
3:90  Error: Replace `t-2·pb-6` with `b-6·pt-2`  prettier/prettier

./src/components/item-header.jsx
56:37  Error: Replace `t-0·lg:ml-4` with `l-4·lg:mt-0`  prettier/prettier
112:53  Error: Replace `mt-2·-mr-1` with `-mr-1·mt-2`  prettier/prettier

./src/components/layout.jsx
16:37  Error: Replace `top-0·left` with `left-0·top`  prettier/prettier

./src/components/modal.jsx
45:48  Error: Replace `t-5·pb-4` with `b-4·pt-5`  prettier/prettier
63:58  Error: Replace `t-0·sm:ml-4` with `l-4·sm:mt-0`  prettier/prettier
126:275  Error: Replace `t-0·sm:ml-3` with `l-3·sm:mt-0`  prettier/prettier

./src/components/pagination.jsx
39:30  Error: Replace `left-1/2·bottom-4` with `bottom-4·left-1/2`  prettier/prettier

./src/components/quick-add.jsx
150:37  Error: Replace `right-8·bottom-24` with `bottom-24·right-8`  prettier/prettier
364:86  Error: Replace `y-2·px-4` with `x-4·py-2`  prettier/prettier
450:133  Error: Replace `y-2·px-4` with `x-4·py-2`  prettier/prettier
501:49  Error: Replace `top-0·left` with `left-0·top`  prettier/prettier

./src/components/sidebar.jsx
417:32  Error: Replace `l-2·mb-4` with `b-4·ml-2`  prettier/prettier
513:47  Error: Replace `left-0·bottom-16` with `bottom-16·left-0`  prettier/prettier

./src/components/slide-out.jsx
138:46  Error: Replace `top-0·left-0·-ml-8·flex·pt-4·pr-2` with `left-0·top-0·-ml-8·flex·pr-2·pt-4`  prettier/prettier
194:47  Error: Replace `top-2·right` with `right-2·top`  prettier/prettier
417:88  Error: Replace `y-2·px-4` with `x-4·py-2`  prettier/prettier
503:136  Error: Replace `y-2·px-4` with `x-4·py-2`  prettier/prettier
541:90  Error: Replace `transparent·border-slate-600·py-2·px-4` with `slate-600·border-transparent·px-4·py-2`  prettier/prettier

./src/components/tagTableRow.jsx
107:87  Error: Replace `y-1·px-2` with `x-2·py-1`  prettier/prettier

./src/components/toastContainer.jsx
8:47  Error: Replace `top-4·right-4·z-50·flex·w-2/3·max-w-md·flex-col·items-end·sm:top-10·sm:right` with `right-4·top-4·z-50·flex·w-2/3·max-w-md·flex-col·items-end·sm:right-10·sm:top`  prettier/prettier

./src/components/toastElements.jsx
37:27  Error: Replace `top-2·right` with `right-2·top`  prettier/prettier
91:27  Error: Replace `top-2·right` with `right-2·top`  prettier/prettier
145:27  Error: Replace `top-2·right` with `right-2·top`  prettier/prettier

./src/pages/auth/signin.jsx
108:34  Error: Replace `top-0·left-0·z-10·flex·h-[250%]·w-[110%]·translate-x-[-55%]·translate-y-[-28%]·rotate-[22deg]·items-center·bg-slate-900·md:w-[70%]·md:translate-y-[-20%]·md:translate-x-[-3` with `left-0·top-0·z-10·flex·h-[250%]·w-[110%]·translate-x-[-55%]·translate-y-[-28%]·rotate-[22deg]·items-center·bg-slate-900·md:w-[70%]·md:translate-x-[-30%]·md:translate-y-[-2`  prettier/prettier
198:122  Error: Replace `y-2·px-4` with `x-4·py-2`  prettier/prettier
210:28  Error: Replace `top-0·right` with `right-0·top`  prettier/prettier

./src/pages/categories.jsx
104:72  Error: Replace `y-1·px-2` with `x-2·py-1`  prettier/prettier
161:95  Error: Replace `y-1·px-2` with `x-2·py-1`  prettier/prettier
167:100  Error: Replace `y-1·px-2` with `x-2·py-1`  prettier/prettier

./src/pages/index.jsx
123:6  Warning: React Hook useEffect has a missing dependency: 'nextauth.user'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./src/pages/settings.jsx
209:57  Error: Replace `y-1·px-2` with `x-2·py-1`  prettier/prettier

./src/pages/tags.jsx
105:72  Error: Replace `y-1·px-2` with `x-2·py-1`  prettier/prettier
160:95  Error: Replace `y-1·px-2` with `x-2·py-1`  prettier/prettier
166:100  Error: Replace `y-1·px-2` with `x-2·py-1`  prettier/prettier

info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
info  - Linting and checking validity of types . ELIFECYCLE  Command failed with exit code 1.

Commit: e97580f96455fd690f57cf16f700dcae98f1c8d3

Reproduction

Clone the repository > pnpm install > pnpm build

System Info

OS: Debian `12.0`
Node.js: `v16.20.0`
pnpm: `7.5.1`

Used Package Manager

pnpm

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Dockerfile for easier self-hosted deployment

Clear and concise description of the problem

Like for many other self-hosted applications, it is far easier to do that if there's a Dockerfile or an image directly available.
Of course, making an image publicly available through, for example, Docker hub isn't that necessary, but at least a Dockerfile should be made available.

Suggested solution

I, personally, have written some Dockerfiles myself, so I could create an initial one, and we can further discuss on how to improve it.
I'll create a PR for it, and we can discuss it in there.

Alternative

No response

Additional context

No response

Validations

  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Unable to login - Frontend indicated "Oops"

Describe the bug

I ran with docker config. I think I did all the step correctly but just changed ports of bk-app to 3066 for preference. However, everytime I load, I get:

`> [email protected] start /app,�

next start,
ready - started server on 0.0.0.0:3066, url: http://localhost:3066,
warn - You have enabled experimental features (legacyBrowsers, browsersListForSwc, images) in next.config.mjs.,
warn - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.,
info - SWC minify release candidate enabled. https://nextjs.link/swcmin,
TypeError: Cannot convert undefined or null to object,
at Function.keys (),
at Signin (/app/.next/server/pages/auth/signin.js:57:43),
at Wc (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:68:44),
at Zc (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:70:253),
at Z (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89),
at $c (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:78:98),
at bd (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:77:404),
at Z (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:217),
at Zc (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:74:209),
at Z (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89),
TypeError: Cannot convert undefined or null to object,
at Function.keys (),
at Signin (/app/.next/server/pages/auth/signin.js:57:43),
at Wc (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:68:44),
at Zc (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:70:253),
at Z (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89),
at $c (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:78:98),
at bd (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:77:404),
at Z (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:217),
at Zc (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:74:209),
at Z (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89),
TypeError: Cannot convert undefined or null to object,
at Function.keys (),
at Signin (/app/.next/server/pages/auth/signin.js:57:43),
at Wc (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:68:44),
at Zc (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:70:253),
at Z (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89),
at $c (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:78:98),
at bd (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:77:404),
at Z (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:217),
at Zc (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:74:209),
at Z (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89),
TypeError: Cannot convert undefined or null to object,
at Function.keys (),
at Signin (/app/.next/server/pages/auth/signin.js:57:43),
at Wc (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:68:44),
at Zc (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:70:253),
at Z (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89),
at $c (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:78:98),
at bd (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:77:404),
at Z (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:217),
at Zc (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:74:209),
at Z (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89),`

I know the issue is me, but I can't seem to figure it out. Since it's local, I did not set credentials, and I think that's where the issue is. But if that's the case, what are my options as GitHub or Google would require public facing, right?

Also, I only know enough to get myself I trouble, obviously..

Great work tho!

Reproduction

https://github.com/tj31moll/briefkasten

System Info

System:
    OS: Linux 4.19 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
    CPU: (2) x64 Common KVM processor
    Memory: 3.53 GB / 4.53 GB
    Container: Yes
    Shell: 5.1.4 - /bin/bash
  Binaries:
    Node: 16.17.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 8.15.0 - /usr/local/bin/npm

Used Package Manager

npm

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Unable to permanently delete account

I appreciate the work that you've been doing on this project, but there are some features that still need to be ironed out before switching from raindrop. For the time being, I wish to delete my account, yet I couldn't find the option in the account settings.

Allow changing port 3000

Clear and concise description of the problem

I have another self hosted doodad using port 3000 already, and I can't figure out how to make briefkasten use a different port.

Suggested solution

It would be nice to change this from the .env file.

Alternative

No response

Additional context

No response

Validations

  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Demo briefkasten seems to be compromised

Describe the bug

Used Google To log into the demo Server.
Google flagged it as harmful, it Got my Steam account hacked.
Has to originate from this since it started right after.

Reproduction

Log into the demo Server with Google Account

System Info

Win 10 | Brave Browser|

Used Package Manager

n/a

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Allow to disable sign up

Clear and concise description of the problem

I'm using github as oauth provider and so far it worked without any issue (although it would be very nice, if the callback url could be added to the docs 😅).
But now I don't want anyone else to register to my instance, since I'm the only one using it.
It would be nice if there was a environment variable (let's say DISABLE_REGISTRATION) or something, to prevent new users from registering. I know that I can customize the code, but since I'm running briefkasten in a docker environment using the pre-build image this is not really an option.
I can imagine that this is quite a popular use case, that once all member have registered, the admin wants to disable further registrations, so his instance it not used by the whole wide world.

Suggested solution

Add environment variable that disabled further registration.

Alternative

No response

Additional context

No response

Validations

  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Error 500 After setting up with Docker

Describe the bug

After following the install instructions for the Docker image, I get error 500 when I visit the URL.

https://i.imgur.com/hxnyD41.png

Reproduction

Every Time I Setup the Docker Image

System Info

Ubuntu 22.04

Server: Docker Engine - Community
 Engine:
  Version:          20.10.21
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.18.7
  Built:            Tue Oct 25 17:59:49 2022
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.12
 runc:
  Version:          1.1.4
 docker-init:
  Version:          0.19.0

Used Package Manager

n/a

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Move/Import data from pocket

Clear and concise description of the problem

Move it with tags
and maybe add a dash to tags with spaces to solve the problem
For example "web dev" -> "web-dev"

Suggested solution

Just support the html file that is exported from pocket

Alternative

No response

Additional context

No response

Validations

  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Not able to save the bookmark

Describe the bug

I am trying to save the bookmark on the UI but it's throwing the error.
Note - I am running my server on raspberry pi 4b

error - ReferenceError: performance is not defined
    at Object.start (webpack-internal:///(api)/./src/lib/helpers.js:27:24)
    at handler (webpack-internal:///(api)/./src/pages/api/bookmarks/index.js:119:72)
    at async Object.apiResolver (/srv/dev-disk-by-label-media/Files/AppData/Config/briefkasten/briefkasten/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/api-utils/node.js:179:9)
    at async DevServer.runApi (/srv/dev-disk-by-label-media/Files/AppData/Config/briefkasten/briefkasten/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/next-server.js:381:9)
    at async Object.fn (/srv/dev-disk-by-label-media/Files/AppData/Config/briefkasten/briefkasten/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/base-server.js:497:37)
    at async Router.execute (/srv/dev-disk-by-label-media/Files/AppData/Config/briefkasten/briefkasten/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/router.js:213:36)
    at async DevServer.run (/srv/dev-disk-by-label-media/Files/AppData/Config/briefkasten/briefkasten/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/base-server.js:616:29)
    at async DevServer.run (/srv/dev-disk-by-label-media/Files/AppData/Config/briefkasten/briefkasten/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/dev/next-dev-server.js:532:20)
    at async DevServer.handleRequest (/srv/dev-disk-by-label-media/Files/AppData/Config/briefkasten/briefkasten/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/base-server.js:317:20) {
  page: '/api/bookmarks'
}
  30 |     serverTiming.timings = {
  31 |       total: {
> 32 |         start: performance.now(),
     |               ^
  33 |       },
  34 |     }
  35 |   },

Reproduction

Run the server and save the bookmark

System Info

System:
    OS: Linux 5.15 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
    CPU: (4) arm64 unknown
    Memory: 712.83 MB / 3.72 GB
    Container: Yes
    Shell: 5.1.4 - /bin/bash
  Binaries:
    Node: 14.19.3 - /usr/bin/node
    Yarn: 1.22.19 - /usr/bin/yarn
    npm: 6.14.17 - /usr/bin/npm
  Browsers:
    Firefox: 91.9.1esr

Used Package Manager

pnpm

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Sentry CLI Failing - Proposition for env variable to disable telemetry

Describe the bug

Sentry CLI causing Failed Builds.
Sentry CLI API request failing because of SSL peer certificate or SSH remote key was not OK.

This happens in the image building process of docker at Stage 7/7 RUN pnpm build

Output log of this stage:

#0 3.523
#0 3.523 > [email protected] build /app
#0 3.523 > next build
#0 3.523
#0 4.359 warn  - You have enabled experimental features (legacyBrowsers, browsersListForSwc) in next.config.mjs.
#0 4.359 warn  - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.
#0 4.359
#0 4.599 Attention: Next.js now collects completely anonymous telemetry regarding usage.
#0 4.600 This information is used to shape Next.js' roadmap and prioritize features.
#0 4.600 You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
#0 4.600 https://nextjs.org/telemetry
#0 4.600
#0 5.137 info  - Linting and checking validity of types...
#0 14.94
#0 14.94 ./src/pages/index.jsx
#0 14.94 123:6  Warning: React Hook useEffect has a missing dependency: 'nextauth.user'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
#0 14.94
#0 14.94 info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
#0 15.01 info  - Creating an optimized production build...
#0 55.41 Failed to compile.
#0 55.41
#0 55.41 Sentry CLI Plugin: Command failed: /app/node_modules/.pnpm/@[email protected]/node_modules/@sentry/cli/sentry-cli releases new wGc6VlB6l9Br9FQAYwq7F
#0 55.41 error: API request failed
#0 55.41   caused by: [60] SSL peer certificate or SSH remote key was not OK (SSL certificate problem: unable to get local issuer certificate)
#0 55.41
#0 55.41 Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.
#0 55.41 Please attach the full debug log to all bug reports.
#0 55.41
#0 55.41 Sentry CLI Plugin: Command failed: /app/node_modules/.pnpm/@[email protected]/node_modules/@sentry/cli/sentry-cli releases new wGc6VlB6l9Br9FQAYwq7F
#0 55.41 error: API request failed
#0 55.41   caused by: [60] SSL peer certificate or SSH remote key was not OK (SSL certificate problem: unable to get local issuer certificate)
#0 55.41
#0 55.41 Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.
#0 55.41 Please attach the full debug log to all bug reports.
#0 55.41
#0 55.41
#0 55.41 > Build failed because of webpack errors

Proposition to also have an environment variable for disabling telemetry.

Reproduction

Cloning Repo > Setting Environment Variables > docker compose up > FAILING IN BUILDING

System Info

System:
    OS: Linux 5.4 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
    CPU: (8) x64 Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz
    Memory: 13.25 GB / 20.00 GB
    Container: Yes
    Shell: 5.1.4 - /bin/bash
  Binaries:
    Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node
    npm: 8.15.0 - ~/.nvm/versions/node/v16.17.0/bin/npm

Used Package Manager

pnpm

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Android Share Error

Describe the bug

I followed the guide in the docs on how to implement the HTTP shortcut.
All variables have been changed and when I share something with the new shortcut it works but also throws an error.
However, the bookmark is still created in the web app, but without any possibility to edit the title or tags.

Error on phone:
Briefkasten failed with status code 500 (Internal Server Error)

Error in docker logs:

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
TypeError: Cannot read properties of undefined (reading 'includes')
    at handler (/app/.next/server/pages/api/bookmarks.js:365:49)
    at async /app/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@sentry/nextjs/cjs/server/wrapApiHandlerWithSentry.js:143:33
    at async Object.apiResolver (/app/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/server/api-utils/node.js:372:9)
    at async NextNodeServer.runApi (/app/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/server/next-server.js:488:9)
    at async Object.fn (/app/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/server/next-server.js:751:37)
    at async Router.execute (/app/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/server/router.js:253:36)
    at async NextNodeServer.run (/app/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/server/base-server.js:384:29)
    at async NextNodeServer.handleRequest (/app/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/server/base-server.js:322:20)

Reproduction

Add HTTP shortcut and try to share any link

System Info

Pixel 6 Android 13 (latest update)
Briefkasten Docker

Used Package Manager

npm

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Support Archival Features for Bookmarks

Clear and concise description of the problem

Currently, Briefkasten Bookmark Manager is a fantastic tool for managing bookmarks and keeping track of interesting webpages. However, it lacks support for archival features, which would greatly enhance its functionality. This issue proposes adding the ability to archive bookmarked pages so that users can still access the content even if the original webpage is no longer available on the web.

The addition of archival features to Briefkasten Bookmark Manager would allow users to capture and store a copy of the bookmarked page. This could be achieved by implementing a web page archiving mechanism that saves a snapshot of the page's content and associated metadata at the time of bookmarking. The archived version of the webpage would be accessible even if the original URL becomes inaccessible or the content changes.

Suggested solution

The archival feature can be implemented using web archiving tools such as Wayback Machine or by leveraging existing libraries, such as ArchiveBox or pywb. These tools provide APIs or command-line interfaces that allow programmatic access to web archiving services. Integrating one of these solutions within the Briefkasten Bookmark Manager codebase would enable users to archive and retrieve bookmarked pages seamlessly.

Alternative

No response

Additional context

Expected Benefits:

  • Preserving Valuable Content: Archiving bookmarked pages ensures that users can access the content they saved, even if the webpage is later removed or altered.

  • Reliable Offline Access: Users can view bookmarked pages without an internet connection, making the bookmark manager useful for offline research or reference purposes.

  • Historical Record: Archiving pages creates a historical record of web content, allowing users to revisit older versions of webpages and observe changes over time.

  • Enhanced Data Integrity: With archived copies, users can verify the accuracy and authenticity of bookmarked content, even if the original page undergoes modifications.

Validations

  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Error in docker build

Describe the bug

.../node_modules/bufferutil install: gyp ERR! find Python
.../node_modules/bufferutil install: gyp ERR! find Python Python is not set from command line or npm configuration
.../node_modules/bufferutil install: gyp ERR! find Python Python is not set from environment variable PYTHON
.../node_modules/bufferutil install: gyp ERR! find Python checking if "python3" can be used
.../node_modules/bufferutil install: gyp ERR! find Python - "python3" is not in PATH or produced an error
.../node_modules/bufferutil install: gyp ERR! find Python checking if "python" can be used
.../node_modules/bufferutil install: gyp ERR! find Python - "python" is not in PATH or produced an error
.../node_modules/bufferutil install: gyp ERR! find Python
.../node_modules/bufferutil install: gyp ERR! find Python **********************************************************
.../node_modules/bufferutil install: gyp ERR! find Python You need to install the latest version of Python.
.../node_modules/bufferutil install: gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
.../node_modules/bufferutil install: gyp ERR! find Python you can try one of the following options:
.../node_modules/bufferutil install: gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
.../node_modules/bufferutil install: gyp ERR! find Python   (accepted by both node-gyp and npm)
.../node_modules/bufferutil install: gyp ERR! find Python - Set the environment variable PYTHON
.../node_modules/bufferutil install: gyp ERR! find Python - Set the npm configuration variable python:
.../node_modules/bufferutil install: gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
.../node_modules/bufferutil install: gyp ERR! find Python For more information consult the documentation at:
.../node_modules/bufferutil install: gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
.../node_modules/bufferutil install: gyp ERR! find Python **********************************************************
.../node_modules/bufferutil install: gyp ERR! find Python
.../node_modules/bufferutil install: gyp ERR! configure error
.../node_modules/bufferutil install: gyp ERR! stack Error: Could not find any Python installation to use
.../node_modules/bufferutil install: gyp ERR! stack     at PythonFinder.fail (/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/find-python.js:330:47)
.../node_modules/bufferutil install: gyp ERR! stack     at PythonFinder.runChecks (/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/find-python.js:159:21)
.../node_modules/bufferutil install: gyp ERR! stack     at PythonFinder.<anonymous> (/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/find-python.js:202:16)
.../node_modules/bufferutil install: gyp ERR! stack     at PythonFinder.execFileCallback (/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/find-python.js:294:16)
.../node_modules/bufferutil install: gyp ERR! stack     at exithandler (node:child_process:408:5)
.../node_modules/bufferutil install: gyp ERR! stack     at ChildProcess.errorhandler (node:child_process:420:5)
.../node_modules/bufferutil install: gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
.../node_modules/bufferutil install: gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
.../node_modules/bufferutil install: gyp ERR! stack     at onErrorNT (node:internal/child_process:478:16)
.../node_modules/bufferutil install: gyp ERR! stack     at processTicksAndRejections (node:internal/process/task_queues:83:21)
.../node_modules/bufferutil install: gyp ERR! System Linux 5.15.61-v8+
.../node_modules/bufferutil install: gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
.../node_modules/bufferutil install: gyp ERR! cwd /app/node_modules/.pnpm/[email protected]/node_modules/bufferutil
.../node_modules/bufferutil install: gyp ERR! node -v v16.17.0
.../node_modules/bufferutil install: gyp ERR! node-gyp -v v9.1.0
.../node_modules/bufferutil install: gyp ERR! not ok
.../node_modules/bufferutil install: Failed
 ELIFECYCLE  Command failed with exit code 1.
The command '/bin/sh -c pnpm install --frozen-lockfile' returned a non-zero code: 1
ERROR: Service 'app' failed to build : Build failed

Reproduction

Docker building

System Info

System:
    OS: Linux 5.15 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
    CPU: (4) arm64 unknown
    Memory: 405.04 MB / 3.72 GB
    Container: Yes
    Shell: 5.1.4 - /bin/bash
  Binaries:
    Node: 14.20.1 - /usr/bin/node
    Yarn: 1.22.19 - /usr/bin/yarn
    npm: 6.14.17 - /usr/bin/npm
  Browsers:
    Firefox: 102.3.0esr

Used Package Manager

pnpm

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Öffentliche Lesezeichen

Clear and concise description of the problem

Hallo,
danke für die tolle App!
Ich suche eine solche Lösung für mein Unternehmen - da wäre es aber zwingend erforderlich, öffentliche Lesezeichen zu haben, also solche, die für alle Nutzer sichtbar sind.
Wäre es möglich, dieses Feature in Briefkasten zu implementieren?

Suggested solution

public bookmarks

Alternative

No response

Additional context

No response

Validations

  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Self-hosting with docker: how to fetch thumbnails?

Hello,

I just installed briefkasten using docker, everything is working except that it just fetches placeholder images, how can I make it work?

I am using supabase.

Also, can the images be hosted locally? (it's running on an archlinux vps at aws; EDIT: served via Apache reverse proxy)

thanks for the awesome app.

Allow to change order via drag'n'drop

Clear and concise description of the problem

It would be very nice, if we could change the order of the bookmarks via drag'n'drop. So I can put my most important things at the top of the list.

Suggested solution

Add bookmark ordering via drag'n'drop

Alternative

No response

Additional context

No response

Validations

  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Docker Setup Error after inserting email adress /api/auth/error

Describe the bug

Hey. I just setup the application with docker-compose behind a traeffik application that is behind a reverse proxy. I setup the app and postgress container and configured the env as pasted in reproduction.

Now when I open my domain I see the page and can enter my email adress in order to get a link. After I press "Submit Query" with the mail put in I get this and no error in the docker logs.
What could be the problem here?
image

I hope you can help me out.

Reproduction

Docker Setup

System Info

(I added ***** everywhere to not expose my domain. It is not like that in my actual env)

`
COMPOSE_PROJECT_NAME=lno-links
# REQUIRED - Prisma / Supabase
DATABASE_URL=postgres://bkAdmin:briefkasten@postgres:5432/briefkasten?sslmode=disable

# REQUIRED - NextAuth.js
NEXTAUTH_URL=http://links.******:3000
NEXTAUTH_SECRET=3f277d4ddb6c44b8923372803fb3c33c85403add777a6e9aab391be2e169ea67
 # Run `openssl rand -hex 32`

GITHUB_ID=
GITHUB_SECRET=

GOOGLE_ID=
GOOGLE_SECRET=

# Optional - Only required if you want to use the Email Provider for NextAuth.js
SMTP_SERVER="smtp://noreply@servicemailer.******69%##@*******:587"
SMTP_FROM=noreply@servicemailer.*******

# Optional - Supabase
# Only required if you want to use cloud object storage for Bookmark screenshots
SUPABASE_KEY=
SUPABASE_URL=
SUPABASE_BUCKET_ID=

#traeffik related env
HTTP_BACKEND_PORT=3000
HTTP_BACKEND_SCHEME=http
HTTPS_BACKEND_PORT=3000
HTTPS_BACKEND_SCHEME=http
DOMAIN=links.***********
`
My docker-compose looks like this:
`version: '3.6'

services:
  postgres:
    container_name: bk-postgres
    image: postgres
    restart: unless-stopped
    environment:
      - POSTGRES_USER=bkAdmin
      - POSTGRES_PASSWORD=briefkasten
      - POSTGRES_DB=briefkasten
    ports:
      - 5432:5432
    volumes:
      - ./briefkasten-db:/var/lib/postgresql/data
  app:
    container_name: bk-app
    build: .
    env_file:
      - .env
    restart: unless-stopped
    volumes:
      - /etc/hosts:/etc/hosts 
    ports:
      - 3000:3000
    labels:
      - traefik.enable=true
      - traefik.docker.network=frontend
      - traefik.http.routers.${COMPOSE_PROJECT_NAME}portal.rule=Host(`${DOMAIN}`)
      - traefik.http.routers.${COMPOSE_PROJECT_NAME}portal.entrypoints=web
      - traefik.http.services.${COMPOSE_PROJECT_NAME}portal.loadbalancer.server.port=${HTTP_BACKEND_PORT}
      - traefik.http.services.${COMPOSE_PROJECT_NAME}portal.loadbalancer.server.scheme=${HTTP_BACKEND_SCHEME}
      - traefik.http.routers.${COMPOSE_PROJECT_NAME}portal.service=${COMPOSE_PROJECT_NAME}portal
      - traefik.http.routers.${COMPOSE_PROJECT_NAME}portal_secure.tls=true
      - traefik.http.routers.${COMPOSE_PROJECT_NAME}portal_secure.rule=Host(`${DOMAIN}`)
      - traefik.http.routers.${COMPOSE_PROJECT_NAME}portal_secure.entrypoints=websecure
      - traefik.http.services.${COMPOSE_PROJECT_NAME}portal_secure.loadbalancer.server.port=${HTTPS_BACKEND_PORT}
      - traefik.http.services.${COMPOSE_PROJECT_NAME}portal_secure.loadbalancer.server.scheme=${HTTPS_BACKEND_SCHEME}
      - traefik.http.routers.${COMPOSE_PROJECT_NAME}portal_secure.service=${COMPOSE_PROJECT_NAME}portal
      - traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https
#      - traefik.http.routers.${COMPOSE_PROJECT_NAME}portal.middlewares=redirect-to-https

    depends_on:
      - 'postgres'

networks:
  default:
    external:
      name: frontend
`

I had to sync the /etc/hosts into the container to make the public domain point to localhost for the service itself so it could reach it. That is because of my network setup, but shouldn't be the problem here.

Used Package Manager

npm

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Supabase URL not being picked by

Describe the bug

Supabase is not being utilised. I already have set up SUPABASE_URL and SUPABASE_KEY in .env

wait  - compiling /api/bookmarks...
event - compiled successfully in 655 ms (117 modules)
SUPABASE_KEY, SUPABASE_URL or SUPABASE_BUCKET_ID missing - will not upload screenshots.
[next-auth][warn][EXPERIMENTAL_API]
`unstable_getServerSession` is experimental and may be removed or changed in the future, as the name suggested.
https://next-auth.js.org/configuration/nextjs#unstable_getServerSession}
https://next-auth.js.org/warnings#EXPERIMENTAL_API
[next-auth][debug][adapter_getSessionAndUser] { args: [ '313c24b3-2b4f-4ce0-b1dc-f867c0178d1d' ] }
[next-auth][debug][adapter_getSessionAndUser] { args: [ '313c24b3-2b4f-4ce0-b1dc-f867c0178d1d' ] }
[next-auth][debug][adapter_getSessionAndUser] { args: [ '313c24b3-2b4f-4ce0-b1dc-f867c0178d1d' ] }
[next-auth][debug][adapter_getSessionAndUser] { args: [ '313c24b3-2b4f-4ce0-b1dc-f867c0178d1d' ] }

Reproduction

Save a bookmark

System Info

System:
    OS: Linux 5.15 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
    CPU: (4) arm64 unknown
    Memory: 652.97 MB / 3.72 GB
    Container: Yes
    Shell: 5.1.4 - /bin/bash
  Binaries:
    Node: 14.19.3 - /usr/bin/node
    Yarn: 1.22.19 - /usr/bin/yarn
    npm: 6.14.17 - /usr/bin/npm
  Browsers:
    Firefox: 91.9.1esr

Used Package Manager

pnpm

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Multi arch docker file

Clear and concise description of the problem

It would be amazing if you could build a multi arch docker container. I prefer to have pre built dockers as I'm sure to have them updated without check each github for updates.
It can be built on arm64 (rpi 4) as I have it running right now without any issues, but it would be amazing to have it pre-built by default if possible.

Thank you for developing it, I've been looking for a nice looking bookmark manager for a while now. It's great.

Suggested solution

add different arch in the dockerfile before build and push

Alternative

No response

Additional context

No response

Validations

  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Adding Keycloak provider

Describe the bug

First of all I'm far from being a developer, so lacking some "admin-friendly" :) abilities and docs leads to hard understanding how to compose pieces in a right way (while all of them seems to be here)

I want to be able to use my Keycloak instance (which is already up and connected to OpenLDAP) in Breifkasten and to turn off other enabled auth capabilities (GitHub, Google, Magic link), and using Docker container (with PostgreSQL as DB) for it.

What I've done:

Wrote docker-compose.yml initially with official image for testing (port 5432 is already exposed, so here is 5433, and as I can see it, in docker-compose there's no need in exposing DB port because containers from the same yml config are placed in the same docker network, but anyway...), which after deploying gave - unsurprisingly - error 500 (there's no other providers in the image)

version: '3'

services:
  postgres:
    image: postgres
    restart: unless-stopped
    environment:
      POSTGRES_USER: bkAdmin
      POSTGRES_PASSWORD: HIDDEN_DB_PASS
      POSTGRES_DB: briefkasten
    ports:
      - "5433:5432"
    volumes:
      - db:/var/lib/postgresql/data
  app:
    image: ndom91/briefkasten:latest
    environment:
      DATABASE_URL: postgres://bkAdmin:HIDDEN_DB_PASS@briefkasten-postgres-1:5432/briefkasten?sslmode=disable
      NEXTAUTH_URL: https://briefkasten.HIDDENDOMAIN.ORG
      NEXTAUTH_SECRET: HIDDEN_RANDOM_SECRET
      KEYCLOAK_ID: briefkasten
      KEYCLOAK_SECRET: HIDDENSECRET_FROM_KEYCLOAKS_CLIENT_CONFIG_FOR_BRIEFKASTEN
      KEYCLOAK_ISSUER: https://keycloak.HIDDENDOMAIN.ORG/realms/briefkasten
    restart: unless-stopped
    ports:
      - "17080:3000"
    depends_on:
      - 'postgres'
volumes:
  db:

then

git clone [email protected]:ndom91/briefkasten.git

Added Keycloak provider and commented out other already included providers

nano src/pages/api/auth/[...nextauth].js

import NextAuth from 'next-auth'
import KeycloakProvider from 'next-auth/providers/keycloak'
#import GithubProvider from 'next-auth/providers/github'
#import GoogleProvider from 'next-auth/providers/google'
#import EmailProvider from 'next-auth/providers/email'
import { PrismaAdapter } from '@next-auth/prisma-adapter'
import prisma from '@/lib/prisma'

const providers = []

if (process.env.KEYCLOAK_ID) {
  providers.push(
    KeycloakProvider({
      clientId: process.env.KEYCLOAK_ID,
      clientSecret: process.env.KEYCLOAK_SECRET,
      issuer: process.env.KEYCLOAK_ISSUER,
    })
  )
}
#if (process.env.GITHUB_ID) {
#  providers.push(
#...CUTTING here too many commented out lines...
#      from: process.env.SMTP_FROM,
#    })
#  )
#}

export const authOptions = {
  adapter: PrismaAdapter(prisma),
  providers,
  pages: {
    signIn: '/auth/signin',
  },
  callbacks: {
    async session({ session, user }) {
      session.user.userId = user.id
      return session
    },
  },
  secret: process.env.NEXTAUTH_SECRET,
  debug: process.env.NODE_ENV !== 'production',
}

export default NextAuth(authOptions)

then launched

docker build -t sabirovrinat85/briefkasten:281222 .

which after some time of building process failed with this messages:

nfo  - Linting and checking validity of types...

Failed to compile.

./src/pages/api/auth/[...nextauth].js
Error: Parsing error: Private names are only allowed in property accesses (`obj.#import`) or in `in` expressions (`#import in obj`). (3:0)

./src/pages/index.jsx
123:6  Warning: React Hook useEffect has a missing dependency: 'nextauth.user'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
 ELIFECYCLE  Command failed with exit code 1.
The command '/bin/sh -c pnpm build' returned a non-zero code: 1

cannot grasp what do I need to add/delete/edit here... and I think that if for custom providers etc there's a need of editing source files and then building custom image, wouldn't it be much more convenient to map those "should edit" files in additional docker volume, so that users could use one image but accommodate it for their special requirements?

Reproduction

needs just a little editing of [...nextauth].js

System Info

System:
    OS: Linux 5.15 Arch Linux
    CPU: (6) x64 AMD Ryzen 5 4500U with Radeon Graphics
    Memory: 1.23 GB / 13.53 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 19.3.0 - /usr/bin/node
    npm: 8.19.2 - /usr/bin/npm
  Browsers:
    Firefox: 108.0.1

Used Package Manager

pnpm

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Tags can't be deleted from a bookmark

Describe the bug

  1. Edit one bookmark
    image
  2. Delete one tag (from the x next to tag) and save
    image
  3. Pick the deleted tag from the left menu - the displayed bookmarks will not contain the one just edited, but the count (right next to tag) will be displayed + 1
  4. Refresh the page (or close directly the page and open a new one) the deleted tag will be again visible
    image

Reproduction

edit one bookmark, delete one tag, refresh page, edit same bookmark - the deleted tag will be still attached

System Info

docker image: ndom91/briefkasten:latest
Postgres DB - docker container in same network as the app
docker behind Traefik proxy
authentication with Google
screenshot scrapping executed with docker from https://github.com/ingeniumstudio/briefkasten-scrape

Used Package Manager

n/a

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Login via Email Magic Link fails in Firefox

Briefkasten deployed with docker, running behind Nginx Proxy Manager.
I set up Github, Google and Email login.
All of the three login providers works correctly in Brave (chrome).

Login via Email fails in Firefox (tested on ubuntu and android).

[next-auth][error][CLIENT_FETCH_ERROR] 
https://next-auth.js.org/errors#client_fetch_error NetworkError when attempting to fetch resource. 
Object { error: {…}, url: "/api/auth/providers", message: "NetworkError when attempting to fetch resource." }

Whitelisting of possible signups

Clear and concise description of the problem

Hey Nico,
first of all thx a lot for briefkasten and your contribution in so many project ❤️ it's really nice. I really envy your frontend as well as backend skill 😅
anyway...

I played around with briefkasten and one thing which i miss is to not allow everybody to sign up on my instance 😅 ex. i have email verify activated (easiest one for me) and i would like to give it to my family members and some friends but not the whole world. Same applies if i would use one of the Oauth Providers (like github). I tried to search on next-auth.js but they also don't have an option for it.


I wish i could have a list of allowed user/domain's to my instance, so that i can provide access to some people around me but not everybody.

Suggested solution

Before sending the login option to next-auth.js check if a domain or usernames are in the whitelist 🤷

Alternative

Hardcoded ENV with domainnames would be totally enough i think

ALLOWED_EMAIL_SIGNUP=*example.com,[email protected]

Additional context

No response

Validations

  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Adding Azure AD authentication

Clear and concise description of the problem

Adding the support of Azure Active Directory for user authentication.

Suggested solution

As per the NextAuth.js framework and the documentation:

  • Adding the provider in the [...nextauth].jsfile
  • Updating the signin.jsx to add a button
  • Updating the schema in schema.prisma to support new fields provided by AAD
  • Updating the .env.example with new variables

Alternative

No response

Additional context

No response

Validations

  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Tag can't be saved

Describe the bug

The tag is created, bug a toast saying that it wasn't saved shows up..

Installed via docker

Everything works. I just need to know if you can have an idea on why this is happening,

thanks (also, is discussions closed?)

EDIT: also, I can add tags to bookmarks, but can't remove
EDIT2: same in Chrome

I'm using firefox for Android (nightly)

Reproduction

https://i.imgur.com/gaU19S7.png

System Info

System:
    OS: Linux 6.1 Arch Linux
    CPU: (2) x64 Intel(R) Xeon(R) CPU @ 2.20GHz
    Memory: 965.12 MB / 1.93 GB
    Container: Yes
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 19.7.0 - /usr/bin/node
    Yarn: 1.22.19 - /usr/bin/yarn
    npm: 8.19.2 - /usr/bin/npm

Used Package Manager

n/a

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Add internal network URL fails

Describe the bug

I try to add an internal URL to briefkasten. This does not work, it says: 'Error saving'. If I check the devtools I see this error on the console: POST http://ubuntu01.home.intra:3000/api/bookmarks 500 (Internal Server Error)

I'm trying to add URLs like:
https://nas02.home.intra/
http://ac.home.intra/

Public URL like https://docs.frigate.video/installation work fine. If I add the previous URL I can then edit it and change it to an internal only version.

It looks like the bk-app cannot get a picture to use to save the URL. How to solve this?

Reproduction

Press the + button, enter the Name, add an internal URL like http://ac.home.intra, press save, error.

System Info

System:
    OS: Linux 5.4 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
    CPU: (2) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
    Memory: 741.42 MB / 1.94 GB
    Container: Yes
    Shell: 5.1.4 - /bin/bash
  Binaries:
    Node: 16.17.1 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 8.15.0 - /usr/local/bin/npm

Used Package Manager

n/a

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Allow tag based search from search bar

Clear and concise description of the problem

It would be a great idea to include tags in search bar.

Suggested solution

If a user searches for a bookmark he can further restrict the search based on the tags from home page. Also, typing a tag name in search bar should show all results associated with that tag.

Alternative

No response

Additional context

No response

Validations

  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Docker build fails for some Sentry CLI auth credentials missing

Describe the bug

Hello,

I'm getting this error while trying to build the docker image.
what credentials is it talking about? how should they be provided?

> [email protected] build /app
> next build

warn  - You have enabled experimental features (legacyBrowsers, browsersListForSwc) in next.config.mjs.
warn  - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.

Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry

info  - Linting and checking validity of types...

./src/pages/index.jsx
123:6  Warning: React Hook useEffect has a missing dependency: 'nextauth.user'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
info  - Creating an optimized production build...
Failed to compile.

Sentry CLI Plugin: Command failed: /app/node_modules/.pnpm/@[email protected]/node_modules/@sentry/cli/sentry-cli releases new cZ8ukyoMD6QgOcJnhqCHQ
error: API request failed
  caused by: sentry reported an error: Authentication credentials were not provided. (http status: 401)

Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.
Please attach the full debug log to all bug reports.

Sentry CLI Plugin: Command failed: /app/node_modules/.pnpm/@[email protected]/node_modules/@sentry/cli/sentry-cli releases new cZ8ukyoMD6QgOcJnhqCHQ
error: API request failed
  caused by: sentry reported an error: Authentication credentials were not provided. (http status: 401)

Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.
Please attach the full debug log to all bug reports.


> Build failed because of webpack errors
 ELIFECYCLE  Command failed with exit code 1.
ERROR: Service 'app' failed to build: The command '/bin/sh -c pnpm build' returned a non-zero code: 1

Reproduction

clone the repository > edit the .env file > patch Dockerfile for installing ca-certificates in bullseye image otherwise Sentry CLI won't accept SSL certs > run "docker-compose up -d"

System Info

System:
    OS: Linux 5.4 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
    CPU: (4) x64 Intel(R) Xeon(R) CPU E3-1231 v3 @ 3.40GHz
    Memory: 2.32 GB / 4.0 GB
    Container: Yes
    Shell: 5.1.4 - /bin/bash
  Binaries:
    Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node
    npm: 8.15.0 - ~/.nvm/versions/node/v16.17.0/bin/npm

Used Package Manager

pnpm

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Sharing Between Accounts

Clear and concise description of the problem

I'd really like to be able to either share individual bookmarks with other users, or perhaps create a "public list" of bookmarks that other users could view and possibly contribute to based on permissions set by the creator. I think it would open up the possibility of using it as a location for teams to easily share resources between members.

Suggested solution

Unfortunately I am not a developer, so I cannot provide a specific implementation.

Alternative

No response

Additional context

No response

Validations

  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Importing chrome bookmark html fails

Describe the bug

export chrome bookmarks in html (not sure if same "standard" than the one you expect though)
file is valid and contains hundreds of links
try to import it in briefkasten
=> 0 imported

Reproduction

export chrome bookmarks in html => try to import it in briefkasten => 0 imported

System Info

tested on your instance at https://briefkastenhq.com/

Used Package Manager

npm

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Exception occured while editing Bookmark

Describe the bug

If I try to edit a bookmark I got an "client exception"

This only happens if the menu sidebar is opened.

To avoid this error at least once:

  • Close left sidebar by clicking <<
  • Press edit button on Bookmark
  • Edit the bookmark
  • Save

Now, if i open the left sidebar without doing a full refresh it will crash with the same error.

The error:

framework-c87cbe29bcbbc912.js:9 TypeError: Cannot assign to read only property '0' of object '[object Array]'
    at Array.sort (<anonymous>)
    at K (132.ff888d8e4acfd3d2.js:1:17880)
    at a4 (framework-c87cbe29bcbbc912.js:9:61582)
    at uC (framework-c87cbe29bcbbc912.js:9:73264)
    at i (framework-c87cbe29bcbbc912.js:9:120633)
    at oq (framework-c87cbe29bcbbc912.js:9:107171)
    at oA (framework-c87cbe29bcbbc912.js:9:107099)
    at oW (framework-c87cbe29bcbbc912.js:9:106962)
    at o5 (framework-c87cbe29bcbbc912.js:9:103749)
    at oM (framework-c87cbe29bcbbc912.js:9:104138)
uh @ framework-c87cbe29bcbbc912.js:9
main-21fe96a802b640d5.js:1 TypeError: Cannot assign to read only property '0' of object '[object Array]'
    at Array.sort (<anonymous>)
    at K (132.ff888d8e4acfd3d2.js:1:17880)
    at a4 (framework-c87cbe29bcbbc912.js:9:61582)
    at uC (framework-c87cbe29bcbbc912.js:9:73264)
    at i (framework-c87cbe29bcbbc912.js:9:120633)
    at oq (framework-c87cbe29bcbbc912.js:9:107171)
    at oA (framework-c87cbe29bcbbc912.js:9:107099)
    at oW (framework-c87cbe29bcbbc912.js:9:106962)
    at o5 (framework-c87cbe29bcbbc912.js:9:103749)
    at oM (framework-c87cbe29bcbbc912.js:9:104138)
G @ main-21fe96a802b640d5.js:1
main-21fe96a802b640d5.js:1 A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred
G @ main-21fe96a802b640d5.js:1
_error-e05054ccd3c4fa56.js:1 TypeError: Cannot assign to read only property '0' of object '[object Array]'
    at Array.sort (<anonymous>)
    at K (132.ff888d8e4acfd3d2.js:1:17880)
    at a4 (framework-c87cbe29bcbbc912.js:9:61582)
    at uC (framework-c87cbe29bcbbc912.js:9:73264)
    at i (framework-c87cbe29bcbbc912.js:9:120633)
    at oq (framework-c87cbe29bcbbc912.js:9:107171)
    at oA (framework-c87cbe29bcbbc912.js:9:107099)
    at oW (framework-c87cbe29bcbbc912.js:9:106962)
    at o5 (framework-c87cbe29bcbbc912.js:9:103749)
    at oM (framework-c87cbe29bcbbc912.js:9:104138)
f.getInitialProps @ _error-e05054ccd3c4fa56.js:1
framework-c87cbe29bcbbc912.js:9 TypeError: Cannot assign to read only property '0' of object '[object Array]'
    at Array.sort (<anonymous>)
    at K (132.ff888d8e4acfd3d2.js:1:17880)
    at a4 (framework-c87cbe29bcbbc912.js:9:61582)
    at i (framework-c87cbe29bcbbc912.js:9:119736)
    at oq (framework-c87cbe29bcbbc912.js:9:107171)
    at oA (framework-c87cbe29bcbbc912.js:9:107099)
    at oW (framework-c87cbe29bcbbc912.js:9:106962)
    at o5 (framework-c87cbe29bcbbc912.js:9:103749)
    at oF (framework-c87cbe29bcbbc912.js:9:102304)
    at w (framework-c87cbe29bcbbc912.js:33:1374)
uh @ framework-c87cbe29bcbbc912.js:9
main-21fe96a802b640d5.js:1 TypeError: Cannot assign to read only property '0' of object '[object Array]'
    at Array.sort (<anonymous>)
    at K (132.ff888d8e4acfd3d2.js:1:17880)
    at a4 (framework-c87cbe29bcbbc912.js:9:61582)
    at i (framework-c87cbe29bcbbc912.js:9:119736)
    at oq (framework-c87cbe29bcbbc912.js:9:107171)
    at oA (framework-c87cbe29bcbbc912.js:9:107099)
    at oW (framework-c87cbe29bcbbc912.js:9:106962)
    at o5 (framework-c87cbe29bcbbc912.js:9:103749)
    at oF (framework-c87cbe29bcbbc912.js:9:102304)
    at w (framework-c87cbe29bcbbc912.js:33:1374)
G @ main-21fe96a802b640d5.js:1
main-21fe96a802b640d5.js:1 A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred

Reproduction

Open all Bookmarks and try to edit a bookmark

System Info

Build locally with Docker
Build remotely on Docker Swarm
Install it without Docker


  System:
    OS: Linux 5.10 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
    CPU: (16) x64 Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz
    Memory: 48.41 GB / 50.08 GB
    Container: Yes
    Shell: 5.1.4 - /bin/bash
  Binaries:
    Node: 16.17.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 8.15.0 - /usr/local/bin/npm

Used Package Manager

pnpm

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

bug: creating a tag in the sidebar returns 500

Describe the bug

Creating a new Tag in the sidebar will throw an error but still save the Tag within the database.

I already updated the source and got the following error within

Error: [Immer] minified error nr: 4. Find the full error at: https://bit.ly/3cXEKWf
    at a (_app-62d4774c9ec39cc8.js:1:20196)
    at P (_app-62d4774c9ec39cc8.js:1:22206)
    at t.produce (_app-62d4774c9ec39cc8.js:1:26354)
    at _app-62d4774c9ec39cc8.js:1:26006
    at n (_app-62d4774c9ec39cc8.js:1:28102)
    at addTag (_app-62d4774c9ec39cc8.js:1:30311)
    at O (132.e5452ba71a226522.js:1:9124)

The error happens in the sidebar.jsx within the function saveQuickTag

Reproduction

Create a new tag from the sidebar

System Info

Build locally with Docker
Build remotely on Docker Swarm
Install it without Docker


  System:
    OS: Linux 5.10 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
    CPU: (16) x64 Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz
    Memory: 48.41 GB / 50.08 GB
    Container: Yes
    Shell: 5.1.4 - /bin/bash
  Binaries:
    Node: 16.17.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 8.15.0 - /usr/local/bin/npm

Used Package Manager

pnpm

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Publish docker container

Clear and concise description of the problem

Would be nice to have a docker container published in a repository like ghcr, dockerhub etc
So downstreams like packagers for platforms (eg Unraid, TrueNAS Scale, etc) can use it

Suggested solution

Publish docker container

Alternative

Have downstreams to build their own, and potentially have bugs coming that are not really this project's fault.
But a fault of a bad built image

Additional context

No response

Validations

  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Add image scraping to the backend for self-hosters

Clear and concise description of the problem

Currently the hosted instance of Briefkasten (https://briefkastenhq.com), runs on Vercel which has a 10s limit on its API routes. Meaning, for the API endpoint which saves new bookmarks, it was not possible to also take the screenshot there and keep it consistently under 10s.

So for the hosted instance, I put the screenshot taking into a decoupled message queue that would be worked through by some serverless function workers.

This seems like way too much work for a self-hosted instance, hwoever, plus the self-hosters do not have that arbitrary 10s limit.

Suggested solution

Vercel adds an environment variable VERCEL which is 1 when an application is running on their platform. Therefore, we can easily tell whether we need to run the screenshotting process through the queue, or have the resources to just fire up playwright / puppeteer right in the backend process and take the screenshot immediately upon adding the bookmark.

This is a feature request from myself, just adding this issue to keep track, inform the community, and potentially gather any additional feedback yall may have 🙏

I do not have an ETA on this, but plan to add it soon ™️

Alternative

No response

Additional context

No response

Validations

  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Unable to install via docker-compose: Incorrect docker-version error

Describe the bug

I can get briefkasten up and "running" but the page that loads is a 500 error saying the page I am looking for cannot be found.

Not sure if this is related to the current build? When I try running everything default I get an error from docker stating the version (3.8) is not compatible. I've tried running on other versions but keep getting similar errors.

Reproduction

n/a

System Info

n/a

Used Package Manager

npm

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Error during docker build

Describe the bug

After following the steps to build docker I have an error during this one =>https://docs.briefkastenhq.com/docs/self-hosting.html#docker

#0 19.43 > Build failed because of webpack errors
#0 19.46  ELIFECYCLE  Command failed with exit code 1.
------
failed to solve: executor failed running [/bin/sh -c pnpm build]: exit code: 1

There is an error in step 7=>

user@PC:~/docker/briefkasten$ docker-compose up -d
[+] Building 52.8s (14/21)                                                                                                                                                                                 
 => [internal] load build definition from Dockerfile                                                                                                                                                  0.1s
 => => transferring dockerfile: 2.46kB                                                                                                                                                                0.0s
 => [internal] load .dockerignore                                                                                                                                                                     0.1s
 => => transferring context: 132B                                                                                                                                                                     0.0s
 => [internal] load metadata for docker.io/library/node:16-bullseye-slim                                                                                                                             52.7s
 => [release  1/11] FROM docker.io/library/node:16-bullseye-slim@sha256:4fc367c89d498b455c6497cdd6211cc6a180bede77d8df80dea9acbcd5ffa19c                                                              3.5s
 => => resolve docker.io/library/node:16-bullseye-slim@sha256:4fc367c89d498b455c6497cdd6211cc6a180bede77d8df80dea9acbcd5ffa19c                                                                        0.0s
 => => sha256:154e3758048b273104a377666acd12ac09b66f2a05e695b323bc777cc4540822 4.19kB / 4.19kB                                                                                                        0.3s
 => => sha256:572071b42bdbd96b880d1f02aca7405829d929d1d956fd2d72aef4aa6bed22c4 35.35MB / 35.35MB                                                                                                      0.9s
 => => sha256:4fc367c89d498b455c6497cdd6211cc6a180bede77d8df80dea9acbcd5ffa19c 1.21kB / 1.21kB                                                                                                        0.0s
 => => sha256:7ce58a18c049245f918c4ce6a5129c89b5d9180a2bc24a8eb257d20968736a15 1.37kB / 1.37kB                                                                                                        0.0s
 => => sha256:08972e06c099ec776a8635d4ac29639b27ab676c9b2ecd490c4a269d46c3b721 7.03kB / 7.03kB                                                                                                        0.0s
 => => sha256:bd159e379b3b1bc0134341e4ffdeab5f966ec422ae04818bb69ecef08a823b05 31.42MB / 31.42MB                                                                                                      0.7s
 => => sha256:25e0c562fc17eafb2090a743dd5c12781f66ea1765c42eb2945888c8a1027170 2.77MB / 2.77MB                                                                                                        0.8s
 => => extracting sha256:bd159e379b3b1bc0134341e4ffdeab5f966ec422ae04818bb69ecef08a823b05                                                                                                             0.9s
 => => sha256:7c556d030bf688ba532e1546ea3acf5f835626d2bc3c67b3da0cdd6b49fa9e8b 450B / 450B                                                                                                            0.8s
 => => extracting sha256:154e3758048b273104a377666acd12ac09b66f2a05e695b323bc777cc4540822                                                                                                             0.0s
 => => extracting sha256:572071b42bdbd96b880d1f02aca7405829d929d1d956fd2d72aef4aa6bed22c4                                                                                                             1.2s
 => => extracting sha256:25e0c562fc17eafb2090a743dd5c12781f66ea1765c42eb2945888c8a1027170                                                                                                             0.1s
 => => extracting sha256:7c556d030bf688ba532e1546ea3acf5f835626d2bc3c67b3da0cdd6b49fa9e8b                                                                                                             0.0s
 => [internal] load build context                                                                                                                                                                     0.1s
 => => transferring context: 9.27MB                                                                                                                                                                   0.1s
 => [release  2/11] WORKDIR /app                                                                                                                                                                      0.2s
 => [release  3/11] RUN npm install -g pnpm;   pnpm --version;   pnpm setup;   mkdir -p /usr/local/share/pnpm &&  export PNPM_HOME="/usr/local/share/pnpm" &&  export PATH="$PNPM_HOME:/usr/local/sb  1.8s
 => [release  4/11] RUN addgroup --system --gid 1001 nodejs                                                                                                                                           0.6s
 => [dependencies 4/5] COPY package.json pnpm-lock.yaml prisma ./                                                                                                                                     0.1s
 => [dependencies 5/5] RUN pnpm install --frozen-lockfile                                                                                                                                            13.9s 
 => [release  5/11] RUN adduser --system --uid 1001 nextjs                                                                                                                                            0.5s 
 => [build 4/7] COPY --from=dependencies /app/node_modules ./node_modules                                                                                                                             2.4s 
 => [build 5/7] COPY . .                                                                                                                                                                              0.1s
 => [build 6/7] RUN pnpm dlx prisma generate                                                                                                                                                          7.1s
 => ERROR [build 7/7] RUN pnpm build                                                                                                                                                                 19.5s
------
 > [build 7/7] RUN pnpm build:
#0 0.778 
#0 0.778 > [email protected] build /app
#0 0.778 > next build
#0 0.778 
#0 1.119 warn  - You have enabled experimental features (legacyBrowsers, browsersListForSwc) in next.config.mjs.
#0 1.120 warn  - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.
#0 1.120 
#0 1.141 Attention: Next.js now collects completely anonymous telemetry regarding usage.
#0 1.141 This information is used to shape Next.js' roadmap and prioritize features.
#0 1.141 You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
#0 1.141 https://nextjs.org/telemetry
#0 1.141 
#0 1.245 info  - Linting and checking validity of types...
#0 4.793 
#0 4.793 ./src/pages/index.jsx
#0 4.793 123:6  Warning: React Hook useEffect has a missing dependency: 'nextauth.user'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
#0 4.793 
#0 4.793 info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
#0 4.795 info  - Creating an optimized production build...
#0 19.43 Failed to compile.
#0 19.43 
#0 19.43 Sentry CLI Plugin: Command failed: /app/node_modules/.pnpm/@[email protected]/node_modules/@sentry/cli/sentry-cli releases new ydC5d0zxMx3SlD5XQJeMM
#0 19.43 error: API request failed
#0 19.43   caused by: [60] SSL peer certificate or SSH remote key was not OK (SSL certificate problem: unable to get local issuer certificate)
#0 19.43 
#0 19.43 Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.
#0 19.43 Please attach the full debug log to all bug reports.
#0 19.43 
#0 19.43 Sentry CLI Plugin: Command failed: /app/node_modules/.pnpm/@[email protected]/node_modules/@sentry/cli/sentry-cli releases new ydC5d0zxMx3SlD5XQJeMM
#0 19.43 error: API request failed
#0 19.43   caused by: [60] SSL peer certificate or SSH remote key was not OK (SSL certificate problem: unable to get local issuer certificate)
#0 19.43 
#0 19.43 Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.
#0 19.43 Please attach the full debug log to all bug reports.
#0 19.43 
#0 19.43 
#0 19.43 > Build failed because of webpack errors
#0 19.46  ELIFECYCLE  Command failed with exit code 1.
------
failed to solve: executor failed running [/bin/sh -c pnpm build]: exit code: 1

Is it planned to have a docker image on a public registry (ex: docker.hub) ?
Thank you for your work

Reproduction

docker-compose up -d

System Info

System

Used Package Manager

n/a

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.