Skip to content

erasys/js-trial-task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Erasys React Native Trial Task

Users are very important on ROMEO. That's why we want you to implement an app that shows a list of users. We have included a simple server with two API endpoints that give you the required data.

Requirements

  • Create a React Native application that shows the results in a layout similar to the following screenshot:

  • Make sure that a single item in the list shows all of the following data (you might need to combine some data sources for this):

    • Username
    • Age
    • Image
    • Location and distance
    • Headline
    • Relative last login time (e.g. 6 minutes ago)

    The screenshot above is just an illustration of what we have in mind. Feel free to use it as a starting point, or implement your own design.

  • You can use any additional packages or frameworks you feel are beneficial to the project

  • The new code must be written in Typescript

  • The app should ideally be able to run on all platforms (Android, iOS, Web), if it's not possible, document which platforms are working so we know which to test.

  • The app can be added to this existing codebase (via git clone) or written externally, but it must work alongside the server in this repo.

  • Include your git history when you send us your code

  • Add a README.md or similar to include any additional information you think is relevant to your submission, including setup instructions, decisions made, issues you faced etc so that we can discuss these later on if necessary

Server

  1. Clone this repository
  2. npm install
  3. npm start
  4. The API is available on http://localhost:3000

API description

GET /api/search?length=32

GET /api/search?length=32&sorting=[DISTANCE|ACTIVITY]

Returns a list of user profiles with some basic information.

Example output

{
  "cursors": {
    "after": (string)
  },
  "total": (number),
  "items": [{
    "id": (string),
    "name": (string),
    "picture": {
      "comment": (string),
      "url": (string)
    },
    ...
  }]
}

/api/profiles?ids=_id1_&ids=_id2_&ids=...

Returns an array of detailed user data matching the given ids.

Example output

[
  {
    "id": (string),
    "location": {
      "name": (string),
      "distance": (number)
    },
    "headline": (string),
    "personal": {
      "age": (number),
      ...
    },
    "sexual": {
      "anal_position": (string),
      ...
    },

    {
      "id": (string),
      ...
    }
]

About

Erasys JavaScript trial task

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •