Backend - Junior

0/12 preguntas respondidas 0%
Candidate information
Accepted formats: PDF, DOC, DOCX. Maximum 5MB

Knowledge questions

Question 1 of 12: This PHP code has a critical vulnerability: `$id = $_GET["id"]; $result = mysqli_query($conn, "SELECT * FROM users WHERE id = $id");`. What is the problem?
Question 2 of 12: What is the difference between `include`, `require`, `include_once`, and `require_once` in PHP?
Question 3 of 12: This Python code has a subtle bug: `def add_item(item, items=[]): items.append(item); return items`. When calling `add_item("a")` then `add_item("b")`, what does the second call return?
Question 4 of 12: What is the difference between list, tuple, and dictionary in Python?
Question 5 of 12: This Node.js/Express endpoint never responds: `app.get("/users", async (req, res, next) => { const users = getUsers(); res.json(users); });` where `getUsers()` returns a Promise. Why?
Question 6 of 12: How does the Node.js event loop work if it is single-threaded?
Question 7 of 12: This SQL query returns fewer results than expected: `SELECT users.name, orders.total FROM users LEFT JOIN orders ON users.id = orders.user_id WHERE orders.total > 100`. Why?
Question 8 of 12: What is the difference between `WHERE` and `HAVING` in SQL?
Question 9 of 12: When would you choose MongoDB over PostgreSQL and vice versa?
Question 10 of 12: What is Redis used for and what data structures does it offer beyond simple key-value?
Question 11 of 12: What HTTP codes correspond to: resource created, validation failed, unauthorized, and rate limit exceeded?
Question 12 of 12: What is the difference between goroutines in Go and operating system threads?

Coding challenge

Develop a REST API with JWT authentication that manages a complete CRUD for "projects". The API must include data validation, consistent error handling, and pagination on listing endpoints.

Requirements

  1. JWT authentication (register, login, route protection)
  2. Full CRUD for projects (create, read, update, delete)
  3. Input data validation with clear error messages
  4. Pagination on listing endpoint (limit/offset or cursor)
  5. Consistent error handling with appropriate HTTP codes

Examples

Input: POST /api/projects { "name": "My Project", "description": "Description" } with header Authorization: Bearer <token>
Output: 201 Created { "id": "uuid", "name": "My Project", "description": "Description", "createdAt": "2024-01-15T10:00:00Z" }
Input: GET /api/projects?page=1&limit=10 without token
Output: 401 Unauthorized { "error": "Token not provided or invalid" }

Accepted technologies

  • Node.js + Express/Fastify
  • Python + FastAPI/Flask
  • PHP + Laravel/Symfony
  • Go + Gin/Echo
  • TypeScript + NestJS

Solution submission

Supported platforms: GitHub, GitLab, Bitbucket Enter a valid repository URL (https://github.com, gitlab.com, or bitbucket.org followed by owner/repository)