|
| 1 | +--- |
| 2 | +title: FAQ |
| 3 | +description: Frequently Asked Questions about ObjectStack Protocol. |
| 4 | +--- |
| 5 | + |
| 6 | +## General Questions |
| 7 | + |
| 8 | +### What is ObjectStack? |
| 9 | + |
| 10 | +ObjectStack is a **metadata-driven protocol** for building enterprise applications. It lets you define your entire application—data models, business logic, and UI—as type-safe JSON/TypeScript configurations instead of writing code. |
| 11 | + |
| 12 | +Think of it as the "Salesforce Platform" or "ServiceNow Platform" but: |
| 13 | +- ✅ Open source |
| 14 | +- ✅ Self-hosted |
| 15 | +- ✅ Type-safe (TypeScript + Zod) |
| 16 | +- ✅ Database agnostic |
| 17 | + |
| 18 | +### Is ObjectStack a framework or a library? |
| 19 | + |
| 20 | +Neither! ObjectStack is a **protocol** (like HTTP or SQL). It defines: |
| 21 | +1. **Schemas** (what data looks like) |
| 22 | +2. **Contracts** (how systems communicate) |
| 23 | +3. **Standards** (naming conventions, best practices) |
| 24 | + |
| 25 | +You can build **implementations** of the protocol in any language (Node.js, Go, Python, etc.). |
| 26 | + |
| 27 | +### How is ObjectStack different from Prisma/TypeORM? |
| 28 | + |
| 29 | +| Feature | Prisma/TypeORM | ObjectStack | |
| 30 | +| :--- | :--- | :--- | |
| 31 | +| **Scope** | ORM (database only) | Full platform (data + UI + logic) | |
| 32 | +| **Business Logic** | Code-based | Declarative (formulas, workflows) | |
| 33 | +| **UI Generation** | None | Server-driven UI included | |
| 34 | +| **Validation** | Manual | Built-in validation rules | |
| 35 | +| **Multi-DB** | Schema-based | Driver-based (easier to extend) | |
| 36 | + |
| 37 | +**Use Prisma if:** You just need a type-safe ORM. |
| 38 | +**Use ObjectStack if:** You want a complete metadata-driven platform. |
| 39 | + |
| 40 | +### How is ObjectStack different from Strapi/Directus? |
| 41 | + |
| 42 | +| Feature | Strapi/Directus | ObjectStack | |
| 43 | +| :--- | :--- | :--- | |
| 44 | +| **Focus** | Headless CMS | Enterprise platform | |
| 45 | +| **Business Logic** | Code plugins | Declarative (no-code) | |
| 46 | +| **Type Safety** | Partial | Full (Zod schemas) | |
| 47 | +| **Formulas** | None | Yes (like Excel/Salesforce) | |
| 48 | +| **Workflows** | Basic | Advanced (state machines) | |
| 49 | +| **Offline-First** | No | Yes | |
| 50 | + |
| 51 | +**Use Strapi if:** You're building a content website. |
| 52 | +**Use ObjectStack if:** You're building CRUD-heavy apps (CRM, ERP, internal tools). |
| 53 | + |
| 54 | +### Can I use ObjectStack with my existing database? |
| 55 | + |
| 56 | +**Yes!** You have two options: |
| 57 | + |
| 58 | +1. **Generate ObjectStack schemas from your DB:** |
| 59 | + ```bash |
| 60 | + objectstack import --from postgres://... |
| 61 | + ``` |
| 62 | + |
| 63 | +2. **Write a custom driver** to wrap your existing DB. |
| 64 | + |
| 65 | +### Is ObjectStack production-ready? |
| 66 | + |
| 67 | +ObjectStack is currently in **beta**. The protocol is stable, but implementations are evolving. |
| 68 | + |
| 69 | +**Stable:** |
| 70 | +- ✅ Schema definitions (`@objectstack/spec`) |
| 71 | +- ✅ TypeScript types |
| 72 | +- ✅ JSON Schema export |
| 73 | + |
| 74 | +**In Development:** |
| 75 | +- 🚧 Reference Kernel implementation |
| 76 | +- 🚧 React renderer |
| 77 | +- 🚧 PostgreSQL driver |
| 78 | + |
| 79 | +**Recommendation:** Use for internal tools and non-critical applications. Wait for v1.0 for production SaaS. |
| 80 | + |
| 81 | +## Technical Questions |
| 82 | + |
| 83 | +### What databases are supported? |
| 84 | + |
| 85 | +ObjectStack uses a **driver model**. Official drivers: |
| 86 | + |
| 87 | +- ✅ **In-Memory Driver** (development/testing) |
| 88 | +- 🚧 **PostgreSQL Driver** (in progress) |
| 89 | +- 🚧 **MySQL Driver** (planned) |
| 90 | +- 🚧 **MongoDB Driver** (planned) |
| 91 | + |
| 92 | +You can build custom drivers for: |
| 93 | +- Any SQL database |
| 94 | +- Any NoSQL database |
| 95 | +- SaaS APIs (Salesforce, Airtable, etc.) |
| 96 | +- Excel files, CSV, etc. |
| 97 | + |
| 98 | +### Does ObjectStack support GraphQL? |
| 99 | + |
| 100 | +**Yes!** ObjectStack auto-generates both REST and GraphQL APIs from your schema definitions. |
| 101 | + |
| 102 | +### Can I customize the generated UI? |
| 103 | + |
| 104 | +**Yes!** You have multiple levels of customization: |
| 105 | + |
| 106 | +1. **Theme-level:** Colors, fonts, spacing |
| 107 | +2. **Component-level:** Override specific components (Button, Input, etc.) |
| 108 | +3. **Layout-level:** Change view configurations |
| 109 | +4. **Complete custom renderer:** Build your own UI that consumes ObjectStack APIs |
| 110 | + |
| 111 | +### How do I handle complex business logic? |
| 112 | + |
| 113 | +ObjectStack provides multiple ways: |
| 114 | + |
| 115 | +1. **Formula Fields:** Excel-like formulas for calculations |
| 116 | + ```typescript |
| 117 | + Field.formula({ expression: 'amount * (1 - discount / 100)' }) |
| 118 | + ``` |
| 119 | + |
| 120 | +2. **Validation Rules:** Declarative constraints |
| 121 | + ```typescript |
| 122 | + ValidationRule.create({ condition: 'due_date > TODAY()' }) |
| 123 | + ``` |
| 124 | + |
| 125 | +3. **Workflows:** Trigger actions on events |
| 126 | + ```typescript |
| 127 | + Workflow.create({ trigger: 'after_update', actions: [...] }) |
| 128 | + ``` |
| 129 | + |
| 130 | +4. **Custom Code:** For truly complex logic, write TypeScript plugins |
| 131 | + |
| 132 | +### How does authentication work? |
| 133 | + |
| 134 | +ObjectStack supports **pluggable authentication providers**: |
| 135 | + |
| 136 | +- OAuth 2.0 / OIDC |
| 137 | +- SAML |
| 138 | +- JWT tokens |
| 139 | +- API keys |
| 140 | +- Custom providers |
| 141 | + |
| 142 | +Configure in your app manifest: |
| 143 | + |
| 144 | +```typescript |
| 145 | +Manifest.create({ |
| 146 | + authentication: { |
| 147 | + provider: 'oauth2', |
| 148 | + config: { /* provider config */ }, |
| 149 | + }, |
| 150 | +}); |
| 151 | +``` |
| 152 | + |
| 153 | +### Is ObjectStack multi-tenant? |
| 154 | + |
| 155 | +**Yes!** ObjectStack supports multiple multi-tenancy strategies: |
| 156 | + |
| 157 | +1. **Schema-per-tenant:** Each tenant gets their own database schema |
| 158 | +2. **Row-level security:** Single schema with tenant isolation via RLS |
| 159 | +3. **Database-per-tenant:** Complete isolation |
| 160 | + |
| 161 | +Configure based on your needs. |
| 162 | + |
| 163 | +### How do I deploy ObjectStack apps? |
| 164 | + |
| 165 | +ObjectStack apps are standard Node.js applications. Deploy like any Node app: |
| 166 | + |
| 167 | +- **Docker:** `docker build` → `docker run` |
| 168 | +- **Kubernetes:** Standard K8s deployment |
| 169 | +- **Serverless:** AWS Lambda, Google Cloud Functions |
| 170 | +- **PaaS:** Heroku, Railway, Render |
| 171 | + |
| 172 | +See the [Deployment Guide](/docs/guides/deployment) for details. |
| 173 | + |
| 174 | +## Development Questions |
| 175 | + |
| 176 | +### Do I need to know Zod? |
| 177 | + |
| 178 | +**Helpful but not required.** If you've used Yup, Joi, or similar validation libraries, Zod will feel familiar. |
| 179 | + |
| 180 | +Basic example: |
| 181 | +```typescript |
| 182 | +import { z } from 'zod'; |
| 183 | + |
| 184 | +const schema = z.object({ |
| 185 | + name: z.string(), |
| 186 | + age: z.number().min(0), |
| 187 | +}); |
| 188 | +``` |
| 189 | + |
| 190 | +ObjectStack provides helper functions to hide Zod complexity: |
| 191 | + |
| 192 | +```typescript |
| 193 | +// Instead of raw Zod |
| 194 | +const raw = z.object({ title: z.string() }); |
| 195 | + |
| 196 | +// Use ObjectStack helpers |
| 197 | +const Task = ObjectSchema.create({ |
| 198 | + fields: { |
| 199 | + title: Field.text({ label: 'Title' }), |
| 200 | + } |
| 201 | +}); |
| 202 | +``` |
| 203 | + |
| 204 | +### How do I debug ObjectStack apps? |
| 205 | + |
| 206 | +1. **Schema validation errors:** Zod provides detailed error messages |
| 207 | +2. **Runtime logs:** ObjectStack kernel logs all operations |
| 208 | +3. **Query debugging:** Enable query logging to see generated SQL |
| 209 | +4. **UI debugging:** Inspect JSON configs in browser devtools |
| 210 | + |
| 211 | +### Can I use ObjectStack with React/Vue/Svelte? |
| 212 | + |
| 213 | +**Yes!** ObjectStack is UI-framework agnostic. |
| 214 | + |
| 215 | +**Option 1:** Use official renderers |
| 216 | +- `@objectstack/react-renderer` (recommended) |
| 217 | +- `@objectstack/vue-renderer` (planned) |
| 218 | + |
| 219 | +**Option 2:** Consume REST/GraphQL APIs from any framework |
| 220 | + |
| 221 | +```tsx |
| 222 | +// React example |
| 223 | +function TaskList() { |
| 224 | + const { data } = useFetch('/api/v1/objects/task'); |
| 225 | + return <div>{/* your UI */}</div>; |
| 226 | +} |
| 227 | +``` |
| 228 | + |
| 229 | +### How do I contribute to ObjectStack? |
| 230 | + |
| 231 | +See the [Contributing Guide](https://github.com/objectstack-ai/spec/blob/main/CONTRIBUTING.md). |
| 232 | + |
| 233 | +We welcome: |
| 234 | +- Bug reports |
| 235 | +- Documentation improvements |
| 236 | +- Driver implementations |
| 237 | +- Renderer implementations |
| 238 | +- Example applications |
| 239 | + |
| 240 | +## Business Questions |
| 241 | + |
| 242 | +### What's the license? |
| 243 | + |
| 244 | +**Apache 2.0** (open source, permissive). |
| 245 | + |
| 246 | +You can: |
| 247 | +- ✅ Use commercially |
| 248 | +- ✅ Modify and distribute |
| 249 | +- ✅ Use in proprietary software |
| 250 | +- ✅ Sublicense |
| 251 | + |
| 252 | +### Is there commercial support? |
| 253 | + |
| 254 | +Not yet. Commercial support and managed hosting are planned for the future. |
| 255 | + |
| 256 | +For now: |
| 257 | +- Community support via GitHub Discussions |
| 258 | +- Professional consulting available (contact team) |
| 259 | + |
| 260 | +### Can I build a SaaS product with ObjectStack? |
| 261 | + |
| 262 | +**Absolutely!** ObjectStack is designed for multi-tenant SaaS platforms. |
| 263 | + |
| 264 | +Many use cases: |
| 265 | +- Internal developer platforms |
| 266 | +- Vertical SaaS (industry-specific apps) |
| 267 | +- White-label solutions |
| 268 | +- Agency client portals |
| 269 | + |
| 270 | +### Who is behind ObjectStack? |
| 271 | + |
| 272 | +ObjectStack is an **open-source project** created by the ObjectStack AI team. See [GitHub Contributors](https://github.com/objectstack-ai/spec/graphs/contributors). |
| 273 | + |
| 274 | +## Common Errors |
| 275 | + |
| 276 | +### "Schema validation failed" |
| 277 | + |
| 278 | +**Cause:** Your schema definition doesn't match the Zod schema. |
| 279 | + |
| 280 | +**Solution:** Check the error message for which field failed. Common issues: |
| 281 | +- Missing required fields |
| 282 | +- Wrong field type |
| 283 | +- Invalid enum value |
| 284 | + |
| 285 | +### "Driver not found" |
| 286 | + |
| 287 | +**Cause:** Kernel can't find the database driver. |
| 288 | + |
| 289 | +**Solution:** |
| 290 | +```typescript |
| 291 | +import { MemoryDriver } from '@objectstack/driver-memory'; |
| 292 | + |
| 293 | +kernel.registerDriver('memory', new MemoryDriver()); |
| 294 | +``` |
| 295 | + |
| 296 | +### "Circular dependency in lookup fields" |
| 297 | + |
| 298 | +**Cause:** Two objects reference each other, creating a cycle. |
| 299 | + |
| 300 | +**Solution:** Use lazy references: |
| 301 | +```typescript |
| 302 | +Field.lookup({ |
| 303 | + reference: () => import('./other-object'), |
| 304 | +}) |
| 305 | +``` |
| 306 | + |
| 307 | +## Still Have Questions? |
| 308 | + |
| 309 | +- 📖 Check the [Guides](/docs/guides/getting-started) |
| 310 | +- 💬 Ask in [GitHub Discussions](https://github.com/objectstack-ai/spec/discussions) |
| 311 | +- 🐛 Report bugs in [GitHub Issues](https://github.com/objectstack-ai/spec/issues) |
| 312 | +- 📧 Email: support@objectstack.dev (for urgent issues) |
0 commit comments