image_management_api/ProjectRequirements.md
2025-05-24 05:12:51 +02:00

3.9 KiB

Sereact GmbH Assignment

Image Management API - Coding Challenge

Deadline: You will have 7 days to complete the challenge.

Overview: Build a scalable image management service that allows teams to securely store, organize, and retrieve images using modern cloud technologies. This challenge tests your ability to work with FastAPI, cloud storage, containerization, and advanced machine learning capabilities.

Image Management API Architecture

Core Requirements:

  1. REST API with FastAPI

Create a RESTful API using FastAPI with proper endpoint documentation (OpenAPI/Swagger)

Implement appropriate error handling and response status codes

Include proper logging and request validation

  1. Data Model

Design and implement the following collections:

Teams: Store team information

Users: Store user details with team associations (no auth flow required)

API Keys: Generate and manage API keys for users

Images: Store metadata about uploaded images with team ownership

  1. Cloud Storage Integration

Implement file upload functionality for images

Configure Google Cloud Storage integration for storing image files

Generate unique filenames and manage metadata appropriately

Handle different image formats and validate uploads

  1. Access Control

Implement API key authentication (no login flow required)

Ensure users can only access images belonging to their team

Add appropriate middleware for validating API keys

Log all access attempts for audit purposes

  1. Containerization & Deployment

Create a Dockerfile for the application

Deploy the containerized application to Google Cloud Run

Configure appropriate environment variables and secrets management

Document the deployment process thoroughly

  1. Database Integration

Choose an appropriate database technology for the problem (MongoDB, Firestore, PostgreSQL, etc.)

Create proper database schemas and relationships

Implement efficient querying patterns

Ensure proper indexing for performance

Bonus Challenges:

  1. Image Understanding

Generate image embeddings using a vision-language model (like CLIP, Google Vision API, etc.)

Store these embeddings in a vector database (Pinecone, Weaviate, etc.)

Establish relationships between images and their embeddings

  1. Semantic Image Search

Create an endpoint that accepts natural language prompts

Use the prompt to retrieve relevant images based on semantic similarity

Return ranked results with relevance scores

Optimize for both accuracy and response time

Deliverables: Source code in a Git repository with clear documentation

Dockerfile and deployment configurations

API documentation (Swagger UI or similar)

Brief architecture document explaining your design decisions

Instructions for local testing and cloud deployment

Any scripts used for setup or data seeding

Evaluation Criteria: Code Quality: Clean, maintainable code with proper error handling

Architecture: Well-designed system architecture with appropriate separation of concerns

Security: Proper API key validation and access control

Performance: Efficient database queries and image handling

Scalability: Design choices that allow for horizontal scaling

Documentation: Clear and comprehensive documentation

Bonus Points: Implementation of image understanding and semantic search features

Time Expectation: Core requirements: 4-6 hours

Bonus challenges: Additional 2-4 hours

Note: While we've provided a time expectation, we value quality over speed. Focus on delivering a well-designed solution rather than rushing to implement all features. Feel free to reach out through Mail in case you have any questions.

Submission Files

Upload File(s) or drag and drop here

Notes

Submit Assignment Powered by Privacy PolicySecurityVulnerability Disclosure