Giter Site home page Giter Site logo

post-app's Introduction

post-app

This app is a posts app under the SPA paradigm.
It is implemented with Vuejs and Vuex.\


routes

The app has a router configuration for filtering with 4 main routes:

  • Home (default route: "/")

  • Contact (route: "/contact")

  • Author (route: "/author")

  • Detail (route: "/detail/:id")

The application shows a 404 page error (Page not found) with routes that not match with the main commented routes.

store

A store is implemented with Vuex inside the app to manage the posts state in a module with state, getters, mutations and actions included.
The app makes use of vuex via mapActions and mapGetters to access to the state in the store.\

It has a main page named HomePage.
In this main page we can find a list of posts from https://jsonplaceholder.typicode.com/posts url.
The css styles are included in the components and in the pages.\


Modules in the app

The modules included are:

Module Page
author AuthorPage
contact ContactPage
detail PostDetailPage
home HomePage
shared NoPageFound

Components in the app

The components included are these ones:

Contact module

  • BaseButton

  • ContactList

  • ContactItem

Home module

  • Pagination

  • PostImage

  • PostsColletion

  • PostItem

Shared components

  • NavBar

  • FooterComponent

  • Spinner

Api

The api file contains the baseURL neede for http request for the posts.


Methods included in the sotre

Getters

  • getAllPosts: This getter provides all posts stored in the store

  • getAllContacts: This getter provides all the contatcs stored

  • getPostById: This getter provides a post by an id

  • getAllContactsLength: This getter provides the length of the contacts collection in the store

Actions

  • loadPosts: This action makes a GET request to bring posts from baseURL

  • addContact: This action add a new contact to the store

Mutations

  • setPosts: Mutation that sets a collection of posts in the store provided

  • addContact: Mutation that creates a contact in the store


Dependencies included in this project by version

The following dependencies have been used for the development of this application

Dependence Version
Axios 0.27.2
Vue 3.2.13
Vue-router 4.0.3
Vuex 4.0.0
Prettier (lintern) 2.4.1

Project setup

This project uses yarn as a package manager, so you can use yarn commands for setup or running project options:

yarn install

Compiles and hot-reloads for development

yarn serve

Compiles and minifies for production

yarn build

Run your unit tests

yarn test:unit

Lints and fixes files

yarn lint

Customize configuration

See Configuration Reference.

post-app's People

Contributors

lupilla avatar

Watchers

 avatar

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.