commit fd47e008a8b662153e7204202ed105113896332f Author: johnpccd Date: Fri May 23 21:30:52 2025 +0200 init diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..d2967a5 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,18 @@ +{ + "configurations": [ + { + "name": "windows-gcc-x64", + "includePath": [ + "${workspaceFolder}/**" + ], + "compilerPath": "f:/msys64/ucrt64/bin/gcc.exe", + "cStandard": "${default}", + "cppStandard": "c++17", + "intelliSenseMode": "windows-gcc-x64", + "compilerArgs": [ + "" + ] + } + ], + "version": 4 +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..fd1b662 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,24 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "C/C++ Runner: Debug Session", + "type": "cppdbg", + "request": "launch", + "args": [], + "stopAtEntry": false, + "externalConsole": true, + "cwd": "f:/Work/sereact", + "program": "f:/Work/sereact/build/Debug/outDebug", + "MIMode": "gdb", + "miDebuggerPath": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..0e9eefb --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,59 @@ +{ + "C_Cpp_Runner.cCompilerPath": "gcc", + "C_Cpp_Runner.cppCompilerPath": "g++", + "C_Cpp_Runner.debuggerPath": "gdb", + "C_Cpp_Runner.cStandard": "", + "C_Cpp_Runner.cppStandard": "c++17", + "C_Cpp_Runner.msvcBatchPath": "C:/Program Files/Microsoft Visual Studio/VR_NR/Community/VC/Auxiliary/Build/vcvarsall.bat", + "C_Cpp_Runner.useMsvc": false, + "C_Cpp_Runner.warnings": [ + "-Wall", + "-Wextra", + "-Wpedantic", + "-Wshadow", + "-Wformat=2", + "-Wcast-align", + "-Wconversion", + "-Wsign-conversion", + "-Wnull-dereference" + ], + "C_Cpp_Runner.msvcWarnings": [ + "/W4", + "/permissive-", + "/w14242", + "/w14287", + "/w14296", + "/w14311", + "/w14826", + "/w44062", + "/w44242", + "/w14905", + "/w14906", + "/w14263", + "/w44265", + "/w14928" + ], + "C_Cpp_Runner.enableWarnings": true, + "C_Cpp_Runner.warningsAsError": false, + "C_Cpp_Runner.compilerArgs": [], + "C_Cpp_Runner.linkerArgs": [], + "C_Cpp_Runner.includePaths": [], + "C_Cpp_Runner.includeSearch": [ + "*", + "**/*" + ], + "C_Cpp_Runner.excludeSearch": [ + "**/build", + "**/build/**", + "**/.*", + "**/.*/**", + "**/.vscode", + "**/.vscode/**" + ], + "C_Cpp_Runner.useAddressSanitizer": false, + "C_Cpp_Runner.useUndefinedSanitizer": false, + "C_Cpp_Runner.useLeakSanitizer": false, + "C_Cpp_Runner.showCompilationTime": false, + "C_Cpp_Runner.useLinkTimeOptimization": false, + "C_Cpp_Runner.msvcSecureNoWarnings": false +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/Requirements.md b/Requirements.md new file mode 100644 index 0000000..c209caa --- /dev/null +++ b/Requirements.md @@ -0,0 +1,169 @@ +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](images/image.png) + + + +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 + + +2. 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 + +3. 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 + + +4. 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 + + +5. 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 + + + +6. 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 + + +2. 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 + diff --git a/images/image.png b/images/image.png new file mode 100644 index 0000000..49a9c82 Binary files /dev/null and b/images/image.png differ