Skip to content

Commit f1905eb

Browse files
committed
feat: add SDK and SQL driver documentation
- Introduced SDK documentation detailing features, installation, and usage examples for various environments including browser, Node.js, and frameworks like React and Vue. - Added SQL Driver documentation covering installation, configuration, CRUD operations, query features, and best practices for organizing metadata in large projects. - Created a new guide on organizing metadata for large projects, emphasizing domain-driven modules and best practices for structuring object definitions, actions, hooks, and translations.
1 parent 1975f11 commit f1905eb

48 files changed

Lines changed: 905 additions & 1226 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/site/app/docs/layout.tsx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,15 @@ export default function Layout({ children }: { children: React.ReactNode }) {
1919
children: [...tree.children]
2020
};
2121

22-
// Find 'Reference' to insert before
23-
const refIndex = modifiedTree.children.findIndex(n => n.name === 'Reference');
22+
// Insert Protocol Specs link before the Reference section
23+
const refIndex = modifiedTree.children.findIndex(
24+
n => n.name === 'API Reference' || n.name === 'Reference'
25+
);
2426

2527
if (refIndex !== -1) {
2628
modifiedTree.children.splice(refIndex, 0, protocolLink as any);
2729
} else {
28-
// If not found, try to find 'Ai' or 'AI'
29-
const aiIndex = modifiedTree.children.findIndex(n => n.name === 'Ai' || n.name === 'AI');
30-
if (aiIndex !== -1) {
31-
modifiedTree.children.splice(aiIndex + 1, 0, protocolLink as any);
32-
} else {
33-
modifiedTree.children.push(protocolLink as any);
34-
}
30+
modifiedTree.children.push(protocolLink as any);
3531
}
3632

3733
return (

apps/site/mdx-components.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@ import defaultMdxComponents from 'fumadocs-ui/mdx';
22
import type { MDXComponents } from 'mdx/types';
33
import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
44
import { Callout } from 'fumadocs-ui/components/callout';
5+
import { Step, Steps } from 'fumadocs-ui/components/steps';
56

67
export function getMDXComponents(components?: MDXComponents): MDXComponents {
78
return {
89
...defaultMdxComponents,
910
Tab,
1011
Tabs,
1112
Callout,
13+
Step,
14+
Steps,
1215
...components,
1316
};
1417
}

content/docs/reference/foundation/core.mdx renamed to content/docs/architecture/core.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -869,14 +869,14 @@ app.registerObject({
869869

870870
## Related Documentation
871871

872-
- **[Foundation Overview](/docs/reference/foundation)** - Trinity architecture
873-
- **[Types Reference](/docs/reference/foundation/types)** - Type definitions
874-
- **[Platform Node](/docs/reference/foundation/platform-node)** - Metadata loading
875-
- **[Drivers Overview](/docs/reference/drivers)** - Database drivers
876-
- **[Validation Guide](/docs/guides/validation)** - Advanced validation patterns
872+
- **[Foundation Overview](/docs/architecture)** - Trinity architecture
873+
- **[Types Reference](/docs/architecture/types)** - Type definitions
874+
- **[Platform Node](/docs/architecture/platform-node)** - Metadata loading
875+
- **[Drivers Overview](/docs/drivers)** - Database drivers
876+
- **[Validation Guide](/docs/logic)** - Advanced validation patterns
877877

878878
## Support
879879

880-
- 📖 [API Reference](/docs/api)
880+
- 📖 [API Reference](/docs/reference)
881881
- 💬 [GitHub Discussions](https://github.com/objectstack-ai/objectql/discussions)
882882
- 🐛 [Report Issues](https://github.com/objectstack-ai/objectql/issues)

content/docs/reference/foundation/index.mdx renamed to content/docs/architecture/index.mdx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Foundation Layer Overview
3-
description: The core architecture of ObjectQL - Types, Core Engine, and Platform Utilities
2+
title: Architecture
3+
description: Internal design of ObjectQL — the Trinity Architecture of Types, Core Engine, and Platform layer
44
---
55

66
# Foundation Layer Overview
@@ -39,7 +39,7 @@ The Foundation Layer is the architectural backbone of ObjectQL, consisting of th
3939

4040
## Core Packages
4141

42-
### [@objectql/types](/docs/reference/foundation/types)
42+
### [@objectql/types](/docs/architecture/types)
4343

4444
**Role**: The API Contract & Type System Constitution
4545

@@ -73,7 +73,7 @@ const project: ObjectConfig = {
7373
};
7474
```
7575

76-
### [@objectql/core](/docs/reference/foundation/core)
76+
### [@objectql/core](/docs/architecture/core)
7777

7878
**Role**: The Runtime Engine & Business Logic Compiler
7979

@@ -111,7 +111,7 @@ const projects = await ctx.object('project').find({
111111
});
112112
```
113113

114-
### [@objectql/platform-node](/docs/reference/foundation/platform-node)
114+
### [@objectql/platform-node](/docs/architecture/platform-node)
115115

116116
**Role**: The Node.js Bridge
117117

@@ -490,16 +490,16 @@ src/
490490

491491
## Related Documentation
492492

493-
- **[Types Reference](/docs/reference/foundation/types)** - Complete type system documentation
494-
- **[Core Reference](/docs/reference/foundation/core)** - Runtime engine and APIs
495-
- **[Platform Node Reference](/docs/reference/foundation/platform-node)** - File system and plugin utilities
496-
- **[Driver Development](/docs/guides/drivers/extensibility)** - Building custom drivers
497-
- **[Validation Guide](/docs/guides/validation)** - Metadata-driven validation
493+
- **[Types Reference](/docs/architecture/types)** - Complete type system documentation
494+
- **[Core Reference](/docs/architecture/core)** - Runtime engine and APIs
495+
- **[Platform Node Reference](/docs/architecture/platform-node)** - File system and plugin utilities
496+
- **[Driver Development](/docs/extending/custom-drivers)** - Building custom drivers
497+
- **[Validation Guide](/docs/logic)** - Metadata-driven validation
498498

499499
## Next Steps
500500

501-
1. **Understand the Types** → Read the [Types Reference](/docs/reference/foundation/types)
502-
2. **Build with Core** → Explore the [Core Reference](/docs/reference/foundation/core)
503-
3. **Load Metadata** → Learn about [Platform Node](/docs/reference/foundation/platform-node)
504-
4. **Choose a Driver** → Review [Drivers Overview](/docs/reference/drivers)
505-
5. **Deploy** → Check the [Deployment Guide](/docs/guides/deployment)
501+
1. **Understand the Types** → Read the [Types Reference](/docs/architecture/types)
502+
2. **Build with Core** → Explore the [Core Reference](/docs/architecture/core)
503+
3. **Load Metadata** → Learn about [Platform Node](/docs/architecture/platform-node)
504+
4. **Choose a Driver** → Review [Drivers Overview](/docs/drivers)
505+
5. **Deploy** → Check the [Deployment Guide](/docs/server)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"title": "Architecture",
3+
"pages": [
4+
"index",
5+
"types",
6+
"core",
7+
"platform-node"
8+
]
9+
}

content/docs/reference/foundation/platform-node.mdx renamed to content/docs/architecture/platform-node.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -848,16 +848,16 @@ This package includes:
848848

849849
## Related Packages
850850

851-
- **[@objectql/core](/docs/reference/foundation/core)** - Core ObjectQL engine
852-
- **[@objectql/types](/docs/reference/foundation/types)** - Type definitions
851+
- **[@objectql/core](/docs/architecture/core)** - Core ObjectQL engine
852+
- **[@objectql/types](/docs/architecture/types)** - Type definitions
853853
- **[@objectql/cli](../../tools/cli)** - Command-line interface
854854

855855
## Related Documentation
856856

857-
- **[Foundation Overview](/docs/reference/foundation)** - Trinity architecture
858-
- **[Core Reference](/docs/reference/foundation/core)** - Runtime engine
859-
- **[Types Reference](/docs/reference/foundation/types)** - Type system
860-
- **[Configuration Guide](/docs/guides/configuration)** - App configuration
857+
- **[Foundation Overview](/docs/architecture)** - Trinity architecture
858+
- **[Core Reference](/docs/architecture/core)** - Runtime engine
859+
- **[Types Reference](/docs/architecture/types)** - Type system
860+
- **[Configuration Guide](/docs/server/configuration)** - App configuration
861861
- **[Metadata Specification](/docs/spec)** - Metadata file formats
862862

863863
## Contributing
@@ -866,6 +866,6 @@ Contributions are welcome! Please see the main [repository README](https://githu
866866

867867
## Support
868868

869-
- 📖 [API Reference](/docs/api)
869+
- 📖 [API Reference](/docs/reference)
870870
- 💬 [GitHub Discussions](https://github.com/objectstack-ai/objectql/discussions)
871871
- 🐛 [Report Issues](https://github.com/objectstack-ai/objectql/issues)

content/docs/reference/foundation/types.mdx renamed to content/docs/architecture/types.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -779,10 +779,10 @@ Recommended `tsconfig.json` settings when using `@objectql/types`:
779779

780780
## Related Documentation
781781

782-
- **[Foundation Overview](/docs/reference/foundation)** - Trinity architecture explanation
783-
- **[Core Reference](/docs/reference/foundation/core)** - Runtime implementation
784-
- **[Validation Guide](/docs/guides/validation)** - Using validation types
785-
- **[Driver Development](/docs/guides/drivers/extensibility)** - Implementing Driver interface
782+
- **[Foundation Overview](/docs/architecture)** - Trinity architecture explanation
783+
- **[Core Reference](/docs/architecture/core)** - Runtime implementation
784+
- **[Validation Guide](/docs/logic)** - Using validation types
785+
- **[Driver Development](/docs/extending/custom-drivers)** - Implementing Driver interface
786786
- **[@objectstack/spec](https://github.com/objectstack-ai/spec)** - Formal protocol specifications
787787

788788
## Contributing
@@ -798,6 +798,6 @@ When contributing new types:
798798

799799
## Support
800800

801-
- 📖 [API Reference](/docs/api)
801+
- 📖 [API Reference](/docs/reference)
802802
- 💬 [GitHub Discussions](https://github.com/objectstack-ai/objectql/discussions)
803803
- 🐛 [Report Issues](https://github.com/objectstack-ai/objectql/issues)

content/docs/data-access/best-practices.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -822,15 +822,15 @@ query {
822822

823823
## 11. Further Reading
824824

825-
- [Query Language Specification](../spec/query-language.md) - Complete JSON-DSL reference
826-
- [Querying Guide](./querying.md) - Step-by-step query examples
827-
- [GraphQL API Documentation](../api/graphql.md) - GraphQL setup and usage
828-
- [REST API Documentation](../api/rest.md) - REST endpoint reference
825+
- [Filter Syntax Reference](/docs/data-access/filter-syntax) - Complete JSON-DSL reference
826+
- [Querying Guide](/docs/data-access/querying) - Step-by-step query examples
827+
- [GraphQL API Documentation](/docs/reference/api/graphql) - GraphQL setup and usage
828+
- [REST API Documentation](/docs/reference/api/rest) - REST endpoint reference
829829

830830
---
831831

832832
**Need Help?**
833833

834-
- 📖 [Documentation](../index.md)
834+
- 📖 [Documentation](/docs)
835835
- 💬 [Community Discord](https://discord.gg/objectql)
836836
- 🐛 [Report Issues](https://github.com/objectstack-ai/objectql/issues)

content/docs/data-access/index.mdx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,12 @@ Learn the fundamentals of querying data with ObjectQL:
2525
- Aggregations and grouping
2626
- Complex queries with nested conditions
2727

28-
### [Client SDK](/docs/data-access/sdk)
28+
### [Client SDK](/docs/reference/api/client-sdk)
2929

30-
Use the TypeScript SDK for type-safe data access:
31-
- Installation and setup
32-
- Basic CRUD operations
33-
- Advanced querying techniques
34-
- Error handling
35-
- TypeScript integration
30+
Use the TypeScript SDK for type-safe data access from browser and Node.js clients:
31+
- DataApiClient and MetadataApiClient
32+
- React and Vue hooks
33+
- Error handling and retry patterns
3634

3735
### [Query Best Practices](/docs/data-access/best-practices)
3836

@@ -93,6 +91,6 @@ This structure makes it easy for frontends, AI agents, and external systems to g
9391
## Next Steps
9492

9593
- Start with **[Querying Data](/docs/data-access/querying)** to learn the basics
96-
- Explore the **[Client SDK](/docs/data-access/sdk)** for type-safe access
94+
- Explore the **[Client SDK](/docs/reference/api/client-sdk)** for type-safe access
9795
- Review **[Best Practices](/docs/data-access/best-practices)** for optimization strategies
98-
- Check the **[API Reference](/docs/reference/api)** for complete documentation
96+
- Check the **[Filter Syntax](/docs/data-access/filter-syntax)** for all available operators

content/docs/data-access/meta.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
22
"title": "Data Access",
33
"pages": [
4+
"index",
45
"querying",
5-
"sdk",
6+
"filter-syntax",
67
"best-practices"
78
]
89
}

0 commit comments

Comments
 (0)