Simple Blog

This is a simple blog project built using Vue.js and TypeScript. It utilizes various dependencies to enhance its functionality.

Installation

To run this project locally, make sure you have Node.js installed on your system. Then, follow these steps:

  1. Clone the repository:

    git clone https://github.com/parsajiravand/simple-blog.git
  2. Navigate to the project's root directory:

    cd simple-blog
  3. Install the dependencies:

    npm install

Usage

Once you have installed the dependencies, you can use the following scripts to interact with the project:

  • npm run dev: Starts the development server using Vite.
  • npm run build: Builds the project for production.
  • npm run preview: Serves the production build locally for preview.

Dependencies

The project has the following dependencies:

  • axios: A promise-based HTTP client for the browser and Node.js.
  • dotenv: Loads environment variables from a .env file.
  • lodash: A utility library delivering modularity, performance, and extra features.
  • pinia: A Vue.js state management system.
  • vue: A progressive JavaScript framework for building user interfaces.
  • vue-router: The official router for Vue.js.

Development Dependencies

The project has the following development dependencies:

  • @vitejs/plugin-vue: A Vite plugin for Vue 3.
  • autoprefixer: A plugin to parse CSS and add vendor prefixes automatically.
  • postcss: A tool for transforming CSS with JavaScript.
  • sass: A mature, stable, and powerful professional-grade CSS extension language.
  • sass-loader: Loads a Sass/SCSS file and compiles it to CSS.
  • tailwindcss: A highly customizable, low-level CSS framework.
  • typescript: A typed superset of JavaScript that compiles to plain JavaScript.
  • vite: A fast development server and build tool for modern web applications.
  • vue-tsc: A TypeScript compiler for Vue Single File Components.

Server

This is the server component of the Kubes Task project. It provides mock API endpoints for posts and user data using JSON Server and Faker.

Installation

To run the server locally, make sure you have Node.js installed on your system. Then, follow these steps:

  1. Navigate to the server folder:

    cd server
  2. Install the dependencies:

    npm install
  3. Run on local machine:

    npm run start

Usage

Once you have installed the dependencies, you can use the following scripts to interact with the server:

  • npm start: Starts the server using JSON Server.
  • npm run dev: Starts the server using Nodemon for development, which automatically restarts the server when changes are detected.

API Endpoints

The server exposes the following API endpoints:

  • /posts: Provides a CRUD API for managing blog posts.
  • /users: Provides a CRUD API for managing user data.

The data served by these endpoints is dynamically generated using Faker to create realistic mock data.

Dependencies

The server has the following dependencies:

  • json-server: A full fake REST API server implemented with JSON.
  • faker: A library for generating realistic mock data.

License

This server component is licensed under the ISC License.