diff --git a/.env.sample b/.env.sample index 14f74df..bafdc9f 100644 --- a/.env.sample +++ b/.env.sample @@ -75,6 +75,13 @@ AUTH0_ISSUER= AUTH0_CLIENT_SECRET= AUTH0_CLIENT_ID= +# Authelia +NEXT_PUBLIC_AUTHELIA_ENABLED="" +AUTHELIA_CLIENT_ID="" +AUTHELIA_CLIENT_SECRET="" +AUTHELIA_WELLKNOWN_URL="" + + # Authentik NEXT_PUBLIC_AUTHENTIK_ENABLED= AUTHENTIK_CUSTOM_NAME= diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md new file mode 100644 index 0000000..651e877 --- /dev/null +++ b/ARCHITECTURE.md @@ -0,0 +1,45 @@ +# Architecture + +This is a summary of the architecture of Linkwarden. It's intended as a primer for collaborators to get a high-level understanding of the project. + +When you start Linkwarden, there are mainly two components that run: + +- The NextJS app, This is the main app and it's responsible for serving the frontend and handling the API routes. +- [The Background Worker](https://github.com/linkwarden/linkwarden/blob/main/scripts/worker.ts), This is a separate `ts-node` process that runs in the background and is responsible for archiving links. + +## Main Tech Stack + +- [NextJS](https://github.com/vercel/next.js) +- [TypeScript](https://github.com/microsoft/TypeScript) +- [Tailwind](https://github.com/tailwindlabs/tailwindcss) +- [DaisyUI](https://github.com/saadeghi/daisyui) +- [Prisma](https://github.com/prisma/prisma) +- [Playwright](https://github.com/microsoft/playwright) +- [Zustand](https://github.com/pmndrs/zustand) + +## Folder Structure + +Here's a summary of the main files and folders in the project: + +``` +linkwarden +├── components # React components +├── hooks # React reusable hooks +├── layouts # Layouts for pages +├── lib +│   ├── api # Server-side functions (controllers, etc.) +│   ├── client # Client-side functions +│   └── shared # Shared functions between client and server +├── pages # Pages and API routes +├── prisma # Prisma schema and migrations +├── scripts +│   ├── migration # Scripts for breaking changes +│   └── worker.ts # Background worker for archiving links +├── store # Zustand stores +├── styles # Styles +└── types # TypeScript types +``` + +## Versioning + +We use semantic versioning for the project. You can track the changes from the [Releases](https://github.com/linkwarden/linkwarden/releases). diff --git a/Dockerfile b/Dockerfile index a6d6129..9de1541 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,4 +20,4 @@ COPY . . RUN yarn prisma generate && \ yarn build -CMD yarn prisma migrate deploy && yarn start +CMD yarn prisma migrate deploy && yarn start \ No newline at end of file diff --git a/LICENSE b/LICENSE.md similarity index 100% rename from LICENSE rename to LICENSE.md diff --git a/components/CollectionListing.tsx b/components/CollectionListing.tsx index eb43386..171117b 100644 --- a/components/CollectionListing.tsx +++ b/components/CollectionListing.tsx @@ -47,7 +47,10 @@ const CollectionListing = () => { useEffect(() => { if (account.username) { - if (!account.collectionOrder || account.collectionOrder.length === 0) + if ( + (!account.collectionOrder || account.collectionOrder.length === 0) && + collections.length > 0 + ) updateAccount({ ...account, collectionOrder: collections diff --git a/components/FilterSearchDropdown.tsx b/components/FilterSearchDropdown.tsx index 57a0ea4..01b8906 100644 --- a/components/FilterSearchDropdown.tsx +++ b/components/FilterSearchDropdown.tsx @@ -26,7 +26,7 @@ export default function FilterSearchDropdown({ > -