Giter VIP home page Giter VIP logo

cutii-technical-test's Introduction

Technical test Cutii

Your mission

Write an app that allows to :

  • create an owner and a robot
  • display robots and theirs owners

We have setup react-router to display two pages in app :

  • /form that must display a form to create an owner and a robot
  • /gallery that must display robots and owners

Feel free to add buttons to navigate between pages (not mandatory).

Screens

app

Note : click on submit button in modal will close the modal.

You must use this technical stack :

โš ๏ธ You should not use local state in your components. For example to open or close a modal, use an redux action.

Your app must be in app folder. To setup your project, run the following commands :

npm i
npm run dev

Your app will be run on port 3000. We use ViteJS instead of Webpack.

To start the server, go in server folder and follow this steps :

  • run npm i to install dependencies
  • go to https://www.elephantsql.com/ to create a free Postgresql database
  • update .env file with the postgres uri to your database
  • run npm start . Your server should start on port 3002.

API

API allows to get two types of ressources : Robots and Owners. There are some business rules :

  • An owner can have many robots.
  • A robot has one owner.
  • Name must be unique for owners.
  • Name must be unique for robots.

Owners

  • Create an owner
POST /owners

Body : {
  name: string;
  avatarUrl: string;
}
  • Get all owners with theirs robots associated.
GET /owners
  • Get an owner by his name
GET /owners/:name

Robots

  • Get all robots.
GET /robots
  • Get an robot by his name
GET /robots/:name
  • Create a robot
POST /robots

Body : {
  name: string;
  avatarUrl: string;
  ownerId: string;
}

cutii-technical-test's People

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.