npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fruit-api

v1.1.18

Published

A fake API for interacting with fruits. Works poorly on purpose. Use at your own risk

Downloads

38

Readme

Intro

You've been given the task of creating a simple application with create/read/delete API requests for some fruit. Unfortunately, it looks like the backend developer who was in charge of creating the API was under an influence of psychedelic substances. Or just not very good at his job. The request to get a list of fruit doesn't make sense at all! We've reached out to the dev and asked him to fix the issue. His response was that it's not a bug but a feature. Ugh. Looks like you'll need to find a workaround and parse the request on your own.

Task

  1. Create a private repository on Github.
  2. Create a new Vue project using Vue-CLI within the new repository: you may use any preprocessors, testing frameworks, linting etc that you like
  3. Create a branch off of master, commit all your work to this new branch
  4. When you are finished, open a PR to master (but do not merge it). In the PR description, copy, paste and answer the following:
    ### Your name
    
    ### What was challenging?
    
    ### What did you enjoy doing?
    
    ### If you had more time, what would you improve/do differently?
    
    ### How much time (more or less) it took you to complete the task?
    
    ### What do you think about the task itself? (Was it a good experience? If not why?)
    
    ### Summary as a gif
    <!-- Show us a gif that represents how you feel about this test, as a whole. -->
    <!-- We don't need you to create a gif showing the project you made. -->
  5. Invite us to your repository
    • @EmilyRosina
    • @RobertParkin
    • @jtarulla

The specification

We would like you to create a simple Vue web app.

  • You will need a view/page displaying a list of fruits. It needs to be fetched using the fruit-api (see the installation/usage instruction below)
  • Each item will allow the user to navigate to the fruit detail view
  • The user should be allowed to add/remove fruits

Expectations

You can find the stack we use for our application in the next section, however, we are currently undergoing some changes/upgrades to it. You are free to use tools and libraries that are not part of it, but there are some guidelines we require you to follow:

  • Use VueJS (version 2 or 3 is fine)
  • As we do not, and have no current plans to use Typescript, we ask that you do not use it to make our review process easier
  • Solve this problem using some kind of state management, either Vuex or Pinia
  • Cover your app's core functionalities with Jest-based unit tests
  • Show us at least some of your custom styling so we can assess your CSS proficiency

Also, keep in mind:

  • We don't expect perfection.
  • We want to have an idea of how you confront a problem, plus what drives and motivates you.
  • Feel free to surprise us!

Our stack

  • Vanilla javascript (no typescript)
  • Vue 2 (currently working to update to Vue 3)
  • Vuetify 2
  • Vuex (with plans to start migrating to pinia soon)
  • Sass (dart-sass)
  • Jest + testing library for unit tests

The API:

The API is using the ESM module loader so please make sure that you have at least [email protected] installed before running it.

To use the API:

  • npm i fruit-api
  • add "api": "fruit-api" to the scripts section of your package.json file
  • run npm run api to serve the fruit-api
  • you can view the API documentation at https://localhost:3000 (or another port number, if 3000 is already in use)

Recommended documentation

| Scaffolding | State Management | Routing | | :-------------------------------: | :-----------------------------: | :-------------------------------------: | | Vue-CLI | Vuex | Vue-router |