Skip to content

bharathkumar-12/html-parser

Repository files navigation

Nuxt.js and Vue.js Project: JSON to HTML/Markdown Converter

This project is a Nuxt.js and Vue.js application designed to consume JSON data from an API, process it, and convert it into meaningful HTML or Markdown content for display. The goal of this project is to demonstrate the ability to handle API responses dynamically and render the data effectively on a web interface. Screenshot 2024-11-09 at 3 44 52 PM


🚀 Features

  • Dynamic API Integration: Fetches data from a given API endpoint.
  • JSON Parsing: Processes and extracts relevant information from the JSON response.
  • HTML/Markdown Conversion: Transforms structured JSON data into readable and formatted HTML or Markdown content.
  • Responsive Design: Ensures content is displayed optimally across devices.
  • Nuxt.js Advantages: Utilizes Nuxt.js for server-side rendering (SSR) and better performance.

🛠️ Technologies Used

  • Frameworks:
    • Nuxt.js - Server-side rendering and static site generation.
    • Vue.js - Reactive UI components.
  • Languages:
    • JavaScript (ES6+)
  • Libraries:
    • Axios (for API calls)
    • Markdown Parser (optional, e.g., marked or markdown-it)

🖥️ How It Works

  1. API Call:

    • Uses Axios to fetch data from a pre-configured API endpoint.
    • Handles errors gracefully with fallback messages.
  2. Data Processing:

    • Extracts relevant fields from the JSON response.
    • Converts data into a structure suitable for rendering as HTML or Markdown.
  3. Rendering:

    • Displays the processed content dynamically on the webpage.
    • Uses Vue.js components to encapsulate the rendering logic.

Setup

Make sure to install dependencies:

# npm
npm install

# pnpm
pnpm install

# yarn
yarn install

# bun
bun install

Development Server

Start the development server on http://localhost:3000:

# npm
npm run dev

# pnpm
pnpm dev

# yarn
yarn dev

# bun
bun run dev

Production

Build the application for production:

# npm
npm run build

# pnpm
pnpm build

# yarn
yarn build

# bun
bun run build

Locally preview production build:

# npm
npm run preview

# pnpm
pnpm preview

# yarn
yarn preview

# bun
bun run preview

Check out the deployment documentation for more information.