Skip to content

About

No description, website, or topics provided.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Kesowa Back End Developer Assignment

A take-home assignment for back end candidates at Kesowa. You build a Node.js REST API that ingests geospatial imagery and extracts location information from it. The test suite in __tests__/ defines the contract — your job is to make it pass.

This repository is published openly so candidates can read the task before applying, and so the tests can be reviewed by anyone. It is not a production service.

What you are building

A REST server that lets a user register, log in, upload geotagged images, and read back the extracted coordinates. The expected endpoints, status codes and response shapes are all specified by __tests__/app.test.ts.

Requirements

  • Node.js 16 or later
  • A running MongoDB instance

Getting started

git clone https://github.com/Kesowa/backend_assignment.git
cd backend_assignment
npm install
cp .env.example .env    # then edit .env for your local setup
npm run dev             # starts the server with live reload
npm test                # runs the suite you need to make pass

Configuration

Configuration is read from a .env file, which is git-ignored. Copy .env.example and fill it in:

Variable Purpose
MONGO_URI MongoDB connection string for the data store
PORT Port the HTTP server listens on (defaults to 8080)
JWT_SECRET Secret used to sign auth tokens — generate your own

How to submit

  1. Fork this repository.
  2. Implement the endpoints the tests require.
  3. Make the full suite pass with npm test.
  4. Open a pull request against master.
  5. Wait for review.

Rules

  • Do not modify __tests__/ unless something there is genuinely broken. If you believe a test is wrong, say so in your pull request rather than editing around it.
  • Persist all data in a MongoDB instance.
  • Store uploaded media on disk, not in the database.
  • Authenticate using the Authorization header.

Hint: reading coordinates from an image

Every image in assets/ carries EXIF GPS metadata. Use an EXIF parser to pull out latitude and longitude — the raw tags look like this:

exif:GPSAltitude: 64022/1000
exif:GPSAltitudeRef: 1
exif:GPSDateStamp: 2022:01:03
exif:GPSInfo: 3627
exif:GPSLatitude: 22/1, 35/1, 179159/10000
exif:GPSLatitudeRef: N
exif:GPSLongitude: 88/1, 27/1, 37260/10000
exif:GPSLongitudeRef: E
exif:GPSProcessingMethod: 65, 83, 67, 73, 73, 0, 0, 0, 71, 80, 83, 0
exif:GPSTimeStamp: 10/1, 23/1, 54/1

Note that latitude and longitude are given as degrees, minutes and seconds in rational form — you will need to convert them to decimal degrees.

Contributing

Candidate submissions go through the fork-and-pull-request flow above. For corrections to the assignment itself — a broken test, an unclear requirement, a bug in the scaffolding — see CONTRIBUTING.md.

Security

Please do not open public issues for security problems. See SECURITY.md for how to report them.

License

Released under the MIT License. © Kesowa Infinite Ventures.

About

No description, website, or topics provided.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages