Skip to content

light-space/mobile-challenge-fs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Invoice Approval Workflow Challenge

At Light, we want to buld the best-in-class invoice approval workflow application. When a customer receives an invoice from a vendor, an approval request is automatically sent to one or more employees (approvers).

Overview

The approval routing logic is based on three criteria:

  • Invoice amount
  • Department
  • Manager approval requirement

Any combination of these criteria can be used to determine the approval flow.

Your task is to implement the workflow logic shown in Figure 1 below:

code_exercise_diagram

Figure 1: Invoice Approval Workflow

Important Note on Design

While you could hardcode all the conditions, we're looking for a flexible, dynamic design that would allow the workflow to be modified without code changes. You don't need to implement the UI for updating workflows, but your architecture should support it.

Requirements

Please provide the following:

1. Database Model

Design a database schema to support workflow configuration and execution.

  • You may include a visual diagram (JPEG or similar) in your README
  • No need to implement the actual database—in-memory structures are fine for this exercise

2. Workflow Processing Logic

Implement the workflow shown in Figure 1 with an HTTP endpoint:

  • Input fields: invoice amount, department, manager approval flag
  • Output: Return the approval routing results (which approvers were selected)
  • Notifications: For this exercise, simply print "sending approval via Slack" to the console instead of implementing actual notification logic

3. Simple UI

Create a basic interface to call your endpoint and execute the workflow.

Additional Notes

  • Assume all amounts are in USD (no currency conversion needed)
  • Feel free to document any real-world considerations or improvements in your README

Provided Starter Code

We have included a basic Kotlin backend setup with placeholders for your implementation. You are welcome to use a different structure or language — any object-oriented language is acceptable, though statically typed languages are preferred.

Build & Run Instructions

Backend

cd backend
./gradlew clean build
./gradlew run

Mobile App

cd app
npm install
npm run ios

Submission

  1. Create a bundle: git bundle create challenge-<your-name>.bundle --all
  2. Send us the generated bundle file

We look forward to seeing your solution! If you have any questions, please don't hesitate to reach out.

About

Full-stack coding challenge (mobile)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published