The 24G Drive Backend Practical Test is a technical evaluation designed to assess the candidate's proficiency in developing a RESTful API using TypeScript and MySQL. The objective is to implement several API routes to handle basic CRUD (Create, Read, Update, Delete) operations, ensuring appropriate handling of HTTP requests and responses, alongside data interaction with a MySQL database.
- Language: TypeScript
- Database: MySQL
- Packages: You are free to use any npm packages you deem fit and appropriate for completing the test
- Create User (
POST /users):- Accept a JSON payload with
firstNameandlastName. - Return the
idof the new user.
- Accept a JSON payload with
- Retrieve User (
GET /users/:id):- Fetch and return the user's data using
id. - Handle non-existent users with a 404 status code.
- Fetch and return the user's data using
- Update User (
PATCH /users/:id):- Update user data using provided
idand payload. - Use a 204 status code for successful updates and 404 for non-existent users.
- Update user data using provided
- Delete User (
DELETE /users/:id):- Delete the user using the provided
id. - Use a 204 status code for successful deletion and 404 if the user doesn’t exist.
- Delete the user using the provided
- User Report
- Write a script in Typescript that generates a CSV file with the following columns, one row for each user in the database. Order the data by users first and last name, alphabetically.
id,firstName,lastName,totalLogins(count),lastLogin(datetime).
- Write a script in Typescript that generates a CSV file with the following columns, one row for each user in the database. Order the data by users first and last name, alphabetically.
Example
| id | firstName | lastName | totalLogins | lastLogin |
|---|---|---|---|---|
| 2 | Elena | Rodriguez | 8 | 2025-10-15T18:12:33Z |
| 3 | Marcus | Johnson | 132 | 2025-10-16T14:45:02Z |
| 1 | Sarah | Chen | 47 | 2025-10-17T09:23:15Z |
- Ensure data is persisted using MySQL.
- Validate API input/output through test requests.
- Utilize the provided script (
npm run test http://localhost:3000) for testing before submission. Change the port if different. - Report script should be executable via
npx ts-node ./generate-user-report.tsor similar and output the report as a CSV file in the current directory the command is being executed from.
- Ensure accurate and consistent HTTP status codes.
- Implement robust error handling.
- Ensure consistent API request and response structures.
The test is structured to evaluate API development, database management, data validation, and error handling skills of the candidates by ensuring alignment with the specified route requirements.
Ensure to follow the guidelines below for packaging and submitting your project upon completion:
- Do not include the
node_modulesdirectory. - Ensure your
package.jsonis accurate for dependency installation vianpm install.
- Compress the project folder into a
.zipfile, excludingnode_modules.
- Upload the
.zipfile to a cloud storage platform (Google Drive, Dropbox, etc.).
- Generate and test a public link for downloading the zipped project file.
- Send the download link via email to the designated submission address and include any necessary details for running your project, known bugs, and features you did not have time to build (if any).
- Testing: Re-test all API routes before submission.
Ensure to thoroughly verify your project and submission email to facilitate a smooth evaluation.