How nikoleesg/nfield-admin works
nfield-admin is a Laravel SDK for managing Nfield surveys and related fieldwork resources. An application resolves the manager or survey service, performs survey operations, and receives typed results; fluent survey resources expose fieldwork, sample, data, quota, assignment, publishing, settings, and sampling-method capabilities. Separate services manage CAPI interviewers, sampling points, and background activity. Endpoint implementations use an authenticated HTTP client to communicate with Nfield. The README and excerpts establish the broad capability map, but many endpoint and service implementations were not sampled, so uncertain links are omitted.
Main entry points: SurveyResource.php Survey resource · HttpClient.php HTTP client · NfieldManagerService.php Nfield manager · SurveyService.php Survey service
Components 21
SDK entry points
- Nfield manager
src/Services/NfieldManagerService.php - Activity sync command
src/Commands/SyncBackgroundActivitiesDetailsCommand.php
Survey operations
- Survey service
src/Services/SurveyService.php - Survey resource
src/Resources/SurveyResource.php - Survey collection
src/Services/v1/SurveysService.php - Sample service
src/Services/SurveySampleService.php - Survey data service
src/Services/SurveyDataService.php - Publishing service
src/Services/SurveyPublishService.php
Fieldwork resources
- Fieldwork service
src/Services/SurveyFieldworkService.php - Quota service
src/Services/SurveyQuotaService.php - Sampling point service
src/Services/v1/SamplingPointService.php - CAPI interviewer service
src/Services/CapiInterviewerService.php - Background activities
src/Services/BackgroundActivitiesService.php - Activity model
src/Models/BackgroundActivity.php
API transport
- Survey endpoints
src/Endpoints/v2/SurveyEndpoint.php - Sample endpoints
src/Endpoints/v2/SurveySampleCollectionEndpoint.php - Sampling point endpoints
src/Endpoints/v2/SamplingPointEndpoint.php - Interviewer endpoints
src/Endpoints/v2/CapiInterviewersEndpoint.php - HTTP client
src/Services/Http/HttpClient.php
Other components
- Laravel application
- Nfield API
Connections 22
- Laravel application → Nfield manager: resolves
src/Services/NfieldManagerService.php - Nfield manager → Survey service: delegates to
src/Services/NfieldManagerService.php - Nfield manager → CAPI interviewer service: delegates to
src/Services/NfieldManagerService.php - Nfield manager → Background activities: delegates to
src/Services/NfieldManagerService.php - Survey service → Survey resource: returns
- Survey resource → Survey endpoints: calls
src/Resources/SurveyResource.php - Survey resource → Fieldwork service: resolves
src/Resources/SurveyResource.php - Survey resource → Survey data service: resolves
src/Resources/SurveyResource.php - Survey resource → Quota service: resolves
src/Resources/SurveyResource.php - Survey resource → Sample service: resolves
src/Resources/SurveyResource.php - Survey resource → Publishing service: resolves
src/Resources/SurveyResource.php - Sample service → Sample endpoints: downloads from
src/Services/SurveySampleService.php - Survey collection → Nfield API: manages surveys
- Sampling point service → Sampling point endpoints: calls
src/Services/v1/SamplingPointService.php - CAPI interviewer service → Interviewer endpoints: calls
src/Services/CapiInterviewerService.php - Background activities → Activity model: persists activity
- Activity sync command → Activity model: updates details
src/Commands/SyncBackgroundActivitiesDetailsCommand.php - HTTP client → Nfield API: sends requests
src/Services/Http/HttpClient.php - Survey endpoints → HTTP client: uses client
- Sample endpoints → HTTP client: uses client
- Sampling point endpoints → HTTP client: uses client
- Interviewer endpoints → HTTP client: uses client