Code Monkey home page Code Monkey logo

karumi-code-test's Introduction

Karumi Test Proposal

VueJS TypeScript CI pipeline status

Application which users will be able to log in and they will keep persisted until logout button was clicked.

Contents

Screenshots

Login View Home View

How to use

Needed tools

  1. Install yarn
  2. Clone this project: git clone https://github.com/joucogi/karumi-code-test.git
  3. Move to the project folder: cd karumi-code-test

Application run

There are two ways to run the application in your own computer or server:

  1. Deploying dist folder

    You can deploy dist folder to your web server

    or

    1. Install serve (yarn global add serve)
    2. Run serve as a SPA serve -l 8080 -s ./dist
  2. Run develop server

    1. Install dependencies yarn install
    2. Compiles and hot-reloads for development yarn serve

At this point, you should be able to access to the next two views:

Application run in Netlify

If you prefer you can visit the application deployed in Netlify

Deploy to production

The application is all compiled and ready to be deployed into dist folder. You can compile again with the following command yarn build.

Testing

Testing the application

  1. Unit and Snapshot tests

    These tests will allow us to verify that the different views and components are displayed and working correctly.

    Command for run unit tests: yarn test:unit

    if it is necessary to regenerate all the snapshots you can do with the following command yarn test:unit -u. It will be only necessary when html or css is changed in Vue components.

  2. E2E tests

    These tests will allow us to test the entire application from beginning to end to ensure the application flow behaves as expected and all integrated pieces work together as expected.

    Command for run e2e tests: yarn test:e2e

    It is possible run tests with user interface by running the following command yarn test:e2e:ui

Lints and fixes files

The following command (yarn lint) is for find and fix problems in TypeScript code.

Languages, libraries and frameworks used

  1. For application

    • TypeScript used in most of the project
    • VueJS to make the user interfaces.
    • Yarn as a package repository.
  2. For tests

Folders structure

Folders more relevance:

  • src: Folder where all the application code is located.
  • test: Folder where all the tests are located.
  • dist: Folder where builded application is located.
.
├── backend  
├── dist
├── public
├── screenshots
├── src
│   ├── adapters
│   ├── assets
│   ├── components
│   ├── contracts
│   ├── middlewares
│   ├── models
│   ├── router
│   ├── services
│   ├── store
│   └── views
└── tests
    ├── e2e
    └── unit

karumi-code-test's People

Contributors

joucogi avatar dependabot[bot] avatar

Watchers

James Cloos avatar  avatar

karumi-code-test's Issues

Develop navigation between views

Tasks to do

  • Button from login View redirects to Home View when it is clicked
  • Button from Home View redirects to Login View when it is clicked

Implement a token to persist the user

Tasks to do

  • When user logs in, the server will generate a token and the application will have to save it.
  • User will persist in the application until the Start View button is clicked.

Fix error in documentation

Tasks to do:

  • In Application run in Netlify second option should be LoginView instead of HomeView.
  • Add link to users.json to show all valid users

Develop the login implementation

Task to do

  • Develop the login implementation. In this step just validate users saved in a variable.
  • Develop a Middleware o Guard to protect the private Home View.
  • Home View button will log out and redirect to Login View when it is clicked.

Create a new vuejs project

Tasks to do

  • Create a new VueJS project.
  • Create a yaml file to configure the continuous integration in GitHub Workflows.

Review and improve Documentation

Documentation will have to contain the next points:

  • An app description
  • Screenshots
  • Usage
  • Libraries used in this project
  • All links must be opened in another tab

Create Home View

Tasks to do

  • Create a home user interface. This screen should contain:
  • Karumi logo
  • Welcome message
  • Button for log out

Log in using a fake API

Tasks to do

[ ] Create a repository which will simulate a request to an api and validate the user.

Create Login View

Tasks to do

  • Create a login user interface as is described in Code Test Proposal

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.