Stack technologique, pipelines IA et infrastructure cloud
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MAD LORDS STUDIO IA - ARCHITECTURE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโ
โ Client iOS โ
โ React Nativeโ
โโโโโโโโฌโโโโโโโโ
โ HTTPS/REST
โผ
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ
โ API โโโโโโโโบโ Auth Service โ
โ Gateway โ โ (JWT + OAuth2) โ
โโโโโโโโฌโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโดโโโโโโโโโฌโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโ
โผ โผ โผ โผ
โโโโโโโโโโโ โโโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ Prompt โ โ IA 2D โ โ Pipeline โ โ Printer โ
โ Engine โ โ Stable- โ โ 2D โ 3D โ โ Integration โ
โ (Brief) โ โ Diffusion โ โ Tripo AI โ โ SDK โ
โโโโโโฌโโโโโ โโโโโโโฌโโโโโโ โโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ
โ โ โ โ
โ โผ โผ โผ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโบโ PostgreSQL + Redis โ
โ (Users, Projects, Assets, Queue) โ
โโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Object Storage (S3) โ
โ (Images 2D, Modรจles 3D, Fichiers STL) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Le moteur de prompt guidรฉ transforme les choix utilisateur en prompt technique optimisรฉ pour Stable Diffusion.
class GuidedPromptEngine: """Convertit les choix utilisateur en prompt IA optimisรฉ""" def build_prompt(self, brief: JewelryBrief) -> str: components = [] # Type de bijou components.append(f"{brief.jewelry_type} jewelry piece") # Vocabulaire Mad Lords selon l'univers style_mapping = { "desert_sun": "desert sun aesthetic, warm golden tones, sand textures", "moon_stars": "celestial motifs, moon phase, silver luminance", "serpents": "snake coils, reptilian scales, mystical serpent", "sacred": "sacred geometry, ancient symbols, spiritual sigils", } components.append(style_mapping.get(brief.universe)) # Matรฉriaux et finitions components.append(f"{brief.metal} metal, {brief.finish} finish") # Paramรจtres techniques LoRA lora_trigger = "<lora:madlords_style_v1:0.8>" return self._assemble(components, lora_trigger)
Modรจle SDXL enrichi par entraรฎnement LoRA sur le catalogue Mad Lords :
# รtape 1: Conversion via Tripo AI POST /api/tripo/generate { "image_url": "s3://madlords/renders/ring_001.png", "mode": "jewelry_detailed", "output_format": "glb" } # รtape 2: Post-traitement Blender (script Python) bpy.ops.wm.open_mainfile(filepath="raw_model.glb") bpy.ops.object.mode_set(mode='EDIT') bpy.ops.mesh.remove_doubles(threshold=0.0001) # Fusion vertices bpy.ops.mesh.fill_holes(sides=64) # Fermeture trous bpy.ops.object.modifier_add(type='SOLIDIFY') # รpaisseur minimale bpy.ops.export_mesh.stl(filepath="output.stl") # รtape 3: Validation STL pour joaillerie class STLValidator: MIN_WALL_THICKNESS = 0.8 # mm - minimum pour fonte or MAX_OVERHANGS = 45 # degrรฉs - supportable sans structures def validate(self, stl_path: str) -> ValidationResult: mesh = trimesh.load(stl_path) checks = { "manifold": mesh.is_watertight, "wall_thickness": self._check_thickness(mesh), "overhangs": self._check_overhangs(mesh), "volume": mesh.volume > 10, # mmยณ minimum } return ValidationResult( valid=all(checks.values()), details=checks )
| Modรจle | Technologie | Prรฉcision |
|---|---|---|
| Formlabs Form 4 | MSLA | 25 ฮผm |
| Asiga MAX X | DLP | 27 ฮผm |
| Envision One cDLM | cDLM | 25 ฮผm |
Formlabs Castable Wax 40 โ Rรฉsine spรฉciale pour fonte ร cire perdue, brรปlage propre, dรฉtails fins jusqu'ร 50ฮผm.
class FormlabsPrinterSDK: async def prepare_print( self, stl_path: str, resin: str = "castable_wax_40" ) -> PrintJob: # Upload vers PreForm job = await self.preform.upload( stl_path, orientation="auto", supports="auto_light" ) # Estimation temps et rรฉsine estimate = await job.estimate() return PrintJob( id=job.id, duration=estimate.time, resin_ml=estimate.resin, layer_height=0.025 # 25ฮผm ) async def start_print(self, job_id: str): return await self.printer.start(job_id) async def get_status(self, job_id: str): return await self.printer.status(job_id)
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ USERS โ โ PROJECTS โ โ ASSETS โ
โโโโโโโโโโโโโโโโโโโค โโโโโโโโโโโโโโโโโโโค โโโโโโโโโโโโโโโโโโโค
โ id (PK) โโโโโโโ<โ user_id (FK) โโโโโโโ<โ project_id (FK) โ
โ email โ โ id (PK) โ โ id (PK) โ
โ invitation_code โ โ jewelry_type โ โ type (2d/3d/stl)โ
โ created_at โ โ universe โ โ s3_path โ
โ profile_data โ โ budget โ โ version โ
โโโโโโโโโโโโโโโโโโโ โ metal โ โ validation โ
โ stones โ โ created_at โ
โ status โ โโโโโโโโโโโโโโโโโโโ
โ brief_json โ
โ prompt โ โโโโโโโโโโโโโโโโโโโ
โ created_at โ โ PAYMENTS โ
โโโโโโโโโโฌโโโโโโโโโ โโโโโโโโโโโโโโโโโโโค
โโโโโโโโโโโโโโโโโ>โ project_id (FK) โ
โ id (PK) โ
โ type (20/30/50) โ
โ amount โ
โ stripe_id โ
โ status โ
โ paid_at โ
โโโโโโโโโโโโโโโโโโโ
name: Deploy Mad Lords Backend on: push: branches: [main, staging] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Run Tests run: | pytest tests/ --cov=app build: needs: test runs-on: ubuntu-latest steps: - name: Build Docker Image run: docker build -t madlords-api . - name: Push to ECR run: aws ecr push madlords-api:${{ github.sha }} deploy: needs: build runs-on: ubuntu-latest steps: - name: Deploy to ECS run: | aws ecs update-service \ --cluster madlords-prod \ --service api \ --force-new-deployment
| Environnement | Branche | URL |
|---|---|---|
| Production | main | api.madlords.studio |
| Staging | staging | staging-api.madlords.studio |
| Dev | develop | dev-api.madlords.studio |