Skip to content

hazadus/nuxt-trello-board

Repository files navigation

Trello Board with Nuxt 3

Trello (kanban) board clone implemented in TypeScript with Nuxt 3.

Screenshot

Features

  • Kanban board with columns, cards, and full drag-and-drop support.
  • Responsive UI.
  • Create as many boards as you wish.
  • Mark cards as "done" or "favorite".
  • Table view.
  • Search modal.
  • Data stored on backend in MongoDB.
  • User authentication.
  • File uploads.
  • Attach uploaded files to cards.

Check out current version of the app at http://boards.hazadus.ru

See Issues tab for all planned features.

Controls

  • tab: cycle columns and cards.
  • space: mark card as completed.
  • enter: mark card as starred.
  • backspace: delete card.
  • Ctrl (Cmd) + /: search cards.

Frameworks, modules and libraries used

Starting the project on your own

All commands below are supposed to be executed from repo directory.

Using Docker Compose

  • Clone the repo
  • Install Docker, or Docker Desktop, if you don't have it.
  • Run docker compose up
  • Open app in the browser at http://localhost

Running in development mode

  • Clone the repo
  • Install dependencies with npm install --force (force if you get an error about Pinia).
  • Add MongoDB URI to .env file
# .env example
MONGO_DB_ADDRESS=mongodb://localhost:27017/board
UPLOAD_DIR="./public/uploads/"
  • Install Docker, or Docker Desktop, if you don't have it.
  • Run docker compose up in one terminal tab to get MongoDB up and running.
  • Run npm run dev in other terminal tab to have auto updates in browser window.
  • Open app in the browser at http://localhost:3000
  • Work with the code at your pleasure!

Recommended VSCode plugins

  • Volar
    • Disable built-in TypeScript plugin for project's workspace
  • Tailwind CSS Intellisense
  • Iconify Intellisense by Antfu

Known issues

Quick reminder on what to improve later.

  • Focus reset from task after toggling completed, favorite status.

Notes

Stuff I learned while working on this project.

  • Run with Node18. Node19 throws an error Cannot start nuxt: The "name" argument must be specified.
  • Downgraded Node version to 18 because of this error (reference).
  • Dockerfile.dev made for dev mode, Dockerfile is somewhat "prod" version.
  • Nuxt differences with plain Vue3:
    • You don't have to import components, functions from VueUse, stuff like ref(), etc.
    • composables directory content is also auto-imported.
  • MongoDB preserves order of the items in arrays. So, to reorder tasks or columns, we just need to reorder array items, and save updated array in MongoDB document!
  • z-index is canceled by setting transform(rotate)

References

Repo Activity

Alt