Appearance
Architecture
Core Philosophy
- Event-Sourced System: All changes are written to a log and projected into a read model.
- Adaptability: Forms, designs, and workflows are designed to evolve over time without breaking existing data.
- Graceful Failure: Interfaces and parsing never crash; fields degrade gracefully if there are issues.
- Separation of Concerns: Designers, developers, and business stakeholders collaborate without overlapping responsibilities.
- Iterative Improvement: We want the system to make it easy to iterate towards practical solutions.
Key Features
Forms and Fields
- Forgiving Template System: Built on formdown and dynamic layouts (see below).
- Dynamic Fields: Support for types like text, number, address, file, select, and more.
- Controls: Render fields dynamically with customizable behavior.
- Tags: Add metadata like
<sensitive>
or<optional>
for additional functionality. - Cardinality: Define single or multi-value fields with (0-n) or similar syntax.
- Help Text: Add inline ("short help") or markdown-based (help:) assistance for fields or options.
Designs and Layouts
- Forgiving Template System: Built on Vue 2 (transitioning to Vue 3) for reactivity and simplicity.
- Dynamic Components: Render documents flexibly, adapting based on user needs or device context.
- Iterative UI Development: Change designs and layouts easily without disrupting underlying logic.
Business Rules and Commands
- Business Rules: If-then automation logic tied to the data model.
- Commands: User-triggered actions for interacting with the system.
- Deterministic Execution: Replayable and debuggable logic for error resolution.
Locks and Keys
- Fine-Grained Access Control: Secure individual documents or entire hierarchies by associating them with locks
- Inheritable Security: Locks and their associated permissions cascade down the document tree, simplifying access management
- Customizable Permissions: Keys can grant specific rights, such as viewing, editing, or executing commands
Services
- Extensibility: Handle external integrations, resource-intensive tasks, or arbitrary code execution.
- Examples:
- Google Maps integration for address lookups.
- Thumbnail generation for uploaded media.
- Video conversion with FFmpeg.
Server Architecture
aeppic 3
- Single-threaded, in-memory representation of the data model.
- Limited scalability, but surprisingly effective for many use cases.
aeppic 4
- Rust-Based kernel
- Safe multithreading, improved performance, and modern tooling.
- SQLite:
- Write model: Partitioned change logs.
- Read model: Default SQLite-based projections.
- Future Projections: Support for PostgreSQL, Elasticsearch, or other systems
Why JavaScript for the Server ?
The Good
- Approachability: JavaScript is well-documented, widely used, and accessible to both developers and laymen.
- Quick Iteration: Its dynamic nature allowed rapid prototyping and experimentation.
- Broad Ecosystem: A wealth of libraries and tools supported fast adoption and development.
The Challenges
- Dynamic Typing: Over time, schema changes and refactoring became harder, leading to runtime errors that were difficult to avoid in larger projects.
- Scalability: While Node.js was sufficient for many use cases, the lack of strong multithreading and safety mechanisms posed challenges for future growth.
The Transition to Rust: Building aeppic 4
Why Rust?
After years of working with JavaScript and TypeScript, the decision to rewrite the kernel of aeppic in Rust stemmed from several key factors:
Safety and Stability
- Rust’s strict compile-time checks prevent common errors, making refactoring and long-term maintenance safer.
- Its ownership model ensures memory safety without garbage collection.
Ecosystem and Tools
- Tools like cargo simplify dependency management, testing, and building.
- The enforced coding standards (e.g., no unwrap) encourage robust error handling.
Performance
- Native performance and zero-cost abstractions allow aeppic to handle high workloads efficiently.
- Safe multithreading opens doors to scalable architectures.
Cultural Fit
The Rust community’s emphasis on clear, maintainable code aligns with the goals of building an enterprise-grade system.
The Role of JavaScript in aeppic 4
While the server kernel transitions to Rust, JavaScript continues to play a vital role:
- Business Rules and Commands etc.: JavaScript remains the scripting language for business logic, leveraging its simplicity and flexibility.
- Integration with Deno: The Rust-based Deno runtime wraps V8 seamlessly, enabling the execution of JavaScript in a secure and performant environment.
Key Features and Goals for aeppic 4
Enhanced Server Architecture
- The core is rebuilt in Rust, with SQLite for both the write model (partitioned change logs) and the default read model.
- Future-proof design allows projections into alternative systems like PostgreSQL or Elasticsearch.
Improved Debuggability
- Deterministic execution of business rules and commands ensures every operation can be replayed and debugged step-by-step.
- Integration with tools like Jaeger for tracing makes it easier to understand and resolve issues.
Dynamic Service Management
- Support for containerized services using Docker or Kubernetes.
- Dynamic starting and stopping of services based on workload or environment.
Developer-Centric Features
- Workspace Mode: A playground for developers to experiment with apps and systems without affecting production.
- VS Code Integration: Tools for live editing, debugging, and inspecting applications.
Explainability
- A pixel-perfect debugging feature to trace every UI element back to its data source, change log, or business rule.
AI-Assisted Development
- AI integration to generate components, business rules, and designs, accelerating development while ensuring auditability.
Gratitude to the Ecosystem
The journey of aeppic owes much to the open-source ecosystem and the contributions of pioneers like Ryan Dahl:
- Node.js provided the foundation for early iterations, enabling rapid progress.
- Deno’s Rust-based runtime now powers aeppic 4, bringing together the best of both JavaScript and Rust.
- Rust and its community have given us the tools to build a robust, scalable, and secure system.
The Future of aeppic
As aeppic 4 takes shape, the vision is clear:
- Build a platform that balances developer agility with enterprise-grade stability.
- Leverage modern tools and technologies to handle the growing complexity of business requirements.
- Create an ecosystem where developers, designers, and business stakeholders can collaborate seamlessly.
By combining the simplicity of JavaScript with the safety and performance of Rust, aeppic continues to push the boundaries of what’s possible in business application development.