Model First Order

C+ 71 completed
Api
containerized / rust · tiny
37
Files
4,775
LOC
1
Frameworks
5
Languages

Pipeline State

completed
Run ID
#361748
Phase
done
Progress
1%
Started
Finished
2026-04-13 01:31:02
LLM tokens
0

Pipeline Metadata

Stage
Cataloged
Decision
proceed
Novelty
62.20
Framework unique
Isolation
Last stage change
2026-05-10 03:34:29
Deduplication group #62130
Member of a group with 2 similar repo(s) — canonical #24733 view group →
Top concepts (2)
Project DescriptionWeb Backend
If a scraper extracted this row, it came from Repobility (https://repobility.com)

AI Prompt

Create a robust REST API using Rust and Actix-web for managing orders. The system needs to handle order status transitions (Draft $\rightarrow$ Confirmed $\rightarrow$ Shipped $\rightarrow$ Delivered, etc.) and manage associated line items. The API must support endpoints to create orders, list them, retrieve details including line items, and allow adding or removing line items. It should also implement logic to recompute the total amount whenever line items are modified. Since this is a model-first approach, please ensure the structure supports generating a TypeScript client from the OpenAPI specification.
rust actix-web rest-api diesel postgres order-management state-machine openapi typescript
Generated by gemma4:latest

Catalog Information

A Rust REST API for managing orders with a state machine and line items, generating a TypeScript client for front‑end use.

Description

This project implements a RESTful API in Rust that handles orders and their line items. Orders progress through a defined state machine (Draft → Confirmed → Shipped → Delivered, with cancellation options). Each line item includes product SKU, quantity, unit price, and a computed total. The API preserves numeric precision end‑to‑end using PostgreSQL NUMERIC and Rust BigDecimal. A code‑first pipeline generates OpenAPI documentation and a TypeScript client, enabling rapid front‑end integration. The system is designed for developers who need a reliable, type‑safe order management backend.

الوصف

يُقدِّم هذا المشروع واجهة برمجة تطبيقات REST مكتوبة بلغة Rust لإدارة الطلبات مع نظام حالة متسلسل يضم Draft → Confirmed → Shipped → Delivered مع إمكانية الإلغاء من Draft أو Confirmed. كل طلب يحتوي على عناصر طلب (Line Items) تتضمن SKU، الكمية، سعر الوحدة، وحساب إجمالي العنصر تلقائياً. يتم الحفاظ على الدقة الرقمية عبر قاعدة PostgreSQL NUMERIC 19,4، مع تحويلها إلى BigDecimal في Rust ثم إلى سلسلة JSON. يعتمد المشروع على منهجية Model‑First Development، حيث يُنشئ الكود نفسه قاعدة البيانات والواجهات، ثم يُولد وثائق OpenAPI وعميل TypeScript للواجهة الأمامية. يتيح ذلك مطوري الخلفية إنشاء واجهات موثوقة وسريعة، مع ضمان أن كل التغييرات في النموذج تنتقل تلقائياً إلى قاعدة البيانات والعميل. يُستهدف هذا النظام مطوري الواجهات الخلفية ومطوري التجارة الإلكترونية الذين يحتاجون إلى نظام إدارة طلبات متكامل مع قواعد صارمة للبيانات.

Novelty

7/10

Tags

order-processing state-transitions line-items numeric-precision api-documentation database-migrations code-first-development

Technologies

actix diesel serde

Claude Models

claude-opus-4.6

Quality Score

C+
70.6/100
Structure
59
Code Quality
99
Documentation
40
Testing
40
Practices
80
Security
100
Dependencies
60

Strengths

  • Consistent naming conventions (snake_case)
  • Low average code complexity \u2014 well-structured code
  • Good security practices \u2014 no major issues detected
  • Containerized deployment (Docker)

Weaknesses

  • No LICENSE file \u2014 legal ambiguity for contributors
  • No CI/CD configuration \u2014 manual testing and deployment
  • 138 duplicate lines detected \u2014 consider DRY refactoring

Recommendations

  • Set up CI/CD (GitHub Actions recommended) to automate testing and deployment
  • Add a linter configuration to enforce code style consistency
  • Add a LICENSE file (MIT recommended for open source)

Security & Health

5.1h
Tech Debt (C)
A
OWASP (100%)
PASS
Quality Gate
A
Risk (3)
Want this analysis on your repo? https://repobility.com/scan/
Unknown
License
5.0%
Duplication
Full Security Report AI Fix Prompts SARIF SBOM

Languages

rust
54.8%
markdown
39.3%
sql
3.3%
toml
1.8%
yaml
0.8%

Frameworks

Actix

Concepts (2)

Analysis by Repobility (https://repobility.com) · MCP-ready
CategoryNameDescriptionConfidence
Provenance: Repobility (https://repobility.com) — every score reproducible from /scan/
auto_descriptionProject DescriptionA Rust REST API for managing orders, built following the Model-First Development pipeline where code — not specs — is the source of truth.80%
auto_categoryWeb Backendweb-backend70%

Quality Timeline

1 quality score recorded.

View File Metrics

Embed Badge

Add to your README:

![Quality](https://repos.aljefra.com/badge/85903.svg)
Quality BadgeSecurity Badge
Export Quality CSVDownload SBOMExport Findings CSV