This is the API repository of the UncSoftware Test. All the source code and requirements are described here. Check the required steps below 👇
-
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
- This page must have these input fields:
💻 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)
- Don't use UI kits such as Material UI, React Bootstrap
- Don't use React templates
- Setup Eslint and Prettier in your project
- A beautiful design and great usability
- Automated tests
- TypeScript
- This API is running at: http://unicodesoftware-interno.ddns.net:3333
- You can also clone this project and run in your computer. There are instructions on how to do this in the section below.
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 |
| 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 |
- Download and install NodeJS LTS version
- 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📧 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.
- Email: contato@unicodesoftware.com.br
- Subject: UNC Online Test
- Message: Put here the URL of your repository in GitHub or GitLab
We will analyze your project and give you feedback faster as we can.
Create an issue in this project and our team will fix as fast as we can.