Sonny ad682faa9e Reorder categories (#12)
* feat: add next category id column

* feat: reorder categories (front)

* refactor: remove dead code & some optimization

* feat(wip): add order column + sql request + trigger

* refactor: fix warnings

* fix: syntax error in migration

* feat: create sql query (category reorder)

* feat: use prisma generated types instead

* feat: create some react context with hooks

* refactor: move a lot of code from home page to
dedicated components

* refactor: extend generated prisma types

* refactor: use hooks and move links footer in dedicated component

* refactor: fix bad types used

* fix: warnings caused by setState loop

* feat: use nextid instead of order column

* fix: reorder categories (front)

* fix: sort categories by nextId

* feat: prevent send update request if cat.id equal target.id

* fix: reorganization applied even if there is no change

* chore: remove unused en var

* feat: check if nextid category exist

* chore: sql query for migration

* refactor: remove useless code and prevent sending request when category not moving

* fix: redorder categories when sending request
2023-12-14 00:15:58 +01:00
2023-11-26 02:56:41 +01:00
2023-12-14 00:15:58 +01:00
2023-12-14 00:15:58 +01:00
2023-11-30 14:02:59 +01:00
2023-12-14 00:15:58 +01:00
2023-10-24 16:55:20 +02:00
2022-01-06 18:24:17 +01:00
2023-12-14 00:15:58 +01:00
2023-11-30 14:02:59 +01:00
2023-11-26 04:16:27 +01:00
2023-12-14 00:15:58 +01:00
2023-10-31 20:15:49 +01:00
2023-11-30 14:02:59 +01:00
2023-11-30 14:02:59 +01:00
2023-12-14 00:15:58 +01:00
2023-12-14 00:15:58 +01:00
2023-12-03 18:52:46 +01:00
2023-11-11 00:08:30 +01:00

MyLinks

MyLinks is a tool that lets you manage your favorite links in an intuitive interface. Free and open source software, focused on privacy and self-hosting.

Setup

Copy example.env file as .env and edit the properties.

cp example.env .env

Dev

Leave the DATABASE_URL property filled

cd docker
make start-dev
cd ..
npx prisma db push
npm run dev

Prod

If you want to use your own database leave, the DATABASE_URL property filled in docker/docker-compose.yml with your database credentials, otherwise you'll have to delete it.

cd docker
make build
make start-prod

GitHub Actions

Env var to define :

DOCKER_USERNAME="Your docker username"
DOCKER_PASSWORD="Your docker password"
SSH_HOST="Your SSH host"
SSH_PORT="Your SSH port" # use port 22 if you are using the default value
SSH_USERNAME="Your SSH username" # private key
SSH_KEY="Your SSH key" # see below

As a good practice, SSH Key should be generated on local machine instead of target/server/remote machine

Generate :

ssh-keygen -t rsa -b 4096
# you can save the file in your current folder since you're not supposed to use it personnaly (its purpose is only to be used by CI/CD)

Copy :

cat ./id_rsa.pub | ssh b@B 'cat >> ~/.ssh/authorized_keys'
# or
ssh-copy-id -i ./id_rsa.pub user@host

Source: https://github.com/appleboy/ssh-action#setting-up-a-ssh-key

Description
A tool that lets you manage your favorite links in an intuitive interface
Readme GPL-3.0 7.7 MiB
Languages
TypeScript 94.9%
CSS 3.2%
JavaScript 0.6%
Dockerfile 0.5%
Edge 0.5%
Other 0.3%