Logo Lanfrica

ianotieno/shamba_management_system

Domaine:

agriculture

Type de record:

software
Créateur:
ian
Hôte:
# SmartSeason Field Monitoring System Submission-ready technical assessment built with Django and Next.js. ## Stack - Backend: Django + Django REST Framework - Frontend: Next.js App Router - Database: SQLite for local development, with a relational data model that can be moved to PostgreSQL easily ## Features - Role-based access for `admin` and `agent` - Field CRUD and assignment for coordinators - Field stage updates and notes for assigned field agents - Computed field statuses: `active`, `at_risk`, `completed` - Dashboard summaries for both roles ## Status logic - `completed`: field stage is `harvested` - `at_risk`: no update has been logged in the last 7 days, or the field is still `planted` more than 21 days after planting - `active`: everything else This keeps the logic simple, explainable, and useful for operational follow-up. ## Local setup ### Backend ```bash cd backend python -m venv .venv source .venv/bin/activate pip install -r requirements.txt python manage.py makemigrations users monitoring python manage.py migrate python seed.py python manage.py runserver ``` ### Frontend ```bash cd frontend npm install API_URL=127.0.0.1 npm run dev ``` ## Demo credentials - Coordinator: `coordinator` / `demo1234` - Agent 1: `agent1` / `demo1234` - Agent 2: `agent2` / `demo1234` ## Assumptions - Coordinators create and reassign fields. - Agents only see fields assigned to them and can only post updates for those fields. - Session authentication is used to keep the implementation compact for the assessment. - SQLite is used locally to reduce setup friction.