0% found this document useful (0 votes)
3 views4 pages

Software Developer

The NagaEd Software Developer Hurdle Task requires candidates to build a full-stack user registration and authentication system using React, Node.js, FastAPI, MySQL, and Docker. The task is divided into four main components: a backend API, a React frontend, a FastAPI microservice for AI features, and a Docker Compose setup. Candidates must submit their code along with an architecture diagram and a README within three days of receiving the task, with an estimated completion time of 4-5 hours.

Uploaded by

konangtubai
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views4 pages

Software Developer

The NagaEd Software Developer Hurdle Task requires candidates to build a full-stack user registration and authentication system using React, Node.js, FastAPI, MySQL, and Docker. The task is divided into four main components: a backend API, a React frontend, a FastAPI microservice for AI features, and a Docker Compose setup. Candidates must submit their code along with an architecture diagram and a README within three days of receiving the task, with an estimated completion time of 4-5 hours.

Uploaded by

konangtubai
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

NagaEd — Software Developer Hurdle Task

NagaEd
Software Developer
Hurdle Task — Mid-Level

Total Duration Approximately 4–5 hours (manage your time effectively)

Submission Submit via the online form within 3 days of receiving this task

Stack React, [Link] (Express), FastAPI (Python), MySQL, Docker

Format Source code as a ZIP or GitHub link + one-page architecture diagram (PNG/PDF)

Overview
This task reflects the real day-to-day work at NagaEd. You will build a small but complete full-stack
feature: a user registration and authentication system with a React frontend, a [Link] REST API, a
FastAPI AI microservice, and a Docker Compose setup that ties it all together. Read all four tasks before
you begin — they are interdependent.

Task 1: Backend API with [Link]


Estimated time: 1.5 – 2 hours

Build a REST API in [Link] (Express or Fastify) that handles user registration and authentication. This is
the core backend service all other tasks depend on.

Instructions
1.​ Initialise a [Link] project and create a REST API with the following endpoints:
◦​ POST /api/register — accepts { username, email, password, address } in the request body
◦​ POST /api/login — accepts { email, password } and returns a signed JWT on success
◦​ GET /api/users/:id — protected route; returns the user record (excluding password) when a valid
JWT is provided
2.​ Store users in a MySQL database. Hash passwords using bcrypt before storing.
3.​ Validate all incoming fields — return appropriate 4xx errors for missing or malformed data.
4.​ Include a README that explains how to install dependencies and run the server.

Confidential — NagaEd RecruitmentPage


NagaEd — Software Developer Hurdle Task

What Good Looks Like


•​ Clean separation of concerns (routes, controllers, services, db layer)
•​ Sensible HTTP status codes and consistent error response shape
•​ No plain-text passwords anywhere — ever

Task 2: React Frontend


Estimated time: 1 – 1.5 hours

Build a minimal React interface that consumes the API from Task 1. This tests your ability to connect a
modern frontend to a REST backend and handle real-world UI concerns like loading states and errors.

Instructions
5.​ Create a React app (Vite or Create React App) with two pages or views: Register and Login.
6.​ The Register form collects username, email, password, and address. The Login form collects
email and password.
7.​ On successful login, store the returned JWT and display the logged-in user’s username on a
simple dashboard page.
8.​ Handle and display errors returned from the API (e.g. “Email already in use”, “Invalid
credentials”).
9.​ The UI does not need to be polished, but it must be functional and not broken on a standard
desktop viewport.

What Good Looks Like


•​ API calls extracted into a service or hook layer, not inline in components
•​ Loading and error states handled gracefully
•​ No hardcoded credentials or API keys in the code

Task 3: FastAPI AI Microservice


Estimated time: 1 – 1.5 hours

Build a small Python FastAPI service that adds an AI-powered feature to the application. This reflects the
kind of work done on Marina AI at NagaEd.

Instructions
10.​ Create a FastAPI service (separate from the [Link] API) with a single POST endpoint: POST
/api/suggest-username
11.​ The endpoint accepts { interests: string[] } in the request body and uses the Groq API ([Link]
— free tier available) to call an LLM and suggest 3 unique, creative usernames based on the
provided interests.
12.​ Return the suggestions as a JSON object: { suggestions: ["name1", "name2", "name3"] }
13.​ Add error handling for cases where the Groq API call fails or the input is malformed.

Confidential — NagaEd RecruitmentPage


NagaEd — Software Developer Hurdle Task

14.​ The FastAPI /docs (Swagger UI) page should render correctly and be usable without additional
setup.

Note: Sign up for a free Groq API key at [Link]. No credit card is required. Store the key as an
environment variable GROQ_API_KEY — never hardcode it.

What Good Looks Like


•​ Pydantic models used for request and response validation
•​ LLM API key loaded from environment variable, never hardcoded
•​ The prompt is thoughtful — the model is given clear, concise instructions
•​ The /docs page renders correctly and describes the endpoint accurately

Task 4: Docker Compose


Estimated time: 1 hour

Containerise all three services and wire them together with Docker Compose. This reflects how NagaEd
deploys applications on AWS.

Instructions
15.​ Write a Dockerfile for the [Link] API and a separate Dockerfile for the FastAPI service. The
React app can be served from the [Link] container or a simple Nginx container.
16.​ Write a [Link] that starts all services together. Services must communicate by
container service name, not localhost.
17.​ Environment variables (JWT secret, Groq API key, database credentials) must be loaded via a
.env file — do not hardcode them in Dockerfiles or the compose file.
18.​ Running docker compose up should bring up the entire application with no manual steps beyond
copying .[Link] to .env.
19.​ Include a brief architecture diagram showing the services, ports, and how they communicate.

What Good Looks Like


•​ Multi-stage Docker builds to keep image sizes small
•​ .dockerignore files present in each service directory
•​ Health checks defined in the compose file
•​ Containers run as a non-root user
•​ Only necessary ports are exposed publicly

Evaluation Criteria
We evaluate submissions holistically. You will not be penalised for using documentation or AI tools — we
do that every day. What matters is the quality of your thinking and the cleanliness of your implementation.

Area What We're Looking For

Confidential — NagaEd RecruitmentPage


NagaEd — Software Developer Hurdle Task

Code Quality Readable, maintainable code with a sensible structure. We should be able
to onboard your codebase easily.

Full-Stack Depth Clear understanding of how the frontend, backend, and microservice
interact end-to-end.

Security Basics Passwords hashed, JWTs validated, secrets in env vars, no obvious
injection vectors.

Container Knowledge Docker setup works first time with docker compose up. Services
communicate correctly.

AI Integration The FastAPI microservice is functional, the Groq integration works, and the
prompt is well-crafted.

Communication README is clear and accurate. Code is well-structured and easy to follow.

Submission Instructions
20.​ Push your code to a public GitHub repository, OR zip the entire project directory.
21.​ Include a top-level [Link] with your name, contact details, and full setup instructions.
22.​ Include your architecture diagram as a PNG or PDF in the repository root or zip.
23.​ Submit via [Link] with subject line: [Your Full Name] — Software
Developer Hurdle Task Submission

Good luck — we look forward to seeing what you build.

Confidential — NagaEd RecruitmentPage

You might also like