General Development Resources
Overview
This guide covers conventions, best practices, and resources for contributing or utilizing Fulcrum App code in general.
Fulcrum Development Resources
Official Documentation
- Fulcrum Developer Docs - Glossary of expressions, data events, reports
- Fulcrum API - REST API reference
- Records API - Working with records
- Forms API - Form management
- Photos API - Photo handling
GitHub Repositories
Use WebFetch to reference these when debugging Fulcrum-specific issues:
- fulcrum-core - Core data structures, schema definitions
- fulcrum-expressions - Expression syntax for calculations
- fulcrum-python - Python SDK source
Date/Time Handling
Important: Fulcrum stores all timestamps in UTC using ISO 8601:
Format: YYYY-MM-DDTHH:mm:ssZ
Example: 2012-04-20T20:35:45Z
// Convert to local time
const isoString = '2025-01-15T18:30:00Z';
const localDate = new Date(isoString);
// Convert to ISO
const now = new Date();
const isoString = now.toISOString();
// Date only (no time)
const dateOnly = Utils.dt2iso(new Date()); // "2025-01-15"
General Development Resources
JavaScript, HTML, CSS
- MDN Web Docs - Authoritative reference for JS, HTML, CSS, Web APIs
- w3schools - Simpler tutorials (less authoritative but easier to read)
Node.js
- Node.js Documentation - Official Node.js docs
- NPM - Package registry
Python
- Python Documentation - Official Python docs
- PEP 8 - Python style guide
Standalone Utils Class
The Utils class can be used outside of Fulcrum in any JavaScript environment.
In Node.js
// Add module exports
module.exports.Utils = Utils;
const U = module.exports.Utils;
// Use
U.arrSort([3, 1, 2]);
U.dtDaysDiff(date1, date2);
As Static Class
// Just use directly
const U = Utils;
U.isBlank(value);
U.strProper('john doe');
In Fulcrum Calculated Fields
Utils Hybrid Class Pattern:
Utils is a hybrid class - all methods are available in two ways:
- Static access -
Utils.methodName()- Use in calculated fields (no Mtools instance) - Instance access -
M.methodName()- Use in data events (when M is instantiated)
// In data events - use either pattern
const M = module.exports.Mtools
Utils.dtAddDays(date, 30) // Static - works
M.dtAddDays(date, 30) // Instance - also works (equivalent)
Minified Standalone Version
The minified standalone Utils class is available in the original source for copy/paste into any environment.
Next Steps
- Return to Merjent Development Guide for Merjent-specific conventions and build process
- Review tutorials: