> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coreflux.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Best Practices & Patterns

> Overview and table of contents for best practices—topic design, reusable logic, alarms, integrations, production architecture, and notebooks.

## After Hello World, What's Next?

Once you've followed [Getting Started](/v2.14/quick-start/getting-started) and have Coreflux, VS Code, and your first Action running, the question becomes *how to grow*: naming topics, handling JSON, scaling Actions, wiring integrations, and shipping systems that stay maintainable. Experienced teams reuse the same patterns across factories, buildings, energy sites, and fleets—only the topics and payloads change.

> [!TIP]
>
> **Like learning chords before writing songs.** Your first Action proves the broker runs your logic; patterns teach you how dozens of Actions, Models, and Routes fit together without turning into spaghetti.

## How Are Best Practices & Patterns Organized

Chapters below live under **Best Practices and Usage Patterns** in the sidebar. Pick one based on what you're building — each page focus on a set of tips for a given topic. Start with **Naming conventions** and finish with **Anti-patterns** when reviewing code.

> **[Naming conventions](/v2.14/lot-language/usage-patterns/naming-conventions)**
>
> PascalCase entities, snake\_case variables, and topic naming basics.

> **[Designing your data layer (the foundation)](/v2.14/lot-language/usage-patterns/data-layer)**
>
> Topic trees (UNS), scalar vs JSON payloads, Models, and inheritance — how data is shaped and addressed.

> **[Working with JSON](/v2.14/lot-language/usage-patterns/working-with-json)**
>
> GET JSON in Actions, nested payloads, and publishing structured output through Models.

> **[Writing reusable logic (the building blocks)](/v2.14/lot-language/usage-patterns/reusable-logic)**
>
> Callable actions, wildcards, counting over time, and Python — techniques for the Action you are writing now; logic that scales and stays maintainable.

> **[Alarms and monitoring](/v2.14/lot-language/usage-patterns/alarms-and-monitoring)**
>
> Threshold crossings and device or route offline detection; optional email routes alongside alarms.

> **[Connecting to the outside world (integrations)](/v2.14/lot-language/usage-patterns/integrations)**
>
> REST server and client, live KPIs from a database, and ENV / Secrets — Routes that bridge to non-MQTT systems.

> **[Production architecture](/v2.14/lot-language/usage-patterns/production-architecture)**
>
> End-to-end device-to-database ingestion and edge–cloud bridges — synthesis patterns that build on everything before.

> **[Project organization](/v2.14/lot-language/usage-patterns/project-organization)**
>
> Keeping notebooks clean and readable — single-file vs multi-file layouts and shared discipline at every stage.

> **[Anti-patterns](/v2.14/lot-language/usage-patterns/anti-patterns)**
>
> Common LoT mistakes and what to do instead.

***

## Next Steps

> **[Introduction to LoT](/v2.14/lot-language/introduction)**
>
> Building blocks and how Actions, Models, Routes, and Rules fit together.

> **[Model Inheritance](/v2.14/lot-language/models/model-inheritance)**
>
> Deep dive on `FROM` and base models.

New to the language? **[Introduction to LoT](/v2.14/lot-language/introduction)** links Actions, Models, Routes, and Rules from one page.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.