-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture
Zachary edited this page Apr 12, 2026
·
2 revisions
FieldOpt is a modern field service management (FSM) dispatch console with three main components:
- RESTful API for all operations
- Async SQLAlchemy for database access
- Real-time capability foundation (WebSockets ready for v0.0.8)
- Role-based access control (coming v0.0.9)
- Real-time technician & job grids (AG Grid)
- Drag-drop job assignment
- Geographic job mapping (Leaflet)
- Timeline visualization
- Advanced search & filtering
- Desktop-first, mobile-ready in v0.0.8+
- Technician records & skill assignments
- Job registry & history
- Assignment tracking
- Dispatch history (for ML training in v0.0.8+)
User Action (UI)
↓
Frontend sends API request
↓
Backend validates & processes
↓
Database updates
↓
Backend responds with updated data
↓
Frontend updates UI in real-time
- Framework: FastAPI (async)
- Database: PostgreSQL 15
- ORM: SQLAlchemy (async)
- Driver: asyncpg
- Validation: Pydantic
- Server: Uvicorn
- HTTP Client: httpx (async)
- Framework: React 18
- Build Tool: Vite
- Data Grid: AG Grid Community
- Maps: Leaflet
- Drag & Drop: @dnd-kit
- UI Components: react-contexify (context menus)
- HTTP Client: Axios
- Styling: Handwritten CSS (no frameworks)
- Hosting: AWS EC2 (us-east-1)
- Containerization: Docker & Docker Compose
- CI/CD: GitHub Actions (planned)
- Reverse Proxy: Nginx
- SSL: Let's Encrypt (Certbot)
- Languages: Python 3.11, JavaScript (ES6+)
- Code Style: Tabs (not spaces)
- Git: Conventional commits
- License: AGPL-3.0
fieldopt/
├── backend/
│ ├── api/
│ │ ├── main.py (FastAPI app entry)
│ │ ├── routes/ (API endpoints)
│ │ └── v1/ (API v1 routes)
│ ├── database/
│ │ ├── models.py (SQLAlchemy models)
│ │ ├── connection.py (DB connection setup)
│ │ ├── reset_db.py (Database reset script)
│ │ └── seeds/ (Seed data files)
│ ├── config.py (Settings & environment)
│ ├── requirements.txt (Python dependencies)
│ └── Dockerfile
│
├── frontend/
│ ├── src/
│ │ ├── api/ (API client)
│ │ ├── components/ (React components)
│ │ ├── styles/ (CSS)
│ │ ├── App.jsx
│ │ └── main.jsx
│ ├── public/ (Static assets)
│ ├── index.html
│ ├── vite.config.js
│ └── package.json
│
├── website/ (Marketing site)
│ ├── index.html
│ ├── styles.css
│ └── assets/
├── deploy/
│ └── nginx.conf (Nginx configuration)
│
├── docker-compose.yml (Local development)
├── docker-compose.prod.yml (Production)
├── Dockerfile (Backend image)
└── .github/
└── workflows/ (CI/CD pipelines)
- FastAPI with async/await for concurrency
- asyncpg driver for non-blocking database I/O
- Designed for real-time updates (WebSockets in v0.0.8)
- Enterprise-grade grids (technicians, jobs)
- Efficient rendering, supports 10k+ rows
- Built-in filtering, sorting, selection
- Customizable columns and cell renderers
- No framework dependencies (Tailwind, Bootstrap)
- Full control over design
- Lighter bundle size
- Custom styling matches app aesthetic
- Open-source foundation
- Commercial dual-license support
- Community contributions protected
API Versions:
-
/api/v1/— Current version
Endpoints:
-
/technicians/— Technician CRUD -
/jobs/— Job CRUD -
/assignments/— Assignment operations -
/routing/— Auto-routing logic
Main Views:
- Technician grid (left pane)
- Job grid (center pane)
- Timeline (right pane)
- Map (floating window)
Modal/Dialogs:
- Search windows
- Filter window
- Context menus (right-click)
Tables:
-
technicians— Tech info, skills, status -
jobs— Job details, requirements, status -
assignments— Job-to-tech mappings -
dispatch_history— Audit log (for ML training)
- ~100-200 technicians
- ~500-1000 jobs per day
- Single PostgreSQL instance sufficient
- Real-time WebSocket updates (horizontal scaling)
- Redis for caching & session store
- Read replicas for analytics
- ML model training on dispatch history
- No authentication (open demo)
- CORS configured for localhost
- JWT token authentication
- Role-based access control (Dispatcher, Supervisor, Manager, Admin)
- API key authentication for integrations
- Rate limiting
- API Response Time: <100ms (p95)
- Grid Render: <500ms for 1000 rows
- Map Load: <1s
- Assignment Operation: <200ms (single + batch)
- Create feature branch:
git checkout -b feat/your-feature - Make changes following code style
- Test locally
- Commit:
git commit -m "feat(scope): message" - Push & create PR
- After merge, tag release:
git tag -a v0.0.X
See Contributing for details.
FieldOpt Wiki
Resources