godprotocol
v2.3.44
Published
A distributed computing environment for Web 4.0 — integrating AI, decentralisation, and virtual computation.
Maintainers
Readme
GodProtocol
A distributed computing environment for Web 4.0 — integrating AI, decentralization, and virtual computation.
GodProtocol is the core implementation of Trinity, a modular, extensible runtime designed to organize computation through Objects, Instances, Datatypes, and Callables (action primitives). It enables developers to build distributed, AI-native applications while abstracting computation into composable virtual components.
Highlights
- Purpose: Build a flexible virtual computation environment (Trinity) that can be embedded, extended, and deployed locally or across distributed systems.
- AI Native: Designed for intelligent, autonomous computation.
- Decentralized: Built with distributed execution in mind.
- Runtime: Modern Node.js (ES Modules).
- Minimum Node Version: 18+
Quick Start
Prerequisites
- Node.js 18 or newer
Install
npm installDevelopment
Runs using nodemon.
npm run startProduction
Runs the application once without nodemon.
npm run devNote
npm run startuses nodemon and automatically reloads on file changes.npm run devexecutes the runtime a single time.- GodProtocol is an ES Module package (
"type": "module").
Programmatic Usage
The runtime is bootstrapped from Index.js, which creates a Trinity instance.
import trinity from "./Index.js";
// Trinity runtime instanceIndex.js exports the instantiated runtime so it can be embedded inside another project.
Environment Variables
| Variable | Description |
| --------- | --------------------------------------------------------- | --- | --------------- |
| Trinity | Runtime name passed into new Trinity(process.env.Trinity | | "GodProtocol") |
Project Structure
.
├── Index.js
├── package.json
├── Objects/
├── Instances/
├── Datatypes/
├── callables/
├── html/
└── utils/Index.js
Entry point that instantiates the Trinity runtime.
Objects/
Contains the core runtime classes.
Examples include:
- Trinity
- Oracle
- Repository
- Manager
- Virtual Machine
- Block
These implement the primary execution model of GodProtocol.
Instances/
Contains runtime-specific objects such as:
- Accounts
- Events
- Folders
- Responses
These represent live entities within the runtime.
Datatypes/
Contains the primitive and compound data structures used throughout Trinity.
Examples include:
- String
- Number
- Boolean
- Array
- Callable wrappers
Also includes:
Datatypes/functions/which provides helper modules like storage and wallet utilities.
Callables/
Contains the runtime's action primitives.
Each callable is a lightweight executable module registered through:
callables/register.jsHTML/
Provides utilities for:
- Loading
- Parsing
- Rendering
- Executing HTML-based runtime assets
Utils/
Contains shared infrastructure including:
- HTTP services
- Socket server
- HTTPS server creation
- Cryptography
- Hashing
- Certificates
Important files:
create_server.jssocket_server.jsservices.js
Files to Read First
If you're exploring the codebase, start here.
Objects/Trinity.js
The heart of the runtime.
Responsible for wiring together:
- Objects
- Instances
- Datatypes
- Callables
Objects/Oracle.js
Implements communication with Oracle endpoints using the HTTP service layer.
utils/create_server.js
Server initialization.
utils/socket_server.js
Socket infrastructure for runtime communication.
Core Concepts
Trinity
The root runtime.
Responsible for orchestrating every component in GodProtocol.
Objects
Large runtime components.
Examples:
- Repository
- Block
- Manager
- Oracle
- Virtual Machine
Instances
Runtime-bound entities representing live state.
Examples:
- Accounts
- Events
- Responses
Datatypes
Strongly typed wrappers responsible for:
- Validation
- Serialization
- Runtime consistency
Callables
Small executable modules that perform runtime actions.
They are dynamically registered and invoked throughout Trinity.
Development
Creating a Callable
- Create a module inside:
callables/functions/- Register it in:
callables/register.jsCreating a Datatype
Follow the existing patterns inside:
Datatypes/Examples:
str.jsnum.jsbool.jsarr.js
Creating Runtime Objects
Core runtime behavior belongs inside:
Objects/Whenever adding a new runtime capability, implement it as an Object and wire it into Trinity.
Runtime State
Per-runtime state should live inside:
Instances/Keep Objects as stateless as possible.
HTTPS Certificates
Development certificates are included:
utils/server.cert
utils/server.keyThese are intended only for local development.
Do not use them in production.
Dependencies
Runtime
aircode4generalised-datastore
Development
nodemon
Install everything with:
npm installTesting
The repository currently ships without automated tests.
Recommended frameworks include:
- Vitest
- Jest
- Ava
Suggested test coverage:
- Trinity startup
- Trinity shutdown
- Callable registration
- Callable execution
- Datatype validation
- Datatype serialization
Troubleshooting
Node Version Errors
Ensure you're using:
- Node.js 18+
ES Module Errors
Verify that your environment respects:
"type": "module"inside package.json.
Missing Imports
Reinstall dependencies:
npm installIf using VS Code or another IDE, restart the language server.
HTTPS Issues
Development certificates are included.
Either:
- trust the local certificates, or
- switch to HTTP during development.
Contributing
- Fork the repository.
- Create a feature branch.
- Implement your changes.
- Add tests where appropriate.
- Open a Pull Request with a clear description.
Please follow the existing architecture and coding conventions.
License
Licensed under the ISC License.
See package.json for details.
Author
Savvy
Repository
https://github.com/immanuel-savvy/GodProtocol
Roadmap
Future improvements include:
- GitHub Actions CI
- Automated testing
- Public Trinity API documentation
- Architecture diagrams
- Runtime examples
- Embedding examples
- Oracle client tutorials
- Distributed execution examples
GodProtocol is the computational substrate behind Trinity—a virtual runtime where AI, decentralized systems, and programmable computation converge to power the next generation of intelligent applications.
