Giter VIP home page Giter VIP logo

node-challenge-001's Introduction

Jungle Devs - Node Challenge #001

Description

Challenge goal: The purpose of this challenge is to give an overall understanding of a backend application. You’ll be implementing a simplified version of news provider API. The concepts that you’re going to apply are:

  • REST architecture;
  • Authentication and permissions;
  • Data modeling and migrations;
  • SQL database;
  • Query optimization;
  • Serialization;
  • Production builds.

Target level: This is an all around challenge that cover both juniors and experience devs based on the depth of how the concepts were applied.

Final accomplishment: By the end of this challenge you’ll have a production ready API.

Acceptance criteria

  • Clear instructions on how to run the application in development mode
  • Clear instructions on how to create production builds
  • A good API documentation or collection
  • Models created using Objection.js
  • Login API: /api/login
  • Sign-up API: /api/sign-up
  • Administrator restricted APIs:
    • CRUD /api/admin/authors
    • CRUD /api/admin/articles
  • List article endpoint /api/articles?category=:slug with the following response:
[
  {
    "author": {
      "name": "Author Name",
      "picture": "https://picture.url"
    },
    "category": "Category",
    "title": "Article title",
    "summary": "This is a summary of the article"
  },
  ...
]
  • Article detail endpoint /api/articles/:id with different responses for anonymous and logged users:

    Anonymous

    {
      "author": {
        "name": "Author Name",
        "picture": "https://picture.url"
      },
      "category": "Category",
      "title": "Article title",
      "summary": "This is a summary of the article",
      "firstParagraph": "<p>This is the first paragraph of this article</p>"
    }

    Logged user

    {
      "author": {
        "name": "Author Name",
        "picture": "https://picture.url"
      },
      "category": "Category",
      "title": "Article title",
      "summary": "This is a summary of the article",
      "firstParagraph": "<p>This is the first paragraph of this article</p>",
      "body": "<div><p>Second paragraph</p><p>Third paragraph</p></div>"
    }

Instructions to Run

  • Database: docker-compose up will start the PostgreSQL DB
  • yarn dev is configured to start the app.js using nodemon

node-challenge-001's People

Contributors

pedrohcalado avatar

Watchers

James Cloos avatar  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.