├── .cursor └── rules │ ├── brand-voice.mdc │ ├── changelog-entry.mdc │ ├── protobuff.mdc │ └── rust.mdc ├── .dockerignore ├── .eslintrc.js ├── .github ├── ISSUE_TEMPLATE │ ├── Bug_report.md │ ├── Feature_request.md │ └── config.yml ├── codeql │ └── codeql-config.yml ├── copilot-instructions.md └── workflows │ ├── codeql-analysis.yml │ ├── copilot-setup-steps.yaml │ ├── deploy-internal-app.yaml │ ├── format.yaml │ ├── release-cli.yaml │ └── test-framework-cli.yaml ├── .gitignore ├── .husky └── pre-commit ├── .npmrc ├── .nvmrc ├── .prettierignore ├── .prettierrc ├── .vscode ├── extensions.json ├── settings.json └── tasks.json ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md ├── SECURITY.md ├── apps ├── create-moose-app │ ├── package.json │ ├── scripts │ │ └── release.sh │ ├── src │ │ └── index.ts │ └── tsconfig.json ├── framework-cli-e2e │ ├── .gitignore │ ├── package.json │ ├── test │ │ └── templates.test.ts │ └── tsconfig.json ├── framework-cli-load-test │ ├── default-moose-app-consumption.js │ └── default-moose-app-ingestion.js ├── framework-cli │ ├── .gitignore │ ├── Cargo.toml │ ├── build.rs │ ├── deploy │ │ ├── Dockerfile.fullstack │ │ ├── README.md │ │ ├── clickhouse │ │ │ ├── clickhouse-config.xml │ │ │ └── run-clickhouse.sh │ │ ├── kubernetes │ │ │ ├── config-files │ │ │ │ ├── managed-cert-ingress.yaml │ │ │ │ ├── managed-cert.yaml │ │ │ │ ├── moose-deployment.yaml │ │ │ │ ├── moose-lb-service.yaml │ │ │ │ ├── moose-service.yaml │ │ │ │ └── redpanda-cluster.yaml │ │ │ ├── deployment-docs │ │ │ │ ├── images │ │ │ │ │ └── pulumi-gcp-project-create.png │ │ │ │ ├── moose-deploy-for-prod.md │ │ │ │ ├── pulimi-test │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── Pulumi.yaml │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── package.json │ │ │ │ │ └── tsconfig.json │ │ │ │ ├── pulumi-poc.md │ │ │ │ └── redpanda-install-on-gke.md │ │ │ └── helper-files │ │ │ │ ├── set-dockerhub-credentials.sh │ │ │ │ ├── set-env-secret.sh │ │ │ │ ├── set-firewall-rule.sh │ │ │ │ └── set-redpanda-password.sh │ │ ├── prod-load-testing │ │ │ ├── README.md │ │ │ └── script.js │ │ ├── push.sh │ │ ├── senddata.sh │ │ └── supervisord.conf │ ├── pyproject.toml │ ├── src │ │ ├── cli.rs │ │ ├── cli │ │ │ ├── commands.rs │ │ │ ├── display.rs │ │ │ ├── local_webserver.rs │ │ │ ├── logger.rs │ │ │ ├── routines.rs │ │ │ ├── routines │ │ │ │ ├── auth.rs │ │ │ │ ├── build.rs │ │ │ │ ├── clean.rs │ │ │ │ ├── code_generation.rs │ │ │ │ ├── dev.rs │ │ │ │ ├── docker_packager.rs │ │ │ │ ├── logs.rs │ │ │ │ ├── ls.rs │ │ │ │ ├── metrics_console.rs │ │ │ │ ├── metrics_console │ │ │ │ │ ├── run_console.rs │ │ │ │ │ └── run_console │ │ │ │ │ │ ├── app.rs │ │ │ │ │ │ ├── client.rs │ │ │ │ │ │ ├── event.rs │ │ │ │ │ │ ├── handler.rs │ │ │ │ │ │ ├── tui.rs │ │ │ │ │ │ └── ui.rs │ │ │ │ ├── openapi.rs │ │ │ │ ├── peek.rs │ │ │ │ ├── ps.rs │ │ │ │ ├── scripts.rs │ │ │ │ ├── seed_data.rs │ │ │ │ ├── templates.rs │ │ │ │ ├── util.rs │ │ │ │ └── validate.rs │ │ │ ├── settings.rs │ │ │ └── watcher.rs │ │ ├── framework.rs │ │ ├── framework │ │ │ ├── blocks.rs │ │ │ ├── blocks │ │ │ │ └── model.rs │ │ │ ├── bulk_import.rs │ │ │ ├── consumption.rs │ │ │ ├── consumption │ │ │ │ ├── loader.rs │ │ │ │ └── model.rs │ │ │ ├── core │ │ │ │ ├── check.rs │ │ │ │ ├── execute.rs │ │ │ │ ├── infra_reality_checker.rs │ │ │ │ ├── infrastructure.rs │ │ │ │ ├── infrastructure │ │ │ │ │ ├── api_endpoint.rs │ │ │ │ │ ├── consumption_webserver.rs │ │ │ │ │ ├── function_process.rs │ │ │ │ │ ├── olap_process.rs │ │ │ │ │ ├── orchestration_worker.rs │ │ │ │ │ ├── sql_resource.rs │ │ │ │ │ ├── table.rs │ │ │ │ │ ├── topic.rs │ │ │ │ │ ├── topic_sync_process.rs │ │ │ │ │ └── view.rs │ │ │ │ ├── infrastructure_map.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── partial_infrastructure_map.rs │ │ │ │ ├── plan.rs │ │ │ │ ├── plan_validator.rs │ │ │ │ └── primitive_map.rs │ │ │ ├── data_model.rs │ │ │ ├── data_model │ │ │ │ ├── config.rs │ │ │ │ ├── model.rs │ │ │ │ └── parser.rs │ │ │ ├── languages.rs │ │ │ ├── python.rs │ │ │ ├── python │ │ │ │ ├── blocks.rs │ │ │ │ ├── checker.rs │ │ │ │ ├── consumption.rs │ │ │ │ ├── datamodel_config.rs │ │ │ │ ├── executor.rs │ │ │ │ ├── generate.rs │ │ │ │ ├── parser.rs │ │ │ │ ├── scripts_worker.rs │ │ │ │ ├── streaming.rs │ │ │ │ ├── templates.rs │ │ │ │ ├── utils.rs │ │ │ │ ├── utils │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── temporal.py │ │ │ │ └── wrappers │ │ │ │ │ ├── blocks_runner.py │ │ │ │ │ ├── consumption_runner.py │ │ │ │ │ ├── load_api_params.py │ │ │ │ │ └── scripts │ │ │ │ │ ├── python_worker_wrapper │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── activity.py │ │ │ │ │ ├── logging.py │ │ │ │ │ ├── serialization.py │ │ │ │ │ ├── types.py │ │ │ │ │ ├── worker.py │ │ │ │ │ └── workflow.py │ │ │ │ │ └── worker-main.py │ │ │ ├── scripts.rs │ │ │ ├── scripts │ │ │ │ ├── collector.rs │ │ │ │ ├── config.rs │ │ │ │ ├── executor.rs │ │ │ │ └── utils.rs │ │ │ ├── sdk.rs │ │ │ ├── sdk │ │ │ │ └── ingest.rs │ │ │ ├── streaming.rs │ │ │ ├── streaming │ │ │ │ ├── generate.rs │ │ │ │ ├── loader.rs │ │ │ │ └── model.rs │ │ │ ├── typescript.rs │ │ │ ├── typescript │ │ │ │ ├── bin.rs │ │ │ │ ├── blocks.rs │ │ │ │ ├── checker.rs │ │ │ │ ├── consumption.rs │ │ │ │ ├── export_collectors.rs │ │ │ │ ├── generate.rs │ │ │ │ ├── generator.rs │ │ │ │ ├── parser.rs │ │ │ │ ├── scripts_worker.rs │ │ │ │ ├── streaming.rs │ │ │ │ └── templates.rs │ │ │ └── versions.rs │ │ ├── infrastructure.rs │ │ ├── infrastructure │ │ │ ├── api.rs │ │ │ ├── olap.rs │ │ │ ├── olap │ │ │ │ ├── clickhouse.rs │ │ │ │ ├── clickhouse │ │ │ │ │ ├── client.rs │ │ │ │ │ ├── config.rs │ │ │ │ │ ├── errors.rs │ │ │ │ │ ├── inserter.rs │ │ │ │ │ ├── mapper.rs │ │ │ │ │ ├── model.rs │ │ │ │ │ ├── queries.rs │ │ │ │ │ └── type_parser.rs │ │ │ │ ├── clickhouse_alt_client.rs │ │ │ │ └── ddl_ordering.rs │ │ │ ├── orchestration.rs │ │ │ ├── orchestration │ │ │ │ ├── temporal.rs │ │ │ │ └── temporal_client.rs │ │ │ ├── processes.rs │ │ │ ├── processes │ │ │ │ ├── blocks_registry.rs │ │ │ │ ├── consumption_registry.rs │ │ │ │ ├── cron_registry.rs │ │ │ │ ├── functions_registry.rs │ │ │ │ ├── kafka_clickhouse_sync.rs │ │ │ │ ├── orchestration_workers_registry.rs │ │ │ │ └── process_registry.rs │ │ │ ├── redis │ │ │ │ ├── connection.rs │ │ │ │ ├── leadership.rs │ │ │ │ ├── messaging.rs │ │ │ │ ├── mock.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── presence.rs │ │ │ │ └── redis_client.rs │ │ │ ├── stream.rs │ │ │ └── stream │ │ │ │ └── kafka │ │ │ │ ├── client.rs │ │ │ │ ├── constants.rs │ │ │ │ ├── errors.rs │ │ │ │ ├── mod.rs │ │ │ │ └── models.rs │ │ ├── main.rs │ │ ├── metrics.rs │ │ ├── metrics_inserter.rs │ │ ├── project.rs │ │ ├── project │ │ │ ├── python_project.rs │ │ │ └── typescript_project.rs │ │ ├── utilities.rs │ │ └── utilities │ │ │ ├── .env │ │ │ ├── auth.rs │ │ │ ├── capture.rs │ │ │ ├── clickhouse_url.rs │ │ │ ├── constants.rs │ │ │ ├── decode_object.rs │ │ │ ├── docker-compose.yml.hbs │ │ │ ├── docker.rs │ │ │ ├── git.rs │ │ │ ├── machine_id.rs │ │ │ ├── package_managers.rs │ │ │ ├── retry.rs │ │ │ ├── system.rs │ │ │ └── validate_passthrough.rs │ └── tests │ │ ├── cli_init.rs │ │ ├── cli_workflows.rs │ │ ├── psl │ │ ├── event.prisma │ │ ├── multiple_complex.psl │ │ ├── multiple_simple │ │ └── simple.prisma │ │ ├── python │ │ ├── flows │ │ │ ├── invalid │ │ │ │ └── flow.py │ │ │ └── valid │ │ │ │ └── flow.py │ │ ├── models │ │ │ ├── __pycache__ │ │ │ │ └── simple.cpython-312.pyc │ │ │ ├── commons.py │ │ │ ├── complex.py │ │ │ ├── jwt.py │ │ │ └── simple.py │ │ └── project │ │ │ ├── requirements.txt │ │ │ └── setup.py │ │ └── test_project │ │ ├── .gitignore │ │ ├── app │ │ └── datamodels │ │ │ ├── extend.m.ts │ │ │ ├── import.ts │ │ │ ├── index_type.ts │ │ │ ├── separate_dir_to_test_get_all │ │ │ └── test_models.ts │ │ │ ├── simple.ts │ │ │ ├── syntax_error.ts │ │ │ └── type_missing.ts │ │ ├── package-lock.json │ │ ├── package.json │ │ └── tsconfig.json ├── framework-docs │ ├── .env │ ├── .eslintrc.js │ ├── .gitignore │ ├── README.md │ ├── components.json │ ├── llm-docs │ │ ├── llms.txt │ │ ├── python │ │ │ ├── constraints.md │ │ │ ├── consumption.md │ │ │ ├── ingest.md │ │ │ ├── pipelines.md │ │ │ ├── schema-definition.md │ │ │ ├── streaming.md │ │ │ ├── table-setup.md │ │ │ └── workflows.md │ │ └── typescript │ │ │ ├── constraints.md │ │ │ ├── consumption.md │ │ │ ├── ingest.md │ │ │ ├── pipelines.md │ │ │ ├── schema-definition.md │ │ │ ├── streaming.md │ │ │ ├── table-setup.md │ │ │ └── workflows.md │ ├── next-env.d.ts │ ├── next-sitemap.config.js │ ├── next.config.mjs │ ├── package.json │ ├── postcss.config.js │ ├── public │ │ ├── Avatars │ │ │ └── Logos-avatar=5-Color-SM.png │ │ ├── CONTAINER-ARCH.svg │ │ ├── DataModelConsole.jpeg │ │ ├── GH-highlevel.png │ │ ├── GH-highlevel.svg │ │ ├── GH-overview-detailed.png │ │ ├── GH-overview-detailed.svg │ │ ├── OVERVIEW-DIAGRAM.svg │ │ ├── PA_architecture.png │ │ ├── architecture-dark.png │ │ ├── architecture-dark.svg │ │ ├── architecture-light.png │ │ ├── architecture-light.svg │ │ ├── artifact.png │ │ ├── autocomplete.png │ │ ├── backend-dark.png │ │ ├── backend-dark.svg │ │ ├── backend-light.png │ │ ├── backend-light.svg │ │ ├── chat.png │ │ ├── claude-search-and-tools.png │ │ ├── claude-settings.png │ │ ├── cursor-mcp-settings.png │ │ ├── dev-prod-dark.png │ │ ├── dev-prod-light.png │ │ ├── favicon.ico │ │ ├── github-dashboard.jpeg │ │ ├── img-diagram-dcm-dark.svg │ │ ├── img-diagram-deploy-local-dark.svg │ │ ├── img-diagram-deploy-prod-dark.svg │ │ ├── img-diagram-full-dark.svg │ │ ├── img-diagram-provision-dark.svg │ │ ├── logo-dark.png │ │ ├── logo-light.png │ │ ├── moose-dev-terminal.png │ │ ├── moose-ls-pa.png │ │ ├── moose-ls.png │ │ ├── new-chat.png │ │ ├── og-image-aurora.png │ │ ├── og-image-fiveonefour.png │ │ ├── og-image-moose.png │ │ ├── openapi-request.png │ │ ├── openapi-try.png │ │ ├── openapi.png │ │ ├── overview-arch-dark.png │ │ ├── overview-arch-light.png │ │ ├── sitemap-0.xml │ │ ├── sitemap.xml │ │ ├── sqltools.png │ │ ├── thunder-client.png │ │ └── vscode-install.png │ ├── src │ │ ├── ABCMonumentGroteskMonoVariable.woff2 │ │ ├── ABCMonumentGroteskVariable.woff2 │ │ ├── components │ │ │ ├── ArgTable.tsx │ │ │ ├── LanguageContext.tsx │ │ │ ├── MuxVideo.tsx │ │ │ ├── bullet-points-card.tsx │ │ │ ├── callout.tsx │ │ │ ├── changelog-category.tsx │ │ │ ├── chip-button.tsx │ │ │ ├── contact-card.tsx │ │ │ ├── contact.tsx │ │ │ ├── cta-card.tsx │ │ │ ├── display.tsx │ │ │ ├── feature-cards.tsx │ │ │ ├── icons.tsx │ │ │ ├── index.tsx │ │ │ ├── language-switcher.tsx │ │ │ ├── language-wrappers.tsx │ │ │ ├── layouts.tsx │ │ │ ├── md-templates │ │ │ │ ├── changelog-guide.md │ │ │ │ └── changelog-template.md │ │ │ ├── meta-renderer.tsx │ │ │ ├── product-badge.tsx │ │ │ ├── q-and-a-bullets.tsx │ │ │ ├── table.tsx │ │ │ ├── toggle-block.tsx │ │ │ ├── two-columns.tsx │ │ │ ├── typography │ │ │ │ └── index.tsx │ │ │ ├── ui │ │ │ │ ├── accordion.tsx │ │ │ │ ├── avatar.tsx │ │ │ │ ├── badge.tsx │ │ │ │ ├── breadcrumb.tsx │ │ │ │ ├── button.tsx │ │ │ │ ├── card.tsx │ │ │ │ ├── collapsible.tsx │ │ │ │ ├── dropdown-menu.tsx │ │ │ │ ├── hover-card.tsx │ │ │ │ ├── index.ts │ │ │ │ ├── navigation-menu.tsx │ │ │ │ ├── select.tsx │ │ │ │ ├── separator.tsx │ │ │ │ ├── sheet.tsx │ │ │ │ └── tabs.tsx │ │ │ └── zoom-img.tsx │ │ ├── lib │ │ │ ├── paths.ts │ │ │ └── utils.ts │ │ ├── middleware.ts │ │ ├── pages │ │ │ ├── _app.tsx │ │ │ ├── _document.tsx │ │ │ ├── _error.jsx │ │ │ ├── _meta.tsx │ │ │ ├── api │ │ │ │ ├── context │ │ │ │ │ └── [...filePath].ts │ │ │ │ ├── event.ts │ │ │ │ ├── llms.txt.ts │ │ │ │ ├── robots.txt.ts │ │ │ │ └── sentry-example-api.js │ │ │ ├── aurora │ │ │ │ ├── _meta.tsx │ │ │ │ ├── data-collection-policy.mdx │ │ │ │ ├── index.mdx │ │ │ │ ├── quickstart.mdx │ │ │ │ ├── quickstart │ │ │ │ │ ├── _meta.tsx │ │ │ │ │ ├── clickhouse-chat.mdx │ │ │ │ │ ├── clickhouse-proj.mdx │ │ │ │ │ └── from-template.mdx │ │ │ │ └── reference │ │ │ │ │ ├── _meta.tsx │ │ │ │ │ ├── cli-reference.mdx │ │ │ │ │ └── tool-reference.mdx │ │ │ ├── index.mdx │ │ │ ├── moose │ │ │ │ ├── _meta.tsx │ │ │ │ ├── building │ │ │ │ │ ├── _meta.tsx │ │ │ │ │ ├── consumption-apis.mdx │ │ │ │ │ ├── data-modeling.mdx │ │ │ │ │ ├── dead-letter-queues.mdx │ │ │ │ │ ├── ingestion.mdx │ │ │ │ │ ├── materialized-views.mdx │ │ │ │ │ ├── olap-table.mdx │ │ │ │ │ ├── streams.mdx │ │ │ │ │ ├── workflows-2.mdx │ │ │ │ │ └── workflows.mdx │ │ │ │ ├── changelog.mdx │ │ │ │ ├── deploying │ │ │ │ │ ├── _meta.tsx │ │ │ │ │ ├── monitoring.mdx │ │ │ │ │ ├── planning.mdx │ │ │ │ │ ├── security.mdx │ │ │ │ │ └── self-hosting │ │ │ │ │ │ ├── _meta.tsx │ │ │ │ │ │ ├── configuring-moose-for-cloud.mdx │ │ │ │ │ │ ├── deploying-on-an-offline-server.mdx │ │ │ │ │ │ ├── deploying-on-ecs.mdx │ │ │ │ │ │ ├── deploying-on-kubernetes.mdx │ │ │ │ │ │ ├── deploying-with-docker-compose.mdx │ │ │ │ │ │ ├── monitoring.mdx │ │ │ │ │ │ ├── packaging-moose-for-deployment.mdx │ │ │ │ │ │ ├── preparing-clickhouse-redpanda.mdx │ │ │ │ │ │ └── summary.mdx │ │ │ │ ├── getting-started │ │ │ │ │ ├── _meta.tsx │ │ │ │ │ ├── architecture.mdx │ │ │ │ │ ├── from-clickhouse.mdx │ │ │ │ │ ├── project-structure.mdx │ │ │ │ │ └── quickstart.mdx │ │ │ │ ├── index.mdx │ │ │ │ └── reference │ │ │ │ │ ├── _meta.tsx │ │ │ │ │ ├── configuration.mdx │ │ │ │ │ ├── metrics-console.mdx │ │ │ │ │ ├── minimum-requirements.mdx │ │ │ │ │ ├── moose-cli.mdx │ │ │ │ │ ├── py-moose-lib.mdx │ │ │ │ │ ├── troubleshooting.mdx │ │ │ │ │ └── ts-moose-lib.mdx │ │ │ ├── release-notes │ │ │ │ ├── _meta.tsx │ │ │ │ ├── index.mdx │ │ │ │ └── upcoming.mdx │ │ │ ├── sentry-example-page.jsx │ │ │ ├── templates.mdx │ │ │ ├── templates │ │ │ │ ├── _meta.tsx │ │ │ │ ├── adsb.mdx │ │ │ │ ├── github.mdx │ │ │ │ └── heartrate.mdx │ │ │ └── usage-data.mdx │ │ └── styles │ │ │ └── globals.css │ ├── tailwind.config.ts │ ├── theme.config.jsx │ ├── tsconfig.json │ └── vercel.json ├── framework-internal-app │ ├── app │ │ ├── aggregations │ │ │ ├── DailyActiveUsers.ts │ │ │ └── sessions.ts │ │ ├── apis │ │ │ ├── dailyActiveUsers.ts │ │ │ ├── log_hierarchy.ts │ │ │ ├── log_query.ts │ │ │ ├── log_timeseries.ts │ │ │ └── machine_id.ts │ │ ├── datamodels │ │ │ ├── logs.ts │ │ │ ├── models.ts │ │ │ └── mooseMetrics.ts │ │ ├── functions │ │ │ ├── Logs │ │ │ │ └── ParsedLogs │ │ │ │ │ └── flow.ts │ │ │ ├── MooseActivity │ │ │ │ └── MooseActivityAugmented │ │ │ │ │ └── flow.ts │ │ │ ├── MooseActivity_migrate__0_0__0_1.sql │ │ │ ├── MooseActivity_migrate__0_1__0_2.sql │ │ │ ├── MooseSessionTelemetry__MooseSessionTelemetryAugmented.ts │ │ │ ├── PageViewEvent │ │ │ │ └── PageViewProcessed │ │ │ │ │ └── flow.ts │ │ │ ├── PageViewEvent_migrate__0_0__PageViewProcessed__0_5.ts │ │ │ ├── ParsedLogs_migrate__0_5__ParsedLogs__0_6.ts │ │ │ ├── UserActivity │ │ │ │ └── ParsedActivity │ │ │ │ │ └── flow.ts │ │ │ └── UserActivity_migrate__0_0__0_3.sql │ │ └── lib │ │ │ └── ipAugmentation.ts │ ├── package.json │ └── project.toml └── moose-cli-npm │ ├── README.md │ ├── package.json │ ├── package.json.tmpl │ ├── scripts │ ├── release-bin.sh │ └── release-cli.sh │ ├── src │ └── index.ts │ └── tsconfig.json ├── examples ├── README.md └── gitub-star-analytics │ └── github-star-analytics-py │ ├── .vscode │ ├── extensions.json │ └── settings.json │ ├── app │ ├── __init__.py │ ├── apis │ │ ├── __init__.py │ │ └── ranked_languages.py │ ├── blocks │ │ ├── MostPopularUsers.py │ │ ├── StargazerProjectsDeduped.py │ │ ├── TopLanguages.py │ │ └── __init__.py │ ├── datamodels │ │ ├── HistoricalStargazer.py │ │ ├── RawStarEvent.py │ │ ├── StargazerProjectInfo.py │ │ └── __init__.py │ ├── functions │ │ ├── HistoricalStargazer__StargazerProjectInfo.py │ │ ├── RawStarEvent__StargazerProjectInfo.py │ │ └── __init__.py │ └── workflows │ │ └── ingest_stargazers.py │ ├── github_star_analytics_py.egg-info │ ├── PKG-INFO │ ├── SOURCES.txt │ ├── dependency_links.txt │ ├── requires.txt │ └── top_level.txt │ ├── moose.config.toml │ ├── sample-data.json │ └── setup.py ├── logo-m-light.png ├── pa.session.sql ├── package.json ├── packages ├── connectors │ └── index.ts ├── design-system-base │ ├── .eslintrc.json │ ├── README.md │ ├── globals.css │ ├── package.json │ ├── postcss.config.js │ ├── scripts │ │ └── release.sh │ ├── tailwind.config.ts │ ├── tsconfig.json │ └── types │ │ └── design-system.d.ts ├── design-system-components │ ├── .eslintrc.json │ ├── README.md │ ├── components.json │ ├── components │ │ ├── CTAs.tsx │ │ ├── PlaceholderImage.tsx │ │ ├── base-nav.tsx │ │ ├── containers │ │ │ └── page-containers.tsx │ │ ├── icon-cards.tsx │ │ ├── index.tsx │ │ ├── language-badge.tsx │ │ ├── logo.tsx │ │ ├── theme-provider.tsx │ │ ├── theme-toggle.tsx │ │ ├── trackable-components.tsx │ │ ├── typography │ │ │ ├── animated.tsx │ │ │ └── standard.tsx │ │ └── ui │ │ │ ├── accordion.tsx │ │ │ ├── avatar.tsx │ │ │ ├── badge.tsx │ │ │ ├── button.tsx │ │ │ ├── card.tsx │ │ │ ├── collapsible.tsx │ │ │ ├── dropdown-menu.tsx │ │ │ ├── hover-card.tsx │ │ │ ├── navigation-menu.tsx │ │ │ ├── select.tsx │ │ │ ├── separator.tsx │ │ │ ├── sheet.tsx │ │ │ └── tabs.tsx │ ├── gsap-bonus.tgz │ ├── images │ │ └── fiveonefour_logo.png │ ├── lib │ │ └── utils.ts │ ├── package.json │ ├── postcss.config.js │ ├── tailwind.config.ts │ ├── tsconfig.json │ └── types │ │ └── design-system.d.ts ├── eslint-config-custom │ ├── index.js │ └── package.json ├── event-capture │ ├── events │ │ ├── api │ │ │ └── route.ts │ │ ├── sendServerEvent.ts │ │ └── withTrackableComponent.tsx │ ├── package.json │ └── scripts │ │ └── release.sh ├── posthog514client-rs │ ├── Cargo.toml │ ├── LICENSE │ ├── README.md │ ├── src │ │ ├── blocking.rs │ │ ├── client.rs │ │ ├── error.rs │ │ ├── event.rs │ │ └── lib.rs │ └── tests │ │ └── blocking_integration_tests.rs ├── protobuf │ └── infrastructure_map.proto ├── py-moose-lib │ ├── .gitignore │ ├── README.md │ ├── moose_lib │ │ ├── __init__.py │ │ ├── blocks.py │ │ ├── clients │ │ │ ├── __init__.py │ │ │ └── redis_client.py │ │ ├── commons.py │ │ ├── data_models.py │ │ ├── dmv2-serializer.py │ │ ├── dmv2.py │ │ ├── internal.py │ │ ├── main.py │ │ ├── query_param.py │ │ ├── streaming │ │ │ ├── __init__.py │ │ │ └── streaming_function_runner.py │ │ └── tasks.py │ ├── pytest.ini │ ├── requirements-dev.txt │ ├── setup.py │ └── tests │ │ ├── __init__.py │ │ ├── conftest.py │ │ ├── test_moose.py │ │ └── test_redis_client.py ├── tailwind-config │ ├── package.json │ └── tailwind.config.js ├── ts-config │ ├── base.json │ ├── nextjs.json │ ├── npm-package.json │ ├── package.json │ └── react-library.json ├── ts-moose-lib │ ├── package.json │ ├── scripts │ │ └── release-lib.sh │ ├── src │ │ ├── blocks │ │ │ ├── helpers.ts │ │ │ └── runner.ts │ │ ├── clients │ │ │ └── redisClient.ts │ │ ├── cluster-utils.ts │ │ ├── commons.ts │ │ ├── compilerPlugin.ts │ │ ├── compilerPluginHelper.ts │ │ ├── config │ │ │ ├── configFile.ts │ │ │ └── runtime.ts │ │ ├── consumption-apis │ │ │ ├── exportTypeSerializer.ts │ │ │ ├── helpers.ts │ │ │ ├── runner.ts │ │ │ └── typiaValidation.ts │ │ ├── dataModels │ │ │ ├── dataModelTypes.ts │ │ │ ├── enumConvert.ts │ │ │ ├── toDataModels.ts │ │ │ ├── typeConvert.ts │ │ │ └── types.ts │ │ ├── dmv2 │ │ │ ├── dataModelMetadata.ts │ │ │ ├── index.ts │ │ │ ├── internal.ts │ │ │ ├── sdk │ │ │ │ ├── consumptionApi.ts │ │ │ │ ├── ingestApi.ts │ │ │ │ ├── ingestPipeline.ts │ │ │ │ ├── materializedView.ts │ │ │ │ ├── olapTable.ts │ │ │ │ ├── sqlResource.ts │ │ │ │ ├── stream.ts │ │ │ │ ├── view.ts │ │ │ │ └── workflow.ts │ │ │ └── typedBase.ts │ │ ├── index.ts │ │ ├── moduleExportSerializer.ts │ │ ├── moose-exec.ts │ │ ├── moose-runner.ts │ │ ├── scripts │ │ │ ├── activity.ts │ │ │ ├── logger.ts │ │ │ ├── runner.ts │ │ │ ├── serialization.ts │ │ │ ├── task.ts │ │ │ ├── types.ts │ │ │ └── workflow.ts │ │ └── streaming-functions │ │ │ └── runner.ts │ ├── tsconfig.json │ └── tsup.config.ts └── ts-moose-proto │ ├── buf.gen.yaml │ ├── package.json │ ├── scripts │ └── release-lib.sh │ ├── tsconfig.json │ └── tsup.config.ts ├── pnpm-lock.yaml ├── pnpm-workspace.yaml ├── rfd ├── 0001 │ └── README.mdx ├── 0002 │ └── README.mdx ├── 0003 │ └── README.mdx ├── 0004 │ └── README.mdx ├── 0005 │ └── README.mdx └── 0006 │ └── readme.mdx ├── scripts ├── package-templates.js ├── package.json ├── rfd │ ├── new.js │ └── template.mdx ├── version.js └── wait-for-npm-package.sh ├── templates ├── ads-b-frontend │ ├── README.md │ ├── frontend │ │ ├── .gitignore │ │ ├── README.md │ │ ├── components.json │ │ ├── eslint.config.mjs │ │ ├── next.config.ts │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── postcss.config.mjs │ │ ├── public │ │ │ ├── file.svg │ │ │ ├── globe.svg │ │ │ ├── next.svg │ │ │ ├── vercel.svg │ │ │ └── window.svg │ │ ├── src │ │ │ ├── app │ │ │ │ ├── favicon.ico │ │ │ │ ├── globals.css │ │ │ │ ├── layout.tsx │ │ │ │ └── page.tsx │ │ │ ├── components │ │ │ │ └── ui │ │ │ │ │ ├── accordion.tsx │ │ │ │ │ ├── alert-dialog.tsx │ │ │ │ │ ├── alert.tsx │ │ │ │ │ ├── aspect-ratio.tsx │ │ │ │ │ ├── avatar.tsx │ │ │ │ │ ├── badge.tsx │ │ │ │ │ ├── breadcrumb.tsx │ │ │ │ │ ├── button.tsx │ │ │ │ │ ├── card.tsx │ │ │ │ │ ├── carousel.tsx │ │ │ │ │ ├── chart.tsx │ │ │ │ │ ├── checkbox.tsx │ │ │ │ │ ├── collapsible.tsx │ │ │ │ │ ├── command.tsx │ │ │ │ │ ├── context-menu.tsx │ │ │ │ │ ├── dialog.tsx │ │ │ │ │ ├── drawer.tsx │ │ │ │ │ ├── dropdown-menu.tsx │ │ │ │ │ ├── form.tsx │ │ │ │ │ ├── hover-card.tsx │ │ │ │ │ ├── input-otp.tsx │ │ │ │ │ ├── input.tsx │ │ │ │ │ ├── label.tsx │ │ │ │ │ ├── menubar.tsx │ │ │ │ │ ├── navigation-menu.tsx │ │ │ │ │ ├── pagination.tsx │ │ │ │ │ ├── popover.tsx │ │ │ │ │ ├── progress.tsx │ │ │ │ │ ├── radio-group.tsx │ │ │ │ │ ├── resizable.tsx │ │ │ │ │ ├── scroll-area.tsx │ │ │ │ │ ├── select.tsx │ │ │ │ │ ├── separator.tsx │ │ │ │ │ ├── sheet.tsx │ │ │ │ │ ├── sidebar.tsx │ │ │ │ │ ├── skeleton.tsx │ │ │ │ │ ├── slider.tsx │ │ │ │ │ ├── sonner.tsx │ │ │ │ │ ├── switch.tsx │ │ │ │ │ ├── table.tsx │ │ │ │ │ ├── tabs.tsx │ │ │ │ │ ├── textarea.tsx │ │ │ │ │ ├── toggle-group.tsx │ │ │ │ │ ├── toggle.tsx │ │ │ │ │ └── tooltip.tsx │ │ │ ├── hooks │ │ │ │ └── use-mobile.ts │ │ │ └── lib │ │ │ │ └── utils.ts │ │ └── tsconfig.json │ ├── moose │ │ ├── .gitignore │ │ ├── .vscode │ │ │ └── settings.json │ │ ├── app │ │ │ ├── datamodels │ │ │ │ └── models.ts │ │ │ ├── functions │ │ │ │ └── process_aircraft.ts │ │ │ ├── index.ts │ │ │ └── scripts │ │ │ │ └── military_aircraft_tracking │ │ │ │ ├── 1.fetch_and_ingest_military_aircraft.ts │ │ │ │ └── config.toml │ │ ├── moose.config.toml │ │ ├── package.json │ │ └── tsconfig.json │ └── template.config.toml ├── ads-b │ ├── .gitignore │ ├── .vscode │ │ └── settings.json │ ├── README.md │ ├── app │ │ ├── datamodels │ │ │ └── models.ts │ │ ├── functions │ │ │ └── process_aircraft.ts │ │ ├── index.ts │ │ └── scripts │ │ │ └── military_aircraft_tracking │ │ │ ├── 1.fetch_and_ingest_military_aircraft.ts │ │ │ └── config.toml │ ├── moose.config.toml │ ├── package.json │ ├── template.config.toml │ └── tsconfig.json ├── brainwaves │ ├── .gitignore │ ├── README.md │ ├── apps │ │ ├── brainmoose │ │ │ ├── .gitignore │ │ │ ├── app │ │ │ │ ├── apis │ │ │ │ │ ├── dailyActiveUsers.ts │ │ │ │ │ ├── getBrainBySessionId.ts │ │ │ │ │ ├── getMostActiveBrainwaves.ts │ │ │ │ │ └── sessionInsights.ts │ │ │ │ ├── blocks │ │ │ │ │ └── DailyActiveUsers.ts │ │ │ │ ├── datamodels │ │ │ │ │ ├── brain.ts │ │ │ │ │ └── models.ts │ │ │ │ ├── functions │ │ │ │ │ └── UserActivity__ParsedActivity.ts │ │ │ │ └── index.ts │ │ │ ├── aurora.config.toml │ │ │ ├── moose.config.toml │ │ │ ├── package-lock.json │ │ │ ├── package.json │ │ │ └── tsconfig.json │ │ └── das │ │ │ ├── das.png │ │ │ ├── download.sh │ │ │ ├── package-lock.json │ │ │ ├── package.json │ │ │ ├── sim.sh │ │ │ ├── src │ │ │ ├── blessed-setup.ts │ │ │ ├── brainwave-analyzer.ts │ │ │ ├── display-manager.ts │ │ │ ├── logger.ts │ │ │ ├── main.ts │ │ │ ├── send-csv-to-udp.ts │ │ │ ├── types.ts │ │ │ ├── udp-server.ts │ │ │ └── utils.ts │ │ │ ├── topn.sh │ │ │ ├── tsconfig.json │ │ │ └── types │ │ │ ├── blessed-contrib.d.ts │ │ │ └── osc-min.d.ts │ ├── docs │ │ ├── brainmoose.jpg │ │ └── museheadband.png │ └── template.config.toml ├── github-dev-trends │ ├── .env.example │ ├── .gitignore │ ├── .vscode │ │ └── settings.json │ ├── Readme.md │ ├── app │ │ ├── apis │ │ │ └── topicTimeseries.ts │ │ ├── favicon.ico │ │ ├── globals.css │ │ ├── index.ts │ │ ├── ingest │ │ │ ├── models.ts │ │ │ └── transform.ts │ │ ├── layout.tsx │ │ ├── page.tsx │ │ ├── providers.tsx │ │ ├── scripts │ │ │ └── getGithubEvents │ │ │ │ ├── 1.fetchEvents.ts │ │ │ │ └── config.toml │ │ └── utils.ts │ ├── components.json │ ├── components │ │ ├── tag-input.tsx │ │ ├── trending-topics-chart.tsx │ │ ├── trending-topics-controls.tsx │ │ └── ui │ │ │ ├── badge.tsx │ │ │ ├── button.tsx │ │ │ ├── card.tsx │ │ │ ├── chart.tsx │ │ │ ├── input.tsx │ │ │ ├── label.tsx │ │ │ └── select.tsx │ ├── eslint.config.mjs │ ├── generated-client │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── .openapi-generator-ignore │ │ ├── .openapi-generator │ │ │ ├── FILES │ │ │ └── VERSION │ │ ├── README.md │ │ ├── apis │ │ │ ├── DefaultApi.ts │ │ │ └── index.ts │ │ ├── index.ts │ │ ├── models │ │ │ ├── GhEvent.ts │ │ │ ├── ResponseBody.ts │ │ │ ├── TopicStats.ts │ │ │ └── index.ts │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── runtime.ts │ │ ├── src │ │ │ ├── apis │ │ │ │ ├── DefaultApi.ts │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ ├── models │ │ │ │ ├── ConsumptionTopicTimeseriesGet200ResponseInner.ts │ │ │ │ ├── ConsumptionTopicTimeseriesGet200ResponseInnerTopicStatsInner.ts │ │ │ │ ├── WatchEvent.ts │ │ │ │ ├── WatchEventWithRepo.ts │ │ │ │ └── index.ts │ │ │ └── runtime.ts │ │ ├── tsconfig.esm.json │ │ └── tsconfig.json │ ├── lib │ │ ├── moose-client.ts │ │ └── utils.ts │ ├── moose.config.toml │ ├── next.config.ts │ ├── package-lock.json │ ├── package.json │ ├── postcss.config.mjs │ ├── tailwind.config.ts │ ├── template.config.toml │ └── tsconfig.json ├── goodreads │ ├── .gitignore │ ├── .vscode │ │ ├── extensions.json │ │ └── settings.json │ ├── README.md │ ├── app │ │ ├── datamodels │ │ │ ├── books.ts │ │ │ └── goodreads_books.ts │ │ └── index.ts │ ├── get_data │ │ ├── ingest_goodreads_data.py │ │ └── requirements.txt │ ├── moose.config.toml │ ├── package.json │ ├── specs │ │ └── project_spec.md │ ├── template.config.toml │ └── tsconfig.json ├── live-heartrate-leaderboard │ ├── .gitignore │ ├── .vscode │ │ ├── extensions.json │ │ └── settings.json │ ├── README.md │ ├── app │ │ ├── __init__.py │ │ ├── apis │ │ │ ├── __init__.py │ │ │ ├── get_leaderboard.py │ │ │ └── get_user_live_heart_rate_stats.py │ │ ├── datamodels │ │ │ ├── BluetoothHRPacket.py │ │ │ ├── ProcessedAntHRPacket.py │ │ │ ├── RawAntHRPacket.py │ │ │ ├── UnifiedHRPacket.py │ │ │ └── __init__.py │ │ ├── functions │ │ │ ├── bluetooth_to_unified_packet.py │ │ │ ├── processed_ant_to_unified_packet.py │ │ │ └── raw_ant_to_processed_ant_packet.py │ │ ├── main.py │ │ ├── pipelines │ │ │ ├── __init__.py │ │ │ └── pipelines.py │ │ ├── scripts │ │ │ ├── __init__.py │ │ │ └── generate_data │ │ │ │ ├── 1.generate_mock_ant_hr_data.py │ │ │ │ └── config.toml │ │ ├── streamlit_app.py │ │ └── views │ │ │ ├── __init__.py │ │ │ └── aggregated_per_second.py │ ├── mock-user-db.json │ ├── moose.config.toml │ ├── prompt.txt │ ├── requirements.txt │ ├── setup.py │ ├── streamlit_app.py │ └── template.config.toml ├── next-app-empty │ ├── README.md │ ├── frontend │ │ ├── .gitignore │ │ ├── README.md │ │ ├── eslint.config.mjs │ │ ├── next.config.ts │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── postcss.config.mjs │ │ ├── public │ │ │ ├── file.svg │ │ │ ├── globe.svg │ │ │ ├── next.svg │ │ │ ├── vercel.svg │ │ │ └── window.svg │ │ ├── src │ │ │ └── app │ │ │ │ ├── favicon.ico │ │ │ │ ├── globals.css │ │ │ │ ├── layout.tsx │ │ │ │ └── page.tsx │ │ └── tsconfig.json │ ├── moose │ │ ├── .gitignore │ │ ├── .vscode │ │ │ ├── extensions.json │ │ │ └── settings.json │ │ ├── app │ │ │ ├── .gitkeep │ │ │ ├── apis │ │ │ │ └── .gitkeep │ │ │ ├── blocks │ │ │ │ └── .gitkeep │ │ │ ├── datamodels │ │ │ │ └── .gitkeep │ │ │ ├── functions │ │ │ │ └── .gitkeep │ │ │ └── scripts │ │ │ │ └── .gitkeep │ │ ├── moose.config.toml │ │ ├── package-lock.json │ │ ├── package.json │ │ └── tsconfig.json │ └── template.config.toml ├── python-empty │ ├── .gitignore │ ├── .vscode │ │ ├── extensions.json │ │ └── settings.json │ ├── README.md │ ├── app │ │ ├── __init__.py │ │ ├── apis │ │ │ └── __init__.py │ │ ├── ingest │ │ │ └── __init__.py │ │ ├── main.py │ │ ├── scripts │ │ │ └── __init__.py │ │ └── views │ │ │ └── __init__.py │ ├── moose.config.toml │ ├── requirements.txt │ ├── setup.py │ └── template.config.toml ├── python │ ├── .gitignore │ ├── .vscode │ │ ├── extensions.json │ │ └── settings.json │ ├── README.md │ ├── app │ │ ├── __init__.py │ │ ├── apis │ │ │ ├── __init__.py │ │ │ └── bar.py │ │ ├── ingest │ │ │ ├── __init__.py │ │ │ ├── models.py │ │ │ └── transforms.py │ │ ├── main.py │ │ ├── scripts │ │ │ ├── __init__.py │ │ │ └── generator │ │ │ │ ├── 1.generate_random.py │ │ │ │ └── config.toml │ │ └── views │ │ │ ├── __init__.py │ │ │ └── bar_aggregated.py │ ├── moose.config.toml │ ├── requirements.txt │ ├── setup.py │ └── template.config.toml ├── typescript-empty │ ├── .gitignore │ ├── .vscode │ │ └── settings.json │ ├── README.md │ ├── app │ │ ├── apis │ │ │ └── .gitkeep │ │ ├── index.ts │ │ ├── ingest │ │ │ └── .gitkeep │ │ ├── scripts │ │ │ └── .gitkeep │ │ └── views │ │ │ └── .gitkeep │ ├── moose.config.toml │ ├── package.json │ ├── template.config.toml │ └── tsconfig.json └── typescript │ ├── .gitignore │ ├── .vscode │ └── settings.json │ ├── README.md │ ├── app │ ├── apis │ │ └── bar.ts │ ├── index.ts │ ├── ingest │ │ ├── models.ts │ │ └── transforms.ts │ ├── scripts │ │ ├── .gitkeep │ │ └── generator │ │ │ ├── 1.generateRandom.ts │ │ │ └── config.toml │ └── views │ │ └── barAggregated.ts │ ├── moose.config.toml │ ├── package-lock.json │ ├── package.json │ ├── template.config.toml │ └── tsconfig.json └── turbo.json /.cursor/rules/protobuff.mdc: -------------------------------------------------------------------------------- 1 | --- 2 | description: Best practices to edit and build .proto files 3 | globs: *.proto 4 | alwaysApply: false 5 | --- 6 | 7 | DO NOT MAKE BREAKING CHANGES -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | .git 2 | **/.next 3 | **/.turbo 4 | .turbo 5 | .vscode 6 | **/target 7 | **/node_modules 8 | node_modules 9 | gha-creds-*.json 10 | template-packages -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | // This tells ESLint to load the config from the package `eslint-config-custom` 4 | extends: ["@repo/eslint-config-custom"], 5 | settings: { 6 | next: { 7 | rootDir: ["apps/*/"], 8 | }, 9 | }, 10 | }; 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | ### Summary 11 | 12 | _Short summary of what is going on or to provide context_. 13 | 14 | ### Steps To Reproduce: 15 | 16 | 1. This is step 1. 17 | 2. This is step 2. 18 | 19 | ### Expected result 20 | 21 | _Describe what should have happened_. 22 | 23 | ### Actual result 24 | 25 | _Describe what actually happened instead_. 26 | 27 | ### Additional information 28 | 29 | _Feel free to attach a screenshot_. 30 | 31 | **Moose CLI Version**: 32 | 33 | **OS and version**: 34 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | labels: enhancement 5 | assignees: '' 6 | --- 7 | 8 | ### Is your feature request related to a problem? Please describe. 9 | A clear and concise description of what the problem is. Ex: I'm always frustrated when [...] 10 | 11 | ### Describe the solution you'd like 12 | A clear and concise description of what you want to happen. 13 | 14 | ### Describe alternatives you've considered 15 | A clear and concise description of any alternative solutions or features you've considered. 16 | 17 | ### Additional context 18 | Add any other context or screenshots about the feature request here. 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: MooseJS Community 4 | url: https://join.slack.com/t/moose-community/shared_invite/zt-2fjh5n3wz-cnOmM9Xe9DYAgQrNu8xKxg 5 | about: Please ask and answer questions here. 6 | -------------------------------------------------------------------------------- /.github/codeql/codeql-config.yml: -------------------------------------------------------------------------------- 1 | name: "CodeQL Configuration" 2 | 3 | paths-ignore: 4 | - "apps/framework-cli/tests/test_project/app/datamodels/syntax_error.ts" 5 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npx lint-staged -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | @gsap:registry=https://npm.greensock.com -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | lts/* -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | apps/framework-cli/tests/test_project 2 | *.mdx 3 | *.md 4 | 5 | pnpm-lock.yaml 6 | docker-compose.yml.hbs -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { "experimentalTernaries": true } 2 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["rust-lang.rust-analyzer", "vadimcn.vscode-lldb"] 3 | } 4 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "rust-analyzer.showUnlinkedFileNotification": false, 3 | "editor.formatOnSave": false, 4 | "[javascript]": { 5 | "editor.defaultFormatter": "esbenp.prettier-vscode" 6 | }, 7 | "[typescript]": { 8 | "editor.defaultFormatter": "esbenp.prettier-vscode" 9 | }, 10 | "[typescriptreact]": { 11 | "editor.defaultFormatter": "esbenp.prettier-vscode" 12 | }, 13 | "[rust]": { 14 | "editor.formatOnSave": true, 15 | "editor.defaultFormatter": "rust-lang.rust-analyzer" 16 | }, 17 | "sqltools.connections": [ 18 | { 19 | "server": "localhost", 20 | "port": 18123, 21 | "useHTTPS": false, 22 | "database": "local", 23 | "username": "panda", 24 | "enableTls": false, 25 | "previewLimit": 50, 26 | "password": "pandapass", 27 | "driver": "ClickHouse", 28 | "name": "pa" 29 | } 30 | ], 31 | "postman.settings.dotenv-detection-notification-visibility": false 32 | } 33 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "CLI build", 6 | "type": "shell", 7 | "command": "cargo build", 8 | "options": { 9 | "cwd": "${workspaceRoot}/apps/framework-cli" 10 | } 11 | }, 12 | { 13 | "label": "TS moose lib build", 14 | "type": "shell", 15 | "command": "pnpm --filter=@514labs/moose-lib run build", 16 | "options": { 17 | "cwd": "${workspaceRoot}" 18 | } 19 | }, 20 | { 21 | "label": "Build all", 22 | "dependsOn": ["CLI build", "TS moose lib build"] 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | resolver = "2" 3 | members = [ 4 | "apps/framework-cli", 5 | "packages/posthog514client-rs", 6 | ] 7 | 8 | [profile.dev] 9 | panic = "abort" 10 | 11 | [profile.release] 12 | panic = "abort" 13 | -------------------------------------------------------------------------------- /apps/create-moose-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "create-moose-app", 3 | "version": "0.0.0", 4 | "description": "Create Moose apps with one command", 5 | "repository": { 6 | "type": "git", 7 | "url": "https://github.com/514-labs/moose/issues", 8 | "directory": "apps/create-moose-app" 9 | }, 10 | "files": [ 11 | "dist" 12 | ], 13 | "scripts": { 14 | "build": "tsc" 15 | }, 16 | "license": "MIT", 17 | "bin": "./dist/index.js", 18 | "devDependencies": { 19 | "@types/node": "18.16.19", 20 | "@typescript-eslint/eslint-plugin": "^5.62.0", 21 | "@typescript-eslint/parser": "^5.62.0", 22 | "eslint": "^8.46.0", 23 | "@repo/ts-config": "workspace:*", 24 | "typescript": "^5.7.0" 25 | }, 26 | "dependencies": { 27 | "@514labs/moose-cli": "0.3.205" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /apps/create-moose-app/scripts/release.sh: -------------------------------------------------------------------------------- 1 | #/usr/bin/env bash 2 | 3 | set -eo pipefail 4 | 5 | version=$1 6 | 7 | cd apps/create-moose-app 8 | npm version $version --no-git-tag-version 9 | 10 | jq \ 11 | --arg VERSION "$version" \ 12 | '.["dependencies"]["@514labs/moose-cli"] = $VERSION' package.json > package.json.tmp \ 13 | && mv package.json.tmp package.json 14 | 15 | cd ../.. 16 | pnpm build --filter ...create-moose-app 17 | cd apps/create-moose-app 18 | pnpm publish --access public --no-git-checks -------------------------------------------------------------------------------- /apps/create-moose-app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@repo/ts-config/npm-package.json", 4 | "include": ["**/*.ts"], 5 | "exclude": ["node_modules", "dist"], 6 | "compilerOptions": { 7 | "rootDir": "./src", 8 | "outDir": "dist", 9 | }, 10 | } 11 | -------------------------------------------------------------------------------- /apps/framework-cli-e2e/.gitignore: -------------------------------------------------------------------------------- 1 | test/test-project* 2 | test/test-python-project* -------------------------------------------------------------------------------- /apps/framework-cli-e2e/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "framework-cli-e2e", 3 | "version": "1.0.0", 4 | "description": "E2E tests for framework-cli", 5 | "scripts": { 6 | "pretest": "cd ../.. && cargo build && pnpm run build --filter=@514labs/moose-lib && ./scripts/package-templates.js", 7 | "test": "mocha -r ts-node/register -p 'test/**/*.ts' --jobs 1 --slow 120000 --async-only --timeout 120000" 8 | }, 9 | "devDependencies": { 10 | "@iarna/toml": "^3.0.0", 11 | "@types/chai": "^4.3.5", 12 | "@types/mocha": "^10.0.1", 13 | "@types/node": "^20.2.5", 14 | "chai": "^4.3.7", 15 | "@clickhouse/client": "latest", 16 | "mocha": "^10.2.0", 17 | "ts-node": "^10.9.1", 18 | "typescript": "^5.1.3" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /apps/framework-cli-e2e/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "module": "commonjs", 5 | "lib": ["ES2020"], 6 | "strict": true, 7 | "esModuleInterop": true, 8 | "skipLibCheck": true, 9 | "forceConsistentCasingInFileNames": true, 10 | "outDir": "./dist", 11 | "rootDir": ".", 12 | "baseUrl": ".", 13 | "paths": { 14 | "datamodels/*": ["test/test-project/app/datamodels/*"], 15 | "versions/*": ["test/test-project/.moose/versions/*"] 16 | }, 17 | "types": ["mocha", "chai", "node"] 18 | }, 19 | "include": ["test/**/*"], 20 | "exclude": ["node_modules"] 21 | } 22 | -------------------------------------------------------------------------------- /apps/framework-cli/.gitignore: -------------------------------------------------------------------------------- 1 | scripts/moose** 2 | 3 | !Cargo.lock 4 | 5 | *.tmp 6 | 7 | src/proto/ -------------------------------------------------------------------------------- /apps/framework-cli/deploy/README.md: -------------------------------------------------------------------------------- 1 | ## Build 2 | 3 | ``` 4 | docker build -t 514labs/moose-fullstack:0.0.0 -f ./Dockerfile.fullstack --build-arg FRAMEWORK_VERSION=0.3.61 . 5 | ``` 6 | 7 | ## Run (no data persisted) 8 | 9 | ``` 10 | docker run --memory=4g 514labs/moose-fullstack:0.0.0 11 | ``` 12 | -------------------------------------------------------------------------------- /apps/framework-cli/deploy/clickhouse/clickhouse-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | :: 4 | 0.0.0.0 5 | 1 6 | 7 | 12 | -------------------------------------------------------------------------------- /apps/framework-cli/deploy/kubernetes/config-files/managed-cert-ingress.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.k8s.io/v1 2 | kind: Ingress 3 | metadata: 4 | name: managed-cert-ingress 5 | annotations: 6 | kubernetes.io/ingress.global-static-ip-name: moosefooddns 7 | networking.gke.io/managed-certificates: managed-cert 8 | ingressClassName: "gce" 9 | spec: 10 | defaultBackend: 11 | service: 12 | name: moose-service 13 | port: 14 | number: 4000 15 | -------------------------------------------------------------------------------- /apps/framework-cli/deploy/kubernetes/config-files/managed-cert.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.gke.io/v1 2 | kind: ManagedCertificate 3 | metadata: 4 | name: managed-cert 5 | spec: 6 | domains: 7 | - moosefood.514.dev 8 | -------------------------------------------------------------------------------- /apps/framework-cli/deploy/kubernetes/config-files/moose-lb-service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: web-lb 5 | spec: 6 | selector: 7 | app: moosedeploy 8 | ports: 9 | - protocol: TCP 10 | port: 4000 11 | targetPort: 4000 12 | type: LoadBalancer 13 | -------------------------------------------------------------------------------- /apps/framework-cli/deploy/kubernetes/config-files/moose-service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: moose-service 5 | spec: 6 | selector: 7 | app: moosedeploy 8 | type: ClusterIP 9 | ports: 10 | - protocol: TCP 11 | port: 4000 12 | targetPort: 4000 13 | -------------------------------------------------------------------------------- /apps/framework-cli/deploy/kubernetes/config-files/redpanda-cluster.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: cluster.redpanda.com/v1alpha1 2 | kind: Redpanda 3 | metadata: 4 | name: redpanda 5 | spec: 6 | chartRef: {} 7 | clusterSpec: 8 | external: 9 | domain: rp.514.dev 10 | auth: 11 | sasl: 12 | enabled: true 13 | users: 14 | - name: red514panda 15 | passwordFrom: 16 | secretKeyRef: 17 | name: redpanda-password 18 | key: password 19 | storage: 20 | persistentVolume: 21 | enabled: true 22 | #storageClass: csi-driver-lvm-striped-xfs -------------------------------------------------------------------------------- /apps/framework-cli/deploy/kubernetes/deployment-docs/images/pulumi-gcp-project-create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-cli/deploy/kubernetes/deployment-docs/images/pulumi-gcp-project-create.png -------------------------------------------------------------------------------- /apps/framework-cli/deploy/kubernetes/deployment-docs/pulimi-test/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | /node_modules/ 3 | -------------------------------------------------------------------------------- /apps/framework-cli/deploy/kubernetes/deployment-docs/pulimi-test/Pulumi.yaml: -------------------------------------------------------------------------------- 1 | name: pulimi-test 2 | runtime: nodejs 3 | description: A minimal Google Cloud TypeScript Pulumi program 4 | config: 5 | pulumi:tags: 6 | value: 7 | pulumi:template: gcp-typescript 8 | -------------------------------------------------------------------------------- /apps/framework-cli/deploy/kubernetes/deployment-docs/pulimi-test/index.ts: -------------------------------------------------------------------------------- 1 | import * as pulumi from "@pulumi/pulumi"; 2 | import * as gcp from "@pulumi/gcp"; 3 | 4 | // Create a GCP resource (Storage Bucket) 5 | const bucket = new gcp.storage.Bucket("my-bucket", { 6 | location: "US", 7 | }); 8 | 9 | // Export the DNS name of the bucket 10 | export const bucketName = bucket.url; 11 | -------------------------------------------------------------------------------- /apps/framework-cli/deploy/kubernetes/deployment-docs/pulimi-test/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pulimi-test", 3 | "main": "index.ts", 4 | "devDependencies": { 5 | "@types/node": "^18" 6 | }, 7 | "dependencies": { 8 | "@pulumi/pulumi": "^3.0.0", 9 | "@pulumi/gcp": "^7.0.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /apps/framework-cli/deploy/kubernetes/deployment-docs/pulimi-test/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "outDir": "bin", 5 | "target": "es2016", 6 | "module": "commonjs", 7 | "moduleResolution": "node", 8 | "sourceMap": true, 9 | "experimentalDecorators": true, 10 | "pretty": true, 11 | "noFallthroughCasesInSwitch": true, 12 | "noImplicitReturns": true, 13 | "forceConsistentCasingInFileNames": true 14 | }, 15 | "files": [ 16 | "index.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /apps/framework-cli/deploy/kubernetes/helper-files/set-env-secret.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Helper script to set a secret in the kubernetes cluster using the environment name and secret value 3 | # Example: ./set-env-secret.sh MOOSE_CLICKHOUSE_CONFIG__DB_NAME hosteddb 4 | if [ -z "$1" ] 5 | then 6 | echo "You must specify the environment key name as the first argument. Example: ./set-env-secret.sh MOOSE_CLICKHOUSE_CONFIG__DB_NAME hosteddb" 7 | exit 1 8 | fi 9 | 10 | if [ -z "$2" ] 11 | then 12 | echo "You must specify the secret value as the second argument. Example: ./set-env-secret.sh MOOSE_CLICKHOUSE_CONFIG__DB_NAME hosteddb" 13 | exit 1 14 | fi 15 | 16 | lc_str=${1,,} 17 | lc_str=${lc_str//_/-} 18 | 19 | kubectl delete secret "sn-${lc_str}" 20 | kubectl create secret generic "sn-${lc_str}" --from-literal="sk-${lc_str}"=$2 -------------------------------------------------------------------------------- /apps/framework-cli/deploy/kubernetes/helper-files/set-firewall-rule.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Helper script to set a GCP firewall rule 3 | # This is necessary in order to allow traffic to enter the kubernetes cluster. 4 | # This will create a firewall rule called ws-firewall that allows traffic on port 4000 5 | # Example: ./set-firewall-rule.sh ws-firewall 4000 6 | 7 | good=1 8 | if [ -z "$1" ] 9 | then 10 | echo "Missing parameter rule name" 11 | good=0 12 | fi 13 | 14 | if [ -z "$2" ] 15 | then 16 | echo "Missing parameter port number" 17 | good=0 18 | fi 19 | 20 | if [ $good -eq 0 ] 21 | then 22 | echo "Usage: ./set-firewall-rule.sh ws-firewall 4000" 23 | exit 1 24 | fi 25 | 26 | gcloud compute firewall-rules delete $1 27 | gcloud compute firewall-rules create $1 --allow tcp:$2 28 | -------------------------------------------------------------------------------- /apps/framework-cli/deploy/kubernetes/helper-files/set-redpanda-password.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | kubectl create secret generic redpanda-password --from-literal=password=$1 -------------------------------------------------------------------------------- /apps/framework-cli/deploy/prod-load-testing/README.md: -------------------------------------------------------------------------------- 1 | # Prod load testing 2 | 3 | For load testing we're using [K6 from Graphana Labs](https://k6.io/docs/). 4 | 5 | Download the CLI on Mac via Homebrew: 6 | 7 | ```sh 8 | brew install k6 9 | ``` 10 | 11 | Once installed create and cd into a folder you'll use for testing: 12 | 13 | ```sh 14 | mkdir /Users/cjus/dev/moose/apps/framework-cli/deploy/prod-load-testing 15 | cd /Users/cjus/dev/moose/apps/framework-cli/deploy/prod-load-testing 16 | k6 new 17 | ``` 18 | 19 | A new `script.js` file will be generated. 20 | We're using the modified `script.js` file included in this repo folder. 21 | 22 | You can take k6 for a test run with: 23 | 24 | ```sh 25 | k6 run script.js 26 | ``` 27 | 28 | In this next run we'll create 10 virtual users (vus) and allow the each user to run for 30 seconds. 29 | 30 | ```sh 31 | k6 run --vus 10 --duration 30s script.js 32 | ``` 33 | 34 | -------------------------------------------------------------------------------- /apps/framework-cli/deploy/prod-load-testing/script.js: -------------------------------------------------------------------------------- 1 | import http from "k6/http"; 2 | import { check, sleep } from "k6"; 3 | 4 | export default function () { 5 | const url = "http://34.82.14.129:4000/ingest/UserActivity"; 6 | const eventId = Math.floor(new Date().getTime()); 7 | const userId = Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString( 8 | 36 9 | ); 10 | 11 | const payload = JSON.stringify({ 12 | eventId, 13 | userId, 14 | timestamp: new Date().toISOString(), 15 | activity: "loadtest", 16 | }); 17 | const params = { 18 | headers: { 19 | "Content-Type": "application/json", 20 | }, 21 | }; 22 | 23 | let res = http.post(url, payload, params); 24 | check(res, { "status was 200": (r) => r.status == 200 }); 25 | 26 | sleep(0.25); 27 | } 28 | -------------------------------------------------------------------------------- /apps/framework-cli/deploy/push.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | version=$2 4 | 5 | if [ -z "$1" ] 6 | then 7 | echo "You must specify the dockerhub repository as an argument. Example: ./push.sh container-repo-name" 8 | echo "Note: you can also provide a second argument to supply a specific version tag - otherwise this script will use the same version as the latest moose-cli on Github." 9 | exit 1 10 | fi 11 | 12 | if [ -z "$2" ] 13 | then 14 | output=$(npx @514labs/moose-cli -V) 15 | version=$(echo "$output" | sed -n '2p' | awk '{print $2}') 16 | fi 17 | 18 | echo "Using version: $version" 19 | arch="moose-df-deployment-aarch64-unknown-linux-gnu" 20 | docker tag $arch:$version $1/$arch:$version 21 | docker push $1/$arch:$version 22 | 23 | arch="moose-df-deployment-x86_64-unknown-linux-gnu" 24 | docker tag $arch:$version $1/$arch:$version 25 | docker push $1/$arch:$version 26 | -------------------------------------------------------------------------------- /apps/framework-cli/deploy/senddata.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | re='^[0-9]+$' 4 | 5 | if [[ $1 =~ $re ]]; then 6 | count=$1 7 | endpoint="http://localhost:4000/ingest/UserActivity/" 8 | else 9 | endpoint=$1 10 | count=$2 11 | fi 12 | 13 | if [ -z "$endpoint" ] 14 | then 15 | endpoint="http://localhost:4000/ingest/UserActivity/" 16 | fi 17 | 18 | if [ -z "$count" ] 19 | then 20 | count=1 21 | fi 22 | 23 | for (( i=1; i<=$count; i++ )) 24 | do 25 | eventID=$(LC_ALL=C < /dev/urandom tr -dc 'a-zA-Z0-9' | fold -w 10 | head -n 1) 26 | userID=$(LC_ALL=C < /dev/urandom tr -dc 'a-zA-Z0-9' | fold -w 6 | head -n 1) 27 | currentTimestamp=$(date '+%Y-%m-%d %H:%M:%S') 28 | 29 | curl -v -X POST \ 30 | -H "Content-Type: application/json" \ 31 | -d "{\"eventId\": \"$eventID\", \"timestamp\": \"$currentTimestamp\", \"userId\": \"$userID\", \"activity\": \"click\"}" \ 32 | $endpoint 33 | done -------------------------------------------------------------------------------- /apps/framework-cli/deploy/supervisord.conf: -------------------------------------------------------------------------------- 1 | [supervisord] 2 | user=root 3 | nodaemon=true 4 | logfile=/dev/null 5 | logfile_maxbytes=0 6 | 7 | [program:redpanda] 8 | user=root 9 | command=rpk redpanda start --reserve-memory 200M --memory 2G --smp 1 --overprovisioned 10 | stdout_logfile=/dev/fd/1 11 | stdout_logfile_maxbytes=0 12 | redirect_stderr=true 13 | 14 | [program:clickhouse] 15 | user=clickhouse 16 | command=/run-clickhouse.sh 17 | stdout_logfile=/dev/fd/1 18 | stdout_logfile_maxbytes=0 19 | redirect_stderr=true 20 | 21 | 22 | -------------------------------------------------------------------------------- /apps/framework-cli/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["maturin==1.8.1"] 3 | build-backend = "maturin" 4 | 5 | [project] 6 | name = "moose-cli" 7 | description_content_type = "text/markdown" 8 | requires-python = ">=3.12" 9 | 10 | [project.urls] 11 | homepage = "https://www.fiveonefour.com" 12 | documentation = "https://docs.fiveonefour.com/moose" 13 | repository = "https://github.com/514labs/moose" 14 | 15 | [tool.maturin] 16 | bindings = "bin" 17 | strip = true 18 | 19 | [tool.maturin.target.x86_64-apple-darwin] 20 | # macOS deployment target SDK version 21 | macos-deployment-target = "13.0" 22 | 23 | [tool.maturin.target.aarch64-apple-darwin] 24 | # macOS deployment target SDK version 25 | macos-deployment-target = "14.0" 26 | 27 | -------------------------------------------------------------------------------- /apps/framework-cli/src/cli/routines/metrics_console.rs: -------------------------------------------------------------------------------- 1 | use crate::cli::{display::Message, routines::RoutineSuccess}; 2 | 3 | mod run_console; 4 | 5 | use super::RoutineFailure; 6 | 7 | pub async fn run_console() -> Result { 8 | let result = run_console::run_console().await; 9 | 10 | match result { 11 | Ok(_) => Ok(RoutineSuccess::success(Message::new( 12 | "".to_string(), 13 | "".to_string(), 14 | ))), 15 | _ => Err(RoutineFailure::error(Message::new( 16 | "".to_string(), 17 | "".to_string(), 18 | ))), 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /apps/framework-cli/src/framework.rs: -------------------------------------------------------------------------------- 1 | use clap::Subcommand; 2 | 3 | pub mod blocks; 4 | pub mod bulk_import; 5 | pub mod consumption; 6 | pub mod core; 7 | pub mod data_model; 8 | pub mod languages; 9 | pub mod python; 10 | pub mod scripts; 11 | pub mod sdk; 12 | pub mod streaming; 13 | pub mod typescript; 14 | pub mod versions; 15 | 16 | pub enum Insights { 17 | Metric, 18 | Dashboard, 19 | Model, 20 | } 21 | 22 | pub enum TopLevelObjects { 23 | Ingestion, 24 | StreamingFunction, 25 | DataModel, 26 | Insights(Insights), 27 | } 28 | 29 | #[derive(Debug, Subcommand)] 30 | pub enum AddableObjects { 31 | IngestPoint, 32 | StreamingFunction, 33 | DataModel, 34 | Metric, 35 | Dashboard, 36 | Model, 37 | } 38 | -------------------------------------------------------------------------------- /apps/framework-cli/src/framework/blocks.rs: -------------------------------------------------------------------------------- 1 | pub mod model; 2 | -------------------------------------------------------------------------------- /apps/framework-cli/src/framework/blocks/model.rs: -------------------------------------------------------------------------------- 1 | #[derive(Debug, thiserror::Error)] 2 | #[non_exhaustive] 3 | pub enum BlocksError { 4 | #[error("Failed to start/stop the blocks process")] 5 | IoError(#[from] std::io::Error), 6 | } 7 | 8 | #[derive(Debug, Clone, Default)] 9 | pub struct Blocks {} 10 | 11 | impl Blocks { 12 | pub fn id(&self) -> String { 13 | "onlyone".to_string() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /apps/framework-cli/src/framework/consumption.rs: -------------------------------------------------------------------------------- 1 | pub mod loader; 2 | pub mod model; 3 | -------------------------------------------------------------------------------- /apps/framework-cli/src/framework/core/infrastructure/consumption_webserver.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | #[derive(Debug, Clone, Serialize, Deserialize)] 4 | pub struct ConsumptionApiWebServer {} 5 | -------------------------------------------------------------------------------- /apps/framework-cli/src/framework/core/infrastructure/olap_process.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | use crate::framework::blocks::model::Blocks; 4 | 5 | // This is mostly a place holder to be hydrated when we move to different processes to execute individual blocks 6 | #[derive(Debug, Clone, Serialize, Deserialize)] 7 | pub struct OlapProcess {} 8 | 9 | impl OlapProcess { 10 | pub fn id(&self) -> String { 11 | "onlyone".to_string() 12 | } 13 | 14 | pub fn from_blocks(_blocks: &Blocks) -> Self { 15 | OlapProcess {} 16 | } 17 | 18 | pub fn expanded_display(&self) -> String { 19 | "Reloading Blocks".to_string() 20 | } 21 | 22 | pub fn short_display(&self) -> String { 23 | self.expanded_display() 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /apps/framework-cli/src/framework/core/plan_validator.rs: -------------------------------------------------------------------------------- 1 | use crate::{infrastructure::stream, project::Project}; 2 | 3 | use super::plan::InfraPlan; 4 | 5 | #[derive(Debug, thiserror::Error)] 6 | pub enum ValidationError { 7 | #[error("Some of the changes derived for the streaming engine are invalid")] 8 | StreamingChange(#[from] stream::StreamingChangesError), 9 | } 10 | 11 | pub fn validate(project: &Project, plan: &InfraPlan) -> Result<(), ValidationError> { 12 | stream::validate_changes(project, &plan.changes.streaming_engine_changes)?; 13 | 14 | Ok(()) 15 | } 16 | -------------------------------------------------------------------------------- /apps/framework-cli/src/framework/python.rs: -------------------------------------------------------------------------------- 1 | use crate::framework::versions::Version; 2 | 3 | pub mod blocks; 4 | pub mod checker; 5 | pub mod consumption; 6 | pub mod datamodel_config; 7 | pub mod executor; 8 | pub mod generate; 9 | pub mod parser; 10 | pub mod scripts_worker; 11 | pub mod streaming; 12 | pub mod templates; 13 | pub mod utils; 14 | 15 | pub fn version_to_identifier(version: &Version) -> String { 16 | format!("v{}", version.as_suffix()) 17 | } 18 | -------------------------------------------------------------------------------- /apps/framework-cli/src/framework/python/checker.rs: -------------------------------------------------------------------------------- 1 | use crate::framework::core::check::{CheckerError, SystemChecker}; 2 | use crate::framework::python::utils::check_python_version; 3 | use async_trait::async_trait; 4 | 5 | pub struct PythonChecker { 6 | pub required_version: String, 7 | } 8 | 9 | #[async_trait] 10 | impl SystemChecker for PythonChecker { 11 | async fn validate(&self) -> Result<(), CheckerError> { 12 | check_python_version(&self.required_version).await 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /apps/framework-cli/src/framework/python/utils/__init__.py: -------------------------------------------------------------------------------- 1 | from .temporal import create_temporal_connection 2 | 3 | __all__ = ['create_temporal_connection'] 4 | -------------------------------------------------------------------------------- /apps/framework-cli/src/framework/python/wrappers/load_api_params.py: -------------------------------------------------------------------------------- 1 | import json 2 | import sys 3 | from importlib import import_module 4 | from dataclasses import asdict 5 | 6 | from moose_lib.query_param import QueryField, convert_consumption_api_param 7 | 8 | def consumption_api_params(module_name: str) -> list[QueryField]: 9 | module = import_module("app.apis." + module_name) 10 | converted = convert_consumption_api_param(module) 11 | if converted is None: 12 | return [] 13 | return converted[1] 14 | 15 | params = consumption_api_params(sys.argv[1]) 16 | print(json.dumps({"params": [asdict(param) for param in params]})) 17 | -------------------------------------------------------------------------------- /apps/framework-cli/src/framework/python/wrappers/scripts/python_worker_wrapper/__init__.py: -------------------------------------------------------------------------------- 1 | from .worker import start_worker 2 | from .logging import log 3 | 4 | __all__ = ['start_worker', 'log'] 5 | -------------------------------------------------------------------------------- /apps/framework-cli/src/framework/python/wrappers/scripts/python_worker_wrapper/types.py: -------------------------------------------------------------------------------- 1 | from typing import TypedDict, Any, Optional 2 | from dataclasses import dataclass 3 | 4 | class WorkflowStepResult(TypedDict): 5 | step: str 6 | data: Optional[dict] 7 | 8 | @dataclass 9 | class StepExecutionContext: 10 | step_name: str 11 | previous_data: Optional[dict] = None 12 | -------------------------------------------------------------------------------- /apps/framework-cli/src/framework/python/wrappers/scripts/worker-main.py: -------------------------------------------------------------------------------- 1 | from python_worker_wrapper import start_worker, log 2 | 3 | import sys 4 | import asyncio 5 | 6 | 7 | def main(): 8 | log.info("Starting worker") 9 | temporal_url = sys.argv[1] 10 | # The root script where all the scripts are located 11 | script_root = sys.argv[2] 12 | # Connection configs 13 | client_cert = sys.argv[3] 14 | client_key = sys.argv[4] 15 | api_key = sys.argv[5] 16 | 17 | try: 18 | asyncio.run(start_worker(temporal_url, script_root, client_cert, client_key, api_key)) 19 | except KeyboardInterrupt: 20 | # Ignore error messages when user force kills the program 21 | # In the future, we might want to terminate all running workflows 22 | pass 23 | 24 | if __name__ == "__main__": 25 | main() -------------------------------------------------------------------------------- /apps/framework-cli/src/framework/sdk.rs: -------------------------------------------------------------------------------- 1 | pub mod ingest; 2 | -------------------------------------------------------------------------------- /apps/framework-cli/src/framework/streaming.rs: -------------------------------------------------------------------------------- 1 | pub mod generate; 2 | pub mod loader; 3 | pub mod model; 4 | -------------------------------------------------------------------------------- /apps/framework-cli/src/framework/typescript.rs: -------------------------------------------------------------------------------- 1 | pub mod bin; 2 | pub mod blocks; 3 | pub mod checker; 4 | pub mod consumption; 5 | pub mod export_collectors; 6 | pub mod generate; 7 | pub mod generator; 8 | pub mod parser; 9 | pub mod scripts_worker; 10 | pub mod streaming; 11 | pub mod templates; 12 | -------------------------------------------------------------------------------- /apps/framework-cli/src/framework/typescript/checker.rs: -------------------------------------------------------------------------------- 1 | use crate::framework::core::check::{CheckerError, SystemChecker}; 2 | use async_trait::async_trait; 3 | 4 | pub struct TypeScriptChecker; 5 | 6 | #[async_trait] 7 | impl SystemChecker for TypeScriptChecker { 8 | async fn validate(&self) -> Result<(), CheckerError> { 9 | Ok(()) 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /apps/framework-cli/src/infrastructure.rs: -------------------------------------------------------------------------------- 1 | //! # Infrastructure 2 | //! This module contains all the functionality for configuring local and cloud infrastructure 3 | //! 4 | //! ## Local Infrastructure 5 | //! 6 | //! ### Redpanda 7 | //! Redpanda is a Kafka API compatible streaming platform that is used for queuing up data. 8 | //! 9 | //! ### Clickhouse 10 | //! Clickhouse is a columnar database that is used for storing data and querying data 11 | //! 12 | //! ### Ingest 13 | //! The ingest module contains all the functionality for ingesting data into the local or cloud 14 | //! infrastructure. 15 | //! 16 | 17 | pub mod api; 18 | pub mod olap; 19 | pub mod orchestration; 20 | pub mod processes; 21 | pub mod redis; 22 | pub mod stream; 23 | -------------------------------------------------------------------------------- /apps/framework-cli/src/infrastructure/api.rs: -------------------------------------------------------------------------------- 1 | use tokio::sync::mpsc::Sender; 2 | 3 | use crate::framework::core::infrastructure_map::{ApiChange, InfrastructureMap}; 4 | 5 | #[derive(Debug, thiserror::Error)] 6 | pub enum ApiChangeError { 7 | #[error("Could not send the error to the api to be executed")] 8 | Send(#[from] tokio::sync::mpsc::error::SendError<(InfrastructureMap, ApiChange)>), 9 | } 10 | 11 | pub async fn execute_changes( 12 | infra_map: &InfrastructureMap, 13 | api_changes: &[ApiChange], 14 | api_changes_channel: Sender<(InfrastructureMap, ApiChange)>, 15 | ) -> Result<(), ApiChangeError> { 16 | for api_change in api_changes.iter() { 17 | api_changes_channel 18 | .send((infra_map.clone(), api_change.clone())) 19 | .await?; 20 | } 21 | 22 | Ok(()) 23 | } 24 | -------------------------------------------------------------------------------- /apps/framework-cli/src/infrastructure/olap/clickhouse/errors.rs: -------------------------------------------------------------------------------- 1 | #[derive(Debug, thiserror::Error)] 2 | #[error("failed interact with clickhouse")] 3 | #[non_exhaustive] 4 | pub enum ClickhouseError { 5 | #[error("Clickhouse - Unsupported data type: {type_name}")] 6 | UnsupportedDataType { 7 | type_name: String, 8 | }, 9 | #[error("Clickhouse - Invalid parameters: {message}")] 10 | InvalidParameters { 11 | message: String, 12 | }, 13 | QueryRender(#[from] handlebars::RenderError), 14 | } 15 | -------------------------------------------------------------------------------- /apps/framework-cli/src/infrastructure/orchestration.rs: -------------------------------------------------------------------------------- 1 | pub mod temporal; 2 | pub mod temporal_client; 3 | -------------------------------------------------------------------------------- /apps/framework-cli/src/infrastructure/stream/kafka/errors.rs: -------------------------------------------------------------------------------- 1 | #[derive(Debug, thiserror::Error)] 2 | pub enum KafkaChangesError { 3 | #[error("Not Supported - {0}")] 4 | NotSupported(String), 5 | 6 | #[error("Anyhow Error")] 7 | Other(#[from] anyhow::Error), 8 | } 9 | -------------------------------------------------------------------------------- /apps/framework-cli/src/infrastructure/stream/kafka/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod client; 2 | pub mod constants; 3 | pub mod errors; 4 | pub mod models; 5 | -------------------------------------------------------------------------------- /apps/framework-cli/src/utilities/.env: -------------------------------------------------------------------------------- 1 | # Temporal versions 2 | TEMPORAL_VERSION=1.22.3 3 | TEMPORAL_UI_VERSION=2.21.3 4 | TEMPORAL_ADMINTOOLS_VERSION=1.22.3 5 | POSTGRESQL_VERSION=13 6 | 7 | # Existing environment variables 8 | CLICKHOUSE_VERSION=latest 9 | DB_NAME=local 10 | CLICKHOUSE_USER=panda 11 | CLICKHOUSE_PASSWORD=pandapass 12 | CLICKHOUSE_HOST_PORT=18123 -------------------------------------------------------------------------------- /apps/framework-cli/src/utilities/decode_object.rs: -------------------------------------------------------------------------------- 1 | use base64::{engine::general_purpose, Engine as _}; 2 | use serde_json::Value; 3 | 4 | pub fn decode_base64_to_json(encoded: &str) -> Result { 5 | general_purpose::STANDARD 6 | .decode(encoded) 7 | .map_err(|e| format!("Invalid base64 encoding: {}", e)) 8 | .and_then(|json_str| { 9 | serde_json::from_slice::(&json_str).map_err(|e| format!("Invalid JSON: {}", e)) 10 | }) 11 | } 12 | -------------------------------------------------------------------------------- /apps/framework-cli/src/utilities/retry.rs: -------------------------------------------------------------------------------- 1 | pub async fn retry( 2 | action: impl Fn() -> F, 3 | should_retry: fn(u32, &E) -> bool, 4 | delay: tokio::time::Duration, 5 | ) -> Result 6 | where 7 | F: std::future::Future>, 8 | { 9 | let mut i = 0; 10 | loop { 11 | match action().await { 12 | Ok(res) => return Ok(res), 13 | Err(err) => { 14 | if should_retry(i, &err) { 15 | i += 1; 16 | tokio::time::sleep(delay).await; 17 | } else { 18 | return Err(err); 19 | } 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /apps/framework-cli/tests/psl/event.prisma: -------------------------------------------------------------------------------- 1 | model Awesome { 2 | id Int @id 3 | name String 4 | description String 5 | } 6 | -------------------------------------------------------------------------------- /apps/framework-cli/tests/psl/multiple_simple: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-cli/tests/psl/multiple_simple -------------------------------------------------------------------------------- /apps/framework-cli/tests/psl/simple.prisma: -------------------------------------------------------------------------------- 1 | model User { 2 | id Int @id 3 | email String 4 | name String? 5 | } -------------------------------------------------------------------------------- /apps/framework-cli/tests/python/flows/invalid/flow.py: -------------------------------------------------------------------------------- 1 | from dataclasses import dataclass 2 | from typing import Callable 3 | 4 | @dataclass 5 | class Flow: 6 | run: Callable 7 | 8 | 9 | my_flow = Flow( 10 | run=lambda: print("Hello, from the flow, yo!") 11 | ) 12 | 13 | @dataclass 14 | class MyDataModel: 15 | name: str 16 | age: int 17 | flag: bool 18 | status: str 19 | test_key: str 20 | arr: list 21 | opt: str 22 | 23 | @dataclass 24 | class MyDataModel2: 25 | name: str 26 | age: int 27 | flag: bool 28 | status: str 29 | test_key: str 30 | arr: list 31 | opt: str 32 | 33 | def my_func(dm: MyDataModel) -> MyDataModel2: 34 | print(dm) 35 | 36 | my_flow_2 = Flow( 37 | run=my_func 38 | ) 39 | 40 | -------------------------------------------------------------------------------- /apps/framework-cli/tests/python/flows/valid/flow.py: -------------------------------------------------------------------------------- 1 | from dataclasses import dataclass 2 | from typing import Callable 3 | from datetime import datetime 4 | 5 | @dataclass 6 | class Flow: 7 | run: Callable 8 | 9 | type Key[T: (str, int)] = T 10 | 11 | @dataclass 12 | class UserActivity: 13 | eventId: Key[str] 14 | timestamp: str 15 | userId: str 16 | activity: str 17 | 18 | @dataclass 19 | class ParsedActivity: 20 | eventId: Key[str] 21 | timestamp: datetime 22 | userId: str 23 | activity: str 24 | 25 | def my_func(dm: UserActivity) -> ParsedActivity: 26 | return ParsedActivity( 27 | eventId=dm.eventId, 28 | timestamp=datetime.fromisoformat(dm.timestamp), 29 | userId=dm.userId, 30 | activity="yo" 31 | ) 32 | 33 | my_flow = Flow( 34 | run=my_func 35 | ) 36 | 37 | -------------------------------------------------------------------------------- /apps/framework-cli/tests/python/models/__pycache__/simple.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-cli/tests/python/models/__pycache__/simple.cpython-312.pyc -------------------------------------------------------------------------------- /apps/framework-cli/tests/python/models/commons.py: -------------------------------------------------------------------------------- 1 | from typing import Generic, TypeVar 2 | 3 | type Key[T: (str, int)] = T 4 | 5 | T = TypeVar('T', bound=object) 6 | 7 | class JWT(Generic[T]): 8 | def __init__(self, payload: T): 9 | self.payload = payload -------------------------------------------------------------------------------- /apps/framework-cli/tests/python/models/complex.py: -------------------------------------------------------------------------------- 1 | from dataclasses import dataclass 2 | from enum import Enum 3 | from typing import Optional 4 | from datetime import datetime 5 | 6 | 7 | type Key[T: (str, int)] = T 8 | 9 | class Status(Enum): 10 | OK = "ok" 11 | ERROR = "error" 12 | 13 | class MySubModel: 14 | name: str 15 | age: int 16 | 17 | 18 | @dataclass 19 | class ComplexModel: 20 | name: Key[str] 21 | age: int 22 | flag: bool 23 | status: Status 24 | test_key: str 25 | arr: list[str] 26 | opt: Optional[str] 27 | list_sub: list[MySubModel] 28 | date: datetime 29 | 30 | -------------------------------------------------------------------------------- /apps/framework-cli/tests/python/models/jwt.py: -------------------------------------------------------------------------------- 1 | from dataclasses import dataclass 2 | from typing import Optional 3 | from .commons import JWT, Key 4 | 5 | @dataclass 6 | class JWTPayload: 7 | iss: str 8 | aud: str 9 | exp: int 10 | context: str 11 | 12 | @dataclass 13 | class MyJwtModel: 14 | name: Key[str] 15 | value: str 16 | jwt: JWT[JWTPayload] 17 | -------------------------------------------------------------------------------- /apps/framework-cli/tests/python/models/simple.py: -------------------------------------------------------------------------------- 1 | from dataclasses import dataclass 2 | from enum import Enum 3 | from typing import Optional 4 | from datetime import datetime 5 | from .commons import JWT, Key 6 | 7 | 8 | class Status(Enum): 9 | OK = "ok" 10 | ERROR = "error" 11 | 12 | @dataclass 13 | class MySubModel: 14 | name: str 15 | age: int 16 | 17 | 18 | @dataclass 19 | class MyModel: 20 | name: Key[str] 21 | age: int 22 | flag: bool 23 | status: Status 24 | test_key: str 25 | arr: list[str] 26 | opt: Optional[str] 27 | sub: MySubModel 28 | date: datetime 29 | 30 | -------------------------------------------------------------------------------- /apps/framework-cli/tests/python/project/requirements.txt: -------------------------------------------------------------------------------- 1 | clickhouse_connect==0.7.16; python_version >= "3.12" 2 | requests==2.32.4; python_version >= "3.12" 3 | moose-cli; python_version >= "3.12" 4 | moose-lib; python_version >= "3.12" -------------------------------------------------------------------------------- /apps/framework-cli/tests/python/project/setup.py: -------------------------------------------------------------------------------- 1 | 2 | from setuptools import setup 3 | 4 | with open('requirements.txt') as f: 5 | requirements = [line.strip() for line in f if line.strip() and not line.startswith('#')] 6 | 7 | setup( 8 | name='test_project', 9 | version='0.0', 10 | install_requires=requirements, 11 | python_requires='>=3.12', 12 | ) 13 | -------------------------------------------------------------------------------- /apps/framework-cli/tests/test_project/.gitignore: -------------------------------------------------------------------------------- 1 | .ts-node -------------------------------------------------------------------------------- /apps/framework-cli/tests/test_project/app/datamodels/extend.m.ts: -------------------------------------------------------------------------------- 1 | type Key = T; 2 | 3 | export interface Base { 4 | id: Key; 5 | } 6 | 7 | interface User extends Base { 8 | name: string; 9 | email: string; 10 | } 11 | -------------------------------------------------------------------------------- /apps/framework-cli/tests/test_project/app/datamodels/import.ts: -------------------------------------------------------------------------------- 1 | import { Base } from "./extend.m"; 2 | 3 | export interface User extends Base { 4 | name: string; 5 | email: string; 6 | } 7 | -------------------------------------------------------------------------------- /apps/framework-cli/tests/test_project/app/datamodels/index_type.ts: -------------------------------------------------------------------------------- 1 | type Key = T; 2 | 3 | export interface MyModel { 4 | name: Key; 5 | custom_properties: { 6 | [key: symbol]: any; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /apps/framework-cli/tests/test_project/app/datamodels/separate_dir_to_test_get_all/test_models.ts: -------------------------------------------------------------------------------- 1 | type Key = T; 2 | 3 | export interface Awesome { 4 | id: Key; 5 | name: string; 6 | description: string; 7 | } 8 | 9 | export interface User { 10 | id: Key; 11 | email: string; 12 | name?: string; 13 | } -------------------------------------------------------------------------------- /apps/framework-cli/tests/test_project/app/datamodels/simple.ts: -------------------------------------------------------------------------------- 1 | type Key = T; 2 | 3 | enum NumEnum { 4 | A = 1, 5 | } 6 | 7 | enum StringedEnum { 8 | A = "TEST", 9 | } 10 | 11 | enum IterationEnum { 12 | A, 13 | B = 10, 14 | C, 15 | } 16 | 17 | export interface MyModel { 18 | name: Key; 19 | age: number; 20 | // abc: MyEnum; 21 | flag: boolean; 22 | "test-key": string; 23 | arr: string[]; 24 | opt?: string; 25 | enum3: StringedEnum; 26 | enum2: IterationEnum; 27 | enum1: NumEnum; 28 | logs: { 29 | info: string; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /apps/framework-cli/tests/test_project/app/datamodels/syntax_error.ts: -------------------------------------------------------------------------------- 1 | export interface Stuff { 2 | foo: string 3 | } 4 | 5 | export const StuffConfig = { 6 | storage: { 7 | enabled: false; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /apps/framework-cli/tests/test_project/app/datamodels/type_missing.ts: -------------------------------------------------------------------------------- 1 | export interface Stuff { 2 | foo 3 | } 4 | -------------------------------------------------------------------------------- /apps/framework-cli/tests/test_project/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "stuff", 3 | "devDependencies": { 4 | "typescript": "latest", 5 | "ts-patch": "latest", 6 | "@514labs/moose-lib": "latest", 7 | "ts-node": "latest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /apps/framework-cli/tests/test_project/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "outDir": "dist", 4 | "esModuleInterop": true, 5 | "paths": { 6 | "datamodels/*": [ 7 | "./app/datamodels/*" 8 | ], 9 | "versions/*": [ 10 | "./.moose/versions/*" 11 | ] 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /apps/framework-docs/.env: -------------------------------------------------------------------------------- 1 | NEXT_TELEMETRY_DISABLED=1 -------------------------------------------------------------------------------- /apps/framework-docs/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ["custom"], 4 | }; 5 | -------------------------------------------------------------------------------- /apps/framework-docs/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | # local env files 28 | .env.local 29 | .env.development.local 30 | .env.test.local 31 | .env.production.local 32 | 33 | # vercel 34 | .vercel 35 | 36 | # Sentry Auth Token 37 | .sentryclirc 38 | 39 | .env*.local 40 | -------------------------------------------------------------------------------- /apps/framework-docs/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "new-york", 4 | "rsc": false, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.ts", 8 | "css": "src/styles/globals.css", 9 | "baseColor": "neutral", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils", 16 | "ui": "@/components/ui", 17 | "lib": "@/lib", 18 | "hooks": "@/hooks" 19 | }, 20 | "iconLibrary": "lucide" 21 | } 22 | -------------------------------------------------------------------------------- /apps/framework-docs/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information. 6 | -------------------------------------------------------------------------------- /apps/framework-docs/next-sitemap.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next-sitemap').IConfig} */ 2 | module.exports = { 3 | siteUrl: process.env.SITE_URL || "https://docs.fiveonefour.com/", 4 | generateRobotsTxt: false, // (optional) 5 | exclude: ["*/_meta"], 6 | // ...other options 7 | }; 8 | -------------------------------------------------------------------------------- /apps/framework-docs/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /apps/framework-docs/public/Avatars/Logos-avatar=5-Color-SM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/Avatars/Logos-avatar=5-Color-SM.png -------------------------------------------------------------------------------- /apps/framework-docs/public/DataModelConsole.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/DataModelConsole.jpeg -------------------------------------------------------------------------------- /apps/framework-docs/public/GH-highlevel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/GH-highlevel.png -------------------------------------------------------------------------------- /apps/framework-docs/public/GH-overview-detailed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/GH-overview-detailed.png -------------------------------------------------------------------------------- /apps/framework-docs/public/PA_architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/PA_architecture.png -------------------------------------------------------------------------------- /apps/framework-docs/public/architecture-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/architecture-dark.png -------------------------------------------------------------------------------- /apps/framework-docs/public/architecture-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/architecture-light.png -------------------------------------------------------------------------------- /apps/framework-docs/public/artifact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/artifact.png -------------------------------------------------------------------------------- /apps/framework-docs/public/autocomplete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/autocomplete.png -------------------------------------------------------------------------------- /apps/framework-docs/public/backend-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/backend-dark.png -------------------------------------------------------------------------------- /apps/framework-docs/public/backend-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/backend-light.png -------------------------------------------------------------------------------- /apps/framework-docs/public/chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/chat.png -------------------------------------------------------------------------------- /apps/framework-docs/public/claude-search-and-tools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/claude-search-and-tools.png -------------------------------------------------------------------------------- /apps/framework-docs/public/claude-settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/claude-settings.png -------------------------------------------------------------------------------- /apps/framework-docs/public/cursor-mcp-settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/cursor-mcp-settings.png -------------------------------------------------------------------------------- /apps/framework-docs/public/dev-prod-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/dev-prod-dark.png -------------------------------------------------------------------------------- /apps/framework-docs/public/dev-prod-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/dev-prod-light.png -------------------------------------------------------------------------------- /apps/framework-docs/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/favicon.ico -------------------------------------------------------------------------------- /apps/framework-docs/public/github-dashboard.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/github-dashboard.jpeg -------------------------------------------------------------------------------- /apps/framework-docs/public/logo-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/logo-dark.png -------------------------------------------------------------------------------- /apps/framework-docs/public/logo-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/logo-light.png -------------------------------------------------------------------------------- /apps/framework-docs/public/moose-dev-terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/moose-dev-terminal.png -------------------------------------------------------------------------------- /apps/framework-docs/public/moose-ls-pa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/moose-ls-pa.png -------------------------------------------------------------------------------- /apps/framework-docs/public/moose-ls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/moose-ls.png -------------------------------------------------------------------------------- /apps/framework-docs/public/new-chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/new-chat.png -------------------------------------------------------------------------------- /apps/framework-docs/public/og-image-aurora.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/og-image-aurora.png -------------------------------------------------------------------------------- /apps/framework-docs/public/og-image-fiveonefour.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/og-image-fiveonefour.png -------------------------------------------------------------------------------- /apps/framework-docs/public/og-image-moose.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/og-image-moose.png -------------------------------------------------------------------------------- /apps/framework-docs/public/openapi-request.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/openapi-request.png -------------------------------------------------------------------------------- /apps/framework-docs/public/openapi-try.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/openapi-try.png -------------------------------------------------------------------------------- /apps/framework-docs/public/openapi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/openapi.png -------------------------------------------------------------------------------- /apps/framework-docs/public/overview-arch-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/overview-arch-dark.png -------------------------------------------------------------------------------- /apps/framework-docs/public/overview-arch-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/overview-arch-light.png -------------------------------------------------------------------------------- /apps/framework-docs/public/sitemap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | https://docs.fiveonefour.com/sitemap-0.xml 4 | -------------------------------------------------------------------------------- /apps/framework-docs/public/sqltools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/sqltools.png -------------------------------------------------------------------------------- /apps/framework-docs/public/thunder-client.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/thunder-client.png -------------------------------------------------------------------------------- /apps/framework-docs/public/vscode-install.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/public/vscode-install.png -------------------------------------------------------------------------------- /apps/framework-docs/src/ABCMonumentGroteskMonoVariable.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/src/ABCMonumentGroteskMonoVariable.woff2 -------------------------------------------------------------------------------- /apps/framework-docs/src/ABCMonumentGroteskVariable.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/apps/framework-docs/src/ABCMonumentGroteskVariable.woff2 -------------------------------------------------------------------------------- /apps/framework-docs/src/components/chip-button.tsx: -------------------------------------------------------------------------------- 1 | import { SmallTextEmbed } from "@/components/typography"; 2 | import { Button } from "@/components/ui"; 3 | import Link from "next/link"; 4 | 5 | interface ChipProps { 6 | label: string; 7 | href: string; 8 | } 9 | 10 | export function ChipButton({ label, href }: ChipProps) { 11 | return ( 12 | 13 | 21 | 22 | ); 23 | } 24 | -------------------------------------------------------------------------------- /apps/framework-docs/src/components/display.tsx: -------------------------------------------------------------------------------- 1 | // Create a component that displays a heading with the mooseJS display style 2 | 3 | import React from "react"; 4 | 5 | export default function Display({ children }: { children: React.ReactNode }) { 6 | return ( 7 |
8 | {children} 9 |
10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /apps/framework-docs/src/components/index.tsx: -------------------------------------------------------------------------------- 1 | export * from "./callout"; 2 | export * from "./cta-card"; 3 | export * from "./zoom-img"; 4 | export * from "./chip-button"; 5 | export * from "./two-columns"; 6 | export * from "./toggle-block"; 7 | export * from "./language-switcher"; 8 | export * from "./language-wrappers"; 9 | export * from "./feature-cards"; 10 | export * from "./MuxVideo"; 11 | export * from "./product-badge"; 12 | export * from "./meta-renderer"; 13 | export * from "./bullet-points-card"; 14 | export * from "./q-and-a-bullets"; 15 | export * from "./icons"; 16 | export * from "./contact"; 17 | -------------------------------------------------------------------------------- /apps/framework-docs/src/components/product-badge.tsx: -------------------------------------------------------------------------------- 1 | import { Badge } from "@/components/ui"; 2 | 3 | interface CustomBadgeProps { 4 | variant?: "moose" | "boreal" | "aurora" | "default"; 5 | children: React.ReactNode; 6 | className?: string; 7 | } 8 | 9 | export function ProductBadge({ 10 | variant = "default", 11 | children, 12 | className = "", 13 | }: CustomBadgeProps) { 14 | const variantClasses = { 15 | moose: 16 | "bg-moose-purple hover:bg-moose-purple-dark text-moose-purple-foreground", 17 | boreal: 18 | "bg-boreal-green hover:bg-boreal-green-dark text-boreal-green-foreground", 19 | aurora: "bg-aurora-teal text-black", 20 | default: "", 21 | }; 22 | 23 | return ( 24 | 25 | {children} 26 | 27 | ); 28 | } 29 | -------------------------------------------------------------------------------- /apps/framework-docs/src/components/table.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | const ProjectStructureTable = () => { 4 | return
hi
; 5 | }; 6 | 7 | export default ProjectStructureTable; 8 | -------------------------------------------------------------------------------- /apps/framework-docs/src/components/ui/collapsible.tsx: -------------------------------------------------------------------------------- 1 | import * as CollapsiblePrimitive from "@radix-ui/react-collapsible"; 2 | 3 | const Collapsible = CollapsiblePrimitive.Root; 4 | 5 | const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger; 6 | 7 | const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent; 8 | 9 | export { Collapsible, CollapsibleTrigger, CollapsibleContent }; 10 | -------------------------------------------------------------------------------- /apps/framework-docs/src/components/ui/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./accordion"; 2 | export * from "./avatar"; 3 | export * from "./badge"; 4 | export * from "./button"; 5 | export * from "./card"; 6 | export * from "./collapsible"; 7 | export * from "./dropdown-menu"; 8 | export * from "./hover-card"; 9 | export * from "./navigation-menu"; 10 | export * from "./select"; 11 | export * from "./separator"; 12 | export * from "./sheet"; 13 | export * from "./tabs"; 14 | -------------------------------------------------------------------------------- /apps/framework-docs/src/components/ui/separator.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import * as SeparatorPrimitive from "@radix-ui/react-separator"; 3 | 4 | import { cn } from "@/lib/utils"; 5 | 6 | const Separator = React.forwardRef< 7 | React.ElementRef, 8 | React.ComponentPropsWithoutRef 9 | >( 10 | ( 11 | { className, orientation = "horizontal", decorative = true, ...props }, 12 | ref, 13 | ) => ( 14 | 25 | ), 26 | ); 27 | Separator.displayName = SeparatorPrimitive.Root.displayName; 28 | 29 | export { Separator }; 30 | -------------------------------------------------------------------------------- /apps/framework-docs/src/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { clsx, type ClassValue } from "clsx"; 2 | import { twMerge } from "tailwind-merge"; 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)); 6 | } 7 | -------------------------------------------------------------------------------- /apps/framework-docs/src/pages/_document.tsx: -------------------------------------------------------------------------------- 1 | import { Html, Head, Main, NextScript } from "next/document"; 2 | import Script from "next/script"; 3 | 4 | export default function Document() { 5 | return ( 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /apps/framework-docs/src/pages/_error.jsx: -------------------------------------------------------------------------------- 1 | import * as Sentry from "@sentry/nextjs"; 2 | import Error from "next/error"; 3 | 4 | const CustomErrorComponent = (props) => { 5 | return ; 6 | }; 7 | 8 | CustomErrorComponent.getInitialProps = async (contextData) => { 9 | // In case this is running in a serverless function, await this in order to give Sentry 10 | // time to send the error before the lambda exits 11 | await Sentry.captureUnderscoreErrorException(contextData); 12 | 13 | // This will contain the status code of the response 14 | return Error.getInitialProps(contextData); 15 | }; 16 | 17 | export default CustomErrorComponent; 18 | -------------------------------------------------------------------------------- /apps/framework-docs/src/pages/_meta.tsx: -------------------------------------------------------------------------------- 1 | import { render } from "@/components"; 2 | import Display from "@/components/display"; 3 | 4 | export default render({ 5 | index: { 6 | display: "hidden", 7 | theme: { 8 | breadcrumb: false, 9 | sidebar: false, 10 | }, 11 | }, 12 | moose: { 13 | type: "page", 14 | title: "Moose", 15 | href: "/moose", 16 | }, 17 | aurora: { 18 | type: "page", 19 | title: "Aurora", 20 | href: "/aurora", 21 | }, 22 | blog: { 23 | title: "Blog", 24 | type: "page", 25 | href: "https://www.fiveonefour.com/blog", 26 | newWindow: true, 27 | }, 28 | templates: { 29 | type: "page", 30 | title: "Templates", 31 | href: "/templates", 32 | }, 33 | "release-notes": { 34 | type: "page", 35 | title: "Release Notes", 36 | href: "/release-notes", 37 | }, 38 | "usage-data": { 39 | display: "hidden", 40 | }, 41 | }); 42 | -------------------------------------------------------------------------------- /apps/framework-docs/src/pages/api/sentry-example-api.js: -------------------------------------------------------------------------------- 1 | // A faulty API route to test Sentry's error monitoring 2 | export default function handler(_req, _res) { 3 | throw new Error("Sentry Example API Route Error"); 4 | // res.status(200).json({ name: "John Doe" }); 5 | } 6 | -------------------------------------------------------------------------------- /apps/framework-docs/src/pages/aurora/_meta.tsx: -------------------------------------------------------------------------------- 1 | import { render } from "@/components"; 2 | import { HandMetal, BookMarked, History } from "lucide-react"; 3 | 4 | const meta = { 5 | index: { 6 | title: "Introduction", 7 | theme: { 8 | breadcrumb: false, 9 | }, 10 | }, 11 | quickstart: { 12 | title: "Quickstart Guides", 13 | Icon: HandMetal, 14 | }, 15 | reference: { 16 | title: "Reference", 17 | Icon: BookMarked, 18 | }, 19 | "data-collection-policy": { 20 | title: "Data collection policy", 21 | Icon: History, 22 | }, 23 | } as const; 24 | 25 | export default render(meta); 26 | -------------------------------------------------------------------------------- /apps/framework-docs/src/pages/aurora/quickstart/_meta.tsx: -------------------------------------------------------------------------------- 1 | import { render } from "@/components"; 2 | const meta = { 3 | "clickhouse-chat": "AI Chat with ClickHouse", 4 | "clickhouse-proj": "AI analytics engineering from your ClickHouse", 5 | "from-template": "AI powered OLAP templates", 6 | }; 7 | export default render(meta); 8 | -------------------------------------------------------------------------------- /apps/framework-docs/src/pages/aurora/reference/_meta.tsx: -------------------------------------------------------------------------------- 1 | import { render } from "@/components"; 2 | const meta = { 3 | "cli-reference": "CLI reference", 4 | "tool-reference": "Tools reference", 5 | }; 6 | export default render(meta); 7 | -------------------------------------------------------------------------------- /apps/framework-docs/src/pages/moose/building/_meta.tsx: -------------------------------------------------------------------------------- 1 | import { render } from "@/components"; 2 | 3 | const meta = { 4 | "data-modeling": "Data Modeling", 5 | ingestion: "Ingesting Data into Analytics Storage", 6 | streams: "Stream Processing", 7 | "olap-table": "Working with OLAP Tables", 8 | "materialized-views": "Transforming Data in-Database", 9 | "consumption-apis": "Exposing Analytics via API", 10 | workflows: "Scheduling & Triggering Workflows", 11 | "workflows-2": { 12 | title: "Scheduling & Triggering Workflows 2.0", 13 | display: "hidden", 14 | }, 15 | "dead-letter-queues": "Error Handling With Dead Letter Queues", 16 | }; 17 | 18 | export default render(meta); 19 | -------------------------------------------------------------------------------- /apps/framework-docs/src/pages/moose/deploying/_meta.tsx: -------------------------------------------------------------------------------- 1 | import { render } from "@/components"; 2 | 3 | const metadata = { 4 | monitoring: "Monitoring", 5 | planning: "Planning", 6 | security: "Security", 7 | "self-hosting": { 8 | title: "Self Hosting", 9 | type: "separator", 10 | }, 11 | }; 12 | 13 | export default render(metadata); 14 | -------------------------------------------------------------------------------- /apps/framework-docs/src/pages/moose/deploying/self-hosting/_meta.tsx: -------------------------------------------------------------------------------- 1 | import { render } from "@/components"; 2 | 3 | const meta = { 4 | summary: "Summary", 5 | "packaging-moose-for-deployment": "Packaging Moose for deployment", 6 | "preparing-clickhouse-redpanda": "Preparing Infrastructure", 7 | "configuring-moose-for-cloud": "Cloud Configuration", 8 | "deploying-on-kubernetes": "Kubernetes Deployment", 9 | "deploying-on-ecs": "AWS ECS Deployment", 10 | "deploying-on-an-offline-server": "Offline Deployment", 11 | "deploying-with-docker-compose": "Docker Compose Deployment", 12 | monitoring: "Monitoring Your App", 13 | } as const; 14 | 15 | export default render(meta); 16 | -------------------------------------------------------------------------------- /apps/framework-docs/src/pages/moose/getting-started/_meta.tsx: -------------------------------------------------------------------------------- 1 | import { render } from "@/components"; 2 | 3 | const meta = { 4 | quickstart: "Quickstart", 5 | "from-clickhouse": "Start from Existing ClickHouse", 6 | "project-structure": "Project Structure", 7 | architecture: "Architecture", 8 | }; 9 | 10 | export default render(meta); 11 | -------------------------------------------------------------------------------- /apps/framework-docs/src/pages/moose/reference/_meta.tsx: -------------------------------------------------------------------------------- 1 | import { render } from "@/components"; 2 | 3 | const meta = { 4 | "ts-moose-lib": "TypeScript API Reference", 5 | "py-moose-lib": "Python API Reference", 6 | "moose-cli": "CLI Reference", 7 | "minimum-requirements": "Minimum Requirements", 8 | troubleshooting: "Troubleshooting", 9 | "metrics-console": "Metrics Console", 10 | }; 11 | 12 | export default render(meta); 13 | -------------------------------------------------------------------------------- /apps/framework-docs/src/pages/release-notes/_meta.tsx: -------------------------------------------------------------------------------- 1 | import { render } from "@/components"; 2 | // Raw meta object - more concise without repetitive rendering logic 3 | const rawMeta = { 4 | index: { 5 | title: "Release Notes", 6 | theme: { 7 | breadcrumb: false, 8 | }, 9 | }, 10 | upcoming: { display: "hidden" }, // This hides it from sidebar/navigation 11 | }; 12 | 13 | // Process the raw meta object to generate the final meta object with proper rendering 14 | export default render(rawMeta); 15 | -------------------------------------------------------------------------------- /apps/framework-docs/src/pages/templates/_meta.tsx: -------------------------------------------------------------------------------- 1 | import { render } from "@/components"; 2 | 3 | const meta = { 4 | github: "Github Trending Topics", 5 | heartrate: "Live Heart Rate Monitoring", 6 | adsb: "ADS-B Aircraft Tracking", 7 | }; 8 | 9 | export default render(meta); 10 | -------------------------------------------------------------------------------- /apps/framework-docs/src/pages/usage-data.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Usage Data 3 | description: Usage Data for Moose 4 | --- 5 | 6 | ### Information Collected 7 | 8 | Please note that Moose may collect information about how you use the service, such as activity data and feature usage. 9 | MooseJS will NEVER collect the data being ingested/processed/consumed with your Moose application. Moose collects aggregated or identifiable data solely to 10 | improve our operations and understand how to provide you with the best experience. 11 | -------------------------------------------------------------------------------- /apps/framework-docs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/ts-config/nextjs.json", 3 | "compilerOptions": { 4 | "plugins": [ 5 | { 6 | "name": "next" 7 | } 8 | ], 9 | "forceConsistentCasingInFileNames": true, 10 | "module": "NodeNext", 11 | "resolveJsonModule": true, 12 | "baseUrl": ".", 13 | "paths": { 14 | "@/*": ["./src/*"] 15 | } 16 | }, 17 | "include": [ 18 | "next-env.d.ts", 19 | "**/*.ts", 20 | "**/*.tsx", 21 | ".next/types/**/*.ts", 22 | "**/*.jsx" 23 | ], 24 | "exclude": ["node_modules"] 25 | } 26 | -------------------------------------------------------------------------------- /apps/framework-internal-app/app/aggregations/DailyActiveUsers.ts: -------------------------------------------------------------------------------- 1 | // Here is a sample aggregation query that calculates the number of daily active users 2 | // based on the number of unique users who complete a sign-in activity each day. 3 | 4 | interface Aggregation { 5 | select: string; 6 | orderBy: string; 7 | } 8 | 9 | export default { 10 | select: ` 11 | SELECT 12 | count(distinct userId) as dailyActiveUsers, 13 | toStartOfDay(timestamp) as date 14 | FROM ParsedActivity_0_0 15 | WHERE activity = 'Login' 16 | GROUP BY toStartOfDay(timestamp) 17 | `, 18 | orderBy: "date", 19 | } satisfies Aggregation as Aggregation; 20 | -------------------------------------------------------------------------------- /apps/framework-internal-app/app/aggregations/sessions.ts: -------------------------------------------------------------------------------- 1 | // Here is a sample aggregation query that calculates the number of daily active users 2 | // based on the number of unique users who complete a sign-in activity each day. 3 | 4 | interface Aggregation { 5 | select: string; 6 | orderBy: string; 7 | } 8 | 9 | export default { 10 | select: ` 11 | SELECT 12 | count(distinct userId) as dailyActiveUsers, 13 | toStartOfDay(timestamp) as date 14 | FROM ParsedActivity_0_0 15 | WHERE activity = 'Login' 16 | GROUP BY toStartOfDay(timestamp) 17 | `, 18 | orderBy: "date", 19 | } satisfies Aggregation as Aggregation; 20 | -------------------------------------------------------------------------------- /apps/framework-internal-app/app/apis/dailyActiveUsers.ts: -------------------------------------------------------------------------------- 1 | // @ts-nocheck 2 | interface QueryParams { 3 | limit: string; 4 | minDailyActiveUsers: string; 5 | } 6 | 7 | export default async function handle( 8 | { limit = "10", minDailyActiveUsers = "0" }: QueryParams, 9 | { client, sql }, 10 | ) { 11 | return client.query( 12 | sql`SELECT 13 | date, 14 | dailyActiveUsers 15 | FROM DailyActiveUsers 16 | WHERE dailyActiveUsers >= ${parseInt(minDailyActiveUsers)} 17 | LIMIT ${parseInt(limit)}`, 18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /apps/framework-internal-app/app/apis/machine_id.ts: -------------------------------------------------------------------------------- 1 | import { ConsumptionUtil } from "@514labs/moose-lib"; 2 | 3 | interface QueryParams {} 4 | 5 | export default async function handle( 6 | {}: QueryParams, 7 | { client, sql }: ConsumptionUtil, 8 | ) { 9 | return client.query(sql`SELECT distinct machineId FROM ParsedLogs_0_6`); 10 | } 11 | -------------------------------------------------------------------------------- /apps/framework-internal-app/app/functions/MooseActivity_migrate__0_0__0_1.sql: -------------------------------------------------------------------------------- 1 | (id, project, activityType, sequenceId, timestamp, cliVersion) -> (id, project, activityType, sequenceId, timestamp, cliVersion, NULL) -------------------------------------------------------------------------------- /apps/framework-internal-app/app/functions/MooseActivity_migrate__0_1__0_2.sql: -------------------------------------------------------------------------------- 1 | (id, project, activityType, sequenceId, timestamp, cliVersion, isMooseDeveloper) -> (id, project, activityType, sequenceId, timestamp, cliVersion, isMooseDeveloper, 'noMachineId') -------------------------------------------------------------------------------- /apps/framework-internal-app/app/functions/PageViewEvent_migrate__0_0__PageViewProcessed__0_5.ts: -------------------------------------------------------------------------------- 1 | import { PageViewEvent, PageViewProcessed } from "../datamodels/models"; 2 | 3 | export default function run(source: PageViewEvent): PageViewProcessed { 4 | return source; 5 | } 6 | -------------------------------------------------------------------------------- /apps/framework-internal-app/app/functions/ParsedLogs_migrate__0_5__ParsedLogs__0_6.ts: -------------------------------------------------------------------------------- 1 | import { ParsedLogs } from "../datamodels/logs"; 2 | 3 | export default function run(source: ParsedLogs): ParsedLogs { 4 | const centralTimeString = source.date; 5 | // Create a Date object from the central time string 6 | const centralDate = new Date(centralTimeString + " -0500"); // -0500 is the offset for Central Time Zone 7 | // Convert the Date object to UTC 8 | const utcDate = new Date( 9 | centralDate.getTime() + centralDate.getTimezoneOffset() * 60000, 10 | ); 11 | 12 | return { ...source, date: utcDate }; 13 | } 14 | -------------------------------------------------------------------------------- /apps/framework-internal-app/app/functions/UserActivity/ParsedActivity/flow.ts: -------------------------------------------------------------------------------- 1 | // Example flow function: Converts local timestamps in UserActivity data to UTC. 2 | 3 | // Imports: Source (UserActivity) and Destination (ParsedActivity) data models. 4 | import { ParsedActivity, UserActivity } from "../../../datamodels/models"; 5 | 6 | // The 'run' function transforms UserActivity data to ParsedActivity format. 7 | // For more details on how Moose flows work, see: https://docs.moosejs.com 8 | export default function run(event: UserActivity): ParsedActivity { 9 | // Convert local timestamp to UTC and return new ParsedActivity object. 10 | return { 11 | eventId: event.eventId, // Retain original event ID. 12 | userId: "puid" + event.userId, // Example: Prefix user ID. 13 | activity: event.activity, // Copy activity unchanged. 14 | timestamp: new Date(event.timestamp.toUTCString()), // Convert timestamp to UTC. 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /apps/framework-internal-app/app/functions/UserActivity_migrate__0_0__0_3.sql: -------------------------------------------------------------------------------- 1 | (eventId, timestamp, userId, activity) -> (eventId, timestamp, userId, activity, 'description') -------------------------------------------------------------------------------- /apps/framework-internal-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "internal-app", 3 | "version": "0.6", 4 | "scripts": { 5 | "dev": "moose-cli dev", 6 | "moose": "moose", 7 | "build": "moose-cli --version && moose-cli build --docker", 8 | "clean-logs": "npx ts-node script.ts" 9 | }, 10 | "dependencies": { 11 | "@514labs/moose-lib": "latest", 12 | "@clickhouse/client-web": "1.1.0", 13 | "fastq": "1.17.1", 14 | "kafkajs": "2.2.4", 15 | "async": "^3.2.5", 16 | "csv-parse": "^5.5.5" 17 | }, 18 | "devDependencies": { 19 | "@types/async": "^3.2.24", 20 | "@514labs/moose-cli": "latest", 21 | "@types/node": "^20.12.12", 22 | "ts-patch": "~3.2.0", 23 | "typescript": "~5.4.0" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /apps/framework-internal-app/project.toml: -------------------------------------------------------------------------------- 1 | language = "Typescript" 2 | 3 | [redpanda_config] 4 | broker = "localhost:19092" 5 | message_timeout_ms = 1000 6 | retention_ms = 21600000 7 | 8 | [clickhouse_config] 9 | db_name = "local" 10 | user = "panda" 11 | password = "pandapass" 12 | use_ssl = false 13 | host = "localhost" 14 | host_port = 18123 15 | postgres_port = 9005 16 | kafka_port = 9092 17 | 18 | [http_server_config] 19 | host = "localhost" 20 | port = 4000 21 | 22 | [console_config] 23 | host_port = 3001 24 | 25 | [supported_old_versions] 26 | "0.0" = "1fe7b86" 27 | "0.1" = "005108e" 28 | "0.2" = "969a0b7" 29 | "0.3" = "22d9fcb" 30 | "0.4" = "78ef1df" 31 | "0.5" = "02ed1a87" 32 | -------------------------------------------------------------------------------- /apps/moose-cli-npm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@514labs/moose-cli", 3 | "version": "0.0.0", 4 | "bin": { 5 | "moose": "dist/index.js", 6 | "moose-cli": "dist/index.js" 7 | }, 8 | "files": [ 9 | "dist" 10 | ], 11 | "scripts": { 12 | "typecheck": "tsc --noEmit", 13 | "lint": "eslint .", 14 | "lint:fix": "eslint . --fix", 15 | "build": "tsc" 16 | }, 17 | "devDependencies": { 18 | "@types/node": "18.16.19", 19 | "@typescript-eslint/eslint-plugin": "^5.62.0", 20 | "@typescript-eslint/parser": "^5.62.0", 21 | "eslint": "^8.46.0", 22 | "@repo/ts-config": "workspace:*", 23 | "typescript": "^5.7.0" 24 | }, 25 | "optionalDependencies": { 26 | "@514labs/moose-cli-darwin-arm64": "0.3.205", 27 | "@514labs/moose-cli-darwin-x64": "0.3.205", 28 | "@514labs/moose-cli-linux-arm64": "0.3.205", 29 | "@514labs/moose-cli-linux-x64": "0.3.205" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /apps/moose-cli-npm/package.json.tmpl: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@514labs/${node_pkg}", 3 | "version": "${node_version}", 4 | "os": ["${node_os}"], 5 | "cpu": ["${node_arch}"] 6 | } -------------------------------------------------------------------------------- /apps/moose-cli-npm/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@repo/ts-config/npm-package.json", 4 | "include": ["**/*.ts"], 5 | "exclude": ["node_modules", "dist"], 6 | "compilerOptions": { 7 | "rootDir": "./src", 8 | "outDir": "dist", 9 | }, 10 | } 11 | -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- 1 | In this directory we have some of the projects — in Python and Typescript — we've built with Moose. From proptypes built on the weekend to production grade 100TB/day observability-as-a-service products, if data ingestion, transformation and exploration is at the core of your project, Moose makes your developer life 10x more productive and easy. 2 | 3 | Feel free to browse, comment and if/when you build something (awesome!) with Moose, we'd love to add a link to the repo here to share with the community. Join us on [slack](https://join.slack.com/t/moose-community/shared_invite/zt-2fjh5n3wz-cnOmM9Xe9DYAgQrNu8xKxg), and we'd be happy to roll up our sleeves and support you at any phase while you build. We're data nerds and builders — so you'd be in good company. 4 | 5 | — 514/Moose Core Team 6 | -------------------------------------------------------------------------------- /examples/gitub-star-analytics/github-star-analytics-py/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "frigus02.vscode-sql-tagged-template-literals-syntax-only", 4 | "mtxr.sqltools", 5 | "ultram4rine.sqltools-clickhouse-driver", 6 | "jeppeandersen.vscode-kafka", 7 | "rangav.vscode-thunder-client" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /examples/gitub-star-analytics/github-star-analytics-py/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "sqltools.connections": [ 3 | { 4 | "server": "localhost", 5 | "port": 18123, 6 | "useHTTPS": false, 7 | "database": "local", 8 | "username": "panda", 9 | "enableTls": false, 10 | "password": "pandapass", 11 | "driver": "ClickHouse", 12 | "name": "moose clickhouse" 13 | } 14 | ], 15 | "python.analysis.extraPaths": [".moose/versions"], 16 | "python.analysis.typeCheckingMode": "basic" 17 | } 18 | -------------------------------------------------------------------------------- /examples/gitub-star-analytics/github-star-analytics-py/app/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/examples/gitub-star-analytics/github-star-analytics-py/app/__init__.py -------------------------------------------------------------------------------- /examples/gitub-star-analytics/github-star-analytics-py/app/apis/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/examples/gitub-star-analytics/github-star-analytics-py/app/apis/__init__.py -------------------------------------------------------------------------------- /examples/gitub-star-analytics/github-star-analytics-py/app/blocks/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/examples/gitub-star-analytics/github-star-analytics-py/app/blocks/__init__.py -------------------------------------------------------------------------------- /examples/gitub-star-analytics/github-star-analytics-py/app/datamodels/HistoricalStargazer.py: -------------------------------------------------------------------------------- 1 | from dataclasses import dataclass 2 | from datetime import datetime 3 | from moose_lib import Key, moose_data_model, DataModelConfig 4 | 5 | # Configuration for batch loading stargazer data from JSON 6 | # Specifies that the input will be in JSON array format 7 | batch_load_config = DataModelConfig( 8 | ingestion=True 9 | ) 10 | 11 | @moose_data_model(batch_load_config) # Apply the batch loading config to this model 12 | @dataclass 13 | class HistoricalStargazer: 14 | starred_at: datetime 15 | login: Key[str] # login is marked as a key field for uniqueness 16 | avatar_url: str 17 | repos_url: str -------------------------------------------------------------------------------- /examples/gitub-star-analytics/github-star-analytics-py/app/datamodels/StargazerProjectInfo.py: -------------------------------------------------------------------------------- 1 | from moose_lib import Key, moose_data_model 2 | from dataclasses import dataclass 3 | from typing import Optional 4 | from datetime import datetime 5 | 6 | @moose_data_model 7 | @dataclass 8 | class StargazerProjectInfo: 9 | starred_at: datetime 10 | stargazer_login: Key[str] 11 | repo_name: str 12 | repo_full_name: str 13 | description: Optional[str] 14 | repo_url: str 15 | repo_stars: int 16 | repo_watchers: int 17 | language: str 18 | repo_size_kb: int 19 | created_at: datetime 20 | updated_at: datetime 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /examples/gitub-star-analytics/github-star-analytics-py/app/datamodels/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/examples/gitub-star-analytics/github-star-analytics-py/app/datamodels/__init__.py -------------------------------------------------------------------------------- /examples/gitub-star-analytics/github-star-analytics-py/app/functions/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/examples/gitub-star-analytics/github-star-analytics-py/app/functions/__init__.py -------------------------------------------------------------------------------- /examples/gitub-star-analytics/github-star-analytics-py/github_star_analytics_py.egg-info/PKG-INFO: -------------------------------------------------------------------------------- 1 | Metadata-Version: 2.1 2 | Name: github-star-analytics-py 3 | Version: 0.0 4 | Requires-Dist: kafka-python-ng==2.2.2 5 | Requires-Dist: clickhouse_connect==0.7.16 6 | Requires-Dist: requests==2.32.3 7 | Requires-Dist: moose-cli 8 | Requires-Dist: moose-lib 9 | -------------------------------------------------------------------------------- /examples/gitub-star-analytics/github-star-analytics-py/github_star_analytics_py.egg-info/SOURCES.txt: -------------------------------------------------------------------------------- 1 | setup.py 2 | app/__init__.py 3 | app/apis/__init__.py 4 | app/apis/ranked_languages.py 5 | app/blocks/MostPopularUsers.py 6 | app/blocks/TopLanguages.py 7 | app/blocks/__init__.py 8 | app/blocks/subqueries.py 9 | app/datamodels/RawStarEvent.py 10 | app/datamodels/StargazerProjectInfo.py 11 | app/datamodels/__init__.py 12 | app/functions/RawStarEvent__StargazerProjectInfo.py 13 | app/functions/__init__.py 14 | github_star_analytics_py.egg-info/PKG-INFO 15 | github_star_analytics_py.egg-info/SOURCES.txt 16 | github_star_analytics_py.egg-info/dependency_links.txt 17 | github_star_analytics_py.egg-info/requires.txt 18 | github_star_analytics_py.egg-info/top_level.txt -------------------------------------------------------------------------------- /examples/gitub-star-analytics/github-star-analytics-py/github_star_analytics_py.egg-info/dependency_links.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/gitub-star-analytics/github-star-analytics-py/github_star_analytics_py.egg-info/requires.txt: -------------------------------------------------------------------------------- 1 | kafka-python-ng==2.2.2 2 | clickhouse_connect==0.7.16 3 | requests==2.32.4 4 | moose-cli 5 | moose-lib 6 | -------------------------------------------------------------------------------- /examples/gitub-star-analytics/github-star-analytics-py/github_star_analytics_py.egg-info/top_level.txt: -------------------------------------------------------------------------------- 1 | app 2 | -------------------------------------------------------------------------------- /examples/gitub-star-analytics/github-star-analytics-py/moose.config.toml: -------------------------------------------------------------------------------- 1 | language = "Python" 2 | 3 | [redpanda_config] 4 | broker = "localhost:19092" 5 | message_timeout_ms = 1000 6 | retention_ms = 30000 7 | replication_factor = 1 8 | 9 | [clickhouse_config] 10 | db_name = "local" 11 | user = "panda" 12 | password = "pandapass" 13 | use_ssl = false 14 | host = "localhost" 15 | host_port = 18123 16 | native_port = 9000 17 | 18 | [http_server_config] 19 | host = "localhost" 20 | port = 4000 21 | management_port = 5001 22 | 23 | [redis_config] 24 | url = "redis://127.0.0.1:6379" 25 | key_prefix = "MS" 26 | 27 | [git_config] 28 | main_branch_name = "main" 29 | 30 | [supported_old_versions] 31 | -------------------------------------------------------------------------------- /examples/gitub-star-analytics/github-star-analytics-py/setup.py: -------------------------------------------------------------------------------- 1 | 2 | from setuptools import setup 3 | 4 | setup( 5 | name='github-star-analytics-py', 6 | version='0.0', 7 | install_requires=[ 8 | "kafka-python-ng==2.2.2", 9 | "clickhouse_connect==0.7.16", 10 | "requests==2.32.4", 11 | "moose-cli", 12 | "moose-lib", 13 | "python-dotenv", 14 | ], 15 | ) 16 | -------------------------------------------------------------------------------- /logo-m-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/logo-m-light.png -------------------------------------------------------------------------------- /pa.session.sql: -------------------------------------------------------------------------------- 1 | WITH ['(?i)topics'] AS patterns 2 | SELECT 3 | date, 4 | message, 5 | source, 6 | multiFuzzyMatchAllIndices(message, 2, patterns) AS indices 7 | FROM ParsedLogs_0_5 8 | WHERE length(indices) > 0 9 | 10 | 11 | SELECT *, COUNT(*) OVER() AS totalRowCount FROM ParsedLogs_0_5 LIMIT 10 OFFSET 10 -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "build": "turbo build", 5 | "dev": "turbo dev", 6 | "lint": "turbo lint", 7 | "clean": "turbo clean", 8 | "prepare": "husky install", 9 | "format": "prettier --write './apps/**/*.{ts,tsx}'" 10 | }, 11 | "devDependencies": { 12 | "@repo/eslint-config-custom": "workspace:*", 13 | "@repo/ts-config": "workspace:*", 14 | "eslint": "^9.23.0", 15 | "husky": "^8.0.3", 16 | "lint-staged": "^15.5.1", 17 | "prettier": "^3.2.5", 18 | "prettier-plugin-tailwindcss": "^0.1.13", 19 | "turbo": "^2.4.4" 20 | }, 21 | "packageManager": "pnpm@9.9.0", 22 | "lint-staged": { 23 | "*.rs": "rustfmt --edition 2021", 24 | "**/*": "prettier --write --ignore-unknown" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /packages/design-system-base/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /packages/design-system-base/README.md: -------------------------------------------------------------------------------- 1 | # 514 Design system 2 | 3 | Our design system is used about all our open source and commercial products. It creates a consistent brand identity and speeds up our ability to generate high quality interfaces. 4 | 5 | ## Adding components 6 | 7 | You need to remember to export your components either by pointing an export path to a specific file or by exposing your export to an already generated index file 8 | -------------------------------------------------------------------------------- /packages/design-system-base/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | "tailwindcss", 4 | [ 5 | "autoprefixer", 6 | { 7 | // Add any specific autoprefixer options here if needed 8 | flexbox: true, 9 | grid: true, 10 | }, 11 | ], 12 | ], 13 | }; 14 | -------------------------------------------------------------------------------- /packages/design-system-base/scripts/release.sh: -------------------------------------------------------------------------------- 1 | #/usr/bin/env bash 2 | 3 | set -eo pipefail 4 | 5 | version=$1 6 | 7 | cd packages/design-system-base 8 | npm version $version --no-git-tag-version 9 | 10 | jq \ 11 | --arg VERSION "$version" \ 12 | package.json > package.json.tmp \ 13 | && mv package.json.tmp package.json 14 | 15 | jq '.dependencies["@514labs/event-capture"]="'$version'"' \ 16 | package.json > package.json.tmp \ 17 | && mv package.json.tmp package.json 18 | cd ../.. 19 | pnpm build --filter=@514labs/design-system-base 20 | cd packages/design-system-base 21 | pnpm publish --access public --no-git-checks 22 | -------------------------------------------------------------------------------- /packages/design-system-base/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/ts-config/react-library.json", 3 | 4 | "compilerOptions": { 5 | "module": "NodeNext", 6 | "moduleResolution": "NodeNext", 7 | "declarationMap": true, 8 | "baseUrl": ".", 9 | "paths": { 10 | "@ui/*": ["./*"] 11 | } 12 | }, 13 | "exclude": ["node_modules"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/design-system-base/types/design-system.d.ts: -------------------------------------------------------------------------------- 1 | declare module "@514labs/design-system/animation"; 2 | -------------------------------------------------------------------------------- /packages/design-system-components/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /packages/design-system-components/README.md: -------------------------------------------------------------------------------- 1 | # 514 Design system 2 | 3 | Our design system is used about all our open source and commercial products. It creates a consistent brand identity and speeds up our ability to generate high quality interfaces. 4 | 5 | ## Adding components 6 | 7 | You need to remember to export your components either by pointing an export path to a specific file or by exposing your export to an already generated index file 8 | -------------------------------------------------------------------------------- /packages/design-system-components/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.js", 8 | "css": "globals.css", 9 | "baseColor": "neutral", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@ui/components", 15 | "utils": "../../lib/utils" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/design-system-components/components/PlaceholderImage.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "../lib/utils"; 2 | 3 | export const PlaceholderImage = ({ className }: { className?: string }) => { 4 | return
; 5 | }; 6 | -------------------------------------------------------------------------------- /packages/design-system-components/components/index.tsx: -------------------------------------------------------------------------------- 1 | export * from "./ui/accordion"; 2 | export * from "./ui/button"; 3 | export * from "./ui/badge"; 4 | export * from "./ui/hover-card"; 5 | export * from "./ui/separator"; 6 | export * from "./theme-provider"; 7 | export * from "./theme-toggle"; 8 | export * from "./logo"; 9 | export * from "./CTAs"; 10 | export * from "./PlaceholderImage"; 11 | export * from "./ui/tabs"; 12 | export * from "./ui/card"; 13 | export * from "./ui/collapsible"; 14 | export * from "./language-badge"; 15 | export * from "./ui/select"; 16 | export * from "./ui/sheet"; 17 | export * from "./icon-cards"; 18 | -------------------------------------------------------------------------------- /packages/design-system-components/components/logo.tsx: -------------------------------------------------------------------------------- 1 | import { GradientText, SmallText, Text } from "./typography/standard"; 2 | import { cn } from "../lib/utils"; 3 | 4 | export const Logo = ({ 5 | property, 6 | subProperty, 7 | className, 8 | }: { 9 | property: string; 10 | subProperty?: string; 11 | className?: string; 12 | }) => { 13 | return ( 14 |
15 | 16 | {property} 17 | 18 | {subProperty && ( 19 | 20 | {subProperty} 21 | 22 | )} 23 |
24 | ); 25 | }; 26 | -------------------------------------------------------------------------------- /packages/design-system-components/components/theme-provider.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { ThemeProvider as NextThemesProvider } from "next-themes"; 4 | import { type ThemeProviderProps } from "next-themes/dist/types"; 5 | 6 | export function ThemeProvider({ children, ...props }: ThemeProviderProps) { 7 | return {children}; 8 | } 9 | -------------------------------------------------------------------------------- /packages/design-system-components/components/ui/collapsible.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import * as CollapsiblePrimitive from "@radix-ui/react-collapsible"; 4 | 5 | const Collapsible = CollapsiblePrimitive.Root; 6 | 7 | const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger; 8 | 9 | const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent; 10 | 11 | export { Collapsible, CollapsibleTrigger, CollapsibleContent }; 12 | -------------------------------------------------------------------------------- /packages/design-system-components/components/ui/separator.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import * as React from "react"; 4 | import * as SeparatorPrimitive from "@radix-ui/react-separator"; 5 | 6 | import { cn } from "../../lib/utils"; 7 | 8 | const Separator = React.forwardRef< 9 | React.ElementRef, 10 | React.ComponentPropsWithoutRef 11 | >( 12 | ( 13 | { className, orientation = "horizontal", decorative = true, ...props }, 14 | ref, 15 | ) => ( 16 | 27 | ), 28 | ); 29 | Separator.displayName = SeparatorPrimitive.Root.displayName; 30 | 31 | export { Separator }; 32 | -------------------------------------------------------------------------------- /packages/design-system-components/gsap-bonus.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/packages/design-system-components/gsap-bonus.tgz -------------------------------------------------------------------------------- /packages/design-system-components/images/fiveonefour_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/packages/design-system-components/images/fiveonefour_logo.png -------------------------------------------------------------------------------- /packages/design-system-components/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { type ClassValue, clsx } from "clsx"; 2 | import { twMerge } from "tailwind-merge"; 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)); 6 | } 7 | -------------------------------------------------------------------------------- /packages/design-system-components/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = require("@514labs/design-system-base/postcss.config"); 2 | -------------------------------------------------------------------------------- /packages/design-system-components/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@repo/ts-config/react-library.json", 3 | 4 | "compilerOptions": { 5 | "module": "NodeNext", 6 | "moduleResolution": "NodeNext", 7 | "baseUrl": ".", 8 | "paths": { 9 | "@ui/*": ["./*"] 10 | } 11 | }, 12 | "exclude": ["node_modules"] 13 | } 14 | -------------------------------------------------------------------------------- /packages/design-system-components/types/design-system.d.ts: -------------------------------------------------------------------------------- 1 | declare module "@514labs/design-system/animation"; 2 | -------------------------------------------------------------------------------- /packages/eslint-config-custom/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ["next", "turbo", "prettier", "eslint:recommended", 'plugin:@typescript-eslint/recommended'], 3 | parser: "@typescript-eslint/parser", 4 | plugins: ["@typescript-eslint"], 5 | rules: { 6 | "@next/next/no-html-link-for-pages": "off", 7 | // Can mark a variable or an arg as unused by prefixing with _ 8 | "@typescript-eslint/no-unused-vars": ["error", { 9 | "argsIgnorePattern": "^_", 10 | "varsIgnorePattern": "^_", 11 | "caughtErrorsIgnorePattern": "^_" 12 | }], 13 | // Temporarily (?) disabled 14 | "@typescript-eslint/no-explicit-any": "off", 15 | }, 16 | parserOptions: { 17 | babelOptions: { 18 | presets: [require.resolve("next/babel")], 19 | }, 20 | }, 21 | }; 22 | -------------------------------------------------------------------------------- /packages/eslint-config-custom/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@repo/eslint-config-custom", 3 | "version": "0.0.1", 4 | "main": "index.js", 5 | "license": "MIT", 6 | "dependencies": { 7 | "eslint-config-next": "^14.2.26", 8 | "eslint-config-prettier": "^10.1.1", 9 | "eslint-plugin-react": "7.37.4", 10 | "eslint-config-turbo": "^2.4.4", 11 | "typescript": "^5.8.2", 12 | "@typescript-eslint/eslint-plugin": "^8.28.0", 13 | "@typescript-eslint/parser": "^8.28.0" 14 | }, 15 | "publishConfig": { 16 | "access": "public" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/event-capture/events/api/route.ts: -------------------------------------------------------------------------------- 1 | import { NextRequest } from "next/server"; 2 | import Mixpanel from "mixpanel"; 3 | 4 | // send an event to mixpanel 5 | export async function POST(request: NextRequest) { 6 | const ip = request.ip ? request.ip : request.headers.get("X-Forwarded-For"); 7 | 8 | const body = await request.json(); 9 | 10 | const mixpanel = Mixpanel.init("be8ca317356e20c587297d52f93f3f9e"); 11 | 12 | const event = { ip, ...body.event }; 13 | 14 | mixpanel.track(body.name, event); 15 | 16 | return new Response("OK"); 17 | } 18 | -------------------------------------------------------------------------------- /packages/event-capture/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@514labs/event-capture", 3 | "version": "0.0.1", 4 | "dependencies": { 5 | "mixpanel": "^0.18.0", 6 | "next": "14.2.26", 7 | "react": "^18", 8 | "react-dom": "^18" 9 | }, 10 | "exports": { 11 | "./client-event": "./events/sendClientEvent.ts", 12 | "./server-event": "./events/sendServerEvent.ts", 13 | "./withTrack": "./events/withTrackableComponent.tsx", 14 | "./event-library": "./events/eventLibrary.ts" 15 | }, 16 | "devDependencies": { 17 | "@types/react": "^18.2.74" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/event-capture/scripts/release.sh: -------------------------------------------------------------------------------- 1 | #/usr/bin/env bash 2 | 3 | set -eo pipefail 4 | 5 | version=$1 6 | 7 | cd packages/event-capture 8 | npm version $version --no-git-tag-version 9 | 10 | jq \ 11 | --arg VERSION "$version" \ 12 | package.json > package.json.tmp \ 13 | && mv package.json.tmp package.json 14 | 15 | cd ../.. 16 | pnpm build --filter=@514labs/event-capture 17 | cd packages/event-capture 18 | pnpm publish --access public --no-git-checks 19 | -------------------------------------------------------------------------------- /packages/posthog514client-rs/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "posthog514client-rs" 3 | version = "0.5.3" 4 | edition = "2021" 5 | description = "A Rust client for PostHog analytics" 6 | license = "MIT" 7 | repository = "https://github.com/514-labs/moose" 8 | documentation = "https://docs.rs/posthog514client-rs" 9 | readme = "README.md" 10 | keywords = ["analytics", "posthog", "client"] 11 | categories = ["api-bindings"] 12 | 13 | [features] 14 | default = [] 15 | blocking = ["reqwest/blocking"] 16 | 17 | [dependencies] 18 | reqwest = { version = "0.11", features = ["json"] } 19 | serde = { version = "1.0", features = ["derive"] } 20 | serde_json = "1.0" 21 | tokio = { version = "1.0", features = ["full"] } 22 | thiserror = "1.0" 23 | tracing = "0.1" 24 | url = "2.4" 25 | chrono = "0.4.41" 26 | 27 | [dev-dependencies] 28 | tokio-test = "0.4" 29 | mockito = "1.0" 30 | test-case = "3.1" 31 | -------------------------------------------------------------------------------- /packages/py-moose-lib/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /dist 3 | /moose_lib.egg-info 4 | .venv -------------------------------------------------------------------------------- /packages/py-moose-lib/README.md: -------------------------------------------------------------------------------- 1 | # Python Moose Lib 2 | 3 | Python package which contains moose utils 4 | -------------------------------------------------------------------------------- /packages/py-moose-lib/moose_lib/__init__.py: -------------------------------------------------------------------------------- 1 | from .main import * 2 | 3 | from .blocks import * 4 | 5 | from .commons import * 6 | 7 | from .tasks import * 8 | 9 | from .data_models import * 10 | 11 | from .dmv2 import * 12 | 13 | from .clients.redis_client import MooseCache -------------------------------------------------------------------------------- /packages/py-moose-lib/moose_lib/clients/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/packages/py-moose-lib/moose_lib/clients/__init__.py -------------------------------------------------------------------------------- /packages/py-moose-lib/moose_lib/dmv2-serializer.py: -------------------------------------------------------------------------------- 1 | from .internal import load_models 2 | 3 | load_models() 4 | -------------------------------------------------------------------------------- /packages/py-moose-lib/moose_lib/streaming/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/packages/py-moose-lib/moose_lib/streaming/__init__.py -------------------------------------------------------------------------------- /packages/py-moose-lib/pytest.ini: -------------------------------------------------------------------------------- 1 | [pytest] 2 | testpaths = tests 3 | python_files = test_*.py 4 | python_classes = Test* 5 | python_functions = test_* 6 | addopts = -v --tb=short -m "not integration" 7 | markers = 8 | integration: marks tests that require external services (like Redis) -------------------------------------------------------------------------------- /packages/py-moose-lib/requirements-dev.txt: -------------------------------------------------------------------------------- 1 | pytest>=7.0.0 2 | pytest-cov>=4.0.0 -------------------------------------------------------------------------------- /packages/py-moose-lib/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Empty __init__.py to mark this as a Python package -------------------------------------------------------------------------------- /packages/py-moose-lib/tests/conftest.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | import os 3 | import sys 4 | 5 | # Add the package root to Python path for imports 6 | sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) -------------------------------------------------------------------------------- /packages/tailwind-config/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tailwind-config", 3 | "version": "0.0.0", 4 | "private": true, 5 | "main": "index.js", 6 | "devDependencies": { 7 | "tailwindcss": "^3.2.4" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/ts-config/base.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "Default", 4 | "compilerOptions": { 5 | "declaration": true, 6 | "declarationMap": true, 7 | "esModuleInterop": true, 8 | "incremental": false, 9 | "isolatedModules": true, 10 | "lib": ["es2022", "DOM", "DOM.Iterable"], 11 | "moduleDetection": "force", 12 | "noUncheckedIndexedAccess": true, 13 | "skipLibCheck": true, 14 | "strict": true, 15 | "target": "ES2022" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/ts-config/nextjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "Next.js", 4 | "extends": "./base.json", 5 | "compilerOptions": { 6 | "plugins": [{ "name": "next" }], 7 | "moduleResolution": "NodeNext", 8 | "allowJs": true, 9 | "jsx": "preserve", 10 | "noEmit": true, 11 | "paths": { 12 | "@ui/*": ["../../packages/design-system/*"] 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/ts-config/npm-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "NPM Package", 4 | "extends": "./base.json", 5 | "compilerOptions": { 6 | "moduleResolution": "node", 7 | "target": "ES6", 8 | "moduleDetection": "auto", 9 | "lib": [], 10 | "module": "commonjs" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/ts-config/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@repo/ts-config", 3 | "version": "0.0.0", 4 | "private": true, 5 | "license": "MIT", 6 | "publishConfig": { 7 | "access": "public" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/ts-config/react-library.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "React Library", 4 | "extends": "./base.json", 5 | "compilerOptions": { 6 | "jsx": "react-jsx" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/ts-moose-lib/scripts/release-lib.sh: -------------------------------------------------------------------------------- 1 | #/usr/bin/env bash 2 | 3 | set -eo pipefail 4 | 5 | # This script should be called from the root of the repository 6 | 7 | version=$1 8 | 9 | cd ./packages/ts-moose-lib 10 | npm version $version --no-git-tag-version 11 | cd ../.. 12 | 13 | # # This is run twice since the change the value of the dependencies in the previous step 14 | pnpm install --filter "@514labs/moose-lib" --no-frozen-lockfile # requires optional dependencies to be present in the registry 15 | pnpm build --filter @514labs/moose-lib 16 | 17 | cd packages/ts-moose-lib 18 | pnpm publish --access public --no-git-checks -------------------------------------------------------------------------------- /packages/ts-moose-lib/src/consumption-apis/exportTypeSerializer.ts: -------------------------------------------------------------------------------- 1 | import process from "process"; 2 | 3 | export async function runConsumptionTypeSerializer(targetModel: string) { 4 | const func = require(`${process.cwd()}/app/apis/${targetModel}.ts`).default; 5 | const inputSchema = func["moose_input_schema"] || null; 6 | const outputSchema = func["moose_output_schema"] || null; 7 | console.log( 8 | JSON.stringify({ 9 | inputSchema, 10 | outputSchema, 11 | }), 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /packages/ts-moose-lib/src/moduleExportSerializer.ts: -------------------------------------------------------------------------------- 1 | export async function runExportSerializer(targetModel: string) { 2 | const exports_list = require(targetModel); 3 | console.log(JSON.stringify(exports_list)); 4 | } 5 | -------------------------------------------------------------------------------- /packages/ts-moose-lib/src/moose-exec.ts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | import { register } from "ts-node"; 4 | 5 | // Register ts-node to interpret TypeScript code 6 | register({ 7 | esm: true, 8 | experimentalSpecifierResolution: "node", 9 | }); 10 | 11 | // Get the script path from the command line arguments 12 | let scriptPath = process.argv[2]; 13 | if (!scriptPath) { 14 | console.error("moose-exec: No script path provided."); 15 | process.exit(1); 16 | } 17 | 18 | scriptPath = scriptPath.substring(0, scriptPath.length - 3); 19 | 20 | // Use dynamic import to load and execute the TypeScript file 21 | try { 22 | require(scriptPath); 23 | } catch (e) { 24 | console.error("moose-exec: Error executing the script:", e); 25 | process.exit(1); 26 | } 27 | -------------------------------------------------------------------------------- /packages/ts-moose-lib/src/scripts/serialization.ts: -------------------------------------------------------------------------------- 1 | // Add serialization helpers 2 | export const mooseJsonEncode = (data: any): string => { 3 | return JSON.stringify(data, (_, value) => { 4 | if (value instanceof Map) { 5 | return { 6 | __type: "Map", 7 | value: Array.from(value.entries()), 8 | }; 9 | } 10 | return value; 11 | }); 12 | }; 13 | 14 | export const mooseJsonDecode = (text: string): any => { 15 | return JSON.parse(text, (_, value) => { 16 | if (value && typeof value === "object" && value.__type === "Map") { 17 | return new Map(value.value); 18 | } 19 | return value; 20 | }); 21 | }; 22 | -------------------------------------------------------------------------------- /packages/ts-moose-lib/src/scripts/task.ts: -------------------------------------------------------------------------------- 1 | export interface TaskFunction { 2 | (input?: any): Promise<{ task: string; data: any }>; 3 | } 4 | 5 | export interface TaskConfig { 6 | retries: number; 7 | } 8 | 9 | export interface TaskDefinition { 10 | task: TaskFunction; 11 | config?: TaskConfig; 12 | } 13 | -------------------------------------------------------------------------------- /packages/ts-moose-lib/src/scripts/types.ts: -------------------------------------------------------------------------------- 1 | export interface WorkflowState { 2 | completedSteps: string[]; 3 | currentStep: string | null; 4 | failedStep: string | null; 5 | scriptPath: string | null; 6 | inputData: any | null; 7 | } 8 | 9 | export interface WorkflowTaskResult { 10 | task: string; 11 | data: any; 12 | } 13 | -------------------------------------------------------------------------------- /packages/ts-moose-lib/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "tsup"; 2 | 3 | export default defineConfig({ 4 | entry: [ 5 | "src/index.ts", 6 | "src/dataModels/toDataModels.ts", 7 | "src/scripts/workflow.ts", 8 | "src/compilerPlugin.ts", 9 | "src/moose-tspc.ts", 10 | "src/moose-runner.ts", 11 | "src/moose-exec.ts", 12 | "src/dmv2/index.ts", 13 | ], 14 | format: ["cjs", "esm"], 15 | dts: true, // Generate declaration file (.d.ts) 16 | outDir: "dist", 17 | splitting: false, 18 | sourcemap: true, 19 | clean: true, 20 | }); 21 | -------------------------------------------------------------------------------- /packages/ts-moose-proto/buf.gen.yaml: -------------------------------------------------------------------------------- 1 | version: v2 2 | inputs: 3 | - directory: ../protobuf 4 | plugins: 5 | - local: node_modules/.bin/protoc-gen-ts 6 | out: generated 7 | -------------------------------------------------------------------------------- /packages/ts-moose-proto/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@514labs/moose-proto", 3 | "version": "0.0.0", 4 | "main": "./dist/index.js", 5 | "module": "./dist/index.mjs", 6 | "types": "./dist/index.d.ts", 7 | "files": [ 8 | "dist" 9 | ], 10 | "scripts": { 11 | "gen": "rimraf generated && mkdir generated && buf generate", 12 | "build": "tsup" 13 | }, 14 | "dependencies": { 15 | "@bufbuild/buf": "^1.45.0", 16 | "@protobuf-ts/runtime": "^2.9.4", 17 | "rimraf": "^6.0.1" 18 | }, 19 | "devDependencies": { 20 | "@protobuf-ts/plugin": "^2.9.4", 21 | "tsup": "^8.3.5" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/ts-moose-proto/scripts/release-lib.sh: -------------------------------------------------------------------------------- 1 | #/usr/bin/env bash 2 | 3 | set -eo pipefail 4 | 5 | # This script should be called from the root of the repository 6 | 7 | version=$1 8 | 9 | cd ./packages/ts-moose-proto 10 | npm version $version --no-git-tag-version 11 | cd ../.. 12 | 13 | # No frozen lockfile because design-system-base has its package.json updated without changing the lock file 14 | pnpm install --filter "@514labs/moose-proto" --no-frozen-lockfile 15 | pnpm --filter @514labs/moose-proto run gen 16 | pnpm --filter @514labs/moose-proto run build 17 | 18 | cd packages/ts-moose-proto 19 | pnpm publish --access public --no-git-checks 20 | -------------------------------------------------------------------------------- /packages/ts-moose-proto/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "tsup"; 2 | 3 | export default defineConfig({ 4 | entry: ["generated/*.ts"], 5 | format: ["cjs", "esm"], // Build for commonJS and ESmodules 6 | dts: true, // Generate declaration file (.d.ts) 7 | splitting: false, 8 | sourcemap: true, 9 | clean: true, 10 | }); 11 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - "apps/*" 3 | - "packages/*" 4 | - "scripts" 5 | -------------------------------------------------------------------------------- /scripts/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@repo/scripts", 3 | "type": "commonjs", 4 | "dependencies": { 5 | "@iarna/toml": "^3.0.0" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /scripts/wait-for-npm-package.sh: -------------------------------------------------------------------------------- 1 | # scripts/wait-for-npm-package.sh 2 | #!/bin/bash 3 | 4 | PACKAGE_NAME=$1 5 | VERSION=$2 6 | MAX_ATTEMPTS=${3:-30} 7 | SLEEP_SECONDS=${4:-10} 8 | 9 | for ((i=1; i<=$MAX_ATTEMPTS; i++)); do 10 | echo "Attempt $i/$MAX_ATTEMPTS: Checking if $PACKAGE_NAME@$VERSION is available..." 11 | if npm view "$PACKAGE_NAME@$VERSION" version &> /dev/null; then 12 | echo "✅ Package $PACKAGE_NAME@$VERSION is available!" 13 | exit 0 14 | fi 15 | echo "Package not found. Waiting ${SLEEP_SECONDS} seconds..." 16 | sleep $SLEEP_SECONDS 17 | done 18 | 19 | echo "❌ Timeout waiting for package $PACKAGE_NAME@$VERSION" 20 | exit 1 21 | -------------------------------------------------------------------------------- /templates/ads-b-frontend/frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.* 7 | .yarn/* 8 | !.yarn/patches 9 | !.yarn/plugins 10 | !.yarn/releases 11 | !.yarn/versions 12 | 13 | # testing 14 | /coverage 15 | 16 | # next.js 17 | /.next/ 18 | /out/ 19 | 20 | # production 21 | /build 22 | 23 | # misc 24 | .DS_Store 25 | *.pem 26 | 27 | # debug 28 | npm-debug.log* 29 | yarn-debug.log* 30 | yarn-error.log* 31 | .pnpm-debug.log* 32 | 33 | # env files (can opt-in for committing if needed) 34 | .env* 35 | 36 | # vercel 37 | .vercel 38 | 39 | # typescript 40 | *.tsbuildinfo 41 | next-env.d.ts 42 | -------------------------------------------------------------------------------- /templates/ads-b-frontend/frontend/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "new-york", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "", 8 | "css": "src/app/globals.css", 9 | "baseColor": "neutral", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils", 16 | "ui": "@/components/ui", 17 | "lib": "@/lib", 18 | "hooks": "@/hooks" 19 | }, 20 | "iconLibrary": "lucide" 21 | } 22 | -------------------------------------------------------------------------------- /templates/ads-b-frontend/frontend/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import { dirname } from "path"; 2 | import { fileURLToPath } from "url"; 3 | import { FlatCompat } from "@eslint/eslintrc"; 4 | 5 | const __filename = fileURLToPath(import.meta.url); 6 | const __dirname = dirname(__filename); 7 | 8 | const compat = new FlatCompat({ 9 | baseDirectory: __dirname, 10 | }); 11 | 12 | const eslintConfig = [ 13 | ...compat.extends("next/core-web-vitals", "next/typescript"), 14 | ]; 15 | 16 | export default eslintConfig; 17 | -------------------------------------------------------------------------------- /templates/ads-b-frontend/frontend/next.config.ts: -------------------------------------------------------------------------------- 1 | import type { NextConfig } from "next"; 2 | 3 | const nextConfig: NextConfig = { 4 | /* config options here */ 5 | }; 6 | 7 | export default nextConfig; 8 | -------------------------------------------------------------------------------- /templates/ads-b-frontend/frontend/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | const config = { 2 | plugins: ["@tailwindcss/postcss"], 3 | }; 4 | 5 | export default config; 6 | -------------------------------------------------------------------------------- /templates/ads-b-frontend/frontend/public/file.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/ads-b-frontend/frontend/public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/ads-b-frontend/frontend/public/window.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/ads-b-frontend/frontend/src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/514-labs/moose/e87dd34a43e1a672544ae21582fcbf2543d64334/templates/ads-b-frontend/frontend/src/app/favicon.ico -------------------------------------------------------------------------------- /templates/ads-b-frontend/frontend/src/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | import { Geist, Geist_Mono } from "next/font/google"; 3 | import "./globals.css"; 4 | 5 | const geistSans = Geist({ 6 | variable: "--font-geist-sans", 7 | subsets: ["latin"], 8 | }); 9 | 10 | const geistMono = Geist_Mono({ 11 | variable: "--font-geist-mono", 12 | subsets: ["latin"], 13 | }); 14 | 15 | export const metadata: Metadata = { 16 | title: "Create Next App", 17 | description: "Generated by create next app", 18 | }; 19 | 20 | export default function RootLayout({ 21 | children, 22 | }: Readonly<{ 23 | children: React.ReactNode; 24 | }>) { 25 | return ( 26 | 27 | 30 | {children} 31 | 32 | 33 | ); 34 | } 35 | -------------------------------------------------------------------------------- /templates/ads-b-frontend/frontend/src/components/ui/aspect-ratio.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio"; 4 | 5 | function AspectRatio({ 6 | ...props 7 | }: React.ComponentProps) { 8 | return ; 9 | } 10 | 11 | export { AspectRatio }; 12 | -------------------------------------------------------------------------------- /templates/ads-b-frontend/frontend/src/components/ui/label.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import * as React from "react"; 4 | import * as LabelPrimitive from "@radix-ui/react-label"; 5 | 6 | import { cn } from "@/lib/utils"; 7 | 8 | function Label({ 9 | className, 10 | ...props 11 | }: React.ComponentProps) { 12 | return ( 13 | 21 | ); 22 | } 23 | 24 | export { Label }; 25 | -------------------------------------------------------------------------------- /templates/ads-b-frontend/frontend/src/components/ui/progress.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import * as React from "react"; 4 | import * as ProgressPrimitive from "@radix-ui/react-progress"; 5 | 6 | import { cn } from "@/lib/utils"; 7 | 8 | function Progress({ 9 | className, 10 | value, 11 | ...props 12 | }: React.ComponentProps) { 13 | return ( 14 | 22 | 27 | 28 | ); 29 | } 30 | 31 | export { Progress }; 32 | -------------------------------------------------------------------------------- /templates/ads-b-frontend/frontend/src/components/ui/separator.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import * as React from "react"; 4 | import * as SeparatorPrimitive from "@radix-ui/react-separator"; 5 | 6 | import { cn } from "@/lib/utils"; 7 | 8 | function Separator({ 9 | className, 10 | orientation = "horizontal", 11 | decorative = true, 12 | ...props 13 | }: React.ComponentProps) { 14 | return ( 15 | 25 | ); 26 | } 27 | 28 | export { Separator }; 29 | -------------------------------------------------------------------------------- /templates/ads-b-frontend/frontend/src/components/ui/skeleton.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils"; 2 | 3 | function Skeleton({ className, ...props }: React.ComponentProps<"div">) { 4 | return ( 5 |
10 | ); 11 | } 12 | 13 | export { Skeleton }; 14 | -------------------------------------------------------------------------------- /templates/ads-b-frontend/frontend/src/components/ui/sonner.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { useTheme } from "next-themes"; 4 | import { Toaster as Sonner, ToasterProps } from "sonner"; 5 | 6 | const Toaster = ({ ...props }: ToasterProps) => { 7 | const { theme = "system" } = useTheme(); 8 | 9 | return ( 10 | 22 | ); 23 | }; 24 | 25 | export { Toaster }; 26 | -------------------------------------------------------------------------------- /templates/ads-b-frontend/frontend/src/components/ui/textarea.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | 3 | import { cn } from "@/lib/utils"; 4 | 5 | function Textarea({ className, ...props }: React.ComponentProps<"textarea">) { 6 | return ( 7 |