|
| 1 | +# Repository Overview |
| 2 | + |
| 3 | +## Project Description |
| 4 | +This project provides a suite of tools to improve developer experience with Xano, focusing on clarity, transparency, automation, and robust version control for Xano backend developments. The main goal is to minimize reliance on AI by offering reliable CLI-based workflows for code generation, documentation, testing, and registry management. The tools allow teams to automate backups, generate OpenAPI specifications, create fully browsable repositories from Xano metadata, scaffold and serve reusable component registries, and run automated tests—all integrated with Git workflows and CI/CD. |
| 5 | + |
| 6 | +**Key technologies used:** |
| 7 | +- Node.js (>=18) |
| 8 | +- TypeScript |
| 9 | +- PNPM workspaces |
| 10 | +- TurboRepo for monorepo builds |
| 11 | +- Jest for testing |
| 12 | +- Esbuild/Rollup for bundling |
| 13 | +- Commander.js for the CLI |
| 14 | +- js-yaml for YAML processing |
| 15 | + |
| 16 | +## Architecture Overview |
| 17 | +- **Monorepo Layout:** Managed by PNPM and TurboRepo with logical separation by package: |
| 18 | + - `@calycode/cli`: The main CLI. |
| 19 | + - `@calycode/core`: Business and program logic for processing Xano data and interfacing with metadata APIs. |
| 20 | + - `@calycode/types`: Shared type definitions. |
| 21 | + - `@calycode/utils`: Shared utilities. |
| 22 | +- **CLI Entry Point:** The CLI (`xano`) registers commands for setup, codegen, OAS gen, tests, registry, backup, etc. Each command routes into core business logic via composed packages. |
| 23 | +- **Extensible Registry System:** For sharing and consuming standardized Xano components (functions, tables, queries, etc.). |
| 24 | +- **Configurable Storage and Context Management:** Multi-user, multi-environment ready. |
| 25 | +- **Automated CI/CD Ready:** Designed to run in GitHub Actions or local workflows. |
| 26 | + |
| 27 | +**Data Flow & Interactions:** |
| 28 | +- User issues a CLI command (`xano ...`) |
| 29 | +- CLI parses config/context, invokes logic in `@calycode/core` |
| 30 | +- Utilities help fetch, transform, and validate data |
| 31 | +- Output is written to file system, appropriate directories, or remote registries |
| 32 | +- CI/CD scripts automate build and publish steps |
| 33 | + |
| 34 | +## Directory Structure |
| 35 | +- **./packages**: Main monorepo packages (cli, core, types, utils) |
| 36 | +- **./docs**: Documentation, including CLI command references |
| 37 | +- **./schemas**: JSON schemas for registries and related features |
| 38 | +- **.github/**: GitHub workflows for CI/CD and publishing |
| 39 | +- **scripts/**: Build, clean, and documentation generation scripts |
| 40 | +- **test-config.json, turbo.json, pnpm-workspace.yaml**: Config files for monorepo tooling |
| 41 | +- **Entry Points:** |
| 42 | + - CLI: `packages/cli/src/index.ts` and `dist/index.cjs` |
| 43 | + - Core logic: `packages/core/src/index.ts` |
| 44 | + |
| 45 | +## Development Workflow |
| 46 | +- **Install/Setup**: `pnpm install` to install everything. (Requires pnpm) |
| 47 | +- **Build**: `pnpm build` (runs TurboRepo, builds all packages) |
| 48 | +- **Run CLI**: `pnpm xano <command>` or if globally linked, `xano <command>` |
| 49 | +- **Testing**: `pnpm test` (runs tests across all packages) |
| 50 | +- **Linting/Formatting**: Eslint/Prettier with default configs, e.g. `pnpm lint`, some packages have their own config and scripts |
| 51 | +- **CI/CD**: See `.github/workflows`. Ready for automated release, docs update, and registry actions |
| 52 | + |
| 53 | +--- |
| 54 | + |
| 55 | +- See also `docs/README.md` and `docs/commands` for command reference. |
| 56 | +- Key configuration in `.changeset/`, `schemas/registry/`, and package-level config files. |
0 commit comments