Skip to content

UncSoftware/unc-online-test

Repository files navigation

📃 Unc Software Online Test

This is the API repository of the UncSoftware Test. All the source code and requirements are described here. Check the required steps below 👇

👌 What you should do

  • Create a React or React Native

    • Your can choose JavaScript or TypeScript
  • Create a page to register a new customer in the database

    • This page must have these input fields:
      • Name (required)
      • Email (required)
      • Phone (required)
      • Birth Date (required)
      • Postal Code
      • Street Name
      • Neighborhood
      • City
      • State
    • You should create a button to send a request to the API
    • The page should handle errors returned from the API
    • After save a customer you should clear all input fields
    • A loading indicator must appear while the API is processing your request

💻 If your project is a website

  • Your website should work well in a cellphone, tablet and in the web (responsiveness)

📳 If your project is a React Native app

  • Create a splash screen for your project (a splash screen is shown when the app is opening)

👎 What you should not do

  • Don't use UI kits such as Material UI, React Bootstrap
  • Don't use React templates

⭐ Differentials

  • Setup Eslint and Prettier in your project
  • A beautiful design and great usability
  • Automated tests
  • TypeScript

🌐 How to consume the API

The file insomnia.json in the root of the project contain all the methods below. You can import this file in your Insomnia to test requests.

Methods

Route Method Explanation
/customer:id GET Get all customers or a single one if you put the id in the route (ex: /customer/abc123 will return only one customer)
/customer PATCH Edit a customer
/customer POST Save a new customer
/customer:id DELETE Delete a customer

Customer Data

Field Type Explanation
id uuid Customer ID (uuid4)
name string Customer name
email string Customer email
phone string Customer phone
birthDate string Customer birth date
postalCode string Customer postal code (CEP in Brazil)
streetName string Customer street name
neighborhood string Customer neighborhood (Bairro in Brazil)
city string Customer city
state string Customer State (SP, RJ, MS)
createdAt timestamp Creation date
updatedAt timestamp Last update date

▶️ How to Run the API locally

  1. Download and install NodeJS LTS version
  2. Follow the instructions below to run the API in development mode:
# Clone the project
git clone https://github.com/UncSoftware/unc-online-test.git

# Install dependencies
yarn install
# or
npm i

# Run the project
yarn dev
# or
npm run dev

🚀 How to submit your project to us

📧 Send an email to us with the url of your repository:

PS: If your project is a website you can deploy to the GitHub Pages, Firebase Hosting or others to help us testing.

We will analyze your project and give you feedback faster as we can.

💩 If you find a problem in the API

Create an issue in this project and our team will fix as fast as we can.

About

Unc Software Online Test

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •