Ibenta Technical Test (Flutter)

Welcome to the Ibenta Technical Test for Flutter Developers. Please make sure you have access to this repo.

Requirements:

flutter --version
Flutter 2.2.0 • channel beta • https://github.com/flutter/flutter.git
Framework • revision b22742018b (4 weeks ago) • 2021-05-14 19:12:57 -0700
Engine • revision a9d88a4d18
Tools • Dart 2.13.0

To do this test:

  1. Fork this repo to your github account.
  2. Create a branch: feature/<Your Name in Kebab Case>-<Todays Date> e.g. feature/john-smith-25-09-2020
  3. Push all your changes in that branch.
  4. When you're done with the test, create a pull request.
  5. Send me the link of your pull request. Make sure I have access to your repo and PR.

Level 1:

  1. Create a screen with the following fields:
    1. Username - This is a required text field.
    2. Email - This is a required email field. This should only contain a valid email value.
    3. First Name - This is a required text field.
    4. Last Name - This is a required text field
    5. Password - This is a required password field.
  2. Add a validation for the fields. Please refer to the field definition above.
  3. Add a submit button. Clicking this button will display an alert/notification that the user has been added.

Level 2:

  1. Create another screen all existing users.
  2. Implement a delete functionality that will remove previously added user.
  3. When the list is empty, display a message indicating the user that they need to add a user first.
  4. Implement an edit functionality that will allow user to edit existing users from the table.

Bonus: Implement some form of automated testing.


Level 3:

  1. Do all steps in Level 1 & Level 2
  2. Implement an API client with the following details:
    • Base URL is https://authentication-service-pr45.gitops.ibenta.com/api
    • Will use OAuth2 for security. OAuth2 details are as follows:
      • Grant Type: Client Credentials
      • Access Token URL: https://authentication-service-pr45.gitops.ibenta.com/oauth/token
      • Client ID: AITWD1zyBVuPWgn4ZBHSREtXJDZXL9Lt
      • Client Secret: ELEGpyarKD0OWDrzfiqWqmpkOb4FSKnb
      • Scope: read write
  3. Use this client to:
    1. Create new users:
      • Request: POST https://authentication-service-pr45.gitops.ibenta.com/api/users
      • Request Body:
            {
                "name": "jon.jones@ibenta.com.au",
                "firstName": "Jon",
                "lastName": "Jones",
                "email": "jon.jones@ibenta.com.au",
                "password": "Password1"
            }
        
      • Response: HTTP 201
      • Response Body: Note ignore permission, roles, groups and organisation
            {
                "name": "jon.jones@ibenta.com.au",
                "permissions": [],
                "firstName": "Jon",
                "lastName": "Jones",
                "email": "jon.jones@ibenta.com.au",
                "password": null,
                "roles": [],
                "groups": [],
                "id": 79,
                "organisation": null
            }
        
    2. Update existing users:
      • Request: PUT https://authentication-service-pr45.gitops.ibenta.com/api/users/{id}
      • Request Body:
            {
                "name": "jon.jones@ibenta.com.au",
                "firstName": "Jon",
                "lastName": "Jones",
                "email": "jon.jones@ibenta.com.au",
                "password": "Password1"
            }
        
      • Response: HTTP 200
      • Response Body: Note ignore permission, roles, groups and organisation
            {
                "name": "james.jones@ibenta.com.au",
                "permissions": [],
                "firstName": "Jon",
                "lastName": "Jones",
                "email": "jon.jones@ibenta.com.au",
                "password": null,
                "roles": [],
                "groups": [],
                "id": 79,
                "organisation": null
            }
        
    3. Delete existing user:
      • Request: DELETE https://authentication-service-pr45.gitops.ibenta.com/api/users/{id}
      • Response: HTTP 204
    4. List all users:
      • Request: GET https://authentication-service-pr45.gitops.ibenta.com/api/users
      • Response: HTTP 200
      • Response Body: Note ignore permission, roles, groups and organisation
            {
                "content": [
                    {
                        "name": "jon.jones@ibenta.com.au",
                        "permissions": [],
                        "firstName": "Jon",
                        "lastName": "Jones",
                        "email": "jon.jones@ibenta.com.au",
                        "password": null,
                        "roles": [],
                        "groups": [],
                        "id": 79,
                        "organisation": null
                    }
                ],
                "pageable": {
                    "sort": {
                        "sorted": false,
                        "unsorted": true,
                        "empty": true
                    },
                    "pageSize": 20,
                    "pageNumber": 0,
                    "offset": 0,
                    "paged": true,
                    "unpaged": false
                },
                "totalPages": 1,
                "totalElements": 1,
                "last": true,
                "first": true,
                "sort": {
                    "sorted": false,
                    "unsorted": true,
                    "empty": true
                },
                "numberOfElements": 1,
                "size": 20,
                "number": 0,
                "empty": false
            }
        

Bonus: Implement infinite scrolling or paging.

ibenta_technical_test_flutter

A new Flutter project.

Getting Started

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.