← Credit Genie Interview Insights

Credit Genie·Software Engineer·Take-home Assignment·Intermediate

IntermediatePrefer not to say
Jun 2026

Summary

Technical interview at Credit Genie for a Software Engineer role where they handed me a partially built FastAPI project and asked me to finish it. Pretty hands-on, less whiteboard theory and more "here's real code, make it work."

Questions Asked (3)

Q1

You're given a FastAPI project with working create and read endpoints and shared Pydantic models. Implement the missing update and delete endpoints to complete the CRUD setup, matching the existing request/response schemas and status codes.

API & IntegrationsTechnical Trade-offs
Author's notes

The existing endpoints were basically a blueprint so I leaned on those hard.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, review the existing create and read endpoints to understand the project's conventions for routing, dependency injection, and response models. Then implement update and delete endpoints that mirror those patterns, using the shared Pydantic models and appropriate HTTP status codes. Finally, verify edge cases like missing resources and partial updates.

Pro tip: Mention that you'll use Pydantic's `exclude_unset` for PATCH-style updates to avoid overwriting fields with defaults, and return 204 No Content for successful deletes to match REST best practices.

1. Review existing code

Examine the create and read endpoints to identify patterns for path parameters, request bodies, response models, and error handling. Note the status codes used (e.g., 201 for create, 200 for read).

2. Design update endpoint

Decide between PUT (full replacement) and PATCH (partial update) based on the existing schemas. Use the shared Pydantic model for the request body and return the updated resource with a 200 status code.

3. Design delete endpoint

Implement a DELETE endpoint that removes the resource by ID. Return 204 No Content on success, and 404 if the resource doesn't exist.

4. Handle errors and edge cases

Add proper error handling for non-existent IDs (404), invalid input (422), and ensure database operations are atomic. Use FastAPI's HTTPException for consistent error responses.

5. Test and verify

Write or run tests to confirm the new endpoints work correctly, including success cases, not-found cases, and validation errors. Ensure they match the existing API contract.

Key Points to Mention

  • Use of shared Pydantic models for request/response validation
  • Appropriate HTTP status codes: 200 for update, 204 for delete, 404 for not found
  • Handling partial updates with PATCH and `exclude_unset` to avoid overwriting fields
  • Dependency injection for database sessions and path parameter validation
  • Error handling with HTTPException and consistent error response format
  • Idempotency of PUT and DELETE methods

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

Write unit tests covering all four CRUD endpoints.

API & Integrations
Author's notes

I patched the data layer and tested happy paths plus the 404 cases.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the API contract and test environment, then outline a test plan that covers each CRUD operation with happy path, edge cases, and error scenarios. Emphasize isolation, repeatability, and the use of mocks or test doubles for external dependencies.

Pro tip: Use a test data builder or factory to create valid payloads and avoid hardcoding, making tests more maintainable and less brittle. Also, consider contract testing to ensure your tests align with the API specification.

1. Understand the API and requirements

Review the API documentation for the four CRUD endpoints, including request/response formats, status codes, and authentication. Clarify any ambiguities about expected behavior.

2. Set up the test environment

Configure a testing framework (e.g., JUnit, pytest, Jest) and ensure you can run tests in isolation. Use a test database or mock external services to avoid dependencies.

3. Write tests for each CRUD operation

For each endpoint, write tests covering successful operations, invalid inputs, missing resources, and authorization failures. Use parameterized tests to cover multiple scenarios efficiently.

4. Ensure test isolation and cleanup

Use setup and teardown methods to create and destroy test data, ensuring tests don't interfere with each other. Consider using transactions or in-memory databases for speed.

5. Run and refine tests

Execute the test suite, check coverage, and refine tests to cover edge cases. Integrate with CI/CD to run tests automatically on code changes.

Key Points to Mention

  • Test each CRUD operation: Create (POST), Read (GET), Update (PUT/PATCH), Delete (DELETE).
  • Cover happy path, edge cases (e.g., invalid IDs, malformed payloads), and error responses (4xx, 5xx).
  • Use mocking or stubbing for external dependencies like databases or third-party services.
  • Ensure tests are independent and can run in any order (isolation).
  • Validate response status codes, headers, and body content.
  • Consider security aspects like authentication and authorization in tests.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

How would you approach implementing these endpoints if you had never used FastAPI before, using the existing code and documentation as your guide?

Adaptability & AmbiguityAPI & Integrations
Author's notes

This was the part I actually liked.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Emphasize a systematic learning approach: start by exploring the existing codebase and FastAPI documentation to understand patterns, then incrementally implement endpoints with testing. Highlight adaptability, resourcefulness, and leveraging team knowledge.

Pro tip: Show that you prioritize understanding the 'why' behind existing patterns before writing code, and that you're not afraid to ask targeted questions after doing your own research.

1. Explore existing code and docs

Review the current codebase to identify similar endpoints, project structure, and conventions. Skim FastAPI documentation for core concepts like routing, request handling, and dependency injection.

2. Set up a minimal working example

Create a simple endpoint (e.g., health check) to validate your understanding and environment. Use FastAPI's interactive docs (Swagger UI) to test it.

3. Incrementally implement endpoints

Build one endpoint at a time, following existing patterns and reusing utilities. Write tests alongside to ensure correctness and catch issues early.

4. Seek feedback and iterate

Share your work with teammates for review, ask specific questions where stuck, and refine based on feedback. Document any new patterns you introduce.

Key Points to Mention

  • Leveraging existing code as a reference for patterns and conventions
  • Using FastAPI's automatic interactive documentation for testing and learning
  • Starting with a small, testable piece to build confidence
  • Writing tests to validate behavior and prevent regressions
  • Asking targeted questions after independent research
  • Documenting learnings and sharing with the team

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.