Skip to content

Latest commit

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Full-Stack Pairing Interview (Django + Vanilla JS)

This repository is intentionally scaffolded for a pairing interview.

The setup works out of the box, but tests are currently failing by design.

Candidates should get all tests to pass.

Stack

  • Backend: Django + SQLite
  • Frontend: Vanilla JavaScript + Vitest

Interview Tasks

Task order for this round:

  1. Frontend test 1: Implement arrayToObject in frontend/src/01-array-to-object.js.

    • Convert an array of objects into an object keyed by id.
    • Preserve all non-id properties in each value.
    • Use null when an item only has id and no additional properties.
    • Handle empty arrays.
  2. Backend test 1: Implement xml_file_count in backend/interview_app/models.py and related workflow logic.

    • Add xml_file_count to User.
    • Count only associated File records with file_type="xml".
    • Keep the field updated when File records are created, updated, or deleted.
    • Ensure tests in backend/interview_app/test_01_xml_file_counter.py pass.
  3. Frontend test 2: Implement createDebouncedSearch in frontend/src/02-debounced-search.js.

    • Input should initialize from searchValue.
    • Input should update when searchValue changes.
    • Search should be debounced and call onSearch with latest input.
    • Show a loading indicator while async search is in progress.
    • Support lifecycle-like behavior via returned update and destroy methods.

Run backend tests:

cd backend
python -m pip install -r requirements.txt
python manage.py test

Run frontend tests:

cd frontend
npm install
npm test

Optional local run

Backend API server:

cd backend
python manage.py runserver

Frontend app:

cd frontend
npm start

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages