---
# System prepended metadata

title: Badgewell Backend Developer Task

---

# Badgewell Backend Developer Task

This task is to assess your skills using **Node Js** and it’s native modules along with other Frameworks like **Express Js** or **Nest Js**.


## Requirements

A simple Authentication API with Express Js or Nest Js with Mongodb Database.


## 1. Sign Up Route
```
[POST] /api/auth/signup
```

It should take email, first name, last name and password from the API consumer, Validating them and save that user in DB if everything is fine, feel free to collect extra data from the user.

## 2. Sign In Route
```
[POST] /api/auth/signin
```

It should take email and password from the API consumer, Validating them and sign in this user and returning user tokens.

## 3. Me Route
```
[GET] /api/me
```

It should return the user data based on the token provided in the request headers and throw error if the token is invalid.

## 4. Refresh Token Route
```
[PATCH] /api/auth/refresh-token
```

It should update the user refresh tokens.

## 5. Logout Route
```
[POST] /api/auth/logout
```

It should log the user out and close the session with backend by expiring the old tokens.



## Task Evaluation

| Criteria                               | Weight    | Required |
| -------------------------------------- | --------- | -------- |
| Authentication and Authorization scenario     | 20        | `true`   |
| Use of Typescript                      | 10         | `true`   |
| Use of (Express/Nest) Framework           | 10        | `true`   |
| Validation                             | 8         | `true`   |
| Following RESTful API standard         | 6         | `true`   |
| Performance and Security                             | 6         | `true`   |
| Unit Testing                | 15 (bonus) | `false`  |
| GraphQl                 | 5 (bonus) | `false`  |
| Code linting and formatting                 | 5 (bonus) | `false`  |



