Giter VIP home page Giter VIP logo

ogerly / nuxt-vuetify-storybook Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 6.42 MB

The GitHub page represents a Nuxt 3 minimal starter project with Storybook and Vuetify integration. The project is currently under active development, with expectations of numerous changes in the future. Its primary goal is to establish a robust framework for professional front-end development, which can serve as a template for larger projects

Home Page: https://ogerly.github.io/nuxt-vuetify-storybook/#/

TypeScript 7.94% Vue 41.49% JavaScript 27.41% MDX 17.62% CSS 5.54%
nuxt3 storybook7 vuetify3 docsify figma stackblitz cromatic

nuxt-vuetify-storybook's Introduction

Nuxt 3 Minimal Starter with Storybook and Vuetify

Storybook Storybook License License License

This project is currently under active development, and we anticipate numerous changes in the near future. Our primary objective is to establish a robust framework for professional front-end development, which can serve as a template for larger projects. Additionally, we aim to structure this project as a tutorial, with completion targeted for Q1/2024.

The interplay of Nuxtjs, Vuetify, and Storybook now works quite well. However, it's not entirely straightforward, and the documentation on Nuxtjs is not always up to date. It took some time to achieve a clean integration, but with the modules provided by Nuxtjs, it is now possible to use Vuetify and Storybook together in a single project.

Demo: https://stackblitz.com/~/github.com/ogerly/nuxt-vuetify-storybook

Setup

Make sure to install the required dependencies by running one of the following commands:

# Using npm
npm install

# Using pnpm
pnpm install

# Using yarn
yarn install

Development Server

Start the development server on http://localhost:3000 with one of the following commands:

# Using npm
npm run dev

# Using pnpm
pnpm run dev

# Using yarn
yarn dev

Production

Build the application for production with the following commands:

# Using npm
npm run build

# Using pnpm
pnpm run build

# Using yarn
yarn build

To preview the production build locally:

# Using npm
npm run preview

# Using pnpm
pnpm run preview

# Using yarn
yarn preview

For more information on deployment, please refer to the Nuxt deployment documentation.


Dokumentation

We use Docsify in this project, which is available at http://localhost:4000. Before you start setting up Ocelot, please read this carefully and follow all the steps.

Pay attention to the dependencies and the interaction of the individual tools and plugins. This project is also intended for teaching and training purposes, covering a wide range of professional front-end development.

To run the documentation on http://localhost:4000, you can use the console command 'pnpm run docsify'.


Front development

Nuxt, Vuetify, Storybook, Figma, Cromatic

Interaction between Storybook, Figma and Chromatic

The interaction between Storybook, Figma and Chromatic plays a decisive role in the professional development process and promotes collaboration between designers, developers and customers.

Storybook

  • Purpose: Storybook is a tool for developing components and user interfaces. It enables developers to create and test UI components in isolation.
  • Use: Developers use Storybook to create and present user interface components. They can define and test different states and scenarios for these components. This facilitates iteration and debugging.

Figma

  • Purpose: Figma is a design and collaboration tool that allows designers to create, edit and share user interfaces.
  • Use: Designers use Figma to create and prototype the visual design of the user interface. They can create mockups, wireframes and interactive prototypes. Figma also enables collaboration as multiple users can work on a design simultaneously.

Chromatic

Interaction

  1. Designer and Figma:

    • Designers use Figma to create the visual design and create prototypes.
    • They share their design work with the development team and the customer via Figma.
  2. Developers and Storybook:

    • Developers use Storybook to implement and test the created components based on the Figma designs.
    • They create Storybook stories to showcase the functionality and appearance of the components.
  3. chromatic and testing:

    • Chromatic can be integrated into the development process to ensure that visual regressions are avoided.
    • Every time a change is made in Storybook, screenshots are automatically taken and compared to previous versions. Any visual deviation is recognised and logged.
  4. Customer and approval:

    • The customer can check the current status of the design and prototypes via Figma.
    • With Chromatic, the customer can ensure that the implementation of the UI components meets the design specifications by monitoring visual regressions.

The interaction of Storybook, Figma and Chromatic promotes seamless collaboration between designers and developers, enables efficient iteration and ensures that the UI components created meet the design specifications. This contributes to the quality and consistency of the end product and facilitates communication and approval with the customer.

Storybook

After starting the application, you can call up the storybook at http://localhost:6006/.

Storybook to Chromatic

You can connect your Storybook to Chromatic. To do this, you need an account with Chromatic.

You can publish your storybook to Chromatic with the following command:

Publish Storybook to Cromatic

  pnpm run build-storybook
  pnpm dlx http-server ./path/to/build
  npm install chromatic --save-dev
  npx chromatic --project-token=<your-project-token>

You can find the Ocelot Storybook of this repository here: https://65440b50eff8b11b8e1d0939-lpcuymgxzi.chromatic.com/

If a Storybook build has been made, the Storybook can be accessed via this command at localhost:8080

  pnpm dlx http-server ./storybook-static

Tutorials



Reconstructing the Starter:

We have built the starter as follows.

The most crucial point is to use precise versions at the moment.

  • Nuxt: 3.6.5
  • Vuetify: 3.3.17
  • Storybook: 7.4.4

Installation Process

  1. Create a new Nuxt 3 project using the following command:
pnpm dlx [email protected] init <project-name>
# Make sure you have 'shamefully-hoist=true' in your .npmrc before running pnpm install
cd <project-name>
pnpm install
  1. Install Storybook and Vuetify:
npx storybook-nuxt init
pnpm add @invictus.codes/nuxt-vuetify vuetify
  1. Update your nuxt.config.ts with the following configuration:
export default defineNuxtConfig({
  devtools: { enabled: true },
  modules: [
    "@invictus.codes/nuxt-vuetify",
    "@nuxtjs/storybook",
    "@nuxtjs/eslint-module",
  ],
  vuetify: {
    vuetifyOptions: {},
    moduleOptions: {
      treeshaking: false,
      useIconCDN: true,
      styles: "none",
      autoImport: false,
      useVuetifyLabs: true,
    },
  },
  css: ["vuetify/styles"],
  storybook: {
    url: "http://localhost:6006",
    storybookRoute: "/__storybook__",
    port: 6006,
  },
});
  1. Start the development server:
  pnpm run dev

Storybook Integration

To integrate Storybook with Nuxt 3, please refer to the Storybook Nuxt module documentation.

Make sure you have the following versions for a smooth experience:
- Nuxt: 3.6.5
- Vuetify: 3.3.17
- Storybook: 7.4.4

We are monitoring the development of the following modules:

.storybook/preview.ts

 import 'vuetify/lib/styles/main.css'
 import '@mdi/font/scss/materialdesignicons.scss'
  • Use the installation instructions from https://storybook.nuxtjs.org/getting-started/setup. The instructions from the module page did not lead to the desired outcome.
  • Vite-plugin-vuetify can cause errors when building Storybook if exact versions are not followed. Remove vite-plugin-vuetify and follow the instructions.

To integrate Storybook with Nuxt 3, please refer to the [Storybook Nuxt module documentation](https://storybook.nuxtjs.org/).

For a detailed tutorial on integrating Storybook with Vuetify in your Nuxt application, you can read this [Medium article](https://medium.com/@chakas3/tutorial-integrating-storybook-with-vuetify-in-your-nuxt-application-ac8af5a0a946).

nuxt-vuetify-storybook's People

Contributors

ogerly avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

nuxt-vuetify-storybook's Issues

1. Drupal CMS

  1. Drupal CMS Aktualisierung:
    • Upgrade auf die neueste Version (10.*).

  2. Responsives Design / Template:
    • Implementierung eines mobilfreundlichen Designs für optimale Benutzererfahrung.

  3. SEO-Optimierung:
    • Strukturoptimierung für suchmaschinenfreundliche Indizierung.
    • Umsetzung von SEO-Marketingstrategien.

  4. TV-Stream Hervorhebung:
    • Hervorheben des TV-Streams, um die Sichtbarkeit zu verbessern.

  5. RSS-Feed Integration:
    • Einrichtung eines RSS-Feeds für eine effiziente Informationsverbreitung.

  6. Social Media Verknüpfung:
    • Integration mit verschiedenen Social Media Kanälen für erweiterte Reichweite.

  7. Automatisches Social Media Posting:
    • Einrichtung eines Systems für automatisches Teilen neuer Beiträge auf Social Media Plattformen.

  8. Interne Inhaltssuche, sauber indizieren und / oder optimieren.

Drupal CMS Optimierung

[ ] 1. Drupal CMS Aktualisierung:
• Upgrade auf die neueste Version (10.*).

[ ] 2. Responsives Design / Template:
• Implementierung eines mobilfreundlichen Designs für optimale Benutzererfahrung.

[ ] 3. SEO-Optimierung:
• Strukturoptimierung für suchmaschinenfreundliche Indizierung.
• Umsetzung von SEO-Marketingstrategien.

[ ] 4. TV-Stream Hervorhebung:
• Hervorheben des TV-Streams, um die Sichtbarkeit zu verbessern.

[ ] 5. RSS-Feed Integration:
• Einrichtung eines RSS-Feeds für eine effiziente Informationsverbreitung.

[ ] 6. Social Media Verknüpfung:
• Integration mit verschiedenen Social Media Kanälen für erweiterte Reichweite.

[ ] 7. Automatisches Social Media Posting:
• Einrichtung eines Systems für automatisches Teilen neuer Beiträge auf Social Media Plattformen.

[ ] 8. Interne Inhaltssuche, sauber indizieren und / oder optimieren.

Drupal CMS Aktualisierung

Drupal CMS Aktualisierung

  1. Backup erstellen

    • Vor dem Update und den Änderungen ein umfassendes Backup der Website erstellen, um Datenverluste zu verhindern.
  2. Update auf Drupal 10.2

    • Drupal-Core auf Version 10.2 aktualisieren.
    • Überprüfen, ob alle Abhängigkeiten mit der neuen Drupal-Version kompatibel sind.
    • Sicherstellen, dass bestehende Funktionen nach dem Update ordnungsgemäß funktionieren.
  3. XML-Verfügbarkeit für alle Inhalte

    • Überprüfen und sicherstellen, dass alle Inhalte der Website als XML verfügbar sind.
    • Implementieren von Änderungen, um sicherzustellen, dass die Seite bei Google News korrekt angemeldet werden kann.
  4. Optimierung des Nachrichtenblocks

    • Überprüfen und analysieren, warum der Block "NACHRICHTEN" separat läuft und von Suchmaschinen nicht indexiert wird.
    • Implementieren von Änderungen, um den Nachrichtenblock in den Suchmaschinenindex aufzunehmen.
    • Sicherstellen, dass der Nachrichtenblock ordnungsgemäß von Analysetools wie Matomo erfasst wird.
  5. Auffindbarkeit aller Artikel in Analysetools

    • Überprüfen, ob alle Artikel (insbesondere Hauptstories) korrekt als ARTIKEL eingestellt sind.
    • Sicherstellen, dass alle Artikel in Matomo oder ähnlichen Suchmaschinen auffindbar sind.
    • Testen, ob die Anzahl der Klicks für jeden Artikel ordnungsgemäß erfasst wird.
  6. Integration von Metadaten für Analysetools

    • Hinzufügen von Metadaten zu jedem Artikel, um eine präzise Analyse in Matomo oder ähnlichen Suchmaschinen zu ermöglichen.
    • Sicherstellen, dass Metadaten korrekt und vollständig sind, um die Artikel eindeutig zu identifizieren.
  7. Überprüfung der Auffindbarkeit im CMS

    • Durchsuchen des CMS, um sicherzustellen, dass alle Artikel im Bereich "NACHRICHTEN" in der Rubrik "HINWEIS" und Hauptstories als ARTIKEL eingestellt sind.
  8. Dokumentation

    • Aktualisieren der Dokumentation, um Änderungen im System zu reflektieren.
    • Hinzufügen von Anleitungen für zukünftige Aktualisierungen und Änderungen.
  9. Tests und QA

    • Durchführen von umfassenden Tests, um sicherzustellen, dass alle Änderungen ordnungsgemäß funktionieren.
    • QA-Überprüfung, um sicherzustellen, dass die Seite in verschiedenen Umgebungen und Browsern einwandfrei funktioniert.
  10. Kommunikation

    • Benachrichtigung an das Team über die geplanten Änderungen und den Zeitplan für das Update.
    • Bereitstellung von Ressourcen und Unterstützung für das Team während des Update-Prozesses.

text der redaktion:
bitte beim Update auf Drupal 10.2 falls möglich folgende Punkte fixen, die für uns oberste Priorität haben: Alle Inhalte sollten als XML verfügbar sein, damit wir die Seite bei Google News entsprechend anmelden können. Und schau dir bitte den Block NACHRICHTEN an, der läuft irgendwie separat und wird derzeit von Suchmaschinen nicht wirklich indexiert. Wir müssten aber die gesamte Seite inklusive aller Bereiche auffindbar machen, zumindest aber im ersten Teil für Analysetools wie Matomo korrekt erfassbar machen.

Bei Matomo oder ähnlichen Suchmaschinen sollte jeder Artikel (jene oben auf der Seite oder jene im Nachrichtenblock) auffindbar sein, so dass wir erkennen können, welcher Artikel wie oft angeklickt wurde.

Wenn du derzeit im CMS schaust findest du alle Artikel des Bereichs NACHRICHTEN in der Rubrik HINWEIS, die Hauptstories hingegen müssen als ARTIKEL eingestellt werden.

change the nuxt vuetify module

  • add vuetify-nuxt-modules,
  • remove invictus.codes.
  • check if everything works.
  • remember the storybook.
  • test if mdi icos work properly.

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.