longfellowone/field-services
49.5
Weak · 21 September 2026
3.7k
lines of production code
Go
primary language
4
measurements over time
What this system is
Features
Add Postgres repository implementations for orders, products, and projects
The application now supports a Postgres database backend for managing supply chain data. New repository implementations have been added for orders, products, and projects, each providing database operations such as saving, finding, and deleting records. The order repository specifically handles saving and retrieving order details along with their associated line items, while the product and project repositories provide similar CRUD capabilities. This change enables the system to persist and query supply-related entities using Postgres instead of the previous (likely in-memory or other) storage mechanism.
supply/postgres · high confidence
Add fuzzy product search service
Introduces a new search service that performs fuzzy matching on product names, limiting results to the top 10 matches. The service retrieves all products via a repository interface and uses the 'sahilm/fuzzy' library to find matches, handling character normalization and result truncation.
supply/search · high confidence
Add gRPC service entry point for supply chain operations
A new gRPC server is introduced in the cmd/grpcsvc package, exposing ordering and search capabilities. The service connects to a PostgreSQL database and initializes repositories for orders, products, and projects to support the ordering and search business logic.
cmd/grpcsvc · high confidence
Added JWT-based authentication middleware for the supply service
A new authentication middleware has been introduced in the supply service to validate JSON Web Tokens (JWT) from Auth0. The middleware verifies the token's audience, issuer, and signature using the Auth0 public key. It then extracts user details (ID, email) and checks for specific scopes ('create:orders' and 'manage:orders') to determine if the user is a foreman or purchaser. If validation fails or the user lacks the required scope, an appropriate HTTP error is returned; otherwise, the user context is passed to downstream handlers.
supply/auth · medium confidence
Added MongoDB repository implementations for orders and products
The \supply/mongo\ package now provides concrete repository implementations for persisting and retrieving Order and Product entities using MongoDB. This includes connection logic, index creation, and CRUD operations (Save, Find, FindAll) for both domains, enabling the application to store and query order and product data in a MongoDB database.
supply/mongo · high confidence
Added example code and build notes for the archive supply chain
Introduced an example Go file (example.go) that demonstrates how to initialize services, create authors and blog posts, and publish content, alongside a NOTES.md file containing build instructions, Docker commands, and references to gRPC and dependency injection patterns.
supply/archive · medium confidence
Added order management and item adjustment prototypes
The \supply/archive\ area now includes multiple prototype implementations for managing orders and their items. In \supply/archive/inmem\, a commented-out in-memory repository for orders is added. In \supply/archive/temp\, several Go files (\method1.go\ through \method15.go\, \simple2.go\, \simple3.go\, \time.go\, and \di.go\) introduce various approaches to adjusting item prices and quantities, adding or removing items from an order, and handling time providers. These files demonstrate different patterns for order state management, including direct struct modification, functional options, and dependency injection for repositories.
supply/archive/inmem, supply/archive/temp · high confidence
Initial GraphQL API for supply chain operations
A new GraphQL service has been introduced in the supply module, enabling clients to query and mutate orders, projects, and product search results. The API exposes queries for retrieving specific orders, listing project orders, searching products, and listing projects by foreman. Mutations allow creating and closing projects, as well as creating, sending, and modifying orders and their items. The implementation uses the gqlgen framework, with generated code in gql\_gen.go and models in models\_gen.go, wired up via a resolver that delegates to existing ordering and search services.
supply/graphql · high confidence
Initial database schema and seed data for PostgreSQL
The PostgreSQL container configuration now includes a Dockerfile and an initialization SQL script. This script defines the schema for the \orders\, \order\_items\, \projects\, and \products\ tables, and populates them with initial seed data, including a list of electrical wire and fitting products.
docker/postgres · high confidence
Introduce ordering and purchasing service layers
Added new service implementations for supply chain operations. The ordering service now supports creating, modifying, and processing orders, including adding/removing items, updating quantities, and managing project lifecycles. The purchasing service enables updating purchase orders, processing orders, and managing product catalogs with category, name, and unit of measure details.
supply/ordering · high confidence
Introduces supply chain domain models and repository interfaces
Adds new domain models for supply chain management, including Order, Item, Product, and Project entities, along with their corresponding repository interfaces. The Item model includes status tracking (New, Waiting, Filled, BackOrdered, etc.) and quantity management. The Order model supports adding/removing items, updating quantities, and tracking order status (Draft, Sent, Processed, Complete). The Product model allows modification of category, name, and unit of measure. The Project model manages project details and active status. Wire configuration is added for dependency injection. Tests are included for all new models.
supply · high confidence
New gRPC API for supply chain operations
A new gRPC service has been introduced in the supply module, exposing endpoints for managing orders (create, add/remove/modify items, send, receive, process, find, and delete), searching for products, and managing projects (create, close, find). The implementation includes the Go server code in supply/grpc/ (ordering.go, search.go, server.go) and the corresponding protocol buffer definitions (supply.proto) and generated code (supply.pb.go).
supply/grpc · high confidence
Removals
Removed obsolete OrderRepository implementation
The file pkg/postgres/orders.go, which contained the OrderRepository struct and its associated methods (including FindAll), has been removed from the codebase. This eliminates unused or legacy database access logic for orders.
pkg/postgres · high confidence
Removed obsolete cmd entrypoint and Wire dependency injection scaffolding
The main entrypoint (cmd/main.go), the Wire dependency injection setup (cmd/wire.go), and the generated Wire code (cmd/wire\_gen.go) have been deleted. This removes the hardcoded database connection logic and the Wire-based dependency injection structure that previously initialized the field services and order processing.
cmd · high confidence
Behavioural changes
Docker Compose configuration updated to use local build contexts for Envoy and gRPC services
The docker-compose.yml file has been restructured to replace the pre-built Envoy image with a local build from the project's Dockerfile, and introduces a new 'grpcsvc' service that also builds locally. Additionally, the configuration now mounts a local SQL initialization script into the Postgres container, and the 'nats' service has been removed from the stack.
(repo-wide) · high confidence
Envoy proxy configuration updated for supply service
The Envoy proxy setup now routes traffic to the supply service instead of the todo service. The Dockerfile was added to build the Envoy container, and the entrypoint script was created to generate the Envoy configuration file using environment variables. The Envoy configuration file was updated to change the cluster name from 'todo\_service' to 'supply\_service' and updated the host address to use the ${SERVICE} environment variable.
docker/envoy · medium confidence
Introduce GraphQL service entry point with CORS and database integration
The new \cmd/graphqlsvc/main.go\ file establishes the entry point for the GraphQL service. It configures a PostgreSQL connection, initializes ordering and search services, and sets up a Chi router to handle \/graphqlsvc\ and a GraphQL Playground at \/\. Crucially, it enables Cross-Origin Resource Sharing (CORS) by allowing all origins, which impacts how clients from different domains can interact with the service.
cmd/graphqlsvc · medium confidence
Removal of legacy ordering service implementation
The \pkg/ordering\ package's \service.go\ file has been removed. This file previously defined the \Service\ struct, the \OrderRepository\ interface, and the \FindAllOrders\ method. The removal indicates a refactoring or migration away from this specific service implementation, likely as part of the broader 'purchasing svc' and 'read models' changes noted in the commit history.
pkg/ordering · high confidence
Renames PostgreSQL initialization script
The PostgreSQL initialization script in the NATS Docker configuration has been renamed from postgres.db.sql to postgres-init.sql to better reflect its purpose as an initialization script.
docker/nats · high confidence
Dependencies
Updated Go dependencies for GraphQL, gRPC, and database drivers
The project's Go module dependencies have been updated. This includes adding the GraphQL code generator (gqlgen) and parser (gqlparser), integrating JWT middleware and token handling (auth0/go-jwt-middleware, dgrijalva/jwt-go), and adding support for gRPC (google.golang.org/grpc v1.20.1). Additionally, the diff introduces the MongoDB Go driver (mongo-go-driver) and updates the PostgreSQL driver (lib/pq) and Google Wire. These changes enable the application to communicate via GraphQL and gRPC, handle authentication, and interact with MongoDB and PostgreSQL databases.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 45 → 50 (+4.4)
- Rubric changed (rubric-2026.08.18 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 98 → 98 (-0.3)
- Architecture 100 → 98 (-1.8)
- Maturity 25 → 36 (+11.1)
- Readiness 26 → 33 (+7.5)
- Security 91 → 78 (-13.4)
- Domain Modelling 100 → 100 (+0.0)
Resolved (10)
- Coverage not included — suite not readable by the collector
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- Duplicated block (13 lines × 7) (supply/archive/temp/method1.go)
- Duplicated block (14 lines × 2) (supply/archive/temp/method13.go)
- Duplicated block (16 lines × 3) (supply/archive/temp/method10.go)
- No exposed public API
- OSV Dependency Vulnerabilities not included (check did not complete)
- Test reliability not included
- complexity unreadable for .go — churn × complexity hotspots could not be measured
- single-maintainer — knowledge-concentration (bus factor) risk
New (48)
- Critical CVE: [GHSA redacted] (go.mod)
- Critical CVE: [GHSA redacted] (go.mod)
- Dependency pinned to a stale untagged commit: github.com/auth0/go-jwt-middleware
- Deprecated module: github.com/go-chi/chi
- Deprecated module: github.com/golang/protobuf
- Deprecated module: github.com/mongodb/mongo-go-driver
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- Duplicated block (10 lines × 2) (supply/archive/temp/method13.go)
- Duplicated block (10 lines × 2) (supply/archive/temp/method13.go)
- Duplicated block (12 lines × 7) (supply/archive/temp/method1.go)
- Duplicated block (15 lines × 2) (supply/archive/temp/method13.go)
- Duplicated block (18 lines × 3) (supply/archive/temp/method10.go)
- Duplicated block (18 lines × 3) (supply/archive/temp/method10.go)
- Duplicated block (8 lines × 2) (supply/archive/temp/method13.go)
- Duplicated block (8 lines × 2) (supply/archive/temp/method13.go)
- Duplicated block (8 lines × 2) (supply/archive/temp/method13.go)
- Duplicated block (8 lines × 2) (supply/archive/temp/method13.go)
- Duplicated block (8 lines × 2) (supply/mongo/orders.go)
- High CVE: [GHSA redacted] (go.mod)
- …and 28 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
longfellowone/field-services was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 60e17cce9faaa1d629bb4ab866e3cb3d55ba8c0b — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-28e75b8e3254.