Showing preview only (9,102K chars total). Download the full file or copy to clipboard to get everything.
Repository: tryabby/abby
Branch: main
Commit: e763d1a9a46f
Files: 722
Total size: 8.5 MB
Directory structure:
gitextract_322ztv_j/
├── .changeset/
│ ├── README.md
│ └── config.json
├── .dockerignore
├── .github/
│ └── workflows/
│ ├── publish.yaml
│ ├── pull_request.yaml
│ └── tests.yaml
├── .gitignore
├── .nvmrc
├── .vscode/
│ ├── extensions.json
│ └── settings.json
├── Dockerfile
├── LICENSE
├── README.md
├── TRACKING.md
├── apps/
│ ├── cdn/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── index.ts
│ │ │ └── lib/
│ │ │ ├── cache.ts
│ │ │ └── config.ts
│ │ └── tsconfig.json
│ ├── docs/
│ │ ├── .eslintrc.json
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── next.config.js
│ │ ├── package.json
│ │ ├── pages/
│ │ │ ├── _app.mdx
│ │ │ ├── _meta.json
│ │ │ ├── a-b-testing.mdx
│ │ │ ├── config.mdx
│ │ │ ├── devtools.mdx
│ │ │ ├── environments.mdx
│ │ │ ├── feature-flags.mdx
│ │ │ ├── index.mdx
│ │ │ ├── integrations/
│ │ │ │ ├── _meta.json
│ │ │ │ ├── angular.mdx
│ │ │ │ ├── express.mdx
│ │ │ │ ├── koa.mdx
│ │ │ │ ├── nextjs.mdx
│ │ │ │ ├── node.mdx
│ │ │ │ ├── react.mdx
│ │ │ │ ├── remix.mdx
│ │ │ │ └── svelte.mdx
│ │ │ ├── nextjs.mdx
│ │ │ ├── reference/
│ │ │ │ ├── _meta.json
│ │ │ │ ├── angular.mdx
│ │ │ │ ├── cli.mdx
│ │ │ │ ├── http.mdx
│ │ │ │ ├── nextjs.mdx
│ │ │ │ ├── operators.mdx
│ │ │ │ ├── react.mdx
│ │ │ │ ├── remix.mdx
│ │ │ │ └── svelte.mdx
│ │ │ ├── remote-config.mdx
│ │ │ └── user-segments.mdx
│ │ ├── snippets/
│ │ │ └── ReactApi.mdx
│ │ ├── theme.config.jsx
│ │ └── tsconfig.json
│ └── web/
│ ├── .gitignore
│ ├── CHANGELOG.md
│ ├── Dockerfile
│ ├── README.md
│ ├── abby.config.ts
│ ├── components.json
│ ├── docker-compose.mailhog.yaml
│ ├── emails/
│ │ ├── ContactFormularEmail.tsx
│ │ ├── index.tsx
│ │ └── invite.tsx
│ ├── next-sitemap.config.js
│ ├── next.config.mjs
│ ├── package.json
│ ├── postcss.config.cjs
│ ├── prisma/
│ │ ├── generateCoupons.ts
│ │ ├── migrations/
│ │ │ ├── 20221205112748_init_db/
│ │ │ │ └── migration.sql
│ │ │ ├── 20221205131914_bruh/
│ │ │ │ └── migration.sql
│ │ │ ├── 20221205132203_/
│ │ │ │ └── migration.sql
│ │ │ ├── 20221205133208_/
│ │ │ │ └── migration.sql
│ │ │ ├── 20221205162949_make_name_and_project_id_unique_identifier_for_test/
│ │ │ │ └── migration.sql
│ │ │ ├── 20221207080237_add_event_table/
│ │ │ │ └── migration.sql
│ │ │ ├── 20221208123701_add_project_invites/
│ │ │ │ └── migration.sql
│ │ │ ├── 20221208134716_use_decimal_for_weights/
│ │ │ │ └── migration.sql
│ │ │ ├── 20221208152910_add_project_user/
│ │ │ │ └── migration.sql
│ │ │ ├── 20221208172715_/
│ │ │ │ └── migration.sql
│ │ │ ├── 20221210195541_add_stripe_info_to_projects/
│ │ │ │ └── migration.sql
│ │ │ ├── 20221212063242_add_plan_to_project/
│ │ │ │ └── migration.sql
│ │ │ ├── 20230101140121_use_role_enum_for_project_users/
│ │ │ │ └── migration.sql
│ │ │ ├── 20230104071050_add_feature_flags/
│ │ │ │ └── migration.sql
│ │ │ ├── 20230104080059_make_featureflag_name_unique_per_project/
│ │ │ │ └── migration.sql
│ │ │ ├── 20230104081514_fix/
│ │ │ │ └── migration.sql
│ │ │ ├── 20230115171608_remove/
│ │ │ │ └── migration.sql
│ │ │ ├── 20230210162012_add_history/
│ │ │ │ └── migration.sql
│ │ │ ├── 20230222182342_add_sort_index_for_env/
│ │ │ │ └── migration.sql
│ │ │ ├── 20230302165144_add_description_to_feature_flag/
│ │ │ │ └── migration.sql
│ │ │ ├── 20230303082044_use_text_for_description_for_longer_texts/
│ │ │ │ └── migration.sql
│ │ │ ├── 20230303121237_add_flag_value_table/
│ │ │ │ └── migration.sql
│ │ │ ├── 20230303130553_/
│ │ │ │ └── migration.sql
│ │ │ ├── 20230303181212_update_history/
│ │ │ │ └── migration.sql
│ │ │ ├── 20230303181813_remove_env_flag_relation/
│ │ │ │ └── migration.sql
│ │ │ ├── 20230303182053_make_id_for_flag_values_unique/
│ │ │ │ └── migration.sql
│ │ │ ├── 20230305160755_rename_flag_value_and_add_index_for_faster_access/
│ │ │ │ └── migration.sql
│ │ │ ├── 20230326163301_make_payment_interval_required/
│ │ │ │ └── migration.sql
│ │ │ ├── 20230511063052_add_coupon_codes_table/
│ │ │ │ └── migration.sql
│ │ │ ├── 20230511064125_renmae_price_id_field_for_code/
│ │ │ │ └── migration.sql
│ │ │ ├── 20230601155320_add_multivariate_flags/
│ │ │ │ └── migration.sql
│ │ │ ├── 20230601161058_update_flag_history/
│ │ │ │ └── migration.sql
│ │ │ ├── 20230602080502_remove_json_field_from_flagtype_enum/
│ │ │ │ └── migration.sql
│ │ │ ├── 20230611180244_move_flag_type_to_flag_instead_of_value/
│ │ │ │ └── migration.sql
│ │ │ ├── 20230628081242_add_api_key_table/
│ │ │ │ └── migration.sql
│ │ │ ├── 20230630140739_add_json_type/
│ │ │ │ └── migration.sql
│ │ │ ├── 20230731133223_rename_apikey/
│ │ │ │ └── migration.sql
│ │ │ ├── 20230803094512_change_api_key_validity_logic/
│ │ │ │ └── migration.sql
│ │ │ ├── 20230901064929_add_requests/
│ │ │ │ └── migration.sql
│ │ │ ├── 20230901065851_remove_hashed_ip_field/
│ │ │ │ └── migration.sql
│ │ │ ├── 20230903075910_add_user_onboarding_information/
│ │ │ │ └── migration.sql
│ │ │ ├── 20231207205533_add_api_version_to_request/
│ │ │ │ └── migration.sql
│ │ │ ├── 20231207205701_add_apiversion_enum/
│ │ │ │ └── migration.sql
│ │ │ ├── 20240620195120_add_apirequest_type/
│ │ │ │ └── migration.sql
│ │ │ ├── 20240621084922_add_indices_for_apirequest/
│ │ │ │ └── migration.sql
│ │ │ ├── 20240826064116_add_integrations/
│ │ │ │ └── migration.sql
│ │ │ ├── 20240903210250_add_anonymous_id_to_event/
│ │ │ │ └── migration.sql
│ │ │ ├── 20250131071445_add_flag_rulesets/
│ │ │ │ └── migration.sql
│ │ │ └── migration_lock.toml
│ │ ├── schema.prisma
│ │ ├── seedEvents.ts
│ │ └── sql/
│ │ ├── getEventsByTestIdForAllTime.sql
│ │ ├── getEventsByTestIdForDay.sql
│ │ └── getEventsByTestIdForLast30Days.sql
│ ├── sentry.client.config.ts
│ ├── sentry.edge.config.ts
│ ├── sentry.server.config.ts
│ ├── src/
│ │ ├── api/
│ │ │ ├── helpers.ts
│ │ │ ├── index.ts
│ │ │ └── routes/
│ │ │ ├── health.test.ts
│ │ │ ├── health.ts
│ │ │ ├── integrations.ts
│ │ │ ├── legacy_project_data.test.ts
│ │ │ ├── legacy_project_data.ts
│ │ │ ├── v1_config.test.ts
│ │ │ ├── v1_config.ts
│ │ │ ├── v1_event.test.ts
│ │ │ ├── v1_event.ts
│ │ │ ├── v1_project_data.test.ts
│ │ │ ├── v1_project_data.ts
│ │ │ └── v2_project_data.ts
│ │ ├── components/
│ │ │ ├── AddABTestModal.tsx
│ │ │ ├── AddFeatureFlagModal.tsx
│ │ │ ├── AsyncCodeExample.tsx
│ │ │ ├── Avatar.tsx
│ │ │ ├── BlogLayout.tsx
│ │ │ ├── Button.tsx
│ │ │ ├── CodeSnippet.tsx
│ │ │ ├── CodeSnippetModalButton.tsx
│ │ │ ├── CreateAPIKeyModal.tsx
│ │ │ ├── CreateEnvironmentModal.tsx
│ │ │ ├── CreateProjectModal.tsx
│ │ │ ├── DashboardButton.tsx
│ │ │ ├── DashboardHeader.tsx
│ │ │ ├── DashboardSection.tsx
│ │ │ ├── DeleteProjectModal.tsx
│ │ │ ├── DevtoolsArrow.tsx
│ │ │ ├── Divider.tsx
│ │ │ ├── Dropdown.tsx
│ │ │ ├── DropdownMenu.tsx
│ │ │ ├── Editor.tsx
│ │ │ ├── EventCounter.tsx
│ │ │ ├── Feature.tsx
│ │ │ ├── FeatureFlag.tsx
│ │ │ ├── FlagIcon.tsx
│ │ │ ├── FlagPage.tsx
│ │ │ ├── Footer.tsx
│ │ │ ├── Input.tsx
│ │ │ ├── Integrations.tsx
│ │ │ ├── JSONEditor.tsx
│ │ │ ├── Layout.tsx
│ │ │ ├── LoadingSpinner.tsx
│ │ │ ├── Logo.tsx
│ │ │ ├── MarketingLayout.tsx
│ │ │ ├── Modal.tsx
│ │ │ ├── Navbar/
│ │ │ │ └── index.tsx
│ │ │ ├── Pricing.tsx
│ │ │ ├── Progress.tsx
│ │ │ ├── ProjectSwitcher.tsx
│ │ │ ├── RadioGroup.tsx
│ │ │ ├── RadioSelect.tsx
│ │ │ ├── RemoveUserModal.tsx
│ │ │ ├── Select.tsx
│ │ │ ├── SignupButton.tsx
│ │ │ ├── Test/
│ │ │ │ ├── CreateTestSection.tsx
│ │ │ │ ├── Metrics.tsx
│ │ │ │ ├── Section.tsx
│ │ │ │ ├── Serves.tsx
│ │ │ │ └── Weights.tsx
│ │ │ ├── TitleEdit.tsx
│ │ │ ├── Toggle.tsx
│ │ │ ├── Tooltip.tsx
│ │ │ ├── UsedBy.tsx
│ │ │ ├── UserAuthForm.tsx
│ │ │ ├── UserInfo.tsx
│ │ │ ├── analytics/
│ │ │ │ └── EventGraph.tsx
│ │ │ ├── app/
│ │ │ │ ├── AppNav.tsx
│ │ │ │ └── UserNav.tsx
│ │ │ ├── charts/
│ │ │ │ └── Donut.tsx
│ │ │ ├── flags/
│ │ │ │ ├── FlagRuleEditor.tsx
│ │ │ │ └── RuleSetEditor.tsx
│ │ │ ├── settings/
│ │ │ │ ├── Integrations.tsx
│ │ │ │ └── Segments.tsx
│ │ │ └── ui/
│ │ │ ├── avatar.tsx
│ │ │ ├── button.tsx
│ │ │ ├── card.tsx
│ │ │ ├── chart.tsx
│ │ │ ├── command.tsx
│ │ │ ├── dialog.tsx
│ │ │ ├── environment-badge.tsx
│ │ │ ├── input.tsx
│ │ │ ├── label.tsx
│ │ │ ├── navigation-menu.tsx
│ │ │ ├── popover.tsx
│ │ │ ├── radio-group.tsx
│ │ │ ├── select.tsx
│ │ │ ├── switch.tsx
│ │ │ ├── table.tsx
│ │ │ ├── tabs.tsx
│ │ │ └── tooltip.tsx
│ │ ├── env/
│ │ │ ├── client.mjs
│ │ │ ├── schema.mjs
│ │ │ └── server.mjs
│ │ ├── instrumentation.ts
│ │ ├── lib/
│ │ │ ├── abby.tsx
│ │ │ ├── environment-styles.ts
│ │ │ ├── events.ts
│ │ │ ├── flags.ts
│ │ │ ├── graphs.ts
│ │ │ ├── helper.ts
│ │ │ ├── hooks/
│ │ │ │ ├── useProjectId.ts
│ │ │ │ └── useQueryParam.ts
│ │ │ ├── logsnag.ts
│ │ │ ├── shiki/
│ │ │ │ ├── languages/
│ │ │ │ │ ├── abap.tmLanguage.json
│ │ │ │ │ ├── actionscript-3.tmLanguage.json
│ │ │ │ │ ├── ada.tmLanguage.json
│ │ │ │ │ ├── apache.tmLanguage.json
│ │ │ │ │ ├── apex.tmLanguage.json
│ │ │ │ │ ├── apl.tmLanguage.json
│ │ │ │ │ ├── applescript.tmLanguage.json
│ │ │ │ │ ├── asm.tmLanguage.json
│ │ │ │ │ ├── astro.tmLanguage.json
│ │ │ │ │ ├── awk.tmLanguage.json
│ │ │ │ │ ├── ballerina.tmLanguage.json
│ │ │ │ │ ├── bat.tmLanguage.json
│ │ │ │ │ ├── berry.tmLanguage.json
│ │ │ │ │ ├── bibtex.tmLanguage.json
│ │ │ │ │ ├── bicep.tmLanguage.json
│ │ │ │ │ ├── blade.tmLanguage.json
│ │ │ │ │ ├── c.tmLanguage.json
│ │ │ │ │ ├── cadence.tmLanguage.json
│ │ │ │ │ ├── clarity.tmLanguage.json
│ │ │ │ │ ├── clojure.tmLanguage.json
│ │ │ │ │ ├── cmake.tmLanguage.json
│ │ │ │ │ ├── cobol.tmLanguage.json
│ │ │ │ │ ├── codeql.tmLanguage.json
│ │ │ │ │ ├── coffee.tmLanguage.json
│ │ │ │ │ ├── cpp-macro.tmLanguage.json
│ │ │ │ │ ├── cpp.tmLanguage.json
│ │ │ │ │ ├── crystal.tmLanguage.json
│ │ │ │ │ ├── csharp.tmLanguage.json
│ │ │ │ │ ├── css.tmLanguage.json
│ │ │ │ │ ├── cue.tmLanguage.json
│ │ │ │ │ ├── d.tmLanguage.json
│ │ │ │ │ ├── dart.tmLanguage.json
│ │ │ │ │ ├── diff.tmLanguage.json
│ │ │ │ │ ├── docker.tmLanguage.json
│ │ │ │ │ ├── dream-maker.tmLanguage.json
│ │ │ │ │ ├── elixir.tmLanguage.json
│ │ │ │ │ ├── elm.tmLanguage.json
│ │ │ │ │ ├── erb.tmLanguage.json
│ │ │ │ │ ├── erlang.tmLanguage.json
│ │ │ │ │ ├── fish.tmLanguage.json
│ │ │ │ │ ├── fsharp.tmLanguage.json
│ │ │ │ │ ├── gherkin.tmLanguage.json
│ │ │ │ │ ├── git-commit.tmLanguage.json
│ │ │ │ │ ├── git-rebase.tmLanguage.json
│ │ │ │ │ ├── glsl.tmLanguage.json
│ │ │ │ │ ├── gnuplot.tmLanguage.json
│ │ │ │ │ ├── go.tmLanguage.json
│ │ │ │ │ ├── graphql.tmLanguage.json
│ │ │ │ │ ├── groovy.tmLanguage.json
│ │ │ │ │ ├── hack.tmLanguage.json
│ │ │ │ │ ├── haml.tmLanguage.json
│ │ │ │ │ ├── handlebars.tmLanguage.json
│ │ │ │ │ ├── haskell.tmLanguage.json
│ │ │ │ │ ├── hcl.tmLanguage.json
│ │ │ │ │ ├── hlsl.tmLanguage.json
│ │ │ │ │ ├── html.tmLanguage.json
│ │ │ │ │ ├── ini.tmLanguage.json
│ │ │ │ │ ├── java.tmLanguage.json
│ │ │ │ │ ├── javascript.tmLanguage.json
│ │ │ │ │ ├── jinja-html.tmLanguage.json
│ │ │ │ │ ├── jinja.tmLanguage.json
│ │ │ │ │ ├── json.tmLanguage.json
│ │ │ │ │ ├── jsonc.tmLanguage.json
│ │ │ │ │ ├── jsonnet.tmLanguage.json
│ │ │ │ │ ├── jssm.tmLanguage.json
│ │ │ │ │ ├── jsx.tmLanguage.json
│ │ │ │ │ ├── julia.tmLanguage.json
│ │ │ │ │ ├── kotlin.tmLanguage.json
│ │ │ │ │ ├── latex.tmLanguage.json
│ │ │ │ │ ├── less.tmLanguage.json
│ │ │ │ │ ├── liquid.tmLanguage.json
│ │ │ │ │ ├── lisp.tmLanguage.json
│ │ │ │ │ ├── logo.tmLanguage.json
│ │ │ │ │ ├── lua.tmLanguage.json
│ │ │ │ │ ├── make.tmLanguage.json
│ │ │ │ │ ├── markdown.tmLanguage.json
│ │ │ │ │ ├── marko.tmLanguage.json
│ │ │ │ │ ├── matlab.tmLanguage.json
│ │ │ │ │ ├── mdx.tmLanguage.json
│ │ │ │ │ ├── mermaid.tmLanguage.json
│ │ │ │ │ ├── nginx.tmLanguage.json
│ │ │ │ │ ├── nim.tmLanguage.json
│ │ │ │ │ ├── nix.tmLanguage.json
│ │ │ │ │ ├── objective-c.tmLanguage.json
│ │ │ │ │ ├── objective-cpp.tmLanguage.json
│ │ │ │ │ ├── ocaml.tmLanguage.json
│ │ │ │ │ ├── pascal.tmLanguage.json
│ │ │ │ │ ├── perl.tmLanguage.json
│ │ │ │ │ ├── php-html.tmLanguage.json
│ │ │ │ │ ├── php.tmLanguage.json
│ │ │ │ │ ├── plsql.tmLanguage.json
│ │ │ │ │ ├── postcss.tmLanguage.json
│ │ │ │ │ ├── powershell.tmLanguage.json
│ │ │ │ │ ├── prisma.tmLanguage.json
│ │ │ │ │ ├── prolog.tmLanguage.json
│ │ │ │ │ ├── pug.tmLanguage.json
│ │ │ │ │ ├── puppet.tmLanguage.json
│ │ │ │ │ ├── purescript.tmLanguage.json
│ │ │ │ │ ├── python.tmLanguage.json
│ │ │ │ │ ├── r.tmLanguage.json
│ │ │ │ │ ├── raku.tmLanguage.json
│ │ │ │ │ ├── razor.tmLanguage.json
│ │ │ │ │ ├── rel.tmLanguage.json
│ │ │ │ │ ├── riscv.tmLanguage.json
│ │ │ │ │ ├── rst.tmLanguage.json
│ │ │ │ │ ├── ruby.tmLanguage.json
│ │ │ │ │ ├── rust.tmLanguage.json
│ │ │ │ │ ├── sas.tmLanguage.json
│ │ │ │ │ ├── sass.tmLanguage.json
│ │ │ │ │ ├── scala.tmLanguage.json
│ │ │ │ │ ├── scheme.tmLanguage.json
│ │ │ │ │ ├── scss.tmLanguage.json
│ │ │ │ │ ├── shaderlab.tmLanguage.json
│ │ │ │ │ ├── shellscript.tmLanguage.json
│ │ │ │ │ ├── smalltalk.tmLanguage.json
│ │ │ │ │ ├── solidity.tmLanguage.json
│ │ │ │ │ ├── sparql.tmLanguage.json
│ │ │ │ │ ├── sql.tmLanguage.json
│ │ │ │ │ ├── ssh-config.tmLanguage.json
│ │ │ │ │ ├── stata.tmLanguage.json
│ │ │ │ │ ├── stylus.tmLanguage.json
│ │ │ │ │ ├── svelte.tmLanguage.json
│ │ │ │ │ ├── swift.tmLanguage.json
│ │ │ │ │ ├── system-verilog.tmLanguage.json
│ │ │ │ │ ├── tasl.tmLanguage.json
│ │ │ │ │ ├── tcl.tmLanguage.json
│ │ │ │ │ ├── tex.tmLanguage.json
│ │ │ │ │ ├── toml.tmLanguage.json
│ │ │ │ │ ├── tsx.tmLanguage.json
│ │ │ │ │ ├── turtle.tmLanguage.json
│ │ │ │ │ ├── twig.tmLanguage.json
│ │ │ │ │ ├── typescript.tmLanguage.json
│ │ │ │ │ ├── vb.tmLanguage.json
│ │ │ │ │ ├── verilog.tmLanguage.json
│ │ │ │ │ ├── vhdl.tmLanguage.json
│ │ │ │ │ ├── viml.tmLanguage.json
│ │ │ │ │ ├── vue-html.tmLanguage.json
│ │ │ │ │ ├── vue.tmLanguage.json
│ │ │ │ │ ├── wasm.tmLanguage.json
│ │ │ │ │ ├── wenyan.tmLanguage.json
│ │ │ │ │ ├── xml.tmLanguage.json
│ │ │ │ │ ├── xsl.tmLanguage.json
│ │ │ │ │ ├── yaml.tmLanguage.json
│ │ │ │ │ └── zenscript.tmLanguage.json
│ │ │ │ └── themes/
│ │ │ │ ├── css-variables.json
│ │ │ │ ├── dark-plus.json
│ │ │ │ ├── dracula-soft.json
│ │ │ │ ├── dracula.json
│ │ │ │ ├── github-dark-dimmed.json
│ │ │ │ ├── github-dark.json
│ │ │ │ ├── github-light.json
│ │ │ │ ├── hc_light.json
│ │ │ │ ├── light-plus.json
│ │ │ │ ├── material-darker.json
│ │ │ │ ├── material-default.json
│ │ │ │ ├── material-lighter.json
│ │ │ │ ├── material-ocean.json
│ │ │ │ ├── material-palenight.json
│ │ │ │ ├── min-dark.json
│ │ │ │ ├── min-light.json
│ │ │ │ ├── monokai.json
│ │ │ │ ├── nord.json
│ │ │ │ ├── one-dark-pro.json
│ │ │ │ ├── poimandres.json
│ │ │ │ ├── rose-pine-dawn.json
│ │ │ │ ├── rose-pine-moon.json
│ │ │ │ ├── rose-pine.json
│ │ │ │ ├── slack-dark.json
│ │ │ │ ├── slack-ochin.json
│ │ │ │ ├── solarized-dark.json
│ │ │ │ ├── solarized-light.json
│ │ │ │ ├── vitesse-dark.json
│ │ │ │ └── vitesse-light.json
│ │ │ ├── stripe.ts
│ │ │ ├── tracking.ts
│ │ │ └── utils.ts
│ │ ├── middleware.ts
│ │ ├── pages/
│ │ │ ├── _app.tsx
│ │ │ ├── _document.tsx
│ │ │ ├── _error.jsx
│ │ │ ├── api/
│ │ │ │ ├── [[...route]].ts
│ │ │ │ ├── auth/
│ │ │ │ │ └── [...nextauth].ts
│ │ │ │ ├── checkout/
│ │ │ │ │ └── index.ts
│ │ │ │ ├── invalidate-limits.ts
│ │ │ │ ├── stripe.ts
│ │ │ │ └── trpc/
│ │ │ │ └── [trpc].ts
│ │ │ ├── checkout/
│ │ │ │ └── index.tsx
│ │ │ ├── contact.tsx
│ │ │ ├── devtools.tsx
│ │ │ ├── imprint.mdx
│ │ │ ├── index.tsx
│ │ │ ├── integrations/
│ │ │ │ ├── [integration]/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── invites/
│ │ │ │ ├── [inviteId].tsx
│ │ │ │ └── index.tsx
│ │ │ ├── login.tsx
│ │ │ ├── nextjs.mdx
│ │ │ ├── privacy.mdx
│ │ │ ├── profile/
│ │ │ │ ├── generate-token.tsx
│ │ │ │ └── index.tsx
│ │ │ ├── projects/
│ │ │ │ └── [projectId]/
│ │ │ │ ├── environments.tsx
│ │ │ │ ├── events.tsx
│ │ │ │ ├── flags/
│ │ │ │ │ ├── [flagId].tsx
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── index.tsx
│ │ │ │ ├── redeem.tsx
│ │ │ │ ├── remote-config.tsx
│ │ │ │ ├── settings.tsx
│ │ │ │ └── tests/
│ │ │ │ └── [testId].tsx
│ │ │ ├── redeem.tsx
│ │ │ ├── signup.tsx
│ │ │ ├── terms.mdx
│ │ │ ├── tips-and-insights/
│ │ │ │ ├── a-b-nextjs.mdx
│ │ │ │ ├── a-b-react.mdx
│ │ │ │ ├── feature-flagging-in-modern-development-teams.mdx
│ │ │ │ ├── feature-flags-for-project-managers.mdx
│ │ │ │ ├── feature-flags-next.mdx
│ │ │ │ ├── honest-marketing.mdx
│ │ │ │ └── index.tsx
│ │ │ └── welcome.tsx
│ │ ├── seo/
│ │ │ └── SeoDescriptions.ts
│ │ ├── server/
│ │ │ ├── common/
│ │ │ │ ├── auth.ts
│ │ │ │ ├── config-cache.ts
│ │ │ │ ├── get-server-auth-session.ts
│ │ │ │ ├── getRequestOrigin.ts
│ │ │ │ ├── github-app.ts
│ │ │ │ ├── integrations.ts
│ │ │ │ ├── memory-cache.ts
│ │ │ │ ├── plans.ts
│ │ │ │ ├── ratelimit.ts
│ │ │ │ ├── stripe.ts
│ │ │ │ └── tracking.ts
│ │ │ ├── db/
│ │ │ │ ├── client.ts
│ │ │ │ └── redis.ts
│ │ │ ├── queue/
│ │ │ │ ├── AfterDataRequest.ts
│ │ │ │ ├── event.ts
│ │ │ │ └── queues.ts
│ │ │ ├── services/
│ │ │ │ ├── AiFlagRemovalService.ts
│ │ │ │ ├── ConfigService.ts
│ │ │ │ ├── EventService.ts
│ │ │ │ ├── FlagService.ts
│ │ │ │ ├── IntegrationService.ts
│ │ │ │ ├── InviteService.ts
│ │ │ │ ├── PlausibleService.ts
│ │ │ │ ├── ProjectService.ts
│ │ │ │ ├── RequestCache.ts
│ │ │ │ ├── RequestService.ts
│ │ │ │ └── TestService.ts
│ │ │ └── trpc/
│ │ │ ├── context.ts
│ │ │ ├── helpers.ts
│ │ │ ├── router/
│ │ │ │ ├── _app.ts
│ │ │ │ ├── apikey.ts
│ │ │ │ ├── auth.ts
│ │ │ │ ├── coupons.ts
│ │ │ │ ├── environments.ts
│ │ │ │ ├── events.ts
│ │ │ │ ├── example.ts
│ │ │ │ ├── flags.ts
│ │ │ │ ├── invite.ts
│ │ │ │ ├── misc.ts
│ │ │ │ ├── project-user.ts
│ │ │ │ ├── project.ts
│ │ │ │ ├── tests.ts
│ │ │ │ └── user.ts
│ │ │ └── trpc.ts
│ │ ├── styles/
│ │ │ ├── shadcn.css
│ │ │ └── theme.json
│ │ ├── types/
│ │ │ ├── flags.ts
│ │ │ ├── next-auth.d.ts
│ │ │ └── plausible-events.ts
│ │ └── utils/
│ │ ├── apiKey.ts
│ │ ├── checkSession.ts
│ │ ├── snippets.ts
│ │ ├── trpc.ts
│ │ ├── updateSession.ts
│ │ └── validateFlags.ts
│ ├── tailwind.config.cjs
│ ├── tsconfig.json
│ ├── vercel.json
│ └── vitest.config.ts
├── biome.json
├── docker-compose.prod.yaml
├── docker-compose.yaml
├── docs/
│ └── integrations.md
├── package.json
├── packages/
│ ├── angular/
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── angular.json
│ │ ├── karma.conf.js
│ │ ├── ng-package.json
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── lib/
│ │ │ │ ├── StorageService.ts
│ │ │ │ ├── abby-logger.service.ts
│ │ │ │ ├── abby.module.ts
│ │ │ │ ├── abby.service.spec.ts
│ │ │ │ ├── abby.service.ts
│ │ │ │ ├── devtools.component.ts
│ │ │ │ ├── flag.directive.ts
│ │ │ │ ├── get-remote-config.pipe.spec.ts
│ │ │ │ ├── get-remote-config.pipe.ts
│ │ │ │ ├── get-variant.pipe.spec.ts
│ │ │ │ ├── get-variant.pipe.ts
│ │ │ │ └── test.directive.ts
│ │ │ └── public-api.ts
│ │ ├── tsconfig.json
│ │ ├── tsconfig.lib.json
│ │ ├── tsconfig.lib.prod.json
│ │ └── tsconfig.spec.json
│ ├── cli/
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── add-flag.ts
│ │ │ ├── add-remote-config.ts
│ │ │ ├── ai.ts
│ │ │ ├── auth.ts
│ │ │ ├── check.ts
│ │ │ ├── consts.ts
│ │ │ ├── http.ts
│ │ │ ├── index.ts
│ │ │ ├── init.ts
│ │ │ ├── pull.ts
│ │ │ ├── push.ts
│ │ │ ├── schemas.ts
│ │ │ ├── sharedOptions.ts
│ │ │ ├── update-config-file.ts
│ │ │ └── util.ts
│ │ ├── tests/
│ │ │ ├── abby.config.stub.ts
│ │ │ ├── base.test.ts
│ │ │ ├── mocks/
│ │ │ │ ├── handlers.ts
│ │ │ │ └── server.ts
│ │ │ └── setup.ts
│ │ ├── tsconfig.json
│ │ ├── tsup.config.ts
│ │ └── vite.config.ts
│ ├── core/
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── defineConfig.ts
│ │ │ ├── helpers.ts
│ │ │ ├── index.ts
│ │ │ ├── mathHelpers.ts
│ │ │ ├── shared/
│ │ │ │ ├── constants.ts
│ │ │ │ ├── helpers.ts
│ │ │ │ ├── http.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── interfaces.ts
│ │ │ │ ├── schemas.ts
│ │ │ │ └── types.ts
│ │ │ └── validation/
│ │ │ └── index.ts
│ │ ├── tests/
│ │ │ ├── base.test.ts
│ │ │ ├── defineConfig.test.ts
│ │ │ ├── math.test.ts
│ │ │ ├── mocks/
│ │ │ │ ├── handlers.ts
│ │ │ │ └── server.ts
│ │ │ ├── setup.ts
│ │ │ ├── types.test.ts
│ │ │ └── validation.test.ts
│ │ ├── tsconfig.json
│ │ ├── tsup.config.ts
│ │ └── vite.config.ts
│ ├── devtools/
│ │ ├── .gitignore
│ │ ├── .storybook/
│ │ │ ├── main.ts
│ │ │ └── preview.ts
│ │ ├── .vscode/
│ │ │ └── extensions.json
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── Devtools.stories.ts
│ │ │ ├── Devtools.svelte
│ │ │ ├── components/
│ │ │ │ ├── ChevronIcon.svelte
│ │ │ │ ├── CloseIcon.svelte
│ │ │ │ ├── Input.svelte
│ │ │ │ ├── JsonEditor.svelte
│ │ │ │ ├── Modal.svelte
│ │ │ │ ├── Select.svelte
│ │ │ │ └── Switch.svelte
│ │ │ ├── index.ts
│ │ │ ├── lib/
│ │ │ │ ├── storage.ts
│ │ │ │ └── types.ts
│ │ │ └── vite-env.d.ts
│ │ ├── svelte.config.js
│ │ ├── tsconfig.json
│ │ ├── tsconfig.node.json
│ │ └── vite.config.ts
│ ├── next/
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── cache.ts
│ │ │ ├── helpers.ts
│ │ │ ├── index.tsx
│ │ │ └── withAbby.tsx
│ │ ├── tests/
│ │ │ ├── cache.test.ts
│ │ │ ├── mocks/
│ │ │ │ ├── handlers.ts
│ │ │ │ └── server.ts
│ │ │ ├── setup.ts
│ │ │ ├── types.test.tsx
│ │ │ ├── useAbby.test.tsx
│ │ │ └── withAbby.test.tsx
│ │ ├── tsconfig.json
│ │ ├── tsup.config.ts
│ │ └── vite.config.ts
│ ├── node/
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── fix-exports.js
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── express/
│ │ │ │ └── index.ts
│ │ │ ├── index.ts
│ │ │ ├── koa/
│ │ │ │ └── index.ts
│ │ │ └── utils/
│ │ │ └── MemoryStorage.ts
│ │ ├── tests/
│ │ │ ├── express.test.ts
│ │ │ ├── koa.test.ts
│ │ │ ├── mocks/
│ │ │ │ ├── handlers.ts
│ │ │ │ └── server.ts
│ │ │ ├── node.test.ts
│ │ │ └── setup.ts
│ │ ├── tsconfig.json
│ │ ├── tsup.config.ts
│ │ └── vite.config.ts
│ ├── react/
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── StorageService.ts
│ │ │ ├── context.tsx
│ │ │ ├── helpers.ts
│ │ │ └── index.ts
│ │ ├── tests/
│ │ │ ├── helpers.test.ts
│ │ │ ├── mocks/
│ │ │ │ ├── handlers.ts
│ │ │ │ └── server.ts
│ │ │ ├── setup.ts
│ │ │ ├── ssr.test.tsx
│ │ │ ├── types.test.tsx
│ │ │ └── useAbby.test.tsx
│ │ ├── tsconfig.json
│ │ ├── tsup.config.ts
│ │ └── vite.config.ts
│ ├── remix/
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── cache.ts
│ │ │ └── index.tsx
│ │ ├── tests/
│ │ │ ├── cache.test.ts
│ │ │ ├── mocks/
│ │ │ │ ├── handlers.ts
│ │ │ │ └── server.ts
│ │ │ ├── setup.ts
│ │ │ ├── ssr.test.tsx
│ │ │ ├── types.test.tsx
│ │ │ └── useAbby.test.tsx
│ │ ├── tsconfig.json
│ │ ├── tsup.config.ts
│ │ └── vite.config.ts
│ ├── svelte/
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── index.ts
│ │ │ ├── lib/
│ │ │ │ ├── AbbyDevtools.svelte
│ │ │ │ ├── AbbyProvider.svelte
│ │ │ │ ├── StorageService.ts
│ │ │ │ └── createAbby.ts
│ │ │ └── tests/
│ │ │ ├── abby.ts
│ │ │ ├── featureFlags.test.ts
│ │ │ ├── mocks/
│ │ │ │ ├── handlers.ts
│ │ │ │ └── server.ts
│ │ │ ├── pages/
│ │ │ │ └── +test.svelte
│ │ │ ├── remoteConfig.test.ts
│ │ │ ├── setupTest.ts
│ │ │ ├── useAbby.test.ts
│ │ │ └── withAbby.test.ts
│ │ ├── svelte.config.js
│ │ ├── tsconfig.json
│ │ ├── tsconfig.node.json
│ │ └── vite.config.ts
│ └── tsconfig/
│ ├── README.md
│ ├── angular-library.json
│ ├── base.json
│ ├── nextjs.json
│ ├── package.json
│ └── react-library.json
├── pnpm-workspace.yaml
└── turbo.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .changeset/README.md
================================================
# Changesets
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
================================================
FILE: .changeset/config.json
================================================
{
"$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
================================================
FILE: .dockerignore
================================================
.git
apps/angular-example
apps/docs
node_modules/
**/node_modules/
================================================
FILE: .github/workflows/publish.yaml
================================================
name: Changesets
on:
push:
branches:
- main
env:
CI: true
PNPM_CACHE_FOLDER: .pnpm-store
jobs:
version:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: checkout code repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: setup node.js
uses: actions/setup-node@v3
with:
node-version: "22.8.0"
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 9.9.0
run_install: false
- name: Setup npmrc
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
- name: setup pnpm config
run: pnpm config set store-dir $PNPM_CACHE_FOLDER
- name: install dependencies
run: pnpm install --frozen-lockfile
- name: build
run: pnpm run build:packages
- name: create and publish versions
uses: changesets/action@v1
with:
commit: "chore: update versions"
title: "chore: update versions"
publish: pnpm ci:publish --no-git-checks
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
================================================
FILE: .github/workflows/pull_request.yaml
================================================
name: Lint and Format
on:
push:
pull_request:
jobs:
quality:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Biome
uses: biomejs/setup-biome@v2
with:
version: latest
- name: Run Biome
run: biome ci .
================================================
FILE: .github/workflows/tests.yaml
================================================
name: Package Tests
on:
push:
paths:
- "packages/**"
pull_request:
paths:
- "packages/**"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "22.8.0"
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 9.9.0
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- run: pnpm i
- run: pnpm build:packages
- run: pnpm test:packages
================================================
FILE: .gitignore
================================================
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
node_modules
.pnp
.pnp.js
# testing
coverage
# next.js
.next/
out/
build
# misc
.env
.idea
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local
# turbo
.turbo
================================================
FILE: .nvmrc
================================================
22.8.0
================================================
FILE: .vscode/extensions.json
================================================
{
"recommendations": ["svelte.svelte-vscode"]
}
================================================
FILE: .vscode/settings.json
================================================
{
"editor.formatOnSave": true,
"[svelte]": {
"editor.defaultFormatter": "svelte.svelte-vscode"
},
"[typescript][typescriptreact][typescriptangular][json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit"
}
}
================================================
FILE: Dockerfile
================================================
FROM node:20-alpine AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
FROM base AS builder
RUN apk update && apk add --no-cache libc6-compat
# Set working directory
WORKDIR /app
COPY . .
RUN pnpm add -g turbo
RUN turbo prune web --docker
# Add lockfile and package.json's of isolated subworkspace
FROM base AS installer
RUN apk add --no-cache libc6-compat
RUN apk update
WORKDIR /app
# First install the dependencies (as they change less often)
COPY .gitignore .gitignore
COPY --from=builder /app/out/json/ .
COPY --from=builder /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
# COPY --from=builder /app/tsconfig.json ./tsconfig.json
RUN pnpm install
# Build the project
COPY --from=builder /app/out/full/ .
RUN pnpm turbo run build --filter=web...
FROM base AS runner
WORKDIR /app
# Don't run production as root
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
USER nextjs
COPY --from=installer /app/apps/web/next.config.mjs .
COPY --from=installer /app/apps/web/package.json .
# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/.next/standalone ./
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/.next/static ./apps/web/.next/static
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/public ./apps/web/public
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/prisma ./apps/web/prisma
# Set your entrypoint script as the entrypoint
WORKDIR /app/apps/web
CMD ["npm", "run", "start:docker"]
================================================
FILE: LICENSE
================================================
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.
================================================
FILE: README.md
================================================

# About Abby
Abby is a open source feature management and A/B testing platform. It is designed to be easy to use and easy to integrate into your existing applications. It aims to improve the developer experience by providing a simple and statically typed API for feature management and A/B testing.
Besides its official SDKS it also offers a friendly and easy to understand Dashboard for the non-developers in your team.
Abby focuses on privacy. This means it won't track any personalized user data and uses no marketing cookies.
You can self host it or use the hosted version available at [tryabby.com](https://www.tryabby.com).
## Getting Started
_TL;DR:_
```
git clone git@github.com:tryabby/abby.git
pnpm i
pnpm build:packages
pnpm db:start
cp apps/web/.env.example apps/web/.env
pnpm db:migrate
pnpm dev
```
1. **Open the Application**:
- Go to `http://localhost:3000` in your browser.
2. **Sign Up**:
- Select "Continue with Email" and enter your email.
3. **Email Verification**:
- Open `http://localhost:8025` in a new tab for MailHog.
- Find and open the email from your application.
4. **Complete Registration**:
- Click the one-time link in the email to verify and finish account setup.
To create an account, you should choose the "Continue with Email" option. The docker-compose.yml includes a [MailHog](https://github.com/mailhog/MailHog) instance at `localhost:8025`, which intercepts the email, so you can get the one-time link from there.
## What's inside?
This turborepo uses [pnpm](https://pnpm.io) as a package manager. It includes the following packages/apps:
### Apps and Packages
- `docs`: a [Next.js](https://nextjs.org/) with [Nextra](https://nextra.site/)
- `web`: another [Next.js](https://nextjs.org/) app using the [T3 Stack](https://create.t3.gg/)
- `core`: The Abby core JavaScript SDK which all other JS SDKs are based on
- `react`: The Abby React SDK
- `next`: The Abby Next.js SDK
- `angular`: The Abby Angular SDK
- `svelte`: The Abby Svelte SDK
Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).
### Utilities
This turborepo has some additional tools already setup for you:
- [TypeScript](https://www.typescriptlang.org/) for static type checking
- [ESLint](https://eslint.org/) for code linting
- [Prettier](https://prettier.io) for code formatting
## Useful Links
Learn more about the power of Turborepo:
- [Pipelines](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks)
- [Caching](https://turbo.build/repo/docs/core-concepts/caching)
- [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching)
- [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering)
- [Configuration Options](https://turbo.build/repo/docs/reference/configuration)
- [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference)
================================================
FILE: TRACKING.md
================================================
# Tracking
The following table shows what we are tracking on our landing page and through
our API.
| Event Name | Triggered when | Additional properties |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| Sign Up Clicked | a user clicks the Signup Button on the landing page | None |
| Plan Selected | a user tries to register for a plan on the landing page | Plan: The plan the user has chosen |
| Plan Upgrade Clicked | a user tries to upgrade their plan on the dashboard | Plan: The plan the user is trying to upgrade to |
| Project Created | a user creates a new project on the dashboard | None |
| AB-Test Created | a user creates a new AB-Test on the dashboard | Amount Of Variants: The amount of variants associated with the new AB-Test |
| Environment Created | a user creates a new environment on the dashboard | None |
| Feature Flag Created | a user creates a new feature flag on the dashboard | Feature Flag Type: The type of feature flag created (Boolean, String, Number, Json) |
| Devtools Opened | a user tries the devtools for the first time | None |
| API Project Data Retrieved | an API call to the endpoint for retrieving the Abby settings for a project, has been sent (We do not track the User-Agent, in this case) | |
================================================
FILE: apps/cdn/.gitignore
================================================
node_modules
dist
.wrangler
.dev.vars
# Change them to your taste:
wrangler.toml
package-lock.json
yarn.lock
pnpm-lock.yaml
================================================
FILE: apps/cdn/README.md
================================================
```
npm install
npm run dev
```
```
npm run deploy
```
================================================
FILE: apps/cdn/package.json
================================================
{
"name": "@tryabby/cdn",
"private": true,
"scripts": {
"dev": "wrangler dev src/index.ts",
"deploy": "wrangler deploy --minify src/index.ts"
},
"dependencies": {
"hono": "^4.5.8"
},
"devDependencies": {
"@tryabby/core": "workspace:*",
"@cloudflare/workers-types": "^4.20231218.0",
"wrangler": "^3.22.0"
}
}
================================================
FILE: apps/cdn/src/index.ts
================================================
import { ABBY_WINDOW_KEY, type AbbyDataResponse } from "@tryabby/core";
import { Hono } from "hono";
import { ZoneCache } from "./lib/cache";
import { cors } from "hono/cors";
import { logger } from "hono/logger";
import { timing } from "hono/timing";
import { ConfigService } from "./lib/config";
const cache = new ZoneCache<{
config: AbbyDataResponse;
}>({
cloudflareApiKey: "",
domain: "cache.tryabby.com",
fresh: 60 * 1000,
stale: 60 * 1000,
zoneId: "",
});
const configCache = new ConfigService(cache);
const app = new Hono()
.use(
"*",
cors({
origin: "*",
maxAge: 60 * 60 * 24 * 30,
})
)
.use("*", timing())
.use("*", logger())
.get("/:projectId/:environment", async (c) => {
const environment = c.req.param("environment");
const projectId = c.req.param("projectId");
const [data, , reason] = await configCache.retrieveConfig({
c,
environment,
projectId,
});
c.header("x-abby-cache", reason);
return c.json(data);
})
.get("/:projectId/:environment/script.js", async (c) => {
const environment = c.req.param("environment");
const projectId = c.req.param("projectId");
const [data, , reason] = await configCache.retrieveConfig({
c,
environment,
projectId,
});
c.header("x-abby-cache", reason);
const script = `window.${ABBY_WINDOW_KEY} = ${JSON.stringify(data)};`;
return c.text(script, {
headers: {
"Content-Type": "application/javascript",
},
});
});
export default app;
================================================
FILE: apps/cdn/src/lib/cache.ts
================================================
import type { Context } from "hono";
export type CacheConfig = {
/**
* How long an entry should be fresh in milliseconds
*/
fresh: number;
/**
* How long an entry should be stale in milliseconds
*
* Stale entries are still valid but should be refreshed in the background
*/
stale: number;
};
export type Entry<TValue> = {
value: TValue;
};
export type ZoneCacheConfig = CacheConfig & {
domain: string;
zoneId: string;
/**
* This token must have at least
*/
cloudflareApiKey: string;
};
export class ZoneCache<TNamespaces extends Record<string, unknown>> {
private readonly config: ZoneCacheConfig;
constructor(config: ZoneCacheConfig) {
this.config = config;
}
private createCacheKey<TName extends keyof TNamespaces>(
namespace: TName,
key: string,
cacheBuster = "v1"
): URL {
return new URL(
`https://${this.config.domain}/cache/${cacheBuster}/${String(namespace)}/${key}`
);
}
public async get<TName extends keyof TNamespaces>(
_c: Context,
namespace: TName,
key: string
): Promise<
[TNamespaces[TName] | undefined, "stale" | "hit" | "miss" | "error"]
> {
try {
const res = await caches.default.match(
new Request(this.createCacheKey(namespace, key))
);
if (!res) {
return [undefined, "miss"];
}
const entry = (await res.json()) as Entry<TNamespaces[TName]>;
return [entry.value, "hit"];
} catch (e) {
console.error("zone cache error:", e);
return [undefined, "error"];
}
}
public async set<TName extends keyof TNamespaces>(
_c: Context,
namespace: TName,
key: string,
value: TNamespaces[TName] | null
): Promise<void> {
const entry: Entry<TNamespaces[TName] | null> = {
value: value,
};
const req = new Request(this.createCacheKey(namespace, key));
const res = new Response(JSON.stringify(entry), {
headers: {
"Content-Type": "application/json",
"Cache-Control": "public, s-maxage=60",
},
});
await caches.default.put(req, res);
}
}
================================================
FILE: apps/cdn/src/lib/config.ts
================================================
import { type AbbyDataResponse, HttpService } from "@tryabby/core";
import type { Context } from "hono";
import { endTime, startTime } from "hono/timing";
import type { ZoneCache } from "./cache";
export class ConfigService {
constructor(
private readonly cache: ZoneCache<{
config: AbbyDataResponse;
}>
) {}
async retrieveConfig({
environment,
projectId,
c,
}: {
projectId: string;
environment: string;
c: Context;
}) {
const cacheKey = [projectId, environment].join(",");
startTime(c, "cacheRead");
const [cachedData, reason] = await this.cache.get(c, "config", cacheKey);
endTime(c, "cacheRead");
if (cachedData) {
return [cachedData, true, reason] as const;
}
startTime(c, "remoteRead");
const data = await HttpService.getProjectData({
projectId,
environment,
});
if (!data) {
throw new Error("Failed to fetch data");
}
endTime(c, "remoteRead");
c.executionCtx.waitUntil(this.cache.set(c, "config", cacheKey, data));
return [data, false, reason] as const;
}
}
================================================
FILE: apps/cdn/tsconfig.json
================================================
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "node",
"esModuleInterop": true,
"strict": true,
"lib": [
"esnext"
],
"types": [
"@cloudflare/workers-types"
],
"jsx": "react-jsx",
"jsxImportSource": "hono/jsx"
},
}
================================================
FILE: apps/docs/.eslintrc.json
================================================
{
"root": true,
"extends": ["custom"]
}
================================================
FILE: apps/docs/.gitignore
================================================
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
# local env files
.env*.local
# vercel
.vercel
# typescript
*.tsbuildinfo
next-env.d.ts
================================================
FILE: apps/docs/CHANGELOG.md
================================================
# docs
## 0.2.0
### Minor Changes
- add edge/api function helpers and non-react a/b test function
================================================
FILE: apps/docs/README.md
================================================
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
## Getting Started
First, run the development server:
```bash
npm run dev
# or
yarn dev
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
## Learn More
To learn more about Next.js, take a look at the following resources:
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
## Deploy on Vercel
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
================================================
FILE: apps/docs/next.config.js
================================================
const withNextra = require("nextra")({
theme: "nextra-theme-docs",
themeConfig: "./theme.config.jsx",
defaultShowCopyCode: true,
});
const { withPlausibleProxy } = require("next-plausible");
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
// use this to add <html lang="en"> to all pages
i18n: {
locales: ["en"],
defaultLocale: "en",
},
};
module.exports = withPlausibleProxy()(withNextra(nextConfig));
================================================
FILE: apps/docs/package.json
================================================
{
"name": "docs",
"version": "0.2.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"dependencies": {
"@types/node": "^18.0.0",
"@types/react": "18.0.26",
"@types/react-dom": "^18.0.5",
"next": "14.1.1",
"next-plausible": "^3.11.3",
"nextra": "2.13.2",
"nextra-theme-docs": "2.13.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "5.5.4"
},
"devDependencies": {
"tsconfig": "workspace:^0.0.0"
}
}
================================================
FILE: apps/docs/pages/_app.mdx
================================================
import PlausibleProvider from "next-plausible";
export default function MyApp({ Component, pageProps }) {
return (
<PlausibleProvider domain="docs.tryabby.com">
<Component {...pageProps} />
</PlausibleProvider>
);
}
================================================
FILE: apps/docs/pages/_meta.json
================================================
{
"index": "Getting Started",
"integrations": "Integrations",
"reference": "Reference",
"-- Guides --": {
"type": "separator",
"title": "Guides"
},
"nextjs": "Next.js",
"devtools": "Devtools",
"-- Concepts --": {
"type": "separator",
"title": "Concepts"
},
"feature-flags": "Feature Flags",
"remote-config": "Remote Configuration",
"environments": "Environments",
"config": "Configuration as Code",
"user-segments": "User Segments",
"a-b-testing": "A/B Tests",
"-- More --": {
"type": "separator",
"title": "More"
},
"abby_link": {
"title": "Abby ↗",
"href": "https://www.tryabby.com",
"newWindow": true
}
}
================================================
FILE: apps/docs/pages/a-b-testing.mdx
================================================
# A/B Tests
Abby allows you to define different tests for your application.
A test is uniquely identified by a name. After creating a test you can define weights for each variant of the test.
By default all variants have the same chance.
When implementing a test in you application you can show different things depending on the selected variant.
The variants will be assigned to users randomly, but the same user will always get the same variant.
The assignment of variants uses the defined weights.
================================================
FILE: apps/docs/pages/config.mdx
================================================
import { Callout } from "nextra-theme-docs";
# Configuration as Code
## Introduction
Abby aims to have the best Developer Experience possible.
This is why Abby is fully configurable via Code. No need to click some buttons in a GUI.
You `abby.config.ts` (or `abby.config.js`) file is the **single source of truth** for your Abby project.
Your configuration should be written in a file called `abby.config.ts` (or `abby.config.js`) which should be located in the root of your project.
Every integration offers a `defineConfig` helper function which offers a typesafe way to define your configuration.
```ts
import { defineConfig } from "@tryabby/core";
// or import { defineConfig } from "@tryabby/<integration>";
```
The config needs to be the default export of the file so that the CLI can find it.
```ts
import { defineConfig } from "@tryabby/core";
// or import { defineConfig } from "@tryabby/<integration>";
export default defineConfig(
{
// your projectId and other sensitive data here
},
{
// your flags, tests, etc. here
}
);
```
<Callout type="info" emoji="💡">
The first parameter includes all data that might be configured via environment variables. You
should not use environment variables in the second parameter, because the type inference might
suffer and the CLI could potentially resolve those environment variables!
</Callout>
## Philosophy
This configuration has two purposes:
#### 1. Integrations
Abby has many integrations to other tools and frameworks. Those can import the config and use it to configure themselves.
For example the `@tryabby/nextjs` integration uses the config to configure the Next.js framework. Reading the config makes the integrations fully typesafe
#### 2. CLI
The [Abby CLI](/reference/cli) uses the config to know what to do. It reads from the config and can then be used to create tests or feature flags on the Abby platform without
any further configuration.
## Example
```ts
// abby.config.ts
import { defineConfig } from "@tryabby/core";
// or import { defineConfig } from "@tryabby/<integration>";
export default defineConfig(
{
projectId: "my-project-id",
currentEnvironment: "development",
},
{
environments: ["development", "production"],
tests: {
SignupButton: {
variants: ["A", "B"],
},
},
flags: ["showFooter"],
remoteConfig: {
customButtonText: "String",
maxUserCount: "Number",
AdvancedTestStats: "JSON",
},
settings: {
flags: {
defaultValue: false,
devOverrides: {
showFooter: true,
},
},
remoteConfig: {
defaultValues: {
JSON: {},
Number: 0,
String: "",
},
devOverrides: {
maxUserCount: 40,
AdvancedTestStats: {},
customButtonText: "My cool button",
},
},
},
}
);
```
## Config Reference
The `defineConfig` function takes two objects as a parameter, that will be merged together when read.
The merged object can contain the following properties:
| Name | Type | Required | Description | details |
| ------------------ | --------- | :------: | ----------------------------------------------------------------------- | --------------------- |
| projectId | `string` | ✅ | The ID of your project in Abby | - |
| apiUrl | `string` | | The URL of the Abby API. Defaults to the hosted version | - |
| currentEnvironment | `string` | ✅ | The current environment of your application | [link](/environments) |
| tests | `object` | | An object containing your defined A/B Tests | - |
| flags | `array` | | An array containing your defined Feature Flag names | - |
| remoteConfig | `object` | | An object containing your Remote Configuration variables | - |
| settings | `object` | | An object with additional settings for Abby | - |
| debug | `boolean` | | A boolean to show additional debug information | - |
| fetch | `fetch` | | You can pass in a custom fetch function. Defaults to `globalThis.fetch` | - |
#### tests
The tests property is an object containing your defined A/B Tests. You probably want to use the Copy Button in your dashboard to copy the tests object.
They keys of the object represent the names of your predefined A/B tests. The values are objects containing the following properties:
| Name | Type | Required | Description |
| -------- | --------------- | :------: | ------------------------------------------------------- |
| variants | `Array<string>` | ✅ | An array of strings containing the variants of the test |
##### Example
```ts
const abby = createAbby({
// ... your config
tests: {
"test-abtest": {
variants: ["control", "variant-a", "variant-b"],
},
},
});
```
#### flags
The flags property is an array containing your defined Feature Flags. You probably want to use the Copy Button in your dashboard to copy the flags array.
##### Example
```ts
const abby = createAbby({
// ... your config
flags: ["test-flag"],
});
```
#### remoteConfig
The remoteConfig property is an object containing your Remote Configuration variables and their respective types.
##### Example
```ts
const abby = createAbby({
// ... your config
remoteConfig: {
myStringVariable: "String",
myNumberVariable: "Number",
myJSONVariable: "JSON",
},
});
```
#### settings
The settings property is an object containing additional settings for Abby. The following properties are available:
- `flags.defaultValue`: Allows you to set a fallback boolean value for your Feature Flags, in case you forgot to add them
in your dashboard or when they could not be fetched correctly.
```json
flags: {
defaultValue: true,
},
```
- `flags.devOverrides`: An object containing the values of feature flags in development mode. The keys of the object represent the names of the flags.
```json
flags: {
devOverrides: {
showHeader: true,
showFooter: false,
},
},
```
- `remoteConfig.defaultValues`: An object containing default values for each Remote Configuration type.
```json
remoteConfig: {
defaultValues: {
String: "Default string value",
Number: 100,
JSON: { default: true },
},
},
```
- `remoteConfig.devOverrides`: An object containing the values of Remote Configuration variables in development mode. The keys of the object represent the names of the flags.
The values need to be of the type of the variable. The value must be of the same type as the variable.
```json
remoteConfig: {
devOverrides: {
myStringVariable: "dev mode string value",
myNumberVariable: 100,
JSON: { devMode: true },
},
},
```
#### debug
A boolean that you can toggle on to get debug information logged to the console. Mostly useful in development to see where something potentially goes wrong.
#### fetch
You can pass a custom fetch function in here. This defaults to the global fetch function. This is mostly needed for older versions of Node.js which
don't have a global fetch function.
================================================
FILE: apps/docs/pages/devtools.mdx
================================================
import { Tab, Tabs, Callout } from "nextra-theme-docs";
# Devtools
Abby comes with a Devtools that allows you to see the different variants of your A/B Tests and Feature Flags.
To use them simply add the `<AbbyDevTools />` component to your app.
## Installation
Install the `@tryabby/devtools` package using your favorite package manager:
<Tabs items={["npm", "yarn", "pnpm"]}>
<Tab>
```bash
npm i @tryabby/devtools
```
</Tab>
<Tab>
```bash
yarn add @tryabby/devtools
```
</Tab>
<Tab>
```bash
pnpm i @tryabby/devtools
```
</Tab>
</Tabs>
## Configuration
In order to use the Devtools you will need to wrap them for your specific integration.
<Callout type="info" emoji="💡">
The Devtools will be omited in the production build!
</Callout>
<Tabs items={["Next.js", "React"]}>
<Tab>
````tsx
// lib/abby.ts
import { createAbby } from "@tryabby/next";
import abbyDevtools from "@tryabby/devtools";
export const { AbbyProvider, withAbby, withDevtools } = createAbby({
// ...your Config
});
// Wrap the Devtools for Next.js
export const AbbyDevtools = withDevtools(abbyDevtools, { defaultShow: true });
`````
</Tab>
<Tab>
````tsx
// lib/abby.ts
import { createAbby } from "@tryabby/react";
import abbyDevtools from "@tryabby/devtools";
export const { AbbyProvider, withDevtools } = createAbby({
// ...your Config
});
// Wrap the Devtools for React
export const AbbyDevtools = withDevtools(abbyDevtools, { defaultShow: true });
`````
</Tab>
</Tabs>
You then need to simply place the Devtools inside of your `AbbyProvider`
```tsx
import { AbbyProvider, AbbyDevTools } from "lib/abby";
// ... your application
export function App() {
return (
<AbbyProvider>
<AbbyDevtools />
<Component {...pageProps} />
</AbbyProvider>
);
}
```
### Usage
The devtools will appear on every page if you set `defaultShow: true`.
Otherwise you can toggle them with <kbd>CMD/CTRL + .</kbd> (or the shortcut you set in the config)
<Callout type="warning" emoji="💡">
You will only be able to update feature flags that are consumed via hooks in the current page! If
you need to update a feature flag that is consumed via `getFeatureFlagValue` set in the
`createAbby` config.
</Callout>
================================================
FILE: apps/docs/pages/environments.mdx
================================================
# Environments
Environments in Abby allow you to reflect the different environments that your application may be deployed to.
For example, you may have a `development` environment, a `staging` environment, and a `production` environment.
When using [Feature Flags](/feature-flags) it is often useful to have different values for the same flag in different environments.
[Remote Configuration variables](/remote-config) can also be controlled per environment.
When you create a new Environment all Flags will get a default value of `false` for that environment.
================================================
FILE: apps/docs/pages/feature-flags.mdx
================================================
# Feature Flags
A feature flag in Abby is basically just a boolean that can be toggled via the Dashboard in Abby.
This is useful for testing new features, or for hiding features that are not yet ready for production.
A feature flag is always toggled for a certain [Environment](/environments) which allows you to test features in different environments.
For example, you can have a feature flag that is enabled in the `development` environment, but disabled in the `production` environment.
## Basic Usage
When a feature flag is toggled for an environment, every user will see the same value for that feature flag.
If you want to test a feature for a specific user, you can use [A/B Tests](/a-b-testing).
## User Segments & Conditional Rules
Feature flags can be made more powerful with user segments and conditional rules. This allows you to dynamically control flag values based on user properties.
### User Properties
First, define the properties you want to use for targeting in your user segment schema. Common properties include:
- User role/type (string)
- Subscription status (boolean)
- Usage metrics (number)
- Location (string)
- Custom attributes specific to your app
### Conditional Rules
Once you have user properties defined, you can create conditional rules for your feature flags:
- **Single Rules**: Simple conditions like "role equals admin" or "subscriptionActive equals true"
- **Rule Groups**: Complex logic combining multiple conditions with AND/OR operators
- **Operators**: Support for various comparisons:
- Strings: equals, not equals, contains, not contains, starts with, ends with, regex
- Numbers: equals, not equals, greater than, less than, greater/less than or equal
- Booleans: equals
### Example Usage
Here's how it works:
1. Define your user properties in the Abby dashboard
2. Create rules for your feature flags using these properties
3. Update user properties in your application code:
```typescript
// Update user properties
abby.updateUserProperties({
role: "admin",
subscriptionActive: true,
usageCount: 100,
});
```
When evaluating feature flags, Abby will:
1. Check the environment value first
2. Evaluate any conditional rules based on user properties
3. Return the appropriate flag value
This allows for powerful targeting scenarios like:
- Enable features only for admin users
- Show premium features to paid subscribers
- Roll out features gradually based on usage metrics
- Target specific user segments with custom rules
================================================
FILE: apps/docs/pages/index.mdx
================================================
# Introduction
Abby is an open-source, fully-typed Feature Flagging & Remote Config service made for developers.
It aims to be the simpliest way to do Feature Flags and Remote Configuration variables on your website.
We tried to make Abby as simple as possible and create the **best** user experience. Therefore we decided to focus on `React` and `Next.js` for now.
## Getting Started
Before you're able to use Abby, you need to create a free account first.
After you created your account you're able to use Abby. Make sure to read the [React Docs](/integrations/react) to get started.
## Philosophy
Here are some of the things that we believe in:
- **Simplicity** - We believe that A/B testing should be as simple as possible. That's why we created Abby.
- **Security** - All data is hosted in Europe and the code is open source.
- **Transparency** - We don't store any user related data, everything is saved anonymously.
================================================
FILE: apps/docs/pages/integrations/_meta.json
================================================
{
"nextjs": "Next.js",
"react": "React",
"remix": "Remix",
"svelte": "Svelte",
"angular": "Angular",
"node": "Node",
"express": "Express",
"koa": "Koa"
}
================================================
FILE: apps/docs/pages/integrations/angular.mdx
================================================
import { Tab, Tabs, Callout } from "nextra-theme-docs";
# Angular
Our Angular integration works with Angular 15 or later.
## Installation
To get started make sure to install the packages using your favorite package manager.
<Tabs items={["npm", "yarn", "pnpm"]}>
<Tab>
```bash
npm i @tryabby/core
npm i @tryabby/angular
```
</Tab>
<Tab>
```bash
yarn add @tryabby/core
yarn add @tryabby/angular
```
</Tab>
<Tab>
```bash
pnpm i @tryabby/core
pnpm i @tryabby/angular
```
</Tab>
</Tabs>
## Usage
<Callout>Make sure, that you have set skipLibCheck to true in your tsconfig</Callout>
### Create your config
To use Abby you need to create your config first. You can do this by creating a file called `abby.config.ts` in your `root` folder. This file will be used to configure your project.
```ts
// abby.config.ts
import { defineConfig } from "@tryabby/angular";
export default defineConfig({
projectId: "<YOUR_PROJECT_ID>",
currentEnvironment: environment.production ? "production" : "development",
environments: ["production", "development"],
tests: {
test: { variants: ["A", "B"] },
footer: { variants: ["dark", "orange", "green"] },
// ... your tests
},
flags: ["darkMode", "newFeature"],
remoteConfig: {
customButtonText: "String",
},
});
```
### Create your Module
To use Abby in your code you will need to import the AbbyModule in your app module first. You will need to call AbbyModule.forRoot() method with the configuration object. Please copy the id of your project from the dashboard to get started.
```ts
import { AbbyModule } from "@tryabby/angular";
import abbyConfig from "../abby.config";
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule, AbbyModule.forRoot(abbyConfig)],
providers: [],
bootstrap: [AppComponent],
})
export class AppModule {}
```
### Using Abby in your Component
You can now use Abby in your components. You will have access to the `AbbyService` which can be used to get one of your variants, a feature flag, a remote config variable or act on any test.
```tsx
import { AbbyService } from '@tryabby/angular';
@Component({...})
export class MyComponent {
footerVariant$ = this.abbyService.getVariant('footer');
constructor(private abbyService: AbbyService) { }
onAct() {
this.abbyService.onAct('footer');
}
}
```
### Using Abby Directives
You can also use Abby's directives to conditionally render elements based on the variant or feature flag.
```html
<ng-container *abbyFlag="'newFeature'">
<!-- This will only be shown if the newFeature flag is truthy. -->
<p>Here is the new feature</p>
</ng-container>
<ng-container *abbyTest="{testName: 'test', variant: 'A'}">
<!-- This will only be shown if the test variant matches the variant. -->
<p>Here is Variant A</p>
</ng-container>
```
Feature Flags can be inverted by putting a `!` in front of the flagname.
```html
<ng-container *abbyFlag="'!newFeature'">
<!-- This will only be shown if the newFeature flag is falsy. -->
</ng-container>
```
For using variants inside an `ngStyle`-Directive, we advice you to move the logic into the component rather than the template:
```ts
import { AbbyService } from '@tryabby/angular';
@Component({...})
export class MyComponent {
footerVariant$ = this.abbyService.getVariant('footer');
footerColor$ = this.footerVariant$.pipe(
map((footerVariant) => {
switch(footerVariant) {
case 'dark':
return 'black';
case 'orange':
return 'orange';
case 'green':
return 'green';
default:
return 'transparent'
}
})
);
constructor(private abbyService: AbbyService) { }
}
```
You can then consume the footer color in your template using the `async`-Pipe:
```html
<div class="footer" [ngStyle]="{ 'color': footerColor$ | async }">Here is a Foooter</div>
```
### Using Abby Pipes
#### getAbbyVariant
You can use the `getAbbyVariant` Pipe in your template to get the active variant of an AB Test.
```html
<p>{ "MyTestName" | getAbbyVariant | async }</p>
```
Optionally, you can pass in a lookup object, to map your variants to a custom type:
```html
<p>{ "MyTestName" | getAbbyVariant: { A: 123, B: 456, C: 789 } | async }</p>
```
#### getRemoteConfig
You can use the `getRemoteConfig` Pipe in your template to get the value for a Remote Configuration variable.
```html
<button>{{ "customButtonText" | getAbbyRemoteConfig | async }}</button>
```
================================================
FILE: apps/docs/pages/integrations/express.mdx
================================================
import { Tab, Tabs, Callout } from "nextra-theme-docs";
# Express
Our Express package allows you to use Abby within all server-side applications.
If you're using Node < 18 you will need to also install any fetch polyfill.
## Installation
To get started make sure to install the packages using your favorite package manager.
<Tabs items={["npm", "yarn", "pnpm"]}>
<Tab>
```bash
npm i @tryabby/express
```
</Tab>
<Tab>
```bash
yarn add @tryabby/express
```
</Tab>
<Tab>
```bash
pnpm i @tryabby/express
```
</Tab>
</Tabs>
## Usage
### Create your config
To use Abby you need to create your config first. You can do this by creating a file called `abby.config.ts` in your root folder. This file will be used to configure your project.
```ts
// abby.config.ts
import { defineConfig } from "@tryabby/node";
export default defineConfig({
projectId: "<YOUR_PROJECT_ID>",
currentEnvironment: environment.production ? "production" : "development",
environments: ["production", "development"],
tests: {
test: { variants: ["A", "B"] },
footer: { variants: ["dark", "orange", "green"] },
// ... your tests
},
flags: ["darkMode", "newFeature"],
remoteConfig: {
customButtonText: "String",
maxSessionCount: "Number",
},
});
```
### Create your Abby instance
To use Abby in your code you need to call the `createAbby` function
```ts
import { createAbby } from "@tryabby/express";
import abbyConfig from "../abby.config";
const { abby, middleware } = createAbby(abbyConfig);
```
### Using Abby in your code
You can now use Abby in your code. Before you can use Abby inside of your route handlers you will need to add the middleware to your Express app.
#### Middleware
```ts
import express from "express";
import { createAbby } from "@tryabby/express";
import abbyConfig from "../abby.config";
const { abby, middleware } = createAbby(abbyConfig);
const app = express();
app.use(middleware);
app.get("/", (req, res) => {
const testVariant = abby.getTestVariant("test");
if (testVariant === "A") {
// show variant A
} else {
// show variant B
}
});
app.listen(3000, () => {
console.log("Server listening on port 3000");
});
```
#### Feature Flags
You can call the `getFeatureFlag` function to get the value of a feature flag.
Since you loaded all the information from our API this is a synchronous function.
```ts
if (abby.getFeatureFlag("newFeature")) {
// use new algorithm
} else {
// use old algorithm
}
```
#### Remote Configs
You can call the `getRemoteConfig` function to get the value of a remote config.
```ts
const maxSessionCount = abby.getRemoteConfig("maxSessionCount");
if (sessionCount < maxSessionCount) {
// show session
} else {
// show error
}
```
#### A/B Tests
You can call the `getTestVariant` function to get the variant of a test.
```ts
const testVariant = abby.getTestVariant("test");
if (testVariant === "A") {
// show variant A
} else {
// show variant B
}
```
================================================
FILE: apps/docs/pages/integrations/koa.mdx
================================================
import { Tab, Tabs, Callout } from "nextra-theme-docs";
# Koa
Our Koa package allows you to use Abby within all server-side applications.
If you're using Node < 18 you will need to also install any fetch polyfill.
## Installation
To get started make sure to install the packages using your favorite package manager.
<Tabs items={["npm", "yarn", "pnpm"]}>
<Tab>
```bash
npm i @tryabby/koa
```
</Tab>
<Tab>
```bash
yarn add @tryabby/koa
```
</Tab>
<Tab>
```bash
pnpm i @tryabby/koa
```
</Tab>
</Tabs>
## Usage
### Create your config
To use Abby you need to create your config first. You can do this by creating a file called `abby.config.ts` in your root folder. This file will be used to configure your project.
```ts
// abby.config.ts
import { defineConfig } from "@tryabby/node";
export default defineConfig({
projectId: "<YOUR_PROJECT_ID>",
currentEnvironment: environment.production ? "production" : "development",
environments: ["production", "development"],
tests: {
test: { variants: ["A", "B"] },
footer: { variants: ["dark", "orange", "green"] },
// ... your tests
},
flags: ["darkMode", "newFeature"],
remoteConfig: {
customButtonText: "String",
maxSessionCount: "Number",
},
});
```
### Create your Abby instance
To use Abby in your code you need to call the `createAbby` function
```ts
import { createAbby } from "@tryabby/koa";
import abbyConfig from "../abby.config";
const { abby, middleware } = createAbby(abbyConfig);
```
### Using Abby in your code
You can now use Abby in your code. Before you can use Abby inside of your route handlers you will need to add the middleware to your Koa app.
#### Middleware
```ts
import Koa from "Koa";
import { createAbby } from "@tryabby/koa";
import abbyConfig from "../abby.config";
const { abby, middleware } = createAbby(abbyConfig);
const app = new Koa();
app.use(middleware);
// ... your routes
app.listen(3000, () => {
console.log("Server listening on port 3000");
});
```
#### Feature Flags
You can call the `getFeatureFlag` function to get the value of a feature flag.
Since you loaded all the information from our API this is a synchronous function.
```ts
if (abby.getFeatureFlag("newFeature")) {
// use new algorithm
} else {
// use old algorithm
}
```
#### Remote Configs
You can call the `getRemoteConfig` function to get the value of a remote config.
```ts
const maxSessionCount = abby.getRemoteConfig("maxSessionCount");
if (sessionCount < maxSessionCount) {
// show session
} else {
// show error
}
```
#### A/B Tests
You can call the `getTestVariant` function to get the variant of a test.
```ts
const testVariant = abby.getTestVariant("test");
if (testVariant === "A") {
// show variant A
} else {
// show variant B
}
```
================================================
FILE: apps/docs/pages/integrations/nextjs.mdx
================================================
import { Tab, Tabs, Callout } from "nextra-theme-docs";
# Next.js
Our Next.js integration works with Next.js 12 or later. It uses the React SDK under the hood and just has some additional features for Next.js.
## Installation
To get started make sure to install the package using your favorite package manager.
<Tabs items={["npm", "yarn", "pnpm"]}>
<Tab>
```bash
npm i @tryabby/next
```
</Tab>
<Tab>
```bash
yarn add @tryabby/next
```
</Tab>
<Tab>
```bash
pnpm i @tryabby/next
```
</Tab>
</Tabs>
### Create your config
To use Abby you need to create your config first. You can do this by creating a file called `abby.config.ts` in your `root` folder. This file will be used to configure your project.
```ts
// abby.config.ts
import { defineConfig } from "@tryabby/next";
export default defineConfig({
projectId: "<YOUR_PROJECT_ID>",
currentEnvironment: process.env.NODE_ENV,
environments: ["production", "development"],
tests: {
test: { variants: ["A", "B"] },
footer: { variants: ["dark", "orange", "green"] },
// ... your tests
},
flags: ["darkMode", "newFeature"],
remoteConfig: {
customButtonText: "String",
},
});
```
### Create your Instance
To use Abby in your code you will need to create a typed Hook and Provider first. You can do this by using the `createAbby` function.
Please copy the id of your project from the dashboard to get started.
```tsx
import { createAbby } from "@tryabby/next";
import abbyConfig from "../abby.config";
const { AbbyProvider, useAbby, withAbby } = createAbby(abbyConfig);
```
### Wrap your Application
You will need to wrap your application with the `AbbyProvider` to make sure the hook works.
This is done in the `_app.tsx` / `_app.js` file in your Next.js project.
```tsx
import { AbbyProvider } from "../lib/abby";
function MyApp({ Component, pageProps }) {
return (
<AbbyProvider>
<Component {...pageProps} />
</AbbyProvider>
);
}
export default MyApp;
```
<Callout type="info" emoji="💡">
If you want to improve the experience read the following section.
</Callout>
By default the `AbbyProvider` will fetch the data from the server on the first render (client side). This can be improved by using the `initialData` prop. This will make sure the data is already available on the first render
This works really well with Static Site Generation (SSG) and Server Side Rendering (SSR).
```tsx /withAbby(MyApp)/
import { AbbyProvider, withAbby } from "../lib/abby";
function MyApp({ Component, pageProps: { __ABBY_PROJECT_DATA__, ...pageProps } }) {
return (
<AbbyProvider initialData={__ABBY_PROJECT_DATA__}>
<Component {...pageProps} />
</AbbyProvider>
);
}
export default withAbby(MyApp);
```
## Usage
For the hook usage please read the [React SDK](/integrations/react#usage) documentation.
================================================
FILE: apps/docs/pages/integrations/node.mdx
================================================
import { Tab, Tabs, Callout } from "nextra-theme-docs";
# Node.js
Our Node.js package allows you to use Abby within all server-side applications.
If you're using Node < 18 you will need to also install any fetch polyfill.
## Installation
To get started make sure to install the packages using your favorite package manager.
<Tabs items={["npm", "yarn", "pnpm"]}>
<Tab>
```bash
npm i @tryabby/node
```
</Tab>
<Tab>
```bash
yarn add @tryabby/node
```
</Tab>
<Tab>
```bash
pnpm i @tryabby/node
```
</Tab>
</Tabs>
## Usage
### Create your config
To use Abby you need to create your config first. You can do this by creating a file called `abby.config.ts` in your root folder. This file will be used to configure your project.
```ts
// abby.config.ts
import { defineConfig } from "@tryabby/node";
export default defineConfig({
projectId: "<YOUR_PROJECT_ID>",
currentEnvironment: environment.production ? "production" : "development",
environments: ["production", "development"],
tests: {
test: { variants: ["A", "B"] },
footer: { variants: ["dark", "orange", "green"] },
// ... your tests
},
flags: ["darkMode", "newFeature"],
remoteConfig: {
customButtonText: "String",
maxSessionCount: "Number",
},
});
```
### Create your Abby instance
To use Abby in your code you need to call the `createAbby` function
```ts
import { createAbby } from "@tryabby/node";
import abbyConfig from "../abby.config";
export const abby = createAbby(abbyConfig);
```
### Using Abby in your code
You can now use Abby in your code.
<Callout type="warning" emoji="💡">
Before you're trying to read Feature Flags, Remote Configs or A/B Test you should call the
`.loadProjectData()` function. This retrieves all the needed information from our API. If you
don't call it fallbacks will be used.
</Callout>
#### Feature Flags
You can call the `getFeatureFlag` function to get the value of a feature flag.
Since you loaded all the information from our API this is a synchronous function.
```ts
if (abby.getFeatureFlag("newFeature")) {
// use new algorithm
} else {
// use old algorithm
}
```
#### Remote Configs
You can call the `getRemoteConfig` function to get the value of a remote config.
```ts
const maxSessionCount = abby.getRemoteConfig("maxSessionCount");
if (sessionCount < maxSessionCount) {
// show session
} else {
// show error
}
```
#### A/B Tests
You can call the `getTestVariant` function to get the variant of a test.
```ts
const testVariant = abby.getTestVariant("test");
if (testVariant === "A") {
// show variant A
} else {
// show variant B
}
```
================================================
FILE: apps/docs/pages/integrations/react.mdx
================================================
import { Tab, Tabs, Callout } from "nextra-theme-docs";
# React
Our React integration works with React 16.8.0 or later. It works with SPAs as well as server side rendered apps.
<Callout>
If you're using Next.js please check out our [Next integration](/integrations/nextjs)
</Callout>
## Installation
To get started make sure to install the package using your favorite package manager.
<Tabs items={["npm", "yarn", "pnpm"]}>
<Tab>
```bash
npm i @tryabby/react
```
</Tab>
<Tab>
```bash
yarn add @tryabby/react
```
</Tab>
<Tab>
```bash
pnpm i @tryabby/react
```
</Tab>
</Tabs>
### Create your config
To use Abby you need to create your config first. You can do this by creating a file called `abby.config.ts` in your `root` folder. This file will be used to configure your project.
```ts
// abby.config.ts
import { defineConfig } from "@tryabby/react";
export default defineConfig({
projectId: "<YOUR_PROJECT_ID>",
currentEnvironment: process.env.NODE_ENV,
environments: ["production", "development"],
tests: {
test: { variants: ["A", "B"] },
footer: { variants: ["dark", "orange", "green"] },
// ... your tests
},
flags: ["darkMode", "newFeature"],
remoteConfig: {
customButtonText: "String",
},
});
```
### Create your Instance
To use Abby in your code you will need to create a typed Hook and Provider first. You can do this by using the `createAbby` function.
Please copy the id of your project from the dashboard to get started.
```jsx
import { createAbby } from "@tryabby/react";
import abbyConfig from "../abby.config";
export const { AbbyProvider, useAbby, useFeatureFlag, useRemoteConfig } = createAbby(abbyConfig);
```
### Wrap your Application
You will need to wrap your application with the `AbbyProvider` to make sure the hook works.
If you're using Next.js you should do this in the `_app.js` file.
You can now import the hooks created by `createAbby` and use it in your components.
## Usage
### useAbby
The `useAbby` hook returns an object with the following values:
- `variant` - The variant that is currently active
- `onAct` - A function that you can call to trigger any kind of interaction with the tested component (will be used to track conversions)
```tsx
import { useAbby } from "./abby";
function MyButton() {
const { variant, onAct } = useAbby("footer");
return (
<main className="p-6">
<h1>Abby Test Page:</h1>
<button
className={`rounded-lg py-2 px-4
${variant === "dark" && "bg-gray-900 text-white"}
${variant === "orange" && "bg-orange-500 text-white"}
${variant === "green" && "bg-green-500 text-white"}`}
onClick={onAct}
>
Cool Button
</button>
</main>
);
}
```
Optionally, you can pass a lookup object to automatically map the selected variant to a custom value.
```tsx
import { useAbby } from "./abby";
function MyButton() {
const { variant, onAct } = useAbby("footer", {
dark: "bg-gray-900",
orange: "bg-orange-500",
green: "bg-green-500",
});
return (
<main className="p-6">
<h1>Abby Test Page:</h1>
<button className={`rounded-lg py-2 px-4 text-white ${variant}`} onClick={onAct}>
Cool Button
</button>
</main>
);
}
```
### useFeatureFlag
The `useFeatureFlag` hook returns a boolean value that indicates if the flag is active or not.
```tsx
import { useFeatureFlag } from "./abby";
function HomePage() {
const hasNewFeature = useFeatureFlag("newFeature");
return (
<main className="p-6">
<h1>Welcome back, User</h1>
{hasNewFeature && <p>Here is the new feature</p>}
<p>This is our super boring page</p>
</main>
);
}
```
### useRemoteConfig
The `useRemoteConfig` hook returns a value as specified in your `abby.config.ts`.
The type of the returned value will automatically be inferred from your config.
```tsx
import { useRemoteConfig } from "./abby";
function HomePage() {
const customButtonText = useRemoteConfig("customButtonText");
return (
<main className="p-6">
<h1>Welcome back, User</h1>
<button>{customButtonText}</button>
</main>
);
}
```
================================================
FILE: apps/docs/pages/integrations/remix.mdx
================================================
import { Tab, Tabs, Callout } from "nextra-theme-docs";
# Remix
Our Remix integration works with Remix v2 or later. It uses the React SDK under the hood and just has some additional features for Remix.
## Installation
To get started make sure to install the package using your favorite package manager.
<Tabs items={["npm", "yarn", "pnpm"]}>
<Tab>
```bash
npm i @tryabby/remix
```
</Tab>
<Tab>
```bash
yarn add @tryabby/remix
```
</Tab>
<Tab>
```bash
pnpm i @tryabby/remix
```
</Tab>
</Tabs>
### Create your config
To use Abby you need to create your config first. You can do this by creating a file called `abby.config.ts` in your `root` folder. This file will be used to configure your project.
```ts
// abby.config.ts
import { defineConfig } from "@tryabby/remix";
export default defineConfig({
projectId: "<YOUR_PROJECT_ID>",
currentEnvironment: process.env.NODE_ENV,
environments: ["production", "development"],
tests: {
test: { variants: ["A", "B"] },
footer: { variants: ["dark", "orange", "green"] },
// ... your tests
},
flags: ["darkMode", "newFeature"],
remoteConfig: {
customButtonText: "String",
},
});
```
### Create your Instance
To use Abby in your code you will need to create a typed Hook and Provider first. You can do this by using the `createAbby` function.
Please copy the id of your project from the dashboard to get started.
```tsx
import { createAbby } from "@tryabby/remix";
import abbyConfig from "../abby.config";
const { AbbyProvider, useAbby } = createAbby(abbyConfig);
```
### Wrap your Application
You will need to wrap your application with the `AbbyProvider` to make sure the hook works.
This is done in the `root.tsx` / `root.js` file in your Next.js project.
```tsx
import { AbbyProvider } from "../lib/abby";
export function Layout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<head>
<meta charSet="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<Meta />
<Links />
</head>
<body>
<AbbyProvider>
{children}
<ScrollRestoration />
<Scripts />
</AbbyProvider>
</body>
</html>
);
}
```
<Callout type="info" emoji="💡">
If you want to improve the experience read the following section.
</Callout>
By default the `AbbyProvider` will fetch the data from the server on the first render (client side). This can be improved by using a `loader`. This will make sure the data is already available on the first render
This allows you to use Server Side Reendering (SSR) with Abby.
Doing this will prevent Flash of Original Content (FOOC) and improve the user experience.
```tsx /await getAbbyData(ctx)/
import { AbbyProvider, getAbbyData } from "../lib/abby";
export const loader = async (ctx) => {
return json({
...(await getAbbyData(ctx)),
});
};
export function Layout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<head>
<meta charSet="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<Meta />
<Links />
</head>
<body>
<AbbyProvider>
{children}
<ScrollRestoration />
<Scripts />
</AbbyProvider>
</body>
</html>
);
}
export default withAbby(MyApp);
```
## Usage
For the hook usage please read the [React SDK](/integrations/react#usage) documentation.
================================================
FILE: apps/docs/pages/integrations/svelte.mdx
================================================
import { Tab, Tabs, Callout } from "nextra-theme-docs";
# Svelte
Our Svelte integration works with Svelte version??? It works with SPAs as well as server side rendered apps.
## Installation
To get started make sure to install the package using your favorite package manager.
<Tabs items={["npm", "yarn", "pnpm"]}>
<Tab>
```bash
npm i @tryabby/svelte
```
</Tab>
<Tab>
```bash
yarn add @tryabby/svelte
```
</Tab>
<Tab>
```bash
pnpm i @tryabby/svelte
```
</Tab>
</Tabs>
## Usage
### Create your config
To use Abby you need to create your config first. You can do this by creating a file called `abby.config.ts` in your `root` folder. This file will be used to configure your project.
```ts
// abby.config.ts
import { defineConfig } from "@tryabby/svelte";
export default defineConfig({
projectId: "<YOUR_PROJECT_ID>",
currentEnvironment: process.env.NODE_ENV,
environments: ["production", "development"],
tests: {
test: { variants: ["A", "B"] },
footer: { variants: ["dark", "orange", "green"] },
// ... your tests
},
flags: ["darkMode", "newFeature"],
remoteConfig: {
customButtonText: "String",
},
});
```
### Create your Instance
To use Abby in your code you will need to create a typed Hook and Provider first. You can do this by using the `createAbby` function.
Please copy the id of your project from the dashboard to get started.
```jsx
import { createAbby } from "@tryabby/svelte";
import abbyConfig from "../abby.config";
const { AbbyProvider, useAbby } = createAbby(abbyConfig);
```
### Wrap your Application
You will need to wrap your application in a layout containing the `AbbyProvider` to make sure the hook works.
```svelte
//+layout.svelte
<script lang="ts">
import { abby } from "$lib/abby";
import type { LayoutServerData } from "./$types";
const Provider = abby.AbbyProvider;
export let data: LayoutServerData;
const Devtools = abby.withDevTools();
</script>
<Provider {data} abby={abby.__abby__}>
<Devtools abby={abby.__abby__} props={{ defaultShow: true }} />
<slot />
</Provider>
```
If you want to use SSR you also need to provide a +layout.server.ts
```tsx
import { abby } from "$lib/abby";
export const load = abby.withAbby();
```
You can now import the functions created by `createAbby` and use it in your components.
## useAbby
The `useAbby` function returns an object with the following values:
- `variant` - A store providing the variant which is currently active
- `onAct` - A function that you can call to trigger any kind of interaction with the tested component (will be used to track conversions)
```svelte
<script lang="ts">
import { abby } from "$lib/abby";
const { variant, onAct } = abby.useAbby("New Test3");
</script>
<body>
<h1>Abby Test Page:</h1>
{#if $variant === "A"}
<button on:click={onAct}> A</button>
{:else}
<button on:click={onAct}> B</button>
{/if}
</body>
```
Optionally, you can provide a lookup object to map the active to a custom value.
```svelte
<script lang="ts">
import { abby } from "$lib/abby";
const { variant , onAct } = abby.useAbby("test", {
A: "Hello",
B: "Goodbye"
});
</script>
<body>
<h1>Abby Test Page:</h1>
<p>{ variant } World!</p>
</body>
```
## useFeatureFlag
The `useFeatureFlag` function returns a store providing a boolean value that indicates if the flag is active or not.
```svelte
<script lang="ts">
import { abby } from "$lib/abby";
const newFeature = abby.useFeatureFlag("newFeature");
</script>
<body>
{#if $newFeature}
my super secret feature
{/if}
</body>
```
## useRemoteConfig
The `useRemoteConfig` function returns a store providing a custom value as specified in your `abby.config.ts`.
The return type will automatically be inferred from your config.
```svelte
<script lang="ts">
import { abby } from "$lib/abby";
const customButtonText = abby.useRemoteConfig("customButtonText");
</script>
<body>
<button>{$customButtonText}</button>
</body>
```
================================================
FILE: apps/docs/pages/nextjs.mdx
================================================
import { Tab, Tabs } from "nextra-theme-docs";
# Using Abby with Next.js
Abby was built to be the best solution for Feature Flags, A/B Testing and Remote Configuration variables in Next.js.
It deeply integrates with Next.js and provides a seamless developer experience.
## Installation
Install the `@tryabby/next` package using your favorite package manager:
<Tabs items={["npm", "yarn", "pnpm"]}>
<Tab>
```bash
npm i @tryabby/next
```
</Tab>
<Tab>
```bash
yarn add @tryabby/next
```
</Tab>
<Tab>
```bash
pnpm i @tryabby/next
```
</Tab>
</Tabs>
## Configuration
In order to use Abby you need to create a **free** account at [tryabby.com](https://www.tryabby.com) first.
You can then use the button in the top right corner of the dashboard to easily copy your Abby config.
Create a file called `abby.config.ts` in the root folder of your project. That's it! You're ready to go!
For this example my `abby.config.ts` file looks like this:
```ts
// abby.config.ts
import { defineConfig } from "@tryabby/next";
export default defineConfig({
projectId: "YOUR_PROJECT",
// For testing purposes we only want to use the production environment
currentEnvironment: "production",
environments: ["production"],
tests: {
theme: {
variants: ["light", "dark"],
},
},
flags: ["useDarkMode"],
remoteConfig: {
customButtonText: "String",
},
});
```
After that you need to create a file called `lib/abby.ts` in your project.
This file will contain all the code (e.g. the Abby hooks) that is needed to integrate Abby into your app.
````ts
// lib/abby.ts
import { createAbby } from "@tryabby/next";
import config from "../abby.config";
export const { withAbby, AbbyProvider, useFeatureFlag, useAbby, withAbbyApiHandler, withAbbyEdge, useRemoteConfig } = createAbby(config);
```
Now you will need to wrap your app with the `AbbyProvider` component. This is done in the `_app.tsx` file.
If you also wrap your app with `withAbby`, you will have access to the Feature Flags for Server Side Rendering or Static Generation as well.
This is highly recommended so that there is no flicker on the inital load of your app. It also allows for proper crawling of your app by search engines.
```tsx
// _app.tsx
import { AbbyProvider } from "lib/abby";
function MyApp({ Component, pageProps: { __ABBY_PROJECT_DATA__, ...pageProps } }) {
return (
<AbbyProvider initialData={__ABBY_PROJECT_DATA__}>
<Component {...pageProps} />
</AbbyProvider>
);
}
export default withAbby(MyApp);
````
If you only want client side rendering, you can skip the `withAbby` part and just wrap your app with the `AbbyProvider` (and omit `initialData`).
## Usage
### Hooks
#### Feature Flags
```tsx
// index.tsx
import { useFeatureFlag } from "lib/abby";
export function HomePage() {
const useDarkmode = useFeatureFlag("useDarkmode");
return (
<>
<h1>My Homepage</h1>
{useDarkmode && <p>Darkmode is enabled</p>}
</>
);
}
```
You can now go to the Abby dashboard and enable the `useDarkmode` flag for your project. You will see the text "Darkmode is enabled" on your homepage.
#### Remote Configuration
```tsx
// index.tsx
import { useRemoteConfig } from "lib/abby";
export function HomePage() {
const customButtonText = useRemoteConfig("customButtonText");
return (
<>
<h1>My Homepage</h1>
<button>{customButtonText}</button>
</>
);
}
```
You can now control the text, which the button is displaying, on the Abby dashboard.
#### A/B Tests
```tsx
// index.tsx
export function HomePage() {
const { variant, onAct } = useAbby("theme");
return (
<>
<h1>My Homepage</h1>
<button
onClick={() => {
onAct();
// React to the user clicking the button
}}
className={`button ${variant === "dark" && "bg-dark"} ${variant === "light" && "bg-light"}`}
>
BUY IT
</button>
</>
);
}
```
This is a simple example of an A/B Test. Once you loaded the page you will get either the "light" or the "dark" variant of the button.
### Non-React Context
You might want to use Abby outside of React. For example in your app's middleware or in a Next.js API route.
#### Edge Functions
[Edge Functions](https://vercel.com/docs/concepts/functions/edge-functions) are Vercel's globally distributed serverless functions.
They are a great way to run code on the edge of the Vercel network and use a leaner runtime with less functionality.
Abby works perfectly with Edge Functions.
The best usecase with Edge Functions and Abby is to use them in your middleware, for example to redirect users to a beta version of your app.
```ts
// middleware.ts
import { withAbbyEdge } from "lib/abby";
import { NextResponse } from "next/server";
export default withAbbyEdge((req) => {
const myFlag = getFeatureFlagValue("test-flag");
// make sure to use the req object here
const [currentVariant, setCookie] = getABTestValue("test-abtest", req);
if (myFlag && currentVariant === "beta-user") {
const res = NextResponse.redirect("/beta");
// update the user's cookie
setCookie(res);
return res;
}
return NextResponse.next();
});
```
#### API Routes
You can access feature flags and A/B tests in your API routes as well.
```ts
// /api/test.ts
import { withAbbyApiHandler } from "lib/abby";
export default withAbbyApiHandler((req, res) => {
const myFlag = getFeatureFlagValue("test-flag");
// make sure to use the req object here
const [currentVariant, setCookie] = getABTestValue("test-abtest", req);
if (myFlag && currentVariant === "beta-user") {
// update the user's cookie
setCookie(res);
return res.status(200).end();
}
res.status(404).end();
});
```
================================================
FILE: apps/docs/pages/reference/_meta.json
================================================
{
"nextjs": "Next.js",
"react": "React",
"remix": "Remix",
"svelte": "Svelte",
"angular": "Angular",
"http": "HTTP API",
"cli": "CLI",
"operators": "Operators"
}
================================================
FILE: apps/docs/pages/reference/angular.mdx
================================================
# @tryabby/angular
## AbbyModule
The AbbyModule is an Angular module that provides a service and some directives to work with Abby.
You can then use the AbbyService in your components or services to interact with the Abby platform. The AbbyFlag, AbbyTest and DevtoolsComponent directives can be used in your templates to show/hide content based on feature flags or AB tests.
### Parameters
The `AbbyModule.forRoot()` method takes an object as a parameter. The object can contain the following properties:
| Name | Type | Required | Description | details |
| ------------------ | -------- | :------: | ------------------------------------------------------------------ | --------------------- |
| projectId | `string` | ✅ | The ID of your project in Abby | - |
| apiUrl | `string` | | The URL of the Abby API. Defaults to the hosted version | - |
| currentEnvironment | `string` | ✅ | The current environment of your application | [link](/environments) |
| tests | `object` | | An object containing your defined A/B Tests | - |
| flags | `array` | | An array containing your defined Feature Flags | - |
| remoteConfig | `object` | | An object containing the name of your remote config and their type | - |
| settings | `object` | | An object with additional settings for Abby | - |
#### properties
##### tests
The tests property is an object containing your defined A/B Tests. You probably want to use the Copy Button in your dashboard to copy the tests object.
They keys of the object represent the names of your predefined A/B tests. The values are objects containing the following properties:
| Name | Type | Required | Description |
| -------- | --------------- | :------: | ------------------------------------------------------- |
| variants | `Array<string>` | ✅ | An array of strings containing the variants of the test |
##### flags
The flags property is an array containing your defined Feature Flags. You probably want to use the Copy Button in your dashboard to copy the flags array.
##### Example
###### abby.config.ts
```ts
export const abby = {
// ..your config
tests: {
test: {
variants: ["control", "variant-a", "variant-b"],
},
},
flags: ["test-flag"],
remoteConfig: {
remoteConfig1: "String",
remoteConfig2: "Number",
remoteConfig3: "JSON",
},
};
@Injectable({
providedIn: "root",
useExisting: AbbyService,
})
export class Abby extends AbbyService<
InferFlagNames<typeof abby>,
InferTestNames<typeof abby>,
InferTests<typeof abby>,
InferRemoteConfig<typeof abby>,
InferRemoteConfigName<typeof abby>
> {}
```
###### app.module.ts
```ts
import { AbbyModule } from "abby";
import { Abby, abby } from "./abby";
@NgModule({
// your config
imports: [
// your imports
AbbyModule.forRoot(abby),
],
providers: [
{
provide: APP_INITIALIZER,
useFactory: (abby: Abby) => () => abby.init(),
deps: [Abby],
multi: true,
},
],
})
export class AppModule {}
```
#### settings
The settings property is an object containing additional settings for Abby. The following properties are available:
- `flags.defaultValue`: Allows you to set a general default boolean value for each Feature Flag type.
```json
flags: {
defaultValue: false,
},
```
- `flags.devOverrides`: An object containing the values of feature flags in development mode. The keys of the object represent the names of the flags.
- `remoteConfig.defaultValue`: Allows you to set default values for the possible Remote Config types.
```json
remoteConfig: {
defaultValues: {
String: "",
Number: 0,
JSON: {},
},
},
```
- `remoteConfig.devOverrides`: An object containing the values of Remote Configuration variables in development mode.
The keys of the object represent the names of the flags. The value must be assignable to the type of the variable.
## AbbyService
- `AbbyService` is a angular service, which provides methods for getting
### getVariant(testName: string, lookupObject?)
Resolves the selected variant for a given test name.
Automatically maps the active variant to a custom value if `lookupObject` is provided.
#### Parameters
- `testName`: The name of the test, needs to be one of the defined tests.
- `lookupObject`: An optional lookup object to automatically map the active variant to a custom value.
#### Return Value
The variant of the test _Type: `string`_
Or the custom value from the `lookupObject` when provided
### getFeatureFlagValue(flagName: string)
Resolves the value of a feature flag by the flagname.
#### Parameters
The name of the flag, needs to be one of the defined flags.
#### Return Value
The value of the flag _Type: `boolean`_
### getRemoteConfig
`getRemoteConfig` is a function to access the value of a Remote Configuration variable. This can be called in a non-react scope (Regular Typescript, Edge Functions and API Routes)
#### Parameters
The name of the Remote Configuration variable, which needs to be one of the keys in your `remoteConfig` object in your `abby.config.ts`.
#### Return Value
The current value of the Remote Configuration variable. The type will be according to the specified type in the `abby.config.ts`
### onAct
A function to call when the user performs an action associated with the test _Type: `function`_
## Directives
### Test Directive
The `AbbyTest` is an Angular directive provided by @tryabby/angular package that enables conditional rendering of components based on the selected variant of an A/B test. It works in conjunction with the AbbyService and is used to wrap the HTML code to be conditionally rendered.
#### Parameters
- `testName`: The name of the test, needs to be one of the defined tests.
- `variant`: The name of the variant to compare with the selected variant of the test.
#### Example
```html
<ng-container *abbyTest="{ testName: 'test-abtest', variant: 'variant-a' }">AAAAAA</ng-container>
<ng-container *abbyTest="{ testName: 'test-abtest', variant: 'variant-b' }">BBBBBB</ng-container>
```
### Flag Directive
The AbbyFlag is an Angular directive provided by @tryabby/core package that enables conditional rendering of components based on the value of a feature flag. It works in conjunction with the AbbyService and is used to wrap the HTML code to be conditionally rendered.
#### Parameters
The name of the feature flag. The name can be prefixed with ! to invert the flag value.
#### Example
```html
<div *featureFlag="'test-flag'"></div>
```
## Pipes
### getAbbyVariant Pipe
Returns the active variant for an AB-Test.
Automatically maps the active variant to a custom value if `lookupObject` is provided.
#### Parameters
- `testName`: The name of the test, needs to be one of the defined tests.
- `lookupObject`: An optional lookup object to automatically map the active variant to a custom value.
#### Example
```html
<h4
[ngStyle]="{
'color': 'AngularTest'
| getAbbyVariant: { A: 'blue', B: 'green', C: 'yellow', D: 'pink' }
| async
}"
>
Variants Pipe
</h4>
```
### getAbbyRemoteConfig Pipe
Returns the current value for a Remote Configuration variable.
#### Parameters
The name of the Remote Configuration variable, which needs to be one of the keys in your `remoteConfig` object in your ABBY config.
#### Example
```html
<p>angularRemoteConfig: {{ "angularRemoteConfig" | getAbbyRemoteConfig | async }}</p>
```
## Devtool Component
The DevtoolsComponent is an Angular component provided by @tryabby/angular package that renders the Abby Devtools in your application. The component is used to wrap the HTML code that renders the Abby Devtools.
The DevtoolsComponent won't work with Server Side Rendering using Angular Universal.
### Example
```html
<abby-devtools></abby-devtools>
```
================================================
FILE: apps/docs/pages/reference/cli.mdx
================================================
import { Tab, Tabs, Callout } from "nextra-theme-docs";
# Command Line Interface (CLI)
The Abby CLI works with Node 10.x or higher.
## Installation
To get started make sure to install the packages using your favorite package manager.
<Tabs items={["npm", "yarn", "pnpm"]}>
<Tab>
```bash
npm i -g @tryabby/cli
```
</Tab>
<Tab>
```bash
yarn add -g @tryabby/cli
```
</Tab>
<Tab>
```bash
pnpm i -g @tryabby/cli
```
</Tab>
</Tabs>
## Usage
To get started with the CLI, you need to authenticate yourself. You can do this by running the `login` command.
You will need to obtain an API key from the [Abby Dashboard](https://www.tryabby.com/profile) first. After you have obtained your API key, run the following command:
```bash
abby login -t [YOUR_TOKEN]
```
When you have successfully authenticated yourself, you can start using the CLI.
## Commands
### `login`
Authenticate yourself with the Abby API.
#### Options
| Flag | Description | Default | Required |
| --------------- | ------------- | ----------- | -------- |
| `-t`, `--token` | Your API key. | `undefined` | ✅ |
### `init`
Create a new config file in the current directory. The config file will be named `abby.config.ts`.
#### Options
| Flag | Description | Default | Required |
| ---------------- | ---------------------------- | ---------------------- | -------- |
| `-c`, `--config` | The path to the config file. | Your current directory | ❌ |
### `push`
Push the changes from your local config to the Abby API.
The updates in the cloud will happen follwing those rules
- If a new test is added, it will be created in the cloud
- If a new environment is added, it will be created in the cloud
- If a new flag is added, it will be created in the cloud
**Caveats:**
You will need to delete flags, tests and environments in the dashboard if you want to fully delete it.
You will then need to delete it manually from your local config. **We are working on a better solution for this.**
#### Options
| Flag | Description | Default | Required |
| ---------------- | ---------------------------------- | ---------------------------------------------- | -------- |
| `-h`, `--host` | The API URL for the Abby instance. | `https://www.tryabby.com` | ❌ |
| `-c`, `--config` | The path to the config file. | The nearest `abby.config.(ts,js,mjs,cjs)` file | ❌ |
### `add flag`
Creates a flag, puts it into your `abby.config.ts` (or specified config file) and pushes the changes to the cloud.
If a flag with the name, which you have entered, already exists, this command will fail.
#### Options
| Flag | Description | Default | Required |
| ---------------- | ---------------------------------- | ---------------------------------------------- | -------- |
| `-h`, `--host` | The API URL for the Abby instance. | `https://www.tryabby.com` | ❌ |
| `-c`, `--config` | The path to the config file. | The nearest `abby.config.(ts,js,mjs,cjs)` file | ❌ |
### `add config`
Creates a remote config value, puts it into your `abby.config.ts` (or specified config file) and pushes the changes to the cloud.
If a remote config with the name, which you have entered, already exists, this command will fail.
#### Options
| Flag | Description | Default | Required |
| ---------------- | ---------------------------------- | ---------------------------------------------- | -------- |
| `-h`, `--host` | The API URL for the Abby instance. | `https://www.tryabby.com` | ❌ |
| `-c`, `--config` | The path to the config file. | The nearest `abby.config.(ts,js,mjs,cjs)` file | ❌ |
### `pull`
Pull the changes from the Abby API to your local config. It will merge the changes from the cloud with your local config.
#### Options
| Flag | Description | Default | Required |
| ---------------- | ---------------------------------- | ---------------------------------------------- | -------- |
| `-h`, `--host` | The API URL for the Abby instance. | `https://www.tryabby.com` | ❌ |
| `-c`, `--config` | The path to the config file. | The nearest `abby.config.(ts,js,mjs,cjs)` file | ❌ |
### `check`
Check if your local config is in sync with the Abby API. It will return a list of changes that need to be pushed or pulled.
#### Options
| Flag | Description | Default | Required |
| ---------------- | ---------------------------------- | ---------------------------------------------- | -------- |
| `-h`, `--host` | The API URL for the Abby instance. | `https://www.tryabby.com` | ❌ |
| `-c`, `--config` | The path to the config file. | The nearest `abby.config.(ts,js,mjs,cjs)` file | ❌ |
================================================
FILE: apps/docs/pages/reference/http.mdx
================================================
# API Reference (HTTP API)
## Endpoints
- [GET `/api/v1/data/:projectId`](#get-apiv1dataprojectid)
- [GET `/api/v1/data/:projectId.js`](#get-apiv1dataprojectidjs)
- [POST `/api/v1/track`](#post-apiv1track)
### GET `/api/v1/data/:projectId`
Returns the data for the given project.
#### Query Parameters
- `environment`: The environment to filter by
#### Path Parameters
- `projectId`: The project ID.
#### Response
```json
{
"tests": [
{
"name": "Test 1",
"weights": [0.5, 0.5]
}
],
"flags": [
{
"name": "Flag 1",
"value": true
}
],
"remoteConfig": [
{
"name": "Remote Config 1",
"value": "Foobar"
}
]
}
```
### GET `/api/v1/data/:projectId/script.js`
Gives the same response as `/api/v1/data/:projectId`, but in JavaScript format.
You can use this endpoint to load the data in the browser using a `<script>` tag.
This is useful if you want to load the data in the browser without having to
wait for the UI framework to load and hydrate. This is mostly the case for SPAs
#### Query Parameters
- `environment`: The environment to filter by.
#### Path Parameters
- `projectId`: The project ID.
#### Response
```js
window.__abby_data__ = {
tests: [
{
name: "Test 1",
weights: [0.5, 0.5],
},
],
flags: [
{
name: "Flag 1",
value: true,
},
],
remoteConfig: [
{
name: "Remote Config 1",
value: "Foobar",
},
],
};
```
### POST `/api/v1/track`
Tracks an event.
#### Request Body
The `type` field can be either `0` (track view) or `1` (track interaction).
```json
{
"type": 1,
"projectId": "<PROJECT_ID>",
"testName": "<TEST_NAME>",
"selectedVariant": "<SELECTED_VARIANT>"
}
```
================================================
FILE: apps/docs/pages/reference/nextjs.mdx
================================================
# API Reference (Next.js)
## createAbby
### Parameters
The `createAbby` function takes an object as a parameter. The object can contain the following properties:
| Name | Type | Required | Description | details |
| ------------------ | -------- | :------: | ------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
| projectId | `string` | ✅ | The ID of your project in Abby | - |
| apiUrl | `string` | | The URL of the Abby API. Defaults to the hosted version | - |
| currentEnvironment | `string` | ✅ | The current environment of your application | [link](/environments) |
| tests | `object` | | An object containing your defined A/B Tests | - |
| flags | `array` | | An array containing your defined Feature Flags | - |
| remoteConfig | `object` | | An object containing the name of your remote config and their type | - |
| settings | `object` | | An object with additional settings for Abby | - |
| user | `object` | | Optional configuration for user properties that can be used for targeting feature flags. This enables conditional rules based on user attributes. | - |
#### tests
The tests property is an object containing your defined A/B Tests. You probably want to use the Copy Button in your dashboard to copy the tests object.
They keys of the object represent the names of your predefined A/B tests. The values are objects containing the following properties:
| Name | Type | Required | Description |
| -------- | --------------- | :------: | ------------------------------------------------------- |
| variants | `Array<string>` | ✅ | An array of strings containing the variants of the test |
##### Example
```ts
const abby = createAbby({
// ... your config
tests: {
"test-abtest": {
variants: ["control", "variant-a", "variant-b"],
},
},
});
```
#### flags
The flags property is an array containing your defined Feature Flags. You probably want to use the Copy Button in your dashboard to copy the flags array.
##### Example
```ts
const abby = createAbby({
// ... your config
flags: ["test-flag"],
});
```
#### settings
The settings property is an object containing additional settings for Abby. The following properties are available:
- `flags.defaultValue`: Allows you to set a general default boolean value for each Feature Flag type.
```json
flags: {
defaultValue: false,
},
```
- `flags.devOverrides`: An object containing the values of feature flags in development mode. The keys of the object represent the names of the flags.
- `remoteConfig.defaultValue`: Allows you to set default values for the possible Remote Config types.
```json
remoteConfig: {
defaultValues: {
String: "",
Number: 0,
JSON: {},
},
},
```
- `remoteConfig.devOverrides`: An object containing the values of Remote Configuration variables in development mode.
The keys of the object represent the names of the flags. The value must be assignable to the type of the variable.
#### user
Optional configuration for user properties that can be used for targeting feature flags. This enables conditional rules based on user attributes. The configuration uses validation helpers from `@tryabby/core`:
```typescript
import * as validation from "@tryabby/core/validation";
const config = createAbby({
// ... other config
user: {
role: validation.string(),
isSubscribed: validation.boolean(),
purchaseCount: validation.number(),
// Optional fields
country: validation.optional(validation.string()),
},
});
```
### Return Values
#### useAbby
`useAbby` is a react hook that used to access the value of an A/B Test.
Recurring users will always get the same value for a test.
New users will get a random value for a test depending on the defined weights
##### Parameters
- `name`: The name of the test or flag, needs to be one of the defined tests.
- `lookupObject`: An optional lookup object to automatically map the active variant to a custom value.
##### Return Values
- `variant` : The variant of the test or the looked up value if you provided a `lookupObject`
- `onAct`: A function to call when the user performs an action associated with the test _Type: `function`_
#### useFeatureFlag
`useFeatureFlag` is a react hook that used to access the value of a Feature Flag.
##### Parameters
The name of the flag, needs to be one of the defined flags.
##### Return Value
The value of the flag _Type: `boolean`_
#### useFeatureFlags
`useFeatureFlags` is a React hook that is used to access all existing feature flags.
##### Parameters
The name of the flag, needs to be one of the defined flags.
##### Return Value
An Array of all feature flags. Includes the name and the value. The value will be a boolean.
#### useRemoteConfig
`useRemotConfig` is a React hook that is used to access the value of a Remote Configuration variable.
##### Parameters
The name of the Remote Configuration variable, which needs to be one of the keys in your `remoteConfig` object in your `abby.config.ts`.
##### Return Value
The current value of the Remote Configuration variable. The type will be according to the specified type in the `abby.config.ts`
#### useRemoteConfigVariables
`useRemoteConfigVariables` is a React hook that is used to access all existing Remote Configuration variables.
##### Parameters
None
##### Return Value
An Array of all remote config variables. Includes the name and the value. The type will be according to the specified type in the `abby.config.ts`
#### AbbyProvider
A react component to wrap your application.
##### Props
- `children`: The children of the component
- `initialData (optional)`: The data (weights, tests, etc). If not provided, the data will be fetched on the client.
#### getFeatureFlagValue
`getFeatureFlagValue` is a function to access the value of a feature flag. This can be called in a non-react scope (Regular Typescript, Edge Functions and API Routes)
##### Parameters
The name of the test or flag, needs to be one of the defined flags.
##### Return Value
The value of the flag _Type: `boolean`_
#### getRemoteConfig
`getRemoteConfig` is a function to access the value of a Remote Configuration variable. This can be called in a non-react scope (Regular Typescript, Edge Functions and API Routes)
##### Parameters
The name of the Remote Configuration variable, which needs to be one of the keys in your `remoteConfig` object in your `abby.config.ts`.
##### Return Value
The current value of the Remote Configuration variable. The type will be according to the specified type in the `abby.config.ts`
#### getABTestValue
`getABTestValue` is a function to access the users variant of an A/B Test. This can be called in a non-react scope.
If the user is new, a random variant will be generated based on the weights, persisted in a cookie and returned.
Otherwise the variant will be read from the cookie and returned.
##### Parameters
- `testName`: The name of the test, needs to be one of the defined tests.
- `lookupObject`: An optional lookup object to automatically map the active variant to a custom value.
##### Return Values
The variant of the test or the looked up value if you provided a `lookupObject`
#### \_\_abby\_\_
`__abby__` is the Abby instance. It can be used to access the data of the current user.
In most cases you will not need to use this.
#### withDevtools
`withDevtools` is a higher order function to wrap the Devtools from [`@tryabby/devtools`](/devtools) for usage within Reacts.
##### Parameters
The Devtools component from `@tryabby/devtools`
##### Example
```jsx
import { AbbyDevTools } from "@tryabby/devtools";
export const AbbyDevtools = withDevtools(AbbyDevTools);
```
#### withAbby
A higher-order component that enables Server Side Rendering within Next.js.
If you wrap your \_app component with this, all occurances of `useFeatureFlag` will be SSR'd
##### Example
```jsx
// _app.tsx (or _app.js)
import { withAbby } from "lib/abby";
function MyApp({ Component, pageProps }) {
return <Component {...pageProps} />;
}
export default withAbby(MyApp);
```
#### withAbbyEdge
A higher-order function that can be wrapped around any vercel edge function (like the `middleware.ts`).
It will preload the data for the current user and pass it to the edge function.
##### Parameters
Your edge function
##### Example
```ts
// middleware.ts
import { withAbbyEdge } from "lib/abby";
import { NextResponse } from "next/server";
export default withAbbyEdge((req) => {
const myFlag = getFeatureFlagValue("test-flag");
// make sure to use the req object here
const [currentVariant, setCookie] = getABTestValue("test-abtest", req);
if (myFlag && currentVariant === "beta-user") {
const res = NextResponse.redirect("/beta");
// update the user's cookie
setCookie(res);
return res;
}
return NextResponse.next();
});
```
#### withAbbyApiHandler
A higher-order function that can be wrapped around any api route.
It will preload the data for the current user and pass it to the edge function.
##### Parameters
Your api route handler
##### Example
```ts
// /api/test.ts
import { withAbbyApiHandler } from "lib/abby";
export default withAbbyApiHandler((req, res) => {
const myFlag = getFeatureFlagValue("test-flag");
// make sure to use the req object here
const [currentVariant, setCookie] = getABTestValue("test-abtest", req);
if (myFlag && currentVariant === "beta-user") {
// update the user's cookie
setCookie(res);
return res.status(200).end();
}
res.status(404).end();
});
```
#### getABResetFunction
This is a function which returns a function that can be used to reset the stored variant for the current user.
This means the cookie will be deleted and the user will get a new variant on the next page load.
##### Parameters
The name of the test, needs to be one of the defined tests.
##### Example
```tsx
import { getABResetFunction } from "lib/abby";
import { useRouter } from "next/router";
export default function SomePage() {
const router = useRouter();
const onReset = () => {
const resetCookie = getABResetFunction("SignupButton");
resetCookie();
router.reload();
};
return (
<div>
<h1>Hello World</h1>
<button onClick={onReset}>Reset Cookie</button>
</div>
);
}
```
#### updateUserProperties
Updates the user properties used for evaluating conditional rules. Properties are validated against their defined types and will throw errors if invalid.
The function:
- Validates each property against its defined type
- Only updates if validation passes
- Throws descriptive errors for invalid values
- Allows partial updates (only updating some properties)
- Handles optional properties correctly
##### Example
```typescript
// Valid updates
abby.updateUserProperties({
role: "admin", // string
isSubscribed: true, // boolean
purchaseCount: 5, // number
country: "US", // optional string
});
// Invalid updates will throw
abby.updateUserProperties({
role: 123, // Error: Expected string but got number
isSubscribed: "true", // Error: Expected boolean but got string
purchaseCount: "5", // Error: Expected number but got string
});
// Partial updates are fine
abby.updateUserProperties({
role: "user", // Only updates role
});
// Optional fields can be undefined
abby.updateUserProperties({
country: undefined, // OK for optional fields
});
```
================================================
FILE: apps/docs/pages/reference/operators.mdx
================================================
# Rule Operators
When configuring conditional rules for feature flags, you can use different operators based on the property type.
## String Operators
| Operator | Description | Example |
| ----------- | --------------------------------- | ------------------------------- |
| eq | Exact string match | `role eq "admin"` |
| neq | Not equal | `role neq "guest"` |
| contains | String contains substring | `email contains "@company.com"` |
| notContains | String does not contain substring | `plan notContains "free"` |
| startsWith | String starts with prefix | `country startsWith "US"` |
| endsWith | String ends with suffix | `domain endsWith ".edu"` |
| regex | String matches regular expression | `email regex "^[a-z]+@.*$"` |
## Number Operators
| Operator | Description | Example |
| -------- | ------------------------ | -------------------------- |
| eq | Equal to | `age eq 21` |
| neq | Not equal to | `loginCount neq 0` |
| gt | Greater than | `purchaseCount gt 5` |
| gte | Greater than or equal to | `subscriptionMonths gte 3` |
| lt | Less than | `errorCount lt 10` |
| lte | Less than or equal to | `failedAttempts lte 3` |
## Boolean Operators
| Operator | Description | Example |
| -------- | ----------- | ---------------------- |
| eq | Equal to | `isSubscribed eq true` |
## Rule Groups
Rules can be combined into groups using logical operators:
| Operator | Description | Example |
| -------- | -------------------------------------- | ----------------------------------------------- |
| and | All conditions in the group must match | `role eq "admin" AND subscriptionDays gt 30` |
| or | Any condition in the group can match | `isTeamMember eq true OR hasBetaAccess eq true` |
### Example Rule Sets
```typescript
// Single rule
{
propertyName: "role",
propertyType: "string",
operator: "eq",
value: "admin",
thenValue: true
}
// Rule group with AND logic
{
operator: "and",
rules: [
{
propertyName: "subscriptionTier",
propertyType: "string",
operator: "eq",
value: "premium"
},
{
propertyName: "usageCount",
propertyType: "number",
operator: "gt",
value: 100
}
],
thenValue: true
}
// Rule group with OR logic
{
operator: "or",
rules: [
{
propertyName: "isAdmin",
propertyType: "boolean",
operator: "eq",
value: true
},
{
propertyName: "email",
propertyType: "string",
operator: "endsWith",
value: "@company.com"
}
],
thenValue: true
}
```
When evaluating rules:
1. Rules are evaluated in order
2. The first matching rule's `thenValue` is used
3. If no rules match, the environment's default value is used
================================================
FILE: apps/docs/pages/reference/react.mdx
================================================
# API Reference (React)
## createAbby
### Parameters
The `createAbby` function takes an object as a parameter. The object can contain the following properties:
| Name | Type | Required | Description | details |
| ------------------ | -------- | :------: | ------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
| projectId | `string` | ✅ | The ID of your project in Abby | - |
| apiUrl | `string` | | The URL of the Abby API. Defaults to the hosted version | - |
| currentEnvironment | `string` | ✅ | The current environment of your application | [link](/environments) |
| tests | `object` | | An object containing your defined A/B Tests | - |
| flags | `array` | | An array containing your defined Feature Flags | - |
| remoteConfig | `object` | | An object containing the name of your remote config and their type | - |
| settings | `object` | | An object with additional settings for Abby | - |
| user | `object` | | Optional configuration for user properties that can be used for targeting feature flags. This enables conditional rules based on user attributes. | - |
#### tests
The tests property is an object containing your defined A/B Tests. You probably want to use the Copy Button in your dashboard to copy the tests object.
They keys of the object represent the names of your predefined A/B tests. The values are objects containing the following properties:
| Name | Type | Required | Description |
| -------- | --------------- | :------: | ------------------------------------------------------- |
| variants | `Array<string>` | ✅ | An array of strings containing the variants of the test |
##### Example
```ts
const abby = createAbby({
// ... your config
tests: {
"test-abtest": {
variants: ["control", "variant-a", "variant-b"],
},
},
});
```
#### flags
The flags property is an array containing your defined Feature Flags. You probably want to use the Copy Button in your dashboard to copy the flags array.
##### Example
```ts
const abby = createAbby({
// ... your config
flags: ["test-flag"],
});
```
#### user
Optional configuration for user properties that can be used for targeting feature flags. This enables conditional rules based on user attributes. The configuration uses validation helpers from `@tryabby/core`:
```typescript
import * as validation from "@tryabby/core/validation";
const config = createAbby({
// ... other config
user: {
role: validation.string(),
isSubscribed: validation.boolean(),
purchaseCount: validation.number(),
// Optional fields
country: validation.optional(validation.string()),
},
});
```
#### settings
The settings property is an object containing additional settings for Abby. The following properties are available:
- `flags.defaultValue`: Allows you to set a general default boolean value for each Feature Flag type.
```json
flags: {
defaultValue: false,
},
```
- `flags.devOverrides`: An object containing the values of feature flags in development mode. The keys of the object represent the names of the flags.
- `remoteConfig.defaultValue`: Allows you to set default values for the possible Remote Config types.
```json
remoteConfig: {
defaultValues: {
String: "",
Number: 0,
JSON: {},
},
},
```
- `remoteConfig.devOverrides`: An object containing the values of Remote Configuration variables in development mode.
The keys of the object represent the names of the flags. The value must be assignable to the type of the variable.
### Return Values
#### useAbby
`useAbby` is a react hook that used to access the value of an A/B Test.
Recurring users will always get the same value for a test.
New users will get a random value for a test depending on the defined weights
##### Parameters
- `testName`: The name of the test or flag, needs to be one of the defined tests.
- `lookupObject`: An optional lookup object to automatically map the active variant to a custom value.
##### Return Values
- `variant` : The variant of the test or the looked up value if you provided a `lookupObject`
- `onAct`: A function to call when the user performs an action associated with the test _Type: `function`_
#### useFeatureFlag
`useFeatureFlag` is a React hook that returns the current value of a feature flag. The value is determined by:
1. The environment value
2. Any conditional rules based on user properties
3. Default/fallback values
##### Parameters
The name of the flag, needs to be one of the defined flags.
##### Return Value
The value of the flag _Type: `boolean`_
##### Example with User Properties
```tsx
import { useFeatureFlag } from "./abby";
function PremiumFeature() {
// Flag will be true if either:
// 1. Enabled in current environment OR
// 2. User matches conditions (e.g. isSubscribed === true)
const hasPremiumAccess = useFeatureFlag("premiumFeature");
if (!hasPremiumAccess) {
return <UpgradeBanner />;
}
return <PremiumContent />;
}
```
#### useFeatureFlags
`useFeatureFlags` is a React hook that is used to access all existing feature flags.
##### Parameters
The name of the flag, needs to be one of the defined flags.
##### Return Value
An Array of all feature flags. Includes the name and the value. The value will be a boolean.
#### useRemoteConfig
`useRemoteConfig` is a React hook that is used to access the value of a Remote Configuration variable.
##### Parameters
The name of the Remote Configuration variable, which needs to be one of the keys in your `remoteConfig` object in your `abby.config.ts`.
##### Return Value
The current value of the Remote Configuration variable. The type will be according to the specified type in the `abby.config.ts`
#### useRemoteConfigVariables
`useRemoteConfigVariables` is a React hook that is used to access all existing Remote Configuration variables.
##### Parameters
None
##### Return Value
An Array of all remote config variables. Includes the name and the value. The type will be according to the specified type in the `abby.config.ts`
#### AbbyProvider
A react component to wrap your application.
##### Props
- `children`: The children of the component
- `initialData (optional)`: The data (weights, tests, etc). If not provided, the data will be fetched on the client.
#### getFeatureFlagValue
`getFeatureFlagValue` is a function to access the value of a feature flag. This can be called in a non-react scope
##### Parameters
The name of the test or flag, needs to be one of the defined flags.
##### Return Value
The value of the flag _Type: `boolean`_
#### getRemoteConfig
`getRemoteConfig` is a function to access the value of a Remote Configuration variable. This can be called in a non-react scope.
##### Parameters
The name of the Remote Configuration variable, which needs to be one of the keys in your `remoteConfig` object in your `abby.config.ts`.
##### Return Value
The current value of the Remote Configuration variable. The type will be according to the specified type in the `abby.config.ts`
#### getABTestValue
`getABTestValue` is a function to access the users variant of an A/B Test. This can be called in a non-react scope.
If the user is new, a random variant will be generated based on the weights, persisted in a cookie and returned.
Otherwise the variant will be read from the cookie and returned.
##### Parameters
- `testName`: The name of the test, needs to be one of the defined tests.
- `lookupObject`: An optional lookup object to automatically map the active variant to a custom value.
##### Return Values
The variant of the test or the looked up value if you provided a `lookupObject`
#### withDevtools
`withDevtools` is a higher order function to wrap the Devtools from [`@tryabby/devtools`](/devtools) for usage within Reacts.
##### Parameters
The Devtools component from `@tryabby/devtools`
##### Example
```jsx
import { AbbyDevTools } from "@tryabby/devtools";
export const AbbyDevtools = withDevtools(AbbyDevTools);
```
#### getABResetFunction
This is a function which returns a function that can be used to reset the stored variant for the current user.
This means the cookie will be deleted and the user will get a new variant on the next page load.
##### Parameters
The name of the test, needs to be one of the defined tests.
##### Example
```tsx
import { getABResetFunction } from "lib/abby";
export default function SomePage() {
const onReset = () => {
const resetCookie = getABResetFunction("SignupButton");
resetCookie();
window.reload();
};
return (
<div>
<h1>Hello World</h1>
<button onClick={onReset}>Reset Cookie</button>
</div>
);
}
```
#### updateUserProperties
Updates the user properties used for evaluating conditional rules. Properties are validated against their defined types and will throw errors if invalid.
The function:
- Validates each property against its defined type
- Only updates if validation passes
- Throws descriptive errors for invalid values
- Allows partial updates (only updating some properties)
- Handles optional properties correctly
##### Example
```typescript
// Valid updates
abby.updateUserProperties({
role: "admin", // string
isSubscribed: true, // boolean
purchaseCount: 5, // number
country: "US", // optional string
});
// Invalid updates will throw
abby.updateUserProperties({
role: 123, // Error: Expected string but got number
isSubscribed: "true", // Error: Expected boolean but got string
purchaseCount: "5", // Error: Expected number but got string
});
// Partial updates are fine
abby.updateUserProperties({
role: "user", // Only updates role
});
// Optional fields can be undefined
abby.updateUserProperties({
country: undefined, // OK for optional fields
});
```
================================================
FILE: apps/docs/pages/reference/remix.mdx
================================================
# API Reference (Remix)
## createAbby
### Parameters
The `createAbby` function takes an object as a parameter. The object can contain the following properties:
| Name | Type | Required | Description | details |
| ------------------ | -------- | :------: | ------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
| projectId | `string` | ✅ | The ID of your project in Abby | - |
| apiUrl | `string` | | The URL of the Abby API. Defaults to the hosted version | - |
| currentEnvironment | `string` | ✅ | The current environment of your application | [link](/environments) |
| tests | `object` | | An object containing your defined A/B Tests | - |
| flags | `array` | | An array containing your defined Feature Flags | - |
| remoteConfig | `object` | | An object containing the name of your remote config and their type | - |
| settings | `object` | | An object with additional settings for Abby | - |
| user | `object` | | Optional configuration for user properties that can be used for targeting feature flags. This enables conditional rules based on user attributes. | - |
#### tests
The tests property is an object containing your defined A/B Tests. You probably want to use the Copy Button in your dashboard to copy the tests object.
They keys of the object represent the names of your predefined A/B tests. The values are objects containing the following properties:
| Name | Type | Required | Description |
| -------- | --------------- | :------: | ------------------------------------------------------- |
| variants | `Array<string>` | ✅ | An array of strings containing the variants of the test |
##### Example
```ts
const abby = createAbby({
// ... your config
tests: {
"test-abtest": {
variants: ["control", "variant-a", "variant-b"],
},
},
});
```
#### flags
The flags property is an array containing your defined Feature Flags. You probably want to use the Copy Button in your dashboard to copy the flags array.
##### Example
```ts
const abby = createAbby({
// ... your config
flags: ["test-flag"],
});
```
#### settings
The settings property is an object containing additional settings for Abby. The following properties are available:
- `flags.defaultValue`: Allows you to set a general default boolean value for each Feature Flag type.
```json
flags: {
defaultValue: false,
},
```
- `flags.devOverrides`: An object containing the values of feature flags in development mode. The keys of the object represent the names of the flags.
- `remoteConfig.defaultValue`: Allows you to set default values for the possible Remote Config types.
```json
remoteConfig: {
defaultValues: {
String: "",
Number: 0,
JSON: {},
},
},
```
- `remoteConfig.devOverrides`: An object containing the values of Remote Configuration variables in development mode.
The keys of the object represent the names of the flags. The value must be assignable to the type of the variable.
#### user
Optional configuration for user properties that can be used for targeting feature flags. This enables conditional rules based on user attributes. The configuration uses validation helpers from `@tryabby/core`:
```typescript
import * as validation from "@tryabby/core/validation";
const config = createAbby({
// ... other config
user: {
role: validation.string(),
isSubscribed: validation.boolean(),
purchaseCount: validation.number(),
// Optional fields
country: validation.optional(validation.string()),
},
});
```
#### updateUserProperties
Updates the user properties used for evaluating conditional rules. Properties are validated against their defined types and will throw errors if invalid.
The function:
- Validates each property against its defined type
- Only updates if validation passes
- Throws descriptive errors for invalid values
- Allows partial updates (only updating some properties)
- Handles optional properties correctly
##### Example
```typescript
// Valid updates
abby.updateUserProperties({
role: "admin", // string
isSubscribed: true, // boolean
purchaseCount: 5, // number
country: "US", // optional string
});
// Invalid updates will throw
abby.updateUserProperties({
role: 123, // Error: Expected string but got number
isSubscribed: "true", // Error: Expected boolean but got string
purchaseCount: "5", // Error: Expected number but got string
});
// Partial updates are fine
abby.updateUserProperties({
role: "user", // Only updates role
});
// Optional fields can be undefined
abby.updateUserProperties({
country: undefined, // OK for optional fields
});
```
### Return Values
#### useAbby
`useAbby` is a react hook that used to access the value of an A/B Test.
Recurring users will always get the same value for a test.
New users will get a random value for a test depending on the defined weights
##### Parameters
- `name`: The name of the test or flag, needs to be one of the defined tests.
- `lookupObject`: An optional lookup object to automatically map the active variant to a custom value.
##### Return Values
- `variant` : The variant of the test or the looked up value if you provided a `lookupObject`
- `onAct`: A function to call when the user performs an action associated with the test _Type: `function`_
#### useFeatureFlag
`useFeatureFlag` is a react hook that used to access the value of a Feature Flag.
##### Parameters
The name of the flag, needs to be one of the defined flags.
##### Return Value
The value of the flag _Type: `boolean`_
#### useFeatureFlags
`useFeatureFlags` is a React hook that is used to access all existing feature flags.
##### Parameters
The name of the flag, needs to be one of the defined flags.
##### Return Value
An Array of all feature flags. Includes the name and the value. The value will be a boolean.
#### useRemoteConfig
`useRemotConfig` is a React hook that is used to access the value of a Remote Configuration variable.
##### Parameters
The name of the Remote Configuration variable, which needs to be one of the keys in your `remoteConfig` object in your `abby.config.ts`.
##### Return Value
The current value of the Remote Configuration variable. The type will be according to the specified type in the `abby.config.ts`
#### useRemoteConfigVariables
`useRemoteConfigVariables` is a React hook that is used to access all existing Remote Configuration variables.
##### Parameters
None
##### Return Value
An Array of all remote config variables. Includes the name and the value. The type will be according to the specified type in the `abby.config.ts`
#### AbbyProvider
A react component to wrap your application.
##### Props
- `children`: The children of the component
- `initialData (optional)`: The data (weights, tests, etc). If not provided, the data will be fetched on the client.
#### getFeatureFlagValue
`getFeatureFlagValue` is a function to access the value of a feature flag. This can be called in a non-react scope (Regular Typescript, Edge Functions and API Routes)
##### Parameters
The name of the test or flag, needs to be one of the defined flags.
##### Return Value
The value of the flag _Type: `boolean`_
#### getRemoteConfig
`getRemoteConfig` is a function to access the value of a Remote Configuration variable. This can be called in a non-react scope (Regular Typescript, Edge Functions and API Routes)
##### Parameters
The name of the Remote Configuration variable, which needs to be one of the keys in your `remoteConfig` object in your `abby.config.ts`.
##### Return Value
The current value of the Remote Configuration variable. The type will be according to the specified type in the `abby.config.ts`
#### getABTestValue
`getABTestValue` is a function to access the users variant of an A/B Test. This can be called in a non-react scope.
If the user is new, a random variant will be generated based on the weights, persisted in a cookie and returned.
Otherwise the variant will be read from the cookie and returned.
##### Parameters
- `testName`: The name of the test, needs to be one of the defined tests.
- `lookupObject`: An optional lookup object to automatically map the active variant to a custom value.
##### Return Values
The variant of the test or the looked up value if you provided a `lookupObject`
#### \_\_abby\_\_
`__abby__` is the Abby instance. It can be used to access the data of the current user.
In most cases you will not need to use this.
#### withDevtools
`withDevtools` is a higher order function to wrap the Devtools from [`@tryabby/devtools`](/devtools) for usage within Reacts.
##### Parameters
The Devtools component from `@tryabby/devtools`
##### Example
```jsx
import { AbbyDevTools } from "@tryabby/devtools";
export const AbbyDevtools = withDevtools(AbbyDevTools);
```
#### getAbbyData
A function used to get the required data to server side render the application with Abby.
This should be called in the `loader` function one of your routes or inside of the root.
##### Example
```jsx
import { AbbyProvider, getAbbyData } from "../lib/abby";
export const loader = async (ctx) => {
return json({
...(await getAbbyData(ctx)),
});
};
```
================================================
FILE: apps/docs/pages/reference/svelte.mdx
================================================
# API Reference (Svelte)
## createAbby
### Parameters
The `createAbby` function takes an object as a parameter. The object can contain the following properties:
| Name | Type | Required | Description | details |
| ------------------ | -------- | :------: | ------------------------------------------------------------------ | --------------------- |
| projectId | `string` | ✅ | The ID of your project in Abby | - |
| apiUrl | `string` | | The URL of the Abby API. Defaults to the hosted version | - |
| currentEnvironment | `string` | ✅ | The current environment of your application | [link](/environments) |
| tests | `object` | | An object containing your defined A/B Tests | - |
| flags | `array` | | An array containing your defined Feature Flags | - |
| remoteConfig | `object` | | An object containing the name of your remote config and their type | - |
| settings | `object` | | An object with additional settings for Abby | - |
#### tests
The tests property is an object containing your defined A/B Tests. You probably want to use the Copy Button in your dashboard to copy the tests object.
They keys of the object represent the names of your predefined A/B tests. The values are objects containing the following properties:
| Name | Type | Required | Description |
| -------- | --------------- | :------: | ------------------------------------------------------- |
| variants | `Array<string>` | ✅ | An array of strings containing the variants of the test |
##### Example
```ts
const abby = createAbby({
// ... your config
tests: {
"test-abtest": {
variants: ["control", "variant-a", "variant-b"],
},
},
});
```
#### flags
The flags property is an array containing your defined Feature Flags. You probably want to use the Copy Button in your dashboard to copy the flags array.
##### Example
```ts
const abby = createAbby({
// ... your config
flags: ["test-flag"],
});
```
#### settings
The settings property is an object containing additional settings for Abby. The following properties are available:
- `flags.defaultValue`: Allows you to set a general default boolean value for each Feature Flag type.
```json
flags: {
defaultValue: false,
},
```
- `flags.devOverrides`: An object containing the values of feature flags in development mode. The keys of the object represent the names of the flags.
- `remoteConfig.defaultValue`: Allows you to set default values for the possible Remote Config types.
```json
remoteConfig: {
defaultValues: {
String: "",
Number: 0,
JSON: {},
},
},
```
- `remoteConfig.devOverrides`: An object containing the values of Remote Configuration variables in development mode.
The keys of the object represent the names of the flags. The value must be assignable to the type of the variable.
### Return Values
#### useAbby
`useAbby` is a function providing acces to a store that is used to access the value of an A/B Test.
Recurring users will always get the same value for a test.
New users will get a random value for a test depending on the defined weights
##### Parameters
- `testName`: The name of the test or flag, needs to be one of the defined tests.
- `lookupObject`: An optional lookup object to automatically map the active variant to a custom value.
##### Return Values
- `variant`: Store providing the variant of the test or the looked up value if you provided a `lookupObject`
- `onAct`: A function to call when the user performs an action associated with the test _Type: `function`_
#### useFeatureFlag
`useFeatureFlag` is a function providing access to a store that is used to access the value of a Feature Flag.
##### Parameters
The name of the flag, needs to be one of the defined flags.
##### Return Value
A store providing the value of the flag _Type: `boolean`_
#### useRemoteConfig
`useRemoteConfig` is a function providing access to a store that is used to access the value of a Remote Configuration variable.
##### Parameters
The name of the Remote Configuration variable. This needs to be one of the defined keys in your `abby.config.ts`.
##### Return Value
A store providing the value of the Remote Configuration variable. The type will be looked up from your `abby.config.ts`.
#### AbbyProvider
A svelte component to wrap your application.
##### Props
- `children`: The children of the component
- `initialData (optional)`: The data (weights, tests, etc). If not provided, the data will be fetched on the client.
#### getFeatureFlagValue
`getFeatureFlagValue` is a function to access the value of a feature flag. This can be called in a non-svelte scope (Regular Typescript, Edge Functions and API Routes)
##### Parameters
The name of the test or flag, needs to be one of the defined flags.
##### Return Value
The value of the flag _Type: `boolean`_
#### getRemoteConfig
`getRemoteConfig` is a function to access the value of a Remote Configuration variable. This can be called in a non-svelte scope (Regular Typescript, Edge Functions and API Routes)
##### Parameters
The name of the Remote Configuration variable, which needs to be one of the keys in your `remoteConfig` object in your `abby.config.ts`.
##### Return Value
The current value of the Remote Configuration variable. The type will be according to the specified type in the `abby.config.ts`
#### getABTestValue
`getABTestValue` is a function to access the users variant of an A/B Test. This can be called in a non-react scope.
If the user is new, a random variant will be generated based on the weights, persisted in a cookie and returned.
Otherwise the variant will be read from the cookie and returned.
##### Parameters
- `testName`: The name of the test, needs to be one of the defined tests.
- `lookupObject`: An optional lookup object to automatically map the active variant to a custom value.
##### Return Values
The variant of the test or the looked up value if you provided a `lookupObject`
#### \_\_abby\_\_
`__abby__` is the Abby instance. It can be used to access the data of the current user.
In most cases you will not need to use this.
#### withDevtools
`withDevtools` is a function providing a svelte component to enable the Devtools. The Devtools need to be within the 'AbbyProvider'.
##### Parameters
The Devtools component from `@tryabby/devtools`
##### Example
```jsx
import { AbbyDevTools } from "@tryabby/devtools";
export const AbbyDevtools = withDevtools(AbbyDevTools);
```
#### withAbby
A function that enables Server Side Rendering within Sveltekit
If you use this in your layout.server.ts, all occurances of `useFeatureFlag` will be SSR'd.
##### Example
```ts
// layout.server.ts
import { abby } from "$lib/abby";
export const load = abby.withAbby();
```
#### getABResetFunction
This is a function which returns a function that can be used to reset the stored variant for the current user.
This means the cookie will be deleted and the user will get a new variant on the next page load.
##### Parameters
The name of the test, needs to be one of the defined tests.
================================================
FILE: apps/docs/pages/remote-config.mdx
================================================
# Remote Configuration variables
Remote Configuration variables are custom String, Number and JSON values, which you can control per [Environment](environments)
They behave similarly to Feature Flags, but allow you to control more types of values than just booleans.
You could for example display a dynamic string on your page, which you can easily change on the Abby Dashboard for all users.
The [Abby Devtools](devtools) also allow you to control Remote Configuration variables in realtime during development,
providing a nice developer experience.
================================================
FILE: apps/docs/pages/user-segments.mdx
================================================
# User Segments Guide
This guide demonstrates how to implement user-based targeting with feature flags in a real application.
## Scenario: Premium Feature Access
Let's say you want to:
- Enable a feature for premium users only
- Allow beta testers to access it regardless of subscription
- Gradually roll it out to users who've been active for over 30 days
## Step 1: Define User Properties
First, configure the user properties you'll need in your `abby.config.ts`:
```typescript
import * as validation from "@trabby/abby/validation";
export default defineConfig(
{
projectId: "your-project-id",
currentEnvironment: "production",
},
{
environments: ["development", "staging", "production"],
flags: ["premiumFeature"],
user: {
subscriptionTier: validation.string(),
isBetaTester: validation.boolean(),
accountAgeDays: validation.number(),
},
}
);
```
## Step 2: Update User Properties
In your application, update these properties when they change:
```typescript
// When user logs in or subscription changes
abby.updateUserProperties({
subscriptionTier: user.subscription.tier,
isBetaTester: user.betaAccess,
accountAgeDays: calculateAccountAge(user.createdAt),
});
```
## Step 3: Configure Rules
In the Abby dashboard, set up rules for your feature flag:
1. Enable for premium users:
- Set a rule where subscriptionTier equals "premium"
2. Enable for beta testers:
- Add another rule where isBetaTester equals true
3. Enable for long-time users:
- Create a rule where accountAgeDays is greater than 30
These rules are evaluated in order, and the feature will be enabled if any of them match. You can also adjust the order of rules and add percentage rollouts to gradually enable the feature for each segment.
## Step 4: Use in Components
Now you can use the feature flag in your components:
```tsx
function PremiumFeature() {
const hasAccess = useFeatureFlag("premiumFeature");
if (!hasAccess) {
return <UpgradePrompt />;
}
return <FeatureContent />;
}
```
## Best Practices
1. **Validation**: User properties are validated against their defined types. Invalid updates will throw errors.
2. **Performance**: Rule evaluation is optimized and cached until user properties change.
3. **Fallbacks**: If user properties aren't set or rules don't match, the flag falls back to its environment value.
4. **TypeScript Support**: The configuration provides full type safety for flag names and user properties.
## Testing
During development, you can use the Abby DevTools to:
- Override user properties
- Test different rule combinations
- Verify rule evaluation logic
Remember to test edge cases like:
- Missing optional properties
- Invalid property values
- Rule ordering effects
================================================
FILE: apps/docs/snippets/ReactApi.mdx
================================================
## createAbby
### Parameters
**Options** - Object
- `projectId`: The ID of your project in Abby
- `apiUrl` _(optional)_: The URL of the Abby API. Defaults to the hosted version
- `currentEnvironment`: The current environment of your application ([details](/environments))
- `tests` _(optional)_: An object containing your defined A/B Tests ([details](#tests))
- `flags` _(optional)_: An array containing your defined Feature Flags ([details](#flags));
- `settings` _(optional)_: An object with additional settings for Abby ([details](#settings));
### Return Values
#### useAbby
`useAbby` is a react hook that used to access the value of an A/B Test.
Recurring users will always get the same value for a test.
New users will get a random value for a test depending on the defined weights
**Parameter:**
- `string`: The name of the test or flag, needs to be one of the defined tests.
**Return Values:**
- `variant` : The variant of the test
- `onAct`: A function to call when the user performs an action associated with the test _Type: `function`_
#### useFeatureFlag
`useFeatureFlag` is a react hook that used to access the value of a Feature Flag.
**Parameter:**
The name of the test or flag, needs to be one of the defined flags.
**Return Value:**
The value of the flag _Type: `boolean`_
#### AbbyProvider
A react component to wrap your application.
**Props:**
- `children`: The children of the component
- `initialData (optional)`: The data (weights, tests, etc). If not provided, the data will be fetched on the client.
#### getFeatureFlagValue
`getFeatureFlagValue` is a function to access the value of a feature flag. This can be called in a non-react scope.
**Parameter:**
The name of the test or flag, needs to be one of the defined flags.
#### **abby**
`__abby__` is the Abby instance. It can be used to access the data of the current user.
In most cases you will not need to use this.
#### withDevtools
`withDevtools` is a higher order function to wrap the Devtools from [`@tryabby/devtools`](/devtools) for usage within Reacts.
**Parameter:**
The Devtools component from `@tryabby/devtools`
**Example:**
```jsx
import { AbbyDevTools } from "@tryabby/devtools";
export const AbbyDevtools = withDevtools(AbbyDevTools);
```
================================================
FILE: apps/docs/theme.config.jsx
================================================
import { useRouter } from "next/router";
export default {
useNextSeoProps() {
const router = useRouter();
const currentPageUrl = `https://docs.tryabby.com${router.asPath}`;
return {
titleTemplate: "%s – Abby Docs",
description:
"Abby is a SaaS tool for developers to streamline A/B testing and feature flagging. Make data-driven decisions and improve user experience with ease.",
openGraph: {
url: currentPageUrl,
title: "Abby Docs",
type: "website",
description:
"Abby is a SaaS tool for developers to streamline A/B testing and feature flagging. Make data-driven decisions and improve user experience with ease.",
images: [
{
url: "https://www.tryabby.com/og.png",
width: 1200,
height: 630,
alt: "Abby",
type: "image/png",
},
],
siteName: "Abby Docs",
},
};
},
search: {
loading: "Loading...",
placeholder: "Search...",
},
head: (
<>
<link rel="icon" href="https://www.tryabby.com/favicon.png" />
</>
),
logo: <span style={{ fontSize: "1.75rem", fontWeight: "bold" }}>Abby</span>,
// docsRepositoryBase: 'https://github.com/cstrnt/abby/blob/main/apps/docs/pages',
project: {
// link: "https://github.com/cstrnt/abby",
},
feedback: {
content: null,
},
editLink: {
component: () => <></>,
},
sidebar: {
toggleButton: true,
},
footer: {
component: null,
},
// ...
};
================================================
FILE: apps/docs/tsconfig.json
================================================
{
"extends": "tsconfig/nextjs.json",
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "theme.config.jsx"],
"exclude": ["node_modules"]
}
================================================
FILE: apps/web/.gitignore
================================================
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# database
/prisma/db.sqlite
/prisma/db.sqlite-journal
# next.js
/.next/
/out/
next-env.d.ts
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
# local env files
# do not commit any .env files to git, except for the .env.example file. https://create.t3.gg/en/usage/env-variables#using-environment-variables
.env
.env*.local
# vercel
.vercel
# typescript
*.tsbuildinfo
public/sitemap*
public/robots.txt
prisma/coupons.csv
================================================
FILE: apps/web/CHANGELOG.md
================================================
# web
## 0.2.42
### Patch Changes
- Updated dependencies
- @tryabby/devtools@8.0.2
- @tryabby/next@7.0.1
## 0.2.41
### Patch Changes
- Updated dependencies
- @tryabby/core@7.0.1
- @tryabby/devtools@8.0.1
- @tryabby/next@7.0.1
## 0.2.40
### Patch Changes
- Updated dependencies
- @tryabby/devtools@8.0.0
- @tryabby/core@7.0.0
- @tryabby/next@7.0.0
## 0.2.39
### Patch Changes
- Updated dependencies
- @tryabby/devtools@7.0.0
- @tryabby/core@6.0.0
- @tryabby/next@6.0.0
## 0.2.38
### Patch Changes
- Updated dependencies
- @tryabby/core@5.4.0
- @tryabby/devtools@5.0.1
- @tryabby/next@5.1.3
## 0.2.37
### Patch Changes
- Updated dependencies [d05cb9a]
- @tryabby/core@5.3.1
- @tryabby/devtools@5.0.1
- @tryabby/next@5.1.2
## 0.2.36
### Patch Changes
- Updated dependencies [31d14b7]
- @tryabby/core@5.3.0
- @tryabby/next@5.1.1
- @tryabby/devtools@5.0.1
## 0.2.35
### Patch Changes
- Updated dependencies
- @tryabby/core@5.2.0
- @tryabby/next@5.1.0
- @tryabby/devtools@5.0.0
## 0.2.34
### Patch Changes
- Updated dependencies
- @tryabby/core@5.1.4
- @tryabby/devtools@5.0.0
- @tryabby/next@5.0.6
## 0.2.33
### Patch Changes
- Updated dependencies
- @tryabby/core@5.1.3
- @tryabby/devtools@5.0.0
- @tryabby/next@5.0.5
## 0.2.32
### Patch Changes
- Updated dependencies
- @tryabby/core@5.1.2
- @tryabby/next@5.0.4
- @tryabby/devtools@5.0.0
## 0.2.31
### Patch Changes
- Updated dependencies
- @tryabby/core@5.1.1
- @tryabby/devtools@5.0.0
- @tryabby/next@5.0.3
## 0.2.30
### Patch Changes
- Updated dependencies
- @tryabby/core@5.1.0
- @tryabby/devtools@5.0.0
- @tryabby/next@5.0.2
## 0.2.29
### Patch Changes
- Updated dependencies
- @tryabby/core@5.0.1
- @tryabby/next@5.0.1
- @tryabby/devtools@5.0.0
## 0.2.28
### Patch Changes
- Updated dependencies
- @tryabby/devtools@5.0.0
- @tryabby/core@5.0.0
- @tryabby/next@5.0.0
## 0.2.27
### Patch Changes
- Updated dependencies
- @tryabby/core@4.2.0
- @tryabby/next@4.1.1
- @tryabby/devtools@4.1.0
## 0.2.26
### Patch Changes
- Updated dependencies
- @tryabby/devtools@4.1.0
- @tryabby/core@4.1.0
- @tryabby/next@4.1.0
## 0.2.25
### Patch Changes
- Updated dependencies
- @tryabby/devtools@4.0.2
- @tryabby/next@4.0.1
## 0.2.24
### Patch Changes
- Updated dependencies
- @tryabby/devtools@4.0.1
- @tryabby/next@4.0.1
## 0.2.23
### Patch Changes
- Updated dependencies
- @tryabby/core@4.0.1
- @tryabby/devtools@4.0.0
- @tryabby/next@4.0.1
## 0.2.22
### Patch Changes
- Updated dependencies
- @tryabby/devtools@4.0.0
- @tryabby/core@4.0.0
- @tryabby/next@4.0.0
## 0.2.21
### Patch Changes
- update projectid env
## 0.2.20
- added angular code snippets
## 0.2.19
### Patch Changes
- Updated dependencies
- @tryabby/core@3.4.0
- @tryabby/devtools@3.3.0
- @tryabby/next@3.4.0
## 0.2.18
### Patch Changes
- refactor shard package
- Updated dependencies
- @tryabby/devtools@3.2.2
- @tryabby/core@3.3.1
- @tryabby/next@3.3.1
## 0.2.17
### Patch Changes
- Updated dependencies
- @tryabby/next@3.3.0
- @tryabby/devtools@3.2.1
## 0.2.16
### Patch Changes
- Updated dependencies
- @tryabby/devtools@3.2.1
- @tryabby/next@3.2.1
## 0.2.15
### Patch Changes
- Updated dependencies
- @tryabby/devtools@3.2.0
- @tryabby/next@3.2.0
## 0.2.14
### Patch Changes
- Updated dependencies
- @tryabby/devtools@3.1.4
- @tryabby/next@3.1.2
## 0.2.13
### Patch Changes
- Updated dependencies
- @tryabby/devtools@3.1.3
- @tryabby/next@3.1.1
## 0.2.12
### Patch Changes
- Updated dependencies
- @tryabby/devtools@3.1.2
- @tryabby/next@3.1.1
## 0.2.11
### Patch Changes
- @tryabby/next@3.1.1
## 0.2.10
### Patch Changes
- Updated dependencies
- @tryabby/devtools@3.1.1
- @tryabby/next@3.1.0
## 0.2.9
### Patch Changes
- Updated dependencies
- @tryabby/devtools@3.1.0
- @tryabby/next@3.1.0
## 0.2.8
### Patch Changes
- Updated dependencies
- @tryabby/next@3.0.1
## 0.2.7
### Patch Changes
- Updated dependencies
- @tryabby/devtools@3.0.3
- @tryabby/next@3.0.0
## 0.2.6
### Patch Changes
- Updated dependencies
- @tryabby/devtools@3.0.2
- @tryabby/next@3.0.0
## 0.2.5
### Patch Changes
- Updated dependencies
- @tryabby/devtools@3.0.1
- @tryabby/next@3.0.0
## 0.2.4
### Patch Changes
- Updated dependencies
- @tryabby/devtools@3.0.0
- @tryabby/next@3.0.0
## 0.2.3
### Patch Changes
- Updated dependencies
- @tryabby/next@2.4.3
- @tryabby/devtools@2.3.2
## 0.2.2
### Patch Changes
- Updated dependencies
- @tryabby/next@2.4.2
## 0.2.1
### Patch Changes
- Updated dependencies
- @tryabby/next@2.4.1
## 0.2.0
### Minor Changes
- add edge/api function helpers and non-react a/b test function
### Patch Changes
- Updated dependencies
- shared@1.1.0
- @tryabby/next@2.4.0
- @tryabby/devtools@2.3.1
## 0.1.31
### Patch Changes
- Updated dependencies
- @tryabby/devtools@2.3.1
- @tryabby/next@2.3.0
## 0.1.30
### Patch Changes
- Updated dependencies
- @tryabby/devtools@2.3.0
- @tryabby/next@2.3.0
## 0.1.29
### Patch Changes
- Updated dependencies
- @tryabby/next@2.2.2
## 0.1.28
### Patch Changes
- Updated dependencies
- @tryabby/devtools@2.2.3
- @tryabby/next@2.2.1
## 0.1.27
### Patch Changes
- Updated dependencies
- @tryabby/devtools@2.2.2
- @tryabby/next@2.2.1
## 0.1.26
### Patch Changes
- Updated dependencies
- @tryabby/devtools@2.2.1
- @tryabby/next@2.2.1
## 0.1.25
### Patch Changes
- Updated dependencies
- @tryabby/devtools@2.2.0
- @tryabby/next@2.2.0
## 0.1.24
### Patch Changes
- Updated dependencies
- @tryabby/next@1.9.0
## 0.1.23
### Patch Changes
- Updated dependencies
- @tryabby/next@1.8.1
## 0.1.22
### Patch Changes
- Updated dependencies
- @tryabby/next@1.8.0
## 0.1.21
### Patch Changes
- Updated dependencies
- @tryabby/next@1.7.0
## 0.1.20
### Patch Changes
- @tryabby/next@1.6.2
## 0.1.19
### Patch Changes
- @tryabby/next@1.6.1
## 0.1.18
### Patch Changes
- Updated dependencies
- @tryabby/next@1.6.0
## 0.1.17
### Patch Changes
- Updated dependencies
- @tryabby/next@1.5.0
## 0.1.16
### Patch Changes
- @tryabby/next@1.4.4
## 0.1.15
### Patch Changes
- @tryabby/next@1.4.3
## 0.1.14
### Patch Changes
- @tryabby/next@1.4.2
## 0.1.13
### Patch Changes
- Updated dependencies
- @tryabby/next@1.4.1
## 0.1.12
### Patch Changes
- Updated dependencies
- @tryabby/next@1.4.0
## 0.1.11
### Patch Changes
- Updated dependencies
- @tryabby/next@1.3.10
## 0.1.10
### Patch Changes
- Updated dependencies
- @tryabby/next@1.3.9
## 0.1.9
### Patch Changes
- Updated dependencies
- @tryabby/next@1.3.8
## 0.1.8
### Patch Changes
- Updated dependencies
- @tryabby/next@1.3.7
## 0.1.7
### Patch Changes
- Updated dependencies
- @tryabby/next@1.3.6
## 0.1.6
### Patch Changes
- Updated dependencies
- @tryabby/next@1.3.5
## 0.1.5
### Patch Changes
- Updated dependencies
- @tryabby/next@1.3.4
## 0.1.4
### Patch Changes
- Updated dependencies
- @tryabby/next@1.3.3
## 0.1.3
### Patch Changes
- @tryabby/next@1.3.2
## 0.1.2
### Patch Changes
- Updated dependencies
- @tryabby/next@1.3.1
## 0.1.1
### Patch Changes
- Updated dependencies
- Updated dependencies [6df8a62]
- @tryabby/next@1.3.0
================================================
FILE: apps/web/Dockerfile
================================================
FROM node:22.8.0-alpine AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN npm i -g corepack@^0.31.0
RUN corepack enable
FROM base AS builder
RUN apk add --no-cache libc6-compat
RUN apk update
# Set working directory
WORKDIR /app
COPY . .
RUN pnpm add -g turbo
RUN turbo prune web --docker
# Add lockfile and package.json's of isolated subworkspace
FROM base AS installer
RUN apk add --no-cache libc6-compat
RUN apk update
WORKDIR /app
# First install the dependencies (as they change less often)
COPY .gitignore .gitignore
COPY --from=builder /app/out/json/ .
COPY --from=builder /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
# COPY --from=builder /app/tsconfig.json ./tsconfig.json
RUN pnpm install --ignore-scripts --frozen-lockfile
# Build the project
COPY --from=builder /app/out/full/ .
RUN pnpm turbo run db:generate --filter=web
RUN pnpm turbo run build --filter=web...
FROM base AS runner
WORKDIR /app
# Don't run production as root
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
USER nextjs
COPY --from=installer /app/apps/web/next.config.mjs .
COPY --from=installer /app/apps/web/package.json .
# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/.next/standalone ./
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/.next/static ./apps/web/.next/static
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/public ./apps/web/public
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/prisma ./apps/web/prisma
# Set your entrypoint script as the entrypoint
# CMD ["cd apps/web && npm run start:docker"]
CMD ["sh", "-cx", "cd ./apps/web && npm run start:docker"]
================================================
FILE: apps/web/README.md
================================================
# Create T3 App
This is a [T3 Stack](https://create.t3.gg/) project bootstrapped with `create-t3-app`.
## What's next? How do I make an app with this?
We try to keep this project as simple as possible, so you can start with just the scaffolding we set up for you, and add additional things later when they become necessary.
If you are not familiar with the different technologies used in this project, please refer to the respective docs. If you still are in the wind, please join our [Discord](https://t3.gg/discord) and ask for help.
- [Next.js](https://nextjs.org)
- [NextAuth.js](https://next-auth.js.org)
- [Prisma](https://prisma.io)
- [Tailwind CSS](https://tailwindcss.com)
- [tRPC](https://trpc.io)
## Learn More
To learn more about the [T3 Stack](https://create.t3.gg/), take a look at the following resources:
- [Documentation](https://create.t3.gg/)
- [Learn the T3 Stack](https://create.t3.gg/en/faq#what-learning-resources-are-currently-available) — Check out these awesome tutorials
You can check out the [create-t3-app GitHub repository](https://github.com/t3-oss/create-t3-app) — your feedback and contributions are welcome!
## How do I deploy this?
Follow our deployment guides for [Vercel](https://create.t3.gg/en/deployment/vercel) and [Docker](https://create.t3.gg/en/deployment/docker) for more information.
================================================
FILE: apps/web/abby.config.ts
================================================
import { defineConfig } from "@tryabby/core";
import * as validation from "@tryabby/core/validation";
export default defineConfig(
{
// biome-ignore lint/style/noNonNullAssertion:>
projectId: process.env.NEXT_PUBLIC_ABBY_PROJECT_ID!,
currentEnvironment: process.env.VERCEL_ENV ?? process.env.NODE_ENV,
apiUrl: process.env.NEXT_PUBLIC_ABBY_API_URL,
__experimentalCdnUrl: process.env.NEXT_PUBLIC_ABBY_CDN_URL,
debug: process.env.NEXT_PUBLIC_ABBY_DEBUG === "true",
},
{
environments: ["development", "production"],
tests: {
SignupButton: {
variants: ["A", "B"],
},
TipsAndTricks: {
variants: ["Blog"],
},
},
flags: ["AdvancedTestStats", "showFooter", "test"],
remoteConfig: {
abc: "JSON",
},
cookies: { disableByDefault: true, expiresInDays: 30 },
user: {
id: validation.string(),
email: validation.string(),
},
}
);
================================================
FILE: apps/web/components.json
================================================
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "tailwind.config.cjs",
"css": "src/styles/shadcn.css",
"baseColor": "slate",
"cssVariables": true
},
"aliases": {
"utils": "lib/utils",
"components": "components"
}
}
================================================
FILE: apps/web/docker-compose.mailhog.yaml
================================================
version: '3.4'
services:
mailhog:
image: mailhog/mailhog
logging:
driver: 'none' # disable saving logs
ports:
- 1025:1025 # smtp server
- 8025:8025 # web ui
================================================
FILE: apps/web/emails/ContactFormularEmail.tsx
================================================
import { Container } from "@react-email/container";
import { Head } from "@react-email/head";
import { Html } from "@react-email/html";
import { Preview } from "@react-email/preview";
import { Section } from "@react-email/section";
import { ABBY_BASE_URL } from "@tryabby/core";
export type Props = {
surname: string;
name: string;
mailadress: string;
message: string;
};
export default function ContactFormularEmail({
surname,
mailadress,
name,
message,
}: Props) {
const _baseUrl =
process.env.NODE_ENV === "development"
? "http://localhost:3000/"
: ABBY_BASE_URL;
return (
<Html>
<Head />
{/* @ts-ignore types are off */}
<Preview>
{name} {surname} tried to contact{" "}
</Preview>
<Section style={main}>
<Container style={container}>
Name: {name} {surname}
<br />
Email: {mailadress}
<br />
Message:
<br />
<pre>{message}</pre>
</Container>
</Section>
</Html>
);
}
const main = {
backgroundColor: "#ffffff",
margin: "0 auto",
};
const container = {
border: "1px solid #eaeaea",
borderRadius: "5px",
margin: "40px auto",
padding: "20px",
width: "465px",
};
const _logo = {
margin: "0 auto",
};
const _h1 = {
color: "#000",
fontFamily:
"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",
fontSize: "24px",
fontWeight: "normal",
textAlign: "center" as const,
margin: "30px 0",
padding: "0",
};
const _avatar = {
borderRadius: "100%",
};
const _link = {
color: "#067df7",
textDecoration: "none",
};
const _text = {
color: "#000",
fontFamily:
"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",
fontSize: "14px",
lineHeight: "24px",
};
const _black = {
color: "black",
};
const _center = {
verticalAlign: "middle",
};
const _btn = {
backgroundColor: "#000",
borderRadius: "5px",
color: "#fff",
fontFamily:
"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",
fontSize: "12px",
fontWeight: 500,
lineHeight: "50px",
textDecoration: "none",
textAlign: "center" as const,
};
const _spacing = {
marginBottom: "26px",
};
================================================
FILE: apps/web/emails/index.tsx
================================================
import { render } from "@react-email/render";
import { env } from "env/server.mjs";
import { createTransport } from "nodemailer";
import ContactFormularEmail, {
type Props as ContactMailProps,
} from "./ContactFormularEmail";
import InviteEmail, { type Props as InviteEmailProps } from "./invite";
const transporter = createTransport({
pool: true,
url: env.EMAIL_SERVER,
from: `Abby <${env.ABBY_FROM_EMAIL}>`,
});
export function sendInviteEmail(props: InviteEmailProps) {
const email = render(<InviteEmail {...props} />);
return transporter.sendMail({
to: props.invitee.email,
from: `Abby <${env.ABBY_FROM_EMAIL}>`,
subject: `Join ${props.inviter.name} on Abby`,
html: email,
});
}
export function sendContactFormularEmail(props: ContactMailProps) {
const email = render(<ContactFormularEmail {...props} />);
const abbyContactAdress = "tim@tryabby.com";
return transporter.sendMail({
to: abbyContactAdress,
from: `Abby <${env.ABBY_FROM_EMAIL}>`,
subject: `New Message from ${props.name} ${props.surname}`,
html: email,
});
}
================================================
FILE: apps/web/emails/invite.tsx
================================================
import type { Project } from "@prisma/client";
import { Button } from "@react-email/button";
import { Container } from "@react-email/container";
import { Head } from "@react-email/head";
import { Html } from "@react-email/html";
import { Link } from "@react-email/link";
import { Preview } from "@react-email/preview";
import { Section } from "@react-email/section";
import { Text } from "@react-email/text";
import { ABBY_BASE_URL } from "@tryabby/core";
export type Props = {
inviteId: string;
invitee: { name?: string; email: string };
inviter: { name: string; email: string };
project: Project;
};
export default function Email({ inviteId, invitee, inviter, project }: Props) {
const baseUrl =
process.env.NODE_ENV === "development"
? "http://localhost:3000/"
: ABBY_BASE_URL;
return (
<Html>
<Head />
{/* @ts-ignore types are off */}
<Preview>Join {inviter.name} on Abby</Preview>
<Section style={main}>
<Container style={container}>
<Section style={{ marginTop: "32px" }}>
<h1>Abby</h1>
</Section>
<Text style={h1}>
Join <strong>{project.name}</strong> on <strong>Abby</strong>
</Text>
<Text style={text}>Hello {invitee.name ?? invitee.email},</Text>
<Text style={text}>
<strong>{inviter.name}</strong> (
<Link href={`mailto:${inviter.email}`} style={link}>
{inviter.email}
</Link>
) has invited you to the <strong>{project.name}</strong> team on{" "}
<strong>Abby</strong>.
</Text>
<Section style={{ textAlign: "center" }}>
<Button
pX={20}
pY={12}
style={btn}
href={`${baseUrl}invites/${inviteId}`}
>
Join the team
</Button>
</Section>
<Text style={text}>
<br />
or copy and paste this URL into your browser:{" "}
<Link
href={`${baseUrl}invites/${inviteId}`}
target="_blank"
style={link}
rel="noreferrer"
>
{baseUrl}invites/{inviteId}
</Link>
</Text>
</Container>
</Section>
</Html>
);
}
const main = {
backgroundColor: "#ffffff",
margin: "0 auto",
};
const container = {
border: "1px solid #eaeaea",
borderRadius: "5px",
margin: "40px auto",
padding: "20px",
width: "465px",
};
const _logo = {
margin: "0 auto",
};
const h1 = {
color: "#000",
fontFamily:
"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', s
gitextract_322ztv_j/ ├── .changeset/ │ ├── README.md │ └── config.json ├── .dockerignore ├── .github/ │ └── workflows/ │ ├── publish.yaml │ ├── pull_request.yaml │ └── tests.yaml ├── .gitignore ├── .nvmrc ├── .vscode/ │ ├── extensions.json │ └── settings.json ├── Dockerfile ├── LICENSE ├── README.md ├── TRACKING.md ├── apps/ │ ├── cdn/ │ │ ├── .gitignore │ │ ├── README.md │ │ ├── package.json │ │ ├── src/ │ │ │ ├── index.ts │ │ │ └── lib/ │ │ │ ├── cache.ts │ │ │ └── config.ts │ │ └── tsconfig.json │ ├── docs/ │ │ ├── .eslintrc.json │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── next.config.js │ │ ├── package.json │ │ ├── pages/ │ │ │ ├── _app.mdx │ │ │ ├── _meta.json │ │ │ ├── a-b-testing.mdx │ │ │ ├── config.mdx │ │ │ ├── devtools.mdx │ │ │ ├── environments.mdx │ │ │ ├── feature-flags.mdx │ │ │ ├── index.mdx │ │ │ ├── integrations/ │ │ │ │ ├── _meta.json │ │ │ │ ├── angular.mdx │ │ │ │ ├── express.mdx │ │ │ │ ├── koa.mdx │ │ │ │ ├── nextjs.mdx │ │ │ │ ├── node.mdx │ │ │ │ ├── react.mdx │ │ │ │ ├── remix.mdx │ │ │ │ └── svelte.mdx │ │ │ ├── nextjs.mdx │ │ │ ├── reference/ │ │ │ │ ├── _meta.json │ │ │ │ ├── angular.mdx │ │ │ │ ├── cli.mdx │ │ │ │ ├── http.mdx │ │ │ │ ├── nextjs.mdx │ │ │ │ ├── operators.mdx │ │ │ │ ├── react.mdx │ │ │ │ ├── remix.mdx │ │ │ │ └── svelte.mdx │ │ │ ├── remote-config.mdx │ │ │ └── user-segments.mdx │ │ ├── snippets/ │ │ │ └── ReactApi.mdx │ │ ├── theme.config.jsx │ │ └── tsconfig.json │ └── web/ │ ├── .gitignore │ ├── CHANGELOG.md │ ├── Dockerfile │ ├── README.md │ ├── abby.config.ts │ ├── components.json │ ├── docker-compose.mailhog.yaml │ ├── emails/ │ │ ├── ContactFormularEmail.tsx │ │ ├── index.tsx │ │ └── invite.tsx │ ├── next-sitemap.config.js │ ├── next.config.mjs │ ├── package.json │ ├── postcss.config.cjs │ ├── prisma/ │ │ ├── generateCoupons.ts │ │ ├── migrations/ │ │ │ ├── 20221205112748_init_db/ │ │ │ │ └── migration.sql │ │ │ ├── 20221205131914_bruh/ │ │ │ │ └── migration.sql │ │ │ ├── 20221205132203_/ │ │ │ │ └── migration.sql │ │ │ ├── 20221205133208_/ │ │ │ │ └── migration.sql │ │ │ ├── 20221205162949_make_name_and_project_id_unique_identifier_for_test/ │ │ │ │ └── migration.sql │ │ │ ├── 20221207080237_add_event_table/ │ │ │ │ └── migration.sql │ │ │ ├── 20221208123701_add_project_invites/ │ │ │ │ └── migration.sql │ │ │ ├── 20221208134716_use_decimal_for_weights/ │ │ │ │ └── migration.sql │ │ │ ├── 20221208152910_add_project_user/ │ │ │ │ └── migration.sql │ │ │ ├── 20221208172715_/ │ │ │ │ └── migration.sql │ │ │ ├── 20221210195541_add_stripe_info_to_projects/ │ │ │ │ └── migration.sql │ │ │ ├── 20221212063242_add_plan_to_project/ │ │ │ │ └── migration.sql │ │ │ ├── 20230101140121_use_role_enum_for_project_users/ │ │ │ │ └── migration.sql │ │ │ ├── 20230104071050_add_feature_flags/ │ │ │ │ └── migration.sql │ │ │ ├── 20230104080059_make_featureflag_name_unique_per_project/ │ │ │ │ └── migration.sql │ │ │ ├── 20230104081514_fix/ │ │ │ │ └── migration.sql │ │ │ ├── 20230115171608_remove/ │ │ │ │ └── migration.sql │ │ │ ├── 20230210162012_add_history/ │ │ │ │ └── migration.sql │ │ │ ├── 20230222182342_add_sort_index_for_env/ │ │ │ │ └── migration.sql │ │ │ ├── 20230302165144_add_description_to_feature_flag/ │ │ │ │ └── migration.sql │ │ │ ├── 20230303082044_use_text_for_description_for_longer_texts/ │ │ │ │ └── migration.sql │ │ │ ├── 20230303121237_add_flag_value_table/ │ │ │ │ └── migration.sql │ │ │ ├── 20230303130553_/ │ │ │ │ └── migration.sql │ │ │ ├── 20230303181212_update_history/ │ │ │ │ └── migration.sql │ │ │ ├── 20230303181813_remove_env_flag_relation/ │ │ │ │ └── migration.sql │ │ │ ├── 20230303182053_make_id_for_flag_values_unique/ │ │ │ │ └── migration.sql │ │ │ ├── 20230305160755_rename_flag_value_and_add_index_for_faster_access/ │ │ │ │ └── migration.sql │ │ │ ├── 20230326163301_make_payment_interval_required/ │ │ │ │ └── migration.sql │ │ │ ├── 20230511063052_add_coupon_codes_table/ │ │ │ │ └── migration.sql │ │ │ ├── 20230511064125_renmae_price_id_field_for_code/ │ │ │ │ └── migration.sql │ │ │ ├── 20230601155320_add_multivariate_flags/ │ │ │ │ └── migration.sql │ │ │ ├── 20230601161058_update_flag_history/ │ │ │ │ └── migration.sql │ │ │ ├── 20230602080502_remove_json_field_from_flagtype_enum/ │ │ │ │ └── migration.sql │ │ │ ├── 20230611180244_move_flag_type_to_flag_instead_of_value/ │ │ │ │ └── migration.sql │ │ │ ├── 20230628081242_add_api_key_table/ │ │ │ │ └── migration.sql │ │ │ ├── 20230630140739_add_json_type/ │ │ │ │ └── migration.sql │ │ │ ├── 20230731133223_rename_apikey/ │ │ │ │ └── migration.sql │ │ │ ├── 20230803094512_change_api_key_validity_logic/ │ │ │ │ └── migration.sql │ │ │ ├── 20230901064929_add_requests/ │ │ │ │ └── migration.sql │ │ │ ├── 20230901065851_remove_hashed_ip_field/ │ │ │ │ └── migration.sql │ │ │ ├── 20230903075910_add_user_onboarding_information/ │ │ │ │ └── migration.sql │ │ │ ├── 20231207205533_add_api_version_to_request/ │ │ │ │ └── migration.sql │ │ │ ├── 20231207205701_add_apiversion_enum/ │ │ │ │ └── migration.sql │ │ │ ├── 20240620195120_add_apirequest_type/ │ │ │ │ └── migration.sql │ │ │ ├── 20240621084922_add_indices_for_apirequest/ │ │ │ │ └── migration.sql │ │ │ ├── 20240826064116_add_integrations/ │ │ │ │ └── migration.sql │ │ │ ├── 20240903210250_add_anonymous_id_to_event/ │ │ │ │ └── migration.sql │ │ │ ├── 20250131071445_add_flag_rulesets/ │ │ │ │ └── migration.sql │ │ │ └── migration_lock.toml │ │ ├── schema.prisma │ │ ├── seedEvents.ts │ │ └── sql/ │ │ ├── getEventsByTestIdForAllTime.sql │ │ ├── getEventsByTestIdForDay.sql │ │ └── getEventsByTestIdForLast30Days.sql │ ├── sentry.client.config.ts │ ├── sentry.edge.config.ts │ ├── sentry.server.config.ts │ ├── src/ │ │ ├── api/ │ │ │ ├── helpers.ts │ │ │ ├── index.ts │ │ │ └── routes/ │ │ │ ├── health.test.ts │ │ │ ├── health.ts │ │ │ ├── integrations.ts │ │ │ ├── legacy_project_data.test.ts │ │ │ ├── legacy_project_data.ts │ │ │ ├── v1_config.test.ts │ │ │ ├── v1_config.ts │ │ │ ├── v1_event.test.ts │ │ │ ├── v1_event.ts │ │ │ ├── v1_project_data.test.ts │ │ │ ├── v1_project_data.ts │ │ │ └── v2_project_data.ts │ │ ├── components/ │ │ │ ├── AddABTestModal.tsx │ │ │ ├── AddFeatureFlagModal.tsx │ │ │ ├── AsyncCodeExample.tsx │ │ │ ├── Avatar.tsx │ │ │ ├── BlogLayout.tsx │ │ │ ├── Button.tsx │ │ │ ├── CodeSnippet.tsx │ │ │ ├── CodeSnippetModalButton.tsx │ │ │ ├── CreateAPIKeyModal.tsx │ │ │ ├── CreateEnvironmentModal.tsx │ │ │ ├── CreateProjectModal.tsx │ │ │ ├── DashboardButton.tsx │ │ │ ├── DashboardHeader.tsx │ │ │ ├── DashboardSection.tsx │ │ │ ├── DeleteProjectModal.tsx │ │ │ ├── DevtoolsArrow.tsx │ │ │ ├── Divider.tsx │ │ │ ├── Dropdown.tsx │ │ │ ├── DropdownMenu.tsx │ │ │ ├── Editor.tsx │ │ │ ├── EventCounter.tsx │ │ │ ├── Feature.tsx │ │ │ ├── FeatureFlag.tsx │ │ │ ├── FlagIcon.tsx │ │ │ ├── FlagPage.tsx │ │ │ ├── Footer.tsx │ │ │ ├── Input.tsx │ │ │ ├── Integrations.tsx │ │ │ ├── JSONEditor.tsx │ │ │ ├── Layout.tsx │ │ │ ├── LoadingSpinner.tsx │ │ │ ├── Logo.tsx │ │ │ ├── MarketingLayout.tsx │ │ │ ├── Modal.tsx │ │ │ ├── Navbar/ │ │ │ │ └── index.tsx │ │ │ ├── Pricing.tsx │ │ │ ├── Progress.tsx │ │ │ ├── ProjectSwitcher.tsx │ │ │ ├── RadioGroup.tsx │ │ │ ├── RadioSelect.tsx │ │ │ ├── RemoveUserModal.tsx │ │ │ ├── Select.tsx │ │ │ ├── SignupButton.tsx │ │ │ ├── Test/ │ │ │ │ ├── CreateTestSection.tsx │ │ │ │ ├── Metrics.tsx │ │ │ │ ├── Section.tsx │ │ │ │ ├── Serves.tsx │ │ │ │ └── Weights.tsx │ │ │ ├── TitleEdit.tsx │ │ │ ├── Toggle.tsx │ │ │ ├── Tooltip.tsx │ │ │ ├── UsedBy.tsx │ │ │ ├── UserAuthForm.tsx │ │ │ ├── UserInfo.tsx │ │ │ ├── analytics/ │ │ │ │ └── EventGraph.tsx │ │ │ ├── app/ │ │ │ │ ├── AppNav.tsx │ │ │ │ └── UserNav.tsx │ │ │ ├── charts/ │ │ │ │ └── Donut.tsx │ │ │ ├── flags/ │ │ │ │ ├── FlagRuleEditor.tsx │ │ │ │ └── RuleSetEditor.tsx │ │ │ ├── settings/ │ │ │ │ ├── Integrations.tsx │ │ │ │ └── Segments.tsx │ │ │ └── ui/ │ │ │ ├── avatar.tsx │ │ │ ├── button.tsx │ │ │ ├── card.tsx │ │ │ ├── chart.tsx │ │ │ ├── command.tsx │ │ │ ├── dialog.tsx │ │ │ ├── environment-badge.tsx │ │ │ ├── input.tsx │ │ │ ├── label.tsx │ │ │ ├── navigation-menu.tsx │ │ │ ├── popover.tsx │ │ │ ├── radio-group.tsx │ │ │ ├── select.tsx │ │ │ ├── switch.tsx │ │ │ ├── table.tsx │ │ │ ├── tabs.tsx │ │ │ └── tooltip.tsx │ │ ├── env/ │ │ │ ├── client.mjs │ │ │ ├── schema.mjs │ │ │ └── server.mjs │ │ ├── instrumentation.ts │ │ ├── lib/ │ │ │ ├── abby.tsx │ │ │ ├── environment-styles.ts │ │ │ ├── events.ts │ │ │ ├── flags.ts │ │ │ ├── graphs.ts │ │ │ ├── helper.ts │ │ │ ├── hooks/ │ │ │ │ ├── useProjectId.ts │ │ │ │ └── useQueryParam.ts │ │ │ ├── logsnag.ts │ │ │ ├── shiki/ │ │ │ │ ├── languages/ │ │ │ │ │ ├── abap.tmLanguage.json │ │ │ │ │ ├── actionscript-3.tmLanguage.json │ │ │ │ │ ├── ada.tmLanguage.json │ │ │ │ │ ├── apache.tmLanguage.json │ │ │ │ │ ├── apex.tmLanguage.json │ │ │ │ │ ├── apl.tmLanguage.json │ │ │ │ │ ├── applescript.tmLanguage.json │ │ │ │ │ ├── asm.tmLanguage.json │ │ │ │ │ ├── astro.tmLanguage.json │ │ │ │ │ ├── awk.tmLanguage.json │ │ │ │ │ ├── ballerina.tmLanguage.json │ │ │ │ │ ├── bat.tmLanguage.json │ │ │ │ │ ├── berry.tmLanguage.json │ │ │ │ │ ├── bibtex.tmLanguage.json │ │ │ │ │ ├── bicep.tmLanguage.json │ │ │ │ │ ├── blade.tmLanguage.json │ │ │ │ │ ├── c.tmLanguage.json │ │ │ │ │ ├── cadence.tmLanguage.json │ │ │ │ │ ├── clarity.tmLanguage.json │ │ │ │ │ ├── clojure.tmLanguage.json │ │ │ │ │ ├── cmake.tmLanguage.json │ │ │ │ │ ├── cobol.tmLanguage.json │ │ │ │ │ ├── codeql.tmLanguage.json │ │ │ │ │ ├── coffee.tmLanguage.json │ │ │ │ │ ├── cpp-macro.tmLanguage.json │ │ │ │ │ ├── cpp.tmLanguage.json │ │ │ │ │ ├── crystal.tmLanguage.json │ │ │ │ │ ├── csharp.tmLanguage.json │ │ │ │ │ ├── css.tmLanguage.json │ │ │ │ │ ├── cue.tmLanguage.json │ │ │ │ │ ├── d.tmLanguage.json │ │ │ │ │ ├── dart.tmLanguage.json │ │ │ │ │ ├── diff.tmLanguage.json │ │ │ │ │ ├── docker.tmLanguage.json │ │ │ │ │ ├── dream-maker.tmLanguage.json │ │ │ │ │ ├── elixir.tmLanguage.json │ │ │ │ │ ├── elm.tmLanguage.json │ │ │ │ │ ├── erb.tmLanguage.json │ │ │ │ │ ├── erlang.tmLanguage.json │ │ │ │ │ ├── fish.tmLanguage.json │ │ │ │ │ ├── fsharp.tmLanguage.json │ │ │ │ │ ├── gherkin.tmLanguage.json │ │ │ │ │ ├── git-commit.tmLanguage.json │ │ │ │ │ ├── git-rebase.tmLanguage.json │ │ │ │ │ ├── glsl.tmLanguage.json │ │ │ │ │ ├── gnuplot.tmLanguage.json │ │ │ │ │ ├── go.tmLanguage.json │ │ │ │ │ ├── graphql.tmLanguage.json │ │ │ │ │ ├── groovy.tmLanguage.json │ │ │ │ │ ├── hack.tmLanguage.json │ │ │ │ │ ├── haml.tmLanguage.json │ │ │ │ │ ├── handlebars.tmLanguage.json │ │ │ │ │ ├── haskell.tmLanguage.json │ │ │ │ │ ├── hcl.tmLanguage.json │ │ │ │ │ ├── hlsl.tmLanguage.json │ │ │ │ │ ├── html.tmLanguage.json │ │ │ │ │ ├── ini.tmLanguage.json │ │ │ │ │ ├── java.tmLanguage.json │ │ │ │ │ ├── javascript.tmLanguage.json │ │ │ │ │ ├── jinja-html.tmLanguage.json │ │ │ │ │ ├── jinja.tmLanguage.json │ │ │ │ │ ├── json.tmLanguage.json │ │ │ │ │ ├── jsonc.tmLanguage.json │ │ │ │ │ ├── jsonnet.tmLanguage.json │ │ │ │ │ ├── jssm.tmLanguage.json │ │ │ │ │ ├── jsx.tmLanguage.json │ │ │ │ │ ├── julia.tmLanguage.json │ │ │ │ │ ├── kotlin.tmLanguage.json │ │ │ │ │ ├── latex.tmLanguage.json │ │ │ │ │ ├── less.tmLanguage.json │ │ │ │ │ ├── liquid.tmLanguage.json │ │ │ │ │ ├── lisp.tmLanguage.json │ │ │ │ │ ├── logo.tmLanguage.json │ │ │ │ │ ├── lua.tmLanguage.json │ │ │ │ │ ├── make.tmLanguage.json │ │ │ │ │ ├── markdown.tmLanguage.json │ │ │ │ │ ├── marko.tmLanguage.json │ │ │ │ │ ├── matlab.tmLanguage.json │ │ │ │ │ ├── mdx.tmLanguage.json │ │ │ │ │ ├── mermaid.tmLanguage.json │ │ │ │ │ ├── nginx.tmLanguage.json │ │ │ │ │ ├── nim.tmLanguage.json │ │ │ │ │ ├── nix.tmLanguage.json │ │ │ │ │ ├── objective-c.tmLanguage.json │ │ │ │ │ ├── objective-cpp.tmLanguage.json │ │ │ │ │ ├── ocaml.tmLanguage.json │ │ │ │ │ ├── pascal.tmLanguage.json │ │ │ │ │ ├── perl.tmLanguage.json │ │ │ │ │ ├── php-html.tmLanguage.json │ │ │ │ │ ├── php.tmLanguage.json │ │ │ │ │ ├── plsql.tmLanguage.json │ │ │ │ │ ├── postcss.tmLanguage.json │ │ │ │ │ ├── powershell.tmLanguage.json │ │ │ │ │ ├── prisma.tmLanguage.json │ │ │ │ │ ├── prolog.tmLanguage.json │ │ │ │ │ ├── pug.tmLanguage.json │ │ │ │ │ ├── puppet.tmLanguage.json │ │ │ │ │ ├── purescript.tmLanguage.json │ │ │ │ │ ├── python.tmLanguage.json │ │ │ │ │ ├── r.tmLanguage.json │ │ │ │ │ ├── raku.tmLanguage.json │ │ │ │ │ ├── razor.tmLanguage.json │ │ │ │ │ ├── rel.tmLanguage.json │ │ │ │ │ ├── riscv.tmLanguage.json │ │ │ │ │ ├── rst.tmLanguage.json │ │ │ │ │ ├── ruby.tmLanguage.json │ │ │ │ │ ├── rust.tmLanguage.json │ │ │ │ │ ├── sas.tmLanguage.json │ │ │ │ │ ├── sass.tmLanguage.json │ │ │ │ │ ├── scala.tmLanguage.json │ │ │ │ │ ├── scheme.tmLanguage.json │ │ │ │ │ ├── scss.tmLanguage.json │ │ │ │ │ ├── shaderlab.tmLanguage.json │ │ │ │ │ ├── shellscript.tmLanguage.json │ │ │ │ │ ├── smalltalk.tmLanguage.json │ │ │ │ │ ├── solidity.tmLanguage.json │ │ │ │ │ ├── sparql.tmLanguage.json │ │ │ │ │ ├── sql.tmLanguage.json │ │ │ │ │ ├── ssh-config.tmLanguage.json │ │ │ │ │ ├── stata.tmLanguage.json │ │ │ │ │ ├── stylus.tmLanguage.json │ │ │ │ │ ├── svelte.tmLanguage.json │ │ │ │ │ ├── swift.tmLanguage.json │ │ │ │ │ ├── system-verilog.tmLanguage.json │ │ │ │ │ ├── tasl.tmLanguage.json │ │ │ │ │ ├── tcl.tmLanguage.json │ │ │ │ │ ├── tex.tmLanguage.json │ │ │ │ │ ├── toml.tmLanguage.json │ │ │ │ │ ├── tsx.tmLanguage.json │ │ │ │ │ ├── turtle.tmLanguage.json │ │ │ │ │ ├── twig.tmLanguage.json │ │ │ │ │ ├── typescript.tmLanguage.json │ │ │ │ │ ├── vb.tmLanguage.json │ │ │ │ │ ├── verilog.tmLanguage.json │ │ │ │ │ ├── vhdl.tmLanguage.json │ │ │ │ │ ├── viml.tmLanguage.json │ │ │ │ │ ├── vue-html.tmLanguage.json │ │ │ │ │ ├── vue.tmLanguage.json │ │ │ │ │ ├── wasm.tmLanguage.json │ │ │ │ │ ├── wenyan.tmLanguage.json │ │ │ │ │ ├── xml.tmLanguage.json │ │ │ │ │ ├── xsl.tmLanguage.json │ │ │ │ │ ├── yaml.tmLanguage.json │ │ │ │ │ └── zenscript.tmLanguage.json │ │ │ │ └── themes/ │ │ │ │ ├── css-variables.json │ │ │ │ ├── dark-plus.json │ │ │ │ ├── dracula-soft.json │ │ │ │ ├── dracula.json │ │ │ │ ├── github-dark-dimmed.json │ │ │ │ ├── github-dark.json │ │ │ │ ├── github-light.json │ │ │ │ ├── hc_light.json │ │ │ │ ├── light-plus.json │ │ │ │ ├── material-darker.json │ │ │ │ ├── material-default.json │ │ │ │ ├── material-lighter.json │ │ │ │ ├── material-ocean.json │ │ │ │ ├── material-palenight.json │ │ │ │ ├── min-dark.json │ │ │ │ ├── min-light.json │ │ │ │ ├── monokai.json │ │ │ │ ├── nord.json │ │ │ │ ├── one-dark-pro.json │ │ │ │ ├── poimandres.json │ │ │ │ ├── rose-pine-dawn.json │ │ │ │ ├── rose-pine-moon.json │ │ │ │ ├── rose-pine.json │ │ │ │ ├── slack-dark.json │ │ │ │ ├── slack-ochin.json │ │ │ │ ├── solarized-dark.json │ │ │ │ ├── solarized-light.json │ │ │ │ ├── vitesse-dark.json │ │ │ │ └── vitesse-light.json │ │ │ ├── stripe.ts │ │ │ ├── tracking.ts │ │ │ └── utils.ts │ │ ├── middleware.ts │ │ ├── pages/ │ │ │ ├── _app.tsx │ │ │ ├── _document.tsx │ │ │ ├── _error.jsx │ │ │ ├── api/ │ │ │ │ ├── [[...route]].ts │ │ │ │ ├── auth/ │ │ │ │ │ └── [...nextauth].ts │ │ │ │ ├── checkout/ │ │ │ │ │ └── index.ts │ │ │ │ ├── invalidate-limits.ts │ │ │ │ ├── stripe.ts │ │ │ │ └── trpc/ │ │ │ │ └── [trpc].ts │ │ │ ├── checkout/ │ │ │ │ └── index.tsx │ │ │ ├── contact.tsx │ │ │ ├── devtools.tsx │ │ │ ├── imprint.mdx │ │ │ ├── index.tsx │ │ │ ├── integrations/ │ │ │ │ ├── [integration]/ │ │ │ │ │ └── index.tsx │ │ │ │ └── index.tsx │ │ │ ├── invites/ │ │ │ │ ├── [inviteId].tsx │ │ │ │ └── index.tsx │ │ │ ├── login.tsx │ │ │ ├── nextjs.mdx │ │ │ ├── privacy.mdx │ │ │ ├── profile/ │ │ │ │ ├── generate-token.tsx │ │ │ │ └── index.tsx │ │ │ ├── projects/ │ │ │ │ └── [projectId]/ │ │ │ │ ├── environments.tsx │ │ │ │ ├── events.tsx │ │ │ │ ├── flags/ │ │ │ │ │ ├── [flagId].tsx │ │ │ │ │ └── index.tsx │ │ │ │ ├── index.tsx │ │ │ │ ├── redeem.tsx │ │ │ │ ├── remote-config.tsx │ │ │ │ ├── settings.tsx │ │ │ │ └── tests/ │ │ │ │ └── [testId].tsx │ │ │ ├── redeem.tsx │ │ │ ├── signup.tsx │ │ │ ├── terms.mdx │ │ │ ├── tips-and-insights/ │ │ │ │ ├── a-b-nextjs.mdx │ │ │ │ ├── a-b-react.mdx │ │ │ │ ├── feature-flagging-in-modern-development-teams.mdx │ │ │ │ ├── feature-flags-for-project-managers.mdx │ │ │ │ ├── feature-flags-next.mdx │ │ │ │ ├── honest-marketing.mdx │ │ │ │ └── index.tsx │ │ │ └── welcome.tsx │ │ ├── seo/ │ │ │ └── SeoDescriptions.ts │ │ ├── server/ │ │ │ ├── common/ │ │ │ │ ├── auth.ts │ │ │ │ ├── config-cache.ts │ │ │ │ ├── get-server-auth-session.ts │ │ │ │ ├── getRequestOrigin.ts │ │ │ │ ├── github-app.ts │ │ │ │ ├── integrations.ts │ │ │ │ ├── memory-cache.ts │ │ │ │ ├── plans.ts │ │ │ │ ├── ratelimit.ts │ │ │ │ ├── stripe.ts │ │ │ │ └── tracking.ts │ │ │ ├── db/ │ │ │ │ ├── client.ts │ │ │ │ └── redis.ts │ │ │ ├── queue/ │ │ │ │ ├── AfterDataRequest.ts │ │ │ │ ├── event.ts │ │ │ │ └── queues.ts │ │ │ ├── services/ │ │ │ │ ├── AiFlagRemovalService.ts │ │ │ │ ├── ConfigService.ts │ │ │ │ ├── EventService.ts │ │ │ │ ├── FlagService.ts │ │ │ │ ├── IntegrationService.ts │ │ │ │ ├── InviteService.ts │ │ │ │ ├── PlausibleService.ts │ │ │ │ ├── ProjectService.ts │ │ │ │ ├── RequestCache.ts │ │ │ │ ├── RequestService.ts │ │ │ │ └── TestService.ts │ │ │ └── trpc/ │ │ │ ├── context.ts │ │ │ ├── helpers.ts │ │ │ ├── router/ │ │ │ │ ├── _app.ts │ │ │ │ ├── apikey.ts │ │ │ │ ├── auth.ts │ │ │ │ ├── coupons.ts │ │ │ │ ├── environments.ts │ │ │ │ ├── events.ts │ │ │ │ ├── example.ts │ │ │ │ ├── flags.ts │ │ │ │ ├── invite.ts │ │ │ │ ├── misc.ts │ │ │ │ ├── project-user.ts │ │ │ │ ├── project.ts │ │ │ │ ├── tests.ts │ │ │ │ └── user.ts │ │ │ └── trpc.ts │ │ ├── styles/ │ │ │ ├── shadcn.css │ │ │ └── theme.json │ │ ├── types/ │ │ │ ├── flags.ts │ │ │ ├── next-auth.d.ts │ │ │ └── plausible-events.ts │ │ └── utils/ │ │ ├── apiKey.ts │ │ ├── checkSession.ts │ │ ├── snippets.ts │ │ ├── trpc.ts │ │ ├── updateSession.ts │ │ └── validateFlags.ts │ ├── tailwind.config.cjs │ ├── tsconfig.json │ ├── vercel.json │ └── vitest.config.ts ├── biome.json ├── docker-compose.prod.yaml ├── docker-compose.yaml ├── docs/ │ └── integrations.md ├── package.json ├── packages/ │ ├── angular/ │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── angular.json │ │ ├── karma.conf.js │ │ ├── ng-package.json │ │ ├── package.json │ │ ├── src/ │ │ │ ├── lib/ │ │ │ │ ├── StorageService.ts │ │ │ │ ├── abby-logger.service.ts │ │ │ │ ├── abby.module.ts │ │ │ │ ├── abby.service.spec.ts │ │ │ │ ├── abby.service.ts │ │ │ │ ├── devtools.component.ts │ │ │ │ ├── flag.directive.ts │ │ │ │ ├── get-remote-config.pipe.spec.ts │ │ │ │ ├── get-remote-config.pipe.ts │ │ │ │ ├── get-variant.pipe.spec.ts │ │ │ │ ├── get-variant.pipe.ts │ │ │ │ └── test.directive.ts │ │ │ └── public-api.ts │ │ ├── tsconfig.json │ │ ├── tsconfig.lib.json │ │ ├── tsconfig.lib.prod.json │ │ └── tsconfig.spec.json │ ├── cli/ │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src/ │ │ │ ├── add-flag.ts │ │ │ ├── add-remote-config.ts │ │ │ ├── ai.ts │ │ │ ├── auth.ts │ │ │ ├── check.ts │ │ │ ├── consts.ts │ │ │ ├── http.ts │ │ │ ├── index.ts │ │ │ ├── init.ts │ │ │ ├── pull.ts │ │ │ ├── push.ts │ │ │ ├── schemas.ts │ │ │ ├── sharedOptions.ts │ │ │ ├── update-config-file.ts │ │ │ └── util.ts │ │ ├── tests/ │ │ │ ├── abby.config.stub.ts │ │ │ ├── base.test.ts │ │ │ ├── mocks/ │ │ │ │ ├── handlers.ts │ │ │ │ └── server.ts │ │ │ └── setup.ts │ │ ├── tsconfig.json │ │ ├── tsup.config.ts │ │ └── vite.config.ts │ ├── core/ │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── package.json │ │ ├── src/ │ │ │ ├── defineConfig.ts │ │ │ ├── helpers.ts │ │ │ ├── index.ts │ │ │ ├── mathHelpers.ts │ │ │ ├── shared/ │ │ │ │ ├── constants.ts │ │ │ │ ├── helpers.ts │ │ │ │ ├── http.ts │ │ │ │ ├── index.ts │ │ │ │ ├── interfaces.ts │ │ │ │ ├── schemas.ts │ │ │ │ └── types.ts │ │ │ └── validation/ │ │ │ └── index.ts │ │ ├── tests/ │ │ │ ├── base.test.ts │ │ │ ├── defineConfig.test.ts │ │ │ ├── math.test.ts │ │ │ ├── mocks/ │ │ │ │ ├── handlers.ts │ │ │ │ └── server.ts │ │ │ ├── setup.ts │ │ │ ├── types.test.ts │ │ │ └── validation.test.ts │ │ ├── tsconfig.json │ │ ├── tsup.config.ts │ │ └── vite.config.ts │ ├── devtools/ │ │ ├── .gitignore │ │ ├── .storybook/ │ │ │ ├── main.ts │ │ │ └── preview.ts │ │ ├── .vscode/ │ │ │ └── extensions.json │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src/ │ │ │ ├── Devtools.stories.ts │ │ │ ├── Devtools.svelte │ │ │ ├── components/ │ │ │ │ ├── ChevronIcon.svelte │ │ │ │ ├── CloseIcon.svelte │ │ │ │ ├── Input.svelte │ │ │ │ ├── JsonEditor.svelte │ │ │ │ ├── Modal.svelte │ │ │ │ ├── Select.svelte │ │ │ │ └── Switch.svelte │ │ │ ├── index.ts │ │ │ ├── lib/ │ │ │ │ ├── storage.ts │ │ │ │ └── types.ts │ │ │ └── vite-env.d.ts │ │ ├── svelte.config.js │ │ ├── tsconfig.json │ │ ├── tsconfig.node.json │ │ └── vite.config.ts │ ├── next/ │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src/ │ │ │ ├── cache.ts │ │ │ ├── helpers.ts │ │ │ ├── index.tsx │ │ │ └── withAbby.tsx │ │ ├── tests/ │ │ │ ├── cache.test.ts │ │ │ ├── mocks/ │ │ │ │ ├── handlers.ts │ │ │ │ └── server.ts │ │ │ ├── setup.ts │ │ │ ├── types.test.tsx │ │ │ ├── useAbby.test.tsx │ │ │ └── withAbby.test.tsx │ │ ├── tsconfig.json │ │ ├── tsup.config.ts │ │ └── vite.config.ts │ ├── node/ │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── fix-exports.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── express/ │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ ├── koa/ │ │ │ │ └── index.ts │ │ │ └── utils/ │ │ │ └── MemoryStorage.ts │ │ ├── tests/ │ │ │ ├── express.test.ts │ │ │ ├── koa.test.ts │ │ │ ├── mocks/ │ │ │ │ ├── handlers.ts │ │ │ │ └── server.ts │ │ │ ├── node.test.ts │ │ │ └── setup.ts │ │ ├── tsconfig.json │ │ ├── tsup.config.ts │ │ └── vite.config.ts │ ├── react/ │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src/ │ │ │ ├── StorageService.ts │ │ │ ├── context.tsx │ │ │ ├── helpers.ts │ │ │ └── index.ts │ │ ├── tests/ │ │ │ ├── helpers.test.ts │ │ │ ├── mocks/ │ │ │ │ ├── handlers.ts │ │ │ │ └── server.ts │ │ │ ├── setup.ts │ │ │ ├── ssr.test.tsx │ │ │ ├── types.test.tsx │ │ │ └── useAbby.test.tsx │ │ ├── tsconfig.json │ │ ├── tsup.config.ts │ │ └── vite.config.ts │ ├── remix/ │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src/ │ │ │ ├── cache.ts │ │ │ └── index.tsx │ │ ├── tests/ │ │ │ ├── cache.test.ts │ │ │ ├── mocks/ │ │ │ │ ├── handlers.ts │ │ │ │ └── server.ts │ │ │ ├── setup.ts │ │ │ ├── ssr.test.tsx │ │ │ ├── types.test.tsx │ │ │ └── useAbby.test.tsx │ │ ├── tsconfig.json │ │ ├── tsup.config.ts │ │ └── vite.config.ts │ ├── svelte/ │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src/ │ │ │ ├── index.ts │ │ │ ├── lib/ │ │ │ │ ├── AbbyDevtools.svelte │ │ │ │ ├── AbbyProvider.svelte │ │ │ │ ├── StorageService.ts │ │ │ │ └── createAbby.ts │ │ │ └── tests/ │ │ │ ├── abby.ts │ │ │ ├── featureFlags.test.ts │ │ │ ├── mocks/ │ │ │ │ ├── handlers.ts │ │ │ │ └── server.ts │ │ │ ├── pages/ │ │ │ │ └── +test.svelte │ │ │ ├── remoteConfig.test.ts │ │ │ ├── setupTest.ts │ │ │ ├── useAbby.test.ts │ │ │ └── withAbby.test.ts │ │ ├── svelte.config.js │ │ ├── tsconfig.json │ │ ├── tsconfig.node.json │ │ └── vite.config.ts │ └── tsconfig/ │ ├── README.md │ ├── angular-library.json │ ├── base.json │ ├── nextjs.json │ ├── package.json │ └── react-library.json ├── pnpm-workspace.yaml └── turbo.json
SYMBOL INDEX (592 symbols across 224 files)
FILE: apps/cdn/src/lib/cache.ts
type CacheConfig (line 3) | type CacheConfig = {
type Entry (line 17) | type Entry<TValue> = {
type ZoneCacheConfig (line 21) | type ZoneCacheConfig = CacheConfig & {
class ZoneCache (line 30) | class ZoneCache<TNamespaces extends Record<string, unknown>> {
method constructor (line 33) | constructor(config: ZoneCacheConfig) {
method createCacheKey (line 37) | private createCacheKey<TName extends keyof TNamespaces>(
method get (line 47) | public async get<TName extends keyof TNamespaces>(
method set (line 70) | public async set<TName extends keyof TNamespaces>(
FILE: apps/cdn/src/lib/config.ts
class ConfigService (line 7) | class ConfigService {
method constructor (line 8) | constructor(
method retrieveConfig (line 14) | async retrieveConfig({
FILE: apps/docs/theme.config.jsx
method useNextSeoProps (line 4) | useNextSeoProps() {
FILE: apps/web/emails/ContactFormularEmail.tsx
type Props (line 8) | type Props = {
function ContactFormularEmail (line 15) | function ContactFormularEmail({
FILE: apps/web/emails/index.tsx
function sendInviteEmail (line 15) | function sendInviteEmail(props: InviteEmailProps) {
function sendContactFormularEmail (line 26) | function sendContactFormularEmail(props: ContactMailProps) {
FILE: apps/web/emails/invite.tsx
type Props (line 12) | type Props = {
function Email (line 19) | function Email({ inviteId, invitee, inviter, project }: Props) {
FILE: apps/web/next.config.mjs
method headers (line 52) | async headers() {
FILE: apps/web/prisma/generateCoupons.ts
constant COUPON_CODE_AMOUNT (line 7) | const COUPON_CODE_AMOUNT = 200;
function main (line 9) | async function main() {
FILE: apps/web/prisma/migrations/20221205112748_init_db/migration.sql
type `Example` (line 2) | CREATE TABLE `Example` (
type `Account` (line 11) | CREATE TABLE `Account` (
type `Session` (line 32) | CREATE TABLE `Session` (
type `User` (line 44) | CREATE TABLE `User` (
type `VerificationToken` (line 56) | CREATE TABLE `VerificationToken` (
FILE: apps/web/prisma/migrations/20221205131914_bruh/migration.sql
type `Project` (line 2) | CREATE TABLE `Project` (
type `ProjectMemeber` (line 12) | CREATE TABLE `ProjectMemeber` (
FILE: apps/web/prisma/migrations/20221205133208_/migration.sql
type `Test` (line 2) | CREATE TABLE `Test` (
type `Option` (line 14) | CREATE TABLE `Option` (
type `Project_userId_idx` (line 25) | CREATE INDEX `Project_userId_idx` ON `Project`(`userId`)
FILE: apps/web/prisma/migrations/20221205162949_make_name_and_project_id_unique_identifier_for_test/migration.sql
type `Test_projectId_name_key` (line 12) | CREATE UNIQUE INDEX `Test_projectId_name_key` ON `Test`(`projectId`, `na...
FILE: apps/web/prisma/migrations/20221207080237_add_event_table/migration.sql
type `Event` (line 2) | CREATE TABLE `Event` (
FILE: apps/web/prisma/migrations/20221208123701_add_project_invites/migration.sql
type `ProjectInvite` (line 2) | CREATE TABLE `ProjectInvite` (
FILE: apps/web/prisma/migrations/20221208152910_add_project_user/migration.sql
type `ProjectUser` (line 2) | CREATE TABLE `ProjectUser` (
FILE: apps/web/prisma/migrations/20221210195541_add_stripe_info_to_projects/migration.sql
type `Project_stripeCustomerId_key` (line 15) | CREATE UNIQUE INDEX `Project_stripeCustomerId_key` ON `Project`(`stripeC...
type `Project_stripeSubscriptionId_key` (line 18) | CREATE UNIQUE INDEX `Project_stripeSubscriptionId_key` ON `Project`(`str...
FILE: apps/web/prisma/migrations/20230104071050_add_feature_flags/migration.sql
type `FeatureFlag` (line 2) | CREATE TABLE `FeatureFlag` (
type `Environment` (line 17) | CREATE TABLE `Environment` (
FILE: apps/web/prisma/migrations/20230104080059_make_featureflag_name_unique_per_project/migration.sql
type `FeatureFlag_projectId_name_key` (line 8) | CREATE UNIQUE INDEX `FeatureFlag_projectId_name_key` ON `FeatureFlag`(`p...
FILE: apps/web/prisma/migrations/20230104081514_fix/migration.sql
type `FeatureFlag_projectId_name_environmentId_key` (line 11) | CREATE UNIQUE INDEX `FeatureFlag_projectId_name_environmentId_key` ON `F...
FILE: apps/web/prisma/migrations/20230210162012_add_history/migration.sql
type `FeatureFlagHistory` (line 2) | CREATE TABLE `FeatureFlagHistory` (
FILE: apps/web/prisma/migrations/20230303121237_add_flag_value_table/migration.sql
type `FlagValue` (line 10) | CREATE TABLE `FlagValue` (
type `_tempFlag` (line 24) | CREATE TABLE `_tempFlag` (
type `FeatureFlag_projectId_name_key` (line 53) | CREATE UNIQUE INDEX `FeatureFlag_projectId_name_key` ON `FeatureFlag`(`p...
type `FeatureFlagHistory_flagId_environmentId_idx` (line 56) | CREATE INDEX `FeatureFlagHistory_flagId_environmentId_idx` ON `FeatureFl...
FILE: apps/web/prisma/migrations/20230303181212_update_history/migration.sql
type `FeatureFlagHistory_flagValueId_idx` (line 21) | CREATE INDEX `FeatureFlagHistory_flagValueId_idx` ON `FeatureFlagHistory...
FILE: apps/web/prisma/migrations/20230303182053_make_id_for_flag_values_unique/migration.sql
type `FlagValue_id_key` (line 11) | CREATE UNIQUE INDEX `FlagValue_id_key` ON `FlagValue`(`id`)
FILE: apps/web/prisma/migrations/20230305160755_rename_flag_value_and_add_index_for_faster_access/migration.sql
type `Environment_projectId_name_idx` (line 2) | CREATE INDEX `Environment_projectId_name_idx` ON `Environment`(`projectI...
FILE: apps/web/prisma/migrations/20230511063052_add_coupon_codes_table/migration.sql
type `CouponCodes` (line 2) | CREATE TABLE `CouponCodes` (
FILE: apps/web/prisma/migrations/20230628081242_add_api_key_table/migration.sql
type `APIKey` (line 2) | CREATE TABLE `APIKey` (
FILE: apps/web/prisma/migrations/20230731133223_rename_apikey/migration.sql
type `ApiKey` (line 11) | CREATE TABLE `ApiKey` (
FILE: apps/web/prisma/migrations/20230901064929_add_requests/migration.sql
type `ApiRequest` (line 2) | CREATE TABLE `ApiRequest` (
FILE: apps/web/prisma/migrations/20240621084922_add_indices_for_apirequest/migration.sql
type `ApiRequest_createdAt_idx` (line 2) | CREATE INDEX `ApiRequest_createdAt_idx` ON `ApiRequest`(`createdAt`)
type `ApiRequest_type_idx` (line 5) | CREATE INDEX `ApiRequest_type_idx` ON `ApiRequest`(`type`)
FILE: apps/web/prisma/migrations/20240826064116_add_integrations/migration.sql
type `Integration` (line 2) | CREATE TABLE `Integration` (
FILE: apps/web/prisma/migrations/20250131071445_add_flag_rulesets/migration.sql
type `UserSegment` (line 2) | CREATE TABLE `UserSegment` (
type `FlagRuleSet` (line 16) | CREATE TABLE `FlagRuleSet` (
FILE: apps/web/prisma/seedEvents.ts
function randomDateFromLast30Days (line 7) | function randomDateFromLast30Days(): Date {
function main (line 18) | async function main() {
FILE: apps/web/src/api/routes/health.ts
function makeHealthRoute (line 5) | function makeHealthRoute() {
FILE: apps/web/src/api/routes/integrations.ts
function makeIntegrationsRoute (line 11) | function makeIntegrationsRoute() {
FILE: apps/web/src/api/routes/legacy_project_data.ts
function getAbbyResponseWithCache (line 20) | async function getAbbyResponseWithCache({
function makeLegacyProjectDataRoute (line 80) | function makeLegacyProjectDataRoute() {
FILE: apps/web/src/api/routes/v1_config.ts
function makeConfigRoute (line 49) | function makeConfigRoute() {
FILE: apps/web/src/api/routes/v1_event.ts
function makeEventRoute (line 9) | function makeEventRoute() {
FILE: apps/web/src/api/routes/v1_project_data.ts
constant X_ABBY_CACHE_HEADER (line 12) | const X_ABBY_CACHE_HEADER = "X-Abby-Cache";
function getAbbyResponseWithCache (line 14) | async function getAbbyResponseWithCache({
function makeProjectDataRoute (line 79) | function makeProjectDataRoute() {
FILE: apps/web/src/api/routes/v2_project_data.ts
constant X_ABBY_CACHE_HEADER (line 13) | const X_ABBY_CACHE_HEADER = "X-Abby-Cache";
function getAbbyResponseWithCache (line 15) | async function getAbbyResponseWithCache({
function makeV2ProjectDataRoute (line 93) | function makeV2ProjectDataRoute() {
FILE: apps/web/src/components/AddABTestModal.tsx
type UIVariant (line 14) | type UIVariant = { name: string; weight: number; id: string };
constant INITIAL_VARIANTS (line 16) | const INITIAL_VARIANTS: Array<UIVariant> = [
constant INITIAL_TEST_NAME (line 30) | const INITIAL_TEST_NAME = "New Test";
type Props (line 32) | type Props = {
FILE: apps/web/src/components/AddFeatureFlagModal.tsx
type Props (line 18) | type Props = {
type FlagFormValues (line 25) | type FlagFormValues = {
function ChangeFlagForm (line 31) | function ChangeFlagForm({
method onSuccess (line 175) | onSuccess() {
FILE: apps/web/src/components/AsyncCodeExample.tsx
function AsyncCodeExample (line 5) | function AsyncCodeExample() {
FILE: apps/web/src/components/Avatar.tsx
function getNameFromEmail (line 5) | function getNameFromEmail(email: string) {
type Props (line 14) | type Props = {
FILE: apps/web/src/components/BlogLayout.tsx
type Props (line 9) | type Props = Pick<MarketingLayoutProps, "children" | "seoTitle"> & {
function BlogLayout (line 13) | function BlogLayout({ children, seoTitle, meta }: Props) {
FILE: apps/web/src/components/Button.tsx
type ButtonProps (line 4) | interface ButtonProps<T extends React.ElementType = React.ElementType> {
function Button (line 9) | function Button<T extends React.ElementType = "button">({
FILE: apps/web/src/components/CodeSnippet.tsx
constant INTEGRATIONS (line 12) | const INTEGRATIONS: Record<
type Props (line 37) | type Props = {
function BaseCodeSnippet (line 41) | function BaseCodeSnippet(
function CodeSnippet (line 102) | function CodeSnippet({ projectId }: Props) {
FILE: apps/web/src/components/CodeSnippetModalButton.tsx
function CodeSnippetModal (line 18) | function CodeSnippetModal({
function CodeSnippetModalButton (line 43) | function CodeSnippetModalButton() {
FILE: apps/web/src/components/CreateAPIKeyModal.tsx
type Props (line 8) | type Props = {
FILE: apps/web/src/components/CreateEnvironmentModal.tsx
type Props (line 10) | type Props = {
method onSuccess (line 26) | onSuccess() {
FILE: apps/web/src/components/CreateProjectModal.tsx
type Props (line 10) | type Props = {
method onSuccess (line 24) | onSuccess() {
FILE: apps/web/src/components/DashboardButton.tsx
type Props (line 4) | type Props = ComponentPropsWithRef<"button">;
function DashboardButton (line 6) | function DashboardButton({ className, ...props }: Props) {
FILE: apps/web/src/components/DashboardHeader.tsx
type Props (line 4) | type Props = {
function DashboardHeader (line 8) | function DashboardHeader({ title }: Props) {
FILE: apps/web/src/components/DashboardSection.tsx
function DashboardSection (line 3) | function DashboardSection({
function DashboardSectionTitle (line 19) | function DashboardSectionTitle({
function DashboardSectionSubtitle (line 31) | function DashboardSectionSubtitle({
FILE: apps/web/src/components/DeleteProjectModal.tsx
type Props (line 8) | type Props = {
function DeleteProjectModal (line 13) | function DeleteProjectModal({ isOpen, onClose }: Props) {
FILE: apps/web/src/components/DevtoolsArrow.tsx
constant DEVTOOLS_ID (line 7) | const DEVTOOLS_ID = "abby-devtools-collapsed";
function useDevtoolsPosition (line 9) | function useDevtoolsPosition() {
function DevtoolsArrow (line 63) | function DevtoolsArrow() {
FILE: apps/web/src/components/Divider.tsx
function Divider (line 3) | function Divider({ className }: { className?: string }) {
FILE: apps/web/src/components/Dropdown.tsx
type Props (line 7) | type Props = {
type ItemProps (line 41) | type ItemProps = {
FILE: apps/web/src/components/Editor.tsx
type Props (line 25) | type Props = {
FILE: apps/web/src/components/EventCounter.tsx
function EventCounter (line 4) | function EventCounter() {
FILE: apps/web/src/components/Feature.tsx
type Props (line 4) | type Props = {
function Feature (line 11) | function Feature({ children, icon: Icon, subtitle, title }: Props) {
FILE: apps/web/src/components/FeatureFlag.tsx
method onSuccess (line 71) | onSuccess(_, { value, flagValueId }) {
method onError (line 92) | onError() {
FILE: apps/web/src/components/FlagIcon.tsx
type Props (line 6) | type Props = {
function FlagIcon (line 11) | function FlagIcon({ type, ...iconProps }: Props) {
FILE: apps/web/src/components/FlagPage.tsx
method onSuccess (line 51) | onSuccess() {
method onError (line 56) | onError() {
method onSuccess (line 93) | onSuccess() {
method onError (line 98) | onError() {
method onSuccess (line 138) | onSuccess() {
method onError (line 143) | onError() {
FILE: apps/web/src/components/Footer.tsx
constant GITHUB_URL (line 7) | const GITHUB_URL = "https://github.com/tryabby/abby";
constant LINKEDIN_URL (line 8) | const LINKEDIN_URL = "https://www.linkedin.com/company/tryabby/";
constant TWITTER_URL (line 9) | const TWITTER_URL = "https://twitter.com/tryabby";
constant DISCORD_INVITE_URL (line 10) | const DISCORD_INVITE_URL = "https://discord.gg/nk7wKf7Pv2";
function Footer (line 12) | function Footer() {
FILE: apps/web/src/components/Input.tsx
type InputProps (line 5) | interface InputProps
FILE: apps/web/src/components/Integrations.tsx
constant INTEGRATIONS (line 14) | const INTEGRATIONS = [
FILE: apps/web/src/components/JSONEditor.tsx
type Props (line 3) | type Props = {
function JSONEditor (line 8) | function JSONEditor({ onChange, value }: Props) {
FILE: apps/web/src/components/LoadingSpinner.tsx
function LoadingSpinner (line 3) | function LoadingSpinner({
FILE: apps/web/src/components/Logo.tsx
type Props (line 1) | type Props = {
function Logo (line 5) | function Logo({ as: Component = "span" }: Props) {
FILE: apps/web/src/components/MarketingLayout.tsx
type MarketingLayoutProps (line 12) | type MarketingLayoutProps = PropsWithChildren<{
function MarketingLayout (line 18) | function MarketingLayout({
FILE: apps/web/src/components/Modal.tsx
type Props (line 12) | type Props = {
FILE: apps/web/src/components/Navbar/index.tsx
type NavItem (line 23) | type NavItem = {
constant NAV_ITEMS (line 37) | const NAV_ITEMS: Array<NavItem> = [
function MobileNav (line 84) | function MobileNav() {
type NavItemProps (line 154) | type NavItemProps = {
function NavItem (line 168) | function NavItem({
function Navbar (line 224) | function Navbar() {
FILE: apps/web/src/components/Pricing.tsx
type PricingElementProps (line 16) | type PricingElementProps = {
function PricingElement (line 29) | function PricingElement({
function PricingTable (line 116) | function PricingTable() {
FILE: apps/web/src/components/Progress.tsx
type Props (line 3) | type Props = {
function Progress (line 8) | function Progress({ currentValue, maxValue }: Props) {
FILE: apps/web/src/components/ProjectSwitcher.tsx
type PopoverTriggerProps (line 39) | type PopoverTriggerProps = React.ComponentPropsWithoutRef<
type ProjectSwitcherProps (line 43) | interface ProjectSwitcherProps extends PopoverTriggerProps {}
function ProjectSwitcher (line 45) | function ProjectSwitcher({ className }: ProjectSwitcherProps) {
FILE: apps/web/src/components/RadioGroup.tsx
type RadioGroupItem (line 6) | type RadioGroupItem = {
type ArrayLike (line 11) | type ArrayLike<T> = Array<T> | ReadonlyArray<T>;
type Props (line 13) | type Props = {
function RadioGroupComponent (line 21) | function RadioGroupComponent({ items, onChange, value }: Props) {
FILE: apps/web/src/components/RadioSelect.tsx
type RadioSelectProps (line 5) | type RadioSelectProps<T extends string> = {
function RadioSelect (line 12) | function RadioSelect<T extends string = string>({
FILE: apps/web/src/components/RemoveUserModal.tsx
type Props (line 7) | type Props = {
function RemoveUserModal (line 13) | function RemoveUserModal({ isOpen, onClose, user }: Props) {
FILE: apps/web/src/components/Select.tsx
type SelectItem (line 8) | type SelectItem = {
type ArrayLike (line 13) | type ArrayLike<T> = Array<T> | ReadonlyArray<T>;
type Props (line 15) | type Props = {
function Select (line 23) | function Select({ items, onChange, value, isLoading, label }: Props) {
FILE: apps/web/src/components/SignupButton.tsx
function SignupButton (line 5) | function SignupButton({ className }: { className?: string }) {
FILE: apps/web/src/components/Test/CreateTestSection.tsx
type Props (line 29) | type Props = {
constant DEFAULT_NEW_VARIANT_PREFIX (line 44) | const DEFAULT_NEW_VARIANT_PREFIX = "New Variant ";
function getMaxDefaultVariantNameIndex (line 53) | function getMaxDefaultVariantNameIndex(variants: Props["variants"]): num...
constant WEIGHT_COLORS (line 130) | const WEIGHT_COLORS = [
constant PRESET_DESCRIPTIONS (line 138) | const PRESET_DESCRIPTIONS = {
function CreateTestSection (line 153) | function CreateTestSection({
FILE: apps/web/src/components/Test/Section.tsx
function getBestVariant (line 21) | function getBestVariant({
method onSuccess (line 58) | onSuccess() {
method onError (line 63) | onError() {
method onSuccess (line 147) | onSuccess() {
method onError (line 151) | onError() {
FILE: apps/web/src/components/Test/Weights.tsx
constant WEIGHT_COLORS (line 25) | const WEIGHT_COLORS = [
constant PRESET_DESCRIPTIONS (line 86) | const PRESET_DESCRIPTIONS = {
FILE: apps/web/src/components/TitleEdit.tsx
type Props (line 5) | type Props = {
function TitleEdit (line 10) | function TitleEdit({ onSave, title }: Props) {
FILE: apps/web/src/components/Toggle.tsx
function Toggle (line 3) | function Toggle({
FILE: apps/web/src/components/UsedBy.tsx
constant COMPANIES (line 8) | const COMPANIES = [
function UsedBy (line 30) | function UsedBy() {
FILE: apps/web/src/components/UserAuthForm.tsx
type UserAuthFormProps (line 14) | interface UserAuthFormProps extends React.HTMLAttributes<HTMLDivElement> {
function UserAuthForm (line 19) | function UserAuthForm({
FILE: apps/web/src/components/analytics/EventGraph.tsx
type EventList (line 24) | type EventList = Array<{
function EventGraph (line 29) | function EventGraph({
FILE: apps/web/src/components/app/AppNav.tsx
function AppNav (line 12) | function AppNav({
FILE: apps/web/src/components/app/UserNav.tsx
function UserNav (line 16) | function UserNav() {
FILE: apps/web/src/components/charts/Donut.tsx
function DonutChart (line 18) | function DonutChart({
FILE: apps/web/src/components/flags/FlagRuleEditor.tsx
function ThenValueInput (line 23) | function ThenValueInput({
type FlagRuleEditorProps (line 78) | type FlagRuleEditorProps<T extends FlagRule | SubFlagRule> = {
function FlagRuleEditor (line 86) | function FlagRuleEditor<T extends FlagRule | SubFlagRule>({
FILE: apps/web/src/components/flags/RuleSetEditor.tsx
function FlagRulesEditor (line 20) | function FlagRulesEditor({
FILE: apps/web/src/components/settings/Integrations.tsx
function Integrations (line 27) | function Integrations({ projectId }: { projectId: string | undefined }) {
FILE: apps/web/src/components/settings/Segments.tsx
type UserSegmentDisplayProps (line 5) | interface UserSegmentDisplayProps {
function getTypeColor (line 9) | function getTypeColor(type: ValidatorType["type"]) {
function UserSegmentDisplay (line 22) | function UserSegmentDisplay({ segment }: UserSegmentDisplayProps) {
FILE: apps/web/src/components/ui/button.tsx
type ButtonProps (line 36) | interface ButtonProps
FILE: apps/web/src/components/ui/chart.tsx
constant THEMES (line 7) | const THEMES = { light: "", dark: ".dark" } as const;
type ChartConfig (line 9) | type ChartConfig = {
type ChartContextProps (line 19) | type ChartContextProps = {
function useChart (line 25) | function useChart() {
function getPayloadConfigFromPayload (line 320) | function getPayloadConfigFromPayload(
FILE: apps/web/src/components/ui/command.tsx
type CommandDialogProps (line 24) | interface CommandDialogProps extends DialogProps {}
FILE: apps/web/src/components/ui/environment-badge.tsx
type EnvironmentBadgeProps (line 4) | interface EnvironmentBadgeProps {
function EnvironmentBadge (line 10) | function EnvironmentBadge({
FILE: apps/web/src/components/ui/input.tsx
type InputProps (line 5) | interface InputProps
FILE: apps/web/src/instrumentation.ts
function register (line 1) | async function register() {
FILE: apps/web/src/lib/environment-styles.ts
constant ENVIRONMENT_COLORS (line 1) | const ENVIRONMENT_COLORS = {
FILE: apps/web/src/lib/events.ts
type TIME_INTERVAL (line 2) | enum TIME_INTERVAL {
constant INTERVALS (line 8) | const INTERVALS = [
function isValidInterval (line 35) | function isValidInterval(interval: string): interval is TIME_INTERVAL {
function isSpecialTimeInterval (line 39) | function isSpecialTimeInterval(
function getFormattingByInterval (line 45) | function getFormattingByInterval(interval: string) {
function getBaseEventsByInterval (line 62) | function getBaseEventsByInterval(
FILE: apps/web/src/lib/flags.ts
function getFlagCount (line 13) | function getFlagCount(flags: Array<FeatureFlag>) {
function transformFlagValue (line 20) | function transformFlagValue(value: string, type: FeatureFlagType) {
function stringifyFlagValue (line 35) | function stringifyFlagValue(value: RemoteConfigValue | boolean): string {
function getDefaultFlagValue (line 43) | function getDefaultFlagValue(type: RemoteConfigValueString | "Boolean") {
function getFlagTypeClassName (line 54) | function getFlagTypeClassName(type: FeatureFlagType) {
function transformDBFlagTypeToclient (line 70) | function transformDBFlagTypeToclient(
function transformClientFlagToDBType (line 87) | function transformClientFlagToDBType(
FILE: apps/web/src/lib/graphs.ts
constant COLORS (line 18) | const COLORS = Object.keys(colors)
function getColorByIndex (line 26) | function getColorByIndex(index: number) {
FILE: apps/web/src/lib/hooks/useProjectId.ts
function useProjectId (line 3) | function useProjectId() {
FILE: apps/web/src/lib/hooks/useQueryParam.ts
function useQueryParam (line 3) | function useQueryParam<T extends string = string>(param: string) {
function useUnsafeQueryParam (line 12) | function useUnsafeQueryParam<T extends string = string>(param: string) {
FILE: apps/web/src/lib/logsnag.ts
function trackSignup (line 10) | function trackSignup() {
function trackPlanOverage (line 20) | function trackPlanOverage(
FILE: apps/web/src/lib/stripe.ts
constant MILLISECONDS_IN_A_DAY (line 36) | const MILLISECONDS_IN_A_DAY = 86_400_000;
constant BETA_PRICE_ID (line 38) | const BETA_PRICE_ID = "BETA";
FILE: apps/web/src/lib/utils.ts
function cn (line 4) | function cn(...inputs: ClassValue[]) {
FILE: apps/web/src/pages/_app.tsx
type NextPageWithLayout (line 22) | type NextPageWithLayout<P = unknown, IP = P> = NextPage<P, IP> & {
type AppPropsWithLayout (line 26) | type AppPropsWithLayout = AppProps & {
FILE: apps/web/src/pages/_document.tsx
function Document (line 3) | function Document() {
FILE: apps/web/src/pages/api/auth/[...nextauth].ts
method session (line 24) | session({ session, token }) {
method jwt (line 40) | async jwt({ token, user, trigger, session }) {
method createUser (line 82) | async createUser({ user }) {
FILE: apps/web/src/pages/api/checkout/index.ts
function checkout (line 13) | async function checkout({
FILE: apps/web/src/pages/api/invalidate-limits.ts
function invalidateProjectLimitsHandler (line 12) | async function invalidateProjectLimitsHandler(
FILE: apps/web/src/pages/api/stripe.ts
type StripeSession (line 18) | interface StripeSession {
function handleStripeWebhook (line 35) | async function handleStripeWebhook(
FILE: apps/web/src/pages/contact.tsx
function ContactPage (line 10) | function ContactPage() {
FILE: apps/web/src/pages/login.tsx
constant DEFAULT_CALLBACK_URL (line 9) | const DEFAULT_CALLBACK_URL = "/projects";
function AuthenticationPage (line 11) | function AuthenticationPage() {
FILE: apps/web/src/pages/profile/index.tsx
method onSuccess (line 85) | onSuccess() {
method onSuccess (line 147) | onSuccess() {
FILE: apps/web/src/pages/projects/[projectId]/environments.tsx
function EnvironmentItem (line 33) | function EnvironmentItem({
method onError (line 128) | onError() {
FILE: apps/web/src/pages/projects/[projectId]/events.tsx
function getValueClass (line 27) | function getValueClass(value: string | null) {
FILE: apps/web/src/pages/projects/[projectId]/index.tsx
type ProjectClientEvents (line 19) | type ProjectClientEvents =
FILE: apps/web/src/pages/projects/[projectId]/settings.tsx
constant SETTINGS_TABS (line 35) | const SETTINGS_TABS = {
method onSuccess (line 86) | onSuccess() {
FILE: apps/web/src/pages/projects/[projectId]/tests/[testId].tsx
constant INTERVAL_PARAM_NAME (line 21) | const INTERVAL_PARAM_NAME = "interval";
FILE: apps/web/src/pages/signup.tsx
constant DEFAULT_CALLBACK_URL (line 8) | const DEFAULT_CALLBACK_URL = "/projects";
function AuthenticationPage (line 10) | function AuthenticationPage() {
FILE: apps/web/src/pages/tips-and-insights/index.tsx
type PostMeta (line 10) | type PostMeta = {
type Props (line 18) | type Props = {
FILE: apps/web/src/pages/welcome.tsx
constant ROLES (line 44) | const ROLES = [
function WizardFooter (line 101) | function WizardFooter() {
function Step1 (line 131) | function Step1() {
function Step2 (line 166) | function Step2() {
constant TECHNOLOGIES (line 230) | const TECHNOLOGIES = [
function Step3 (line 270) | function Step3() {
function Step4 (line 322) | function Step4() {
function WelcomePage (line 361) | function WelcomePage(
FILE: apps/web/src/seo/SeoDescriptions.ts
type SeoProps (line 1) | type SeoProps = {
type Layouts (line 6) | type Layouts = "Marketing" | "Blog" | "Integrations" | "DashBoard" | "Do...
function getSeo (line 8) | function getSeo(pageName: string, layoutName: Layouts) {
function getMarketingSeo (line 17) | function getMarketingSeo(pageName: string): SeoProps {
function getBlogLayout (line 199) | function getBlogLayout(pageName: string): SeoProps {
FILE: apps/web/src/server/common/auth.ts
function assertUserHasAcessToProject (line 4) | async function assertUserHasAcessToProject(
FILE: apps/web/src/server/common/config-cache.ts
type ConfigCacheKey (line 10) | type ConfigCacheKey = {
method getConfig (line 16) | static getConfig({ environment, projectId }: ConfigCacheKey) {
method setConfig (line 20) | static setConfig({
method deleteConfig (line 30) | static deleteConfig({ environment, projectId }: ConfigCacheKey) {
FILE: apps/web/src/server/common/github-app.ts
constant PER_PAGE (line 20) | const PER_PAGE = 100;
FILE: apps/web/src/server/common/integrations.ts
type GithubIntegrationSettings (line 10) | type GithubIntegrationSettings = z.infer<
FILE: apps/web/src/server/common/plans.ts
type PlanName (line 12) | type PlanName = z.infer<typeof planNameSchema>;
constant PLANS (line 14) | const PLANS: Record<PlanName, string> = {
type Limit (line 22) | type Limit = {
FILE: apps/web/src/server/common/tracking.ts
type EventProps (line 5) | type EventProps = Record<string, unknown> | never;
type EventOptionsTuple (line 6) | type EventOptionsTuple<P extends EventProps> = P extends never
type EventOptions (line 10) | type EventOptions<P extends EventProps> = {
class TrackingService (line 20) | class TrackingService {
method constructor (line 23) | constructor() {
method trackEvent (line 31) | public trackEvent<const N extends keyof ServerEvents>(
FILE: apps/web/src/server/queue/AfterDataRequest.ts
type AfterRequestJobPayload (line 10) | type AfterRequestJobPayload = {
FILE: apps/web/src/server/queue/event.ts
type EventJobPayload (line 11) | type EventJobPayload = AbbyEvent & {
FILE: apps/web/src/server/queue/queues.ts
constant QUEUE_NAMES (line 9) | const QUEUE_NAMES = {
FILE: apps/web/src/server/services/AiFlagRemovalService.ts
class AIFlagRemovalService (line 3) | class AIFlagRemovalService {
method constructor (line 4) | constructor(private openai: OpenAI) {}
method removeFlagFromCode (line 6) | async removeFlagFromCode(code: string, flagName: string) {
FILE: apps/web/src/server/services/ConfigService.ts
function handleGET (line 18) | async function handleGET({ projectId }: { projectId: string }) {
function handlePUT (line 69) | async function handlePUT({
FILE: apps/web/src/server/services/EventService.ts
method hashUserInfo (line 21) | private static hashUserInfo(ipAddress: string, userAgent: string) {
method createEvent (line 27) | static async createEvent({
method getEventsByProjectId (line 55) | static async getEventsByProjectId(projectId: string) {
method getEventsByTestId (line 65) | static async getEventsByTestId(
method getEventsForCurrentPeriod (line 89) | static async getEventsForCurrentPeriod(projectId: string) {
FILE: apps/web/src/server/services/FlagService.ts
method createFlag (line 11) | static async createFlag({
FILE: apps/web/src/server/services/InviteService.ts
method acceptInvite (line 4) | static async acceptInvite(inviteId: string, userId: string) {
method getEventsByProjectId (line 43) | static async getEventsByProjectId(projectId: string) {
FILE: apps/web/src/server/services/PlausibleService.ts
method trackPlausibleGoal (line 14) | static async trackPlausibleGoal<EventName extends keyof PlausibleEvents>(
FILE: apps/web/src/server/services/ProjectService.ts
method hasProjectAccess (line 7) | static async hasProjectAccess(projectId: string, userId: string) {
method createProject (line 17) | static async createProject(input: { projectName: string; userId: string ...
FILE: apps/web/src/server/services/RequestCache.ts
method getCacheKey (line 4) | private static getCacheKey(projectId: string) {
method increment (line 8) | static async increment(projectId: string) {
method get (line 12) | static async get(projectId: string) {
method reset (line 16) | static async reset(projectId: string | string[]) {
FILE: apps/web/src/server/services/RequestService.ts
method storeRequest (line 5) | static async storeRequest(request: Omit<ApiRequest, "id" | "createdAt">) {
FILE: apps/web/src/server/services/TestService.ts
type Variant (line 7) | type Variant = {
method createTest (line 13) | static async createTest(
FILE: apps/web/src/server/trpc/context.ts
type CreateContextOptions (line 9) | type CreateContextOptions = {
type Context (line 47) | type Context = inferAsyncReturnType<typeof createContext>;
FILE: apps/web/src/server/trpc/helpers.ts
function getSSRTrpc (line 7) | async function getSSRTrpc(opts: CreateNextContextOptions) {
FILE: apps/web/src/server/trpc/router/_app.ts
type AppRouter (line 33) | type AppRouter = typeof appRouter;
FILE: apps/web/src/server/trpc/router/project.ts
type ClientOption (line 11) | type ClientOption = Omit<Option, "chance"> & {
FILE: apps/web/src/server/trpc/trpc.ts
method errorFormatter (line 8) | errorFormatter({ shape }) {
FILE: apps/web/src/types/flags.ts
type FlagValueString (line 3) | type FlagValueString = RemoteConfigValueString | "Boolean";
FILE: apps/web/src/types/next-auth.d.ts
type UserSession (line 3) | type UserSession = {
type Session (line 15) | interface Session {
type JWT (line 22) | interface JWT {
FILE: apps/web/src/types/plausible-events.ts
type Plan (line 4) | type Plan = PlanName | "HOBBY";
type PlausibleEvents (line 6) | type PlausibleEvents = {
type ServerEvents (line 33) | type ServerEvents = {
FILE: apps/web/src/utils/apiKey.ts
function generateRandomString (line 4) | function generateRandomString(length = 32): string {
function hashString (line 9) | function hashString(data: string): string {
FILE: apps/web/src/utils/snippets.ts
type CodeSnippetData (line 39) | type CodeSnippetData = {
type Integrations (line 44) | type Integrations = "react" | "nextjs" | "svelte" | "angular";
function generateCodeSnippets (line 46) | async function generateCodeSnippets({
FILE: apps/web/src/utils/trpc.ts
method config (line 15) | config() {
type RouterInputs (line 35) | type RouterInputs = inferRouterInputs<AppRouter>;
type RouterOutputs (line 40) | type RouterOutputs = inferRouterOutputs<AppRouter>;
FILE: apps/web/src/utils/validateFlags.ts
function validateFlag (line 3) | function validateFlag(flagType: FeatureFlagType, value: string) {
FILE: packages/angular/src/lib/StorageService.ts
class ABStorageService (line 8) | class ABStorageService implements IStorageService {
method get (line 9) | get(projectId: string, testName: string): string | null {
method set (line 26) | set(projectId: string, testName: string, value: string): void {
method remove (line 31) | remove(projectId: string, testName: string): void {
class FFStorageService (line 37) | class FFStorageService implements IStorageService {
method get (line 38) | get(projectId: string, flagName: string): string | null {
method set (line 55) | set(projectId: string, flagName: string, value: string): void {
method remove (line 60) | remove(projectId: string, flagName: string): void {
class RCStorageService (line 66) | class RCStorageService implements IStorageService {
method get (line 67) | get(projectId: string, key: string): string | null {
method set (line 83) | set(projectId: string, key: string, value: string): void {
method remove (line 88) | remove(projectId: string, key: string): void {
FILE: packages/angular/src/lib/abby-logger.service.ts
class AbbyLoggerService (line 6) | class AbbyLoggerService {
method constructor (line 9) | constructor(@Inject(ABBY_CONFIG_TOKEN) private config: AbbyConfig) {}
method log (line 11) | log(...args: unknown[]): void {
method warn (line 17) | warn(...args: unknown[]): void {
FILE: packages/angular/src/lib/abby.module.ts
constant ABBY_CONFIG_TOKEN (line 18) | const ABBY_CONFIG_TOKEN = new InjectionToken<AbbyConfig>("AbbyConfig");
class AbbyModule (line 36) | class AbbyModule {
method forRoot (line 37) | static forRoot(config: AbbyConfig): ModuleWithProviders<AbbyModule> {
FILE: packages/angular/src/lib/abby.service.spec.ts
class Abby (line 87) | class Abby extends AbbyService<
class TestComponent (line 98) | @Component({
class ATestComponent (line 214) | @Component({})
class BTestComponent (line 217) | @Component({})
class CTestComponent (line 220) | @Component({})
class DTestComponent (line 223) | @Component({})
class FlagComponent (line 226) | @Component({})
FILE: packages/angular/src/lib/abby.service.ts
type LocalData (line 35) | type LocalData<
type InferFlagNames (line 54) | type InferFlagNames<C extends AbbyConfig> = InferFlags<C>[number];
type InferTestNames (line 55) | type InferTestNames<C extends AbbyConfig> = InferTests<C> extends Record<
type InferTests (line 61) | type InferTests<C extends AbbyConfig> = NonNullable<C["tests"]>;
type InferFlags (line 62) | type InferFlags<C extends AbbyConfig> = NonNullable<C["flags"]>;
type InferRemoteConfig (line 63) | type InferRemoteConfig<C extends AbbyConfig> = NonNullable<
type InferRemoteConfigName (line 66) | type InferRemoteConfigName<C extends AbbyConfig> = keyof NonNullable<
type PossibleFlagName (line 70) | type PossibleFlagName<FlagName extends string> = FlagName | `!${FlagName}`;
class AbbyService (line 73) | class AbbyService<
method constructor (line 104) | constructor(
method init (line 155) | public init(): Observable<void> {
method getVariant (line 159) | public getVariant<T extends keyof Tests>(testName: T): Observable<stri...
method onAct (line 173) | public onAct(testName: string): void {
method getFeatureFlagValue (line 199) | public getFeatureFlagValue<F extends PossibleFlagName<FlagName>>(
method getRemoteConfig (line 226) | public getRemoteConfig<T extends RemoteConfigName>(
method resolveData (line 237) | private resolveData(): Observable<
method getAbbyInstance (line 256) | public getAbbyInstance(): Abby<
method getRouterVariant (line 266) | public getRouterVariant(
FILE: packages/angular/src/lib/devtools.component.ts
class DevtoolsComponent (line 12) | class DevtoolsComponent implements OnInit {
method constructor (line 17) | constructor(private readonly abby: AbbyService) {}
method ngOnInit (line 19) | ngOnInit(): void {
FILE: packages/angular/src/lib/flag.directive.ts
class AbbyFlag (line 18) | class AbbyFlag implements OnDestroy {
method abbyFlag (line 20) | set abbyFlag(featureFlag: string) {
method constructor (line 35) | constructor(
method ngOnDestroy (line 56) | ngOnDestroy(): void {
FILE: packages/angular/src/lib/get-remote-config.pipe.ts
class GetRemoteConfigPipe (line 14) | class GetRemoteConfigPipe<
method constructor (line 18) | constructor(private abbyService: AbbyService) {}
method transform (line 20) | transform<T extends Extract<keyof RemoteConfig, string>>(
FILE: packages/angular/src/lib/get-variant.pipe.ts
class GetAbbyVariantPipe (line 11) | class GetAbbyVariantPipe<
method constructor (line 16) | constructor(private abbyService: AbbyService<string, string, Tests>) {}
method transform (line 18) | transform(testName: TestName): Observable<string> {
FILE: packages/angular/src/lib/test.directive.ts
class AbbyTest (line 18) | class AbbyTest implements OnInit, OnDestroy {
method constructor (line 23) | constructor(
method ngOnInit (line 29) | ngOnInit(): void {
method ngOnDestroy (line 46) | ngOnDestroy(): void {
FILE: packages/cli/src/add-flag.ts
function addFlag (line 6) | async function addFlag(options: {
FILE: packages/cli/src/add-remote-config.ts
function addRemoteConfig (line 7) | async function addRemoteConfig(options: {
FILE: packages/cli/src/ai.ts
function removeFlagInstance (line 8) | async function removeFlagInstance(options: {
FILE: packages/cli/src/auth.ts
function writeTokenFile (line 9) | function writeTokenFile(token: string) {
function getToken (line 13) | async function getToken() {
FILE: packages/cli/src/check.ts
function verifyLocalConfig (line 10) | async function verifyLocalConfig({
FILE: packages/cli/src/consts.ts
constant ABBY_BASE_URL (line 4) | const ABBY_BASE_URL = "https://www.tryabby.com";
FILE: packages/cli/src/http.ts
method getConfigFromServer (line 9) | static async getConfigFromServer({
method updateConfigOnServer (line 36) | static async updateConfigOnServer({
method getFilesWithFlagsRemoved (line 77) | static async getFilesWithFlagsRemoved({
FILE: packages/cli/src/init.ts
function initAbbyConfig (line 5) | async function initAbbyConfig({ path }: { path: string }) {
FILE: packages/cli/src/pull.ts
function mergeConfigs (line 8) | function mergeConfigs(
function pullAndMerge (line 26) | async function pullAndMerge({
FILE: packages/cli/src/push.ts
function push (line 4) | async function push({
FILE: packages/cli/src/update-config-file.ts
function updateConfigFile (line 9) | async function updateConfigFile(
function updateConfigFileContent (line 28) | function updateConfigFileContent(
FILE: packages/cli/src/util.ts
function loadLocalConfig (line 12) | async function loadLocalConfig({
function multiLineLog (line 68) | function multiLineLog(...args: any[]) {
function startServerAndGetToken (line 72) | async function startServerAndGetToken(host?: string) {
FILE: packages/cli/tests/base.test.ts
constant API_KEY (line 27) | const API_KEY = "test";
FILE: packages/core/src/defineConfig.ts
constant DYNAMIC_ABBY_CONFIG_KEYS (line 4) | const DYNAMIC_ABBY_CONFIG_KEYS = [
type DynamicConfigKeys (line 12) | type DynamicConfigKeys = (typeof DYNAMIC_ABBY_CONFIG_KEYS)[number];
function defineConfig (line 14) | function defineConfig<
FILE: packages/core/src/helpers.ts
function parseCookies (line 2) | function parseCookies(cookieHeader: string) {
FILE: packages/core/src/index.ts
type ABConfig (line 31) | type ABConfig<T extends string = string> = {
type Settings (line 35) | type Settings<
type LocalData (line 67) | type LocalData<
type PersistentStorage (line 86) | interface PersistentStorage {
type AbbyConfig (line 91) | type AbbyConfig<
class Abby (line 123) | class Abby<
method constructor (line 164) | constructor(
method loadProjectData (line 220) | async loadProjectData() {
method getProjectDataAsync (line 251) | async getProjectDataAsync(): Promise<
method responseToLocalData (line 267) | private responseToLocalData<FlagName extends string, TestName extends ...
method getProjectData (line 320) | getProjectData(): LocalData<FlagName, TestName, RemoteConfigName> {
method init (line 363) | init(data: AbbyDataResponse) {
method getFeatureFlag (line 383) | getFeatureFlag(key: FlagName): boolean {
method getRemoteConfig (line 454) | getRemoteConfig<
method getTestVariant (line 526) | getTestVariant<T extends keyof Tests>(key: T): Tests[T]["variants"][nu...
method updateLocalVariant (line 562) | updateLocalVariant<T extends keyof Tests>(
method updateFlag (line 577) | updateFlag(name: FlagName, value: boolean) {
method updateRemoteConfig (line 590) | updateRemoteConfig<T extends RemoteConfigName>(
method subscribe (line 609) | subscribe(listener: (newValue: LocalData<FlagName, TestName>) => void) {
method notifyListeners (line 620) | private notifyListeners() {
method getConfig (line 627) | getConfig() {
method getVariants (line 634) | getVariants<T extends keyof Tests>(testName: T): Tests[T]["variants"] {
method setLocalOverrides (line 644) | setLocalOverrides(cookies: string) {
method getDefaultRemoteConfigValue (line 699) | private getDefaultRemoteConfigValue<RemoteConfigName extends string>(
method stringifiedValue (line 716) | private stringifiedValue(value: RemoteConfigValue | boolean): string {
method getFeatureFlags (line 726) | getFeatureFlags() {
method getRemoteConfigVariables (line 738) | getRemoteConfigVariables() {
method enableCookies (line 754) | enableCookies() {
method disableCookies (line 771) | disableCookies() {
method updateUserProperties (line 784) | updateUserProperties(
method evaluateUserProperties (line 826) | private evaluateUserProperties<T extends boolean | RemoteConfigValue>(
FILE: packages/core/src/mathHelpers.ts
function getRandomDecimal (line 4) | function getRandomDecimal() {
function getWeightedRandomNumber (line 15) | function getWeightedRandomNumber<T extends Record<string, number>>(
function getDefaultWeights (line 31) | function getDefaultWeights<Variants extends ReadonlyArray<string>>(
function validateWeights (line 39) | function validateWeights<
function getWeightedRandomVariant (line 49) | function getWeightedRandomVariant<
function getVariantWithHeighestWeightOrFirst (line 64) | function getVariantWithHeighestWeightOrFirst<
FILE: packages/core/src/shared/constants.ts
constant DOCS_URL (line 1) | const DOCS_URL = "https://docs.tryabby.com/";
constant ABBY_BASE_URL (line 2) | const ABBY_BASE_URL = "https://www.tryabby.com/";
constant ABBY_AB_STORAGE_PREFIX (line 3) | const ABBY_AB_STORAGE_PREFIX = "__abby__ab__";
constant ABBY_FF_STORAGE_PREFIX (line 4) | const ABBY_FF_STORAGE_PREFIX = "__abby__ff__";
constant ABBY_RC_STORAGE_PREFIX (line 5) | const ABBY_RC_STORAGE_PREFIX = "__abby__rc__";
constant ABBY_INSTANCE_KEY (line 6) | const ABBY_INSTANCE_KEY = "__abby_instance__";
constant DEFAULT_FEATURE_FLAG_VALUE (line 7) | const DEFAULT_FEATURE_FLAG_VALUE = false;
constant ABBY_WINDOW_KEY (line 8) | const ABBY_WINDOW_KEY = "__abby_data__";
FILE: packages/core/src/shared/helpers.ts
function getABStorageKey (line 8) | function getABStorageKey(projectId: string, testName: string): string {
function getFFStorageKey (line 12) | function getFFStorageKey(projectId: string, flagName: string): string {
function getRCStorageKey (line 16) | function getRCStorageKey(
function assertUnreachable (line 23) | function assertUnreachable(_x: never): never {
function remoteConfigStringToType (line 27) | function remoteConfigStringToType({
function getDefaultRemoteConfigValue (line 46) | function getDefaultRemoteConfigValue(
function stringifyRemoteConfigValue (line 61) | function stringifyRemoteConfigValue(value: RemoteConfigValue) {
FILE: packages/core/src/shared/http.ts
method getProjectData (line 5) | static async getProjectData({
method sendData (line 37) | static sendData({
FILE: packages/core/src/shared/interfaces.ts
type StorageServiceOptions (line 1) | interface StorageServiceOptions {
type IStorageService (line 5) | interface IStorageService {
FILE: packages/core/src/shared/schemas.ts
type AbbyEvent (line 12) | type AbbyEvent = z.infer<typeof abbyEventSchema>;
type ValidatorType (line 35) | type ValidatorType = z.infer<typeof validatorType>;
type AbbyConfigFile (line 84) | type AbbyConfigFile = z.infer<typeof abbyConfigSchema>;
type PullAbbyConfigResponse (line 86) | type PullAbbyConfigResponse = Pick<
type RemoteConfigValue (line 91) | type RemoteConfigValue = z.infer<typeof remoteConfigValue>;
type RemoteConfigValueString (line 93) | type RemoteConfigValueString = z.infer<
type RemoteConfigValueStringToType (line 97) | type RemoteConfigValueStringToType<T extends RemoteConfigValueString> =
type FlagRuleSet (line 174) | type FlagRuleSet = z.infer<typeof flagRulesSetSchema>;
type FlagRule (line 175) | type FlagRule = z.infer<typeof flagRuleSchema>;
type SubFlagRule (line 176) | type SubFlagRule = z.infer<typeof subFlagRuleSchema>;
type StringFlagRule (line 177) | type StringFlagRule = z.infer<typeof stringFlagRuleSchema>;
type NumberFlagRule (line 178) | type NumberFlagRule = z.infer<typeof numberFlagRuleSchema>;
type BooleanFlagRule (line 179) | type BooleanFlagRule = z.infer<typeof booleanFlagRuleSchema>;
FILE: packages/core/src/shared/types.ts
type AbbyEventType (line 3) | enum AbbyEventType {
type AbbyDataResponse (line 8) | type AbbyDataResponse = {
type LegacyAbbyDataResponse (line 25) | type LegacyAbbyDataResponse = {
type ExtractVariants (line 33) | type ExtractVariants<
FILE: packages/core/src/validation/index.ts
type StringValidatorType (line 4) | type StringValidatorType = { type: "string" };
type NumberValidatorType (line 5) | type NumberValidatorType = { type: "number" };
type BooleanValidatorType (line 6) | type BooleanValidatorType = { type: "boolean" };
type Infer (line 18) | type Infer<T> = T extends StringValidatorType
type ValidationErrors (line 32) | type ValidationErrors = Array<{
function validateProperty (line 37) | function validateProperty<T extends ValidatorType>(
function validate (line 58) | function validate<T extends Record<string, ValidatorType>>(
FILE: packages/core/tests/base.test.ts
constant OLD_ENV (line 4) | const OLD_ENV = process.env;
FILE: packages/core/tests/math.test.ts
type Variant (line 28) | type Variant = (typeof variants)[number];
FILE: packages/core/tests/types.test.ts
type DevOverrides (line 37) | type DevOverrides = NonNullable<
FILE: packages/devtools/src/Devtools.stories.ts
type Story (line 42) | type Story = StoryObj<typeof meta>;
FILE: packages/devtools/src/index.ts
class DevtoolsFactory (line 4) | class DevtoolsFactory {
method create (line 5) | create(props: AbbyDevtoolProps) {
type AbbyDevtoolProps (line 19) | type AbbyDevtoolProps = ComponentProps<DevtoolsComponent>;
FILE: packages/devtools/src/lib/storage.ts
constant DEVTOOLS_KEY (line 1) | const DEVTOOLS_KEY = "abbyy-devtools";
function getShowDevtools (line 3) | function getShowDevtools() {
function setShowDevtools (line 11) | function setShowDevtools(value: boolean) {
type Sections (line 15) | type Sections = {
function getSections (line 21) | function getSections(): Sections {
function setSections (line 33) | function setSections(sections: Sections) {
FILE: packages/devtools/src/lib/types.ts
type Modifier (line 1) | type Modifier = "command" | "ctrl" | "alt" | "shift" | "option" | "meta";
type Char (line 2) | type Char =
type SpecialKey (line 29) | type SpecialKey =
type Key (line 54) | type Key = Char | SpecialKey;
type Shortcut (line 56) | type Shortcut =
FILE: packages/next/src/cache.ts
class PromiseCache (line 1) | class PromiseCache<T> {
method constructor (line 6) | constructor(ttl = 1000 * 60) {
method get (line 10) | public async get(key: string, fn: () => Promise<T>): Promise<T> {
FILE: packages/next/src/helpers.ts
function getIsomorphicCookies (line 9) | function getIsomorphicCookies<
function isEdgeFunction (line 40) | function isEdgeFunction(
function isBrowser (line 46) | function isBrowser(
FILE: packages/next/src/index.tsx
function createAbby (line 23) | function createAbby<
type WithAbbyProps (line 254) | type WithAbbyProps = {
FILE: packages/next/src/withAbby.tsx
constant ABBY_DATA_KEY (line 13) | const ABBY_DATA_KEY = "__ABBY_PROJECT_DATA__";
function withAbby (line 15) | function withAbby<
FILE: packages/next/tests/types.test.tsx
constant OLD_ENV (line 7) | const OLD_ENV = process.env;
FILE: packages/next/tests/withAbby.test.tsx
constant OLD_ENV (line 4) | const OLD_ENV = process.env;
FILE: packages/node/fix-exports.js
function main (line 9) | function main() {
FILE: packages/node/src/express/index.ts
function createAbbyMiddleWare (line 13) | function createAbbyMiddleWare<
FILE: packages/node/src/index.ts
function createAbby (line 10) | function createAbby<
FILE: packages/node/src/koa/index.ts
function createAbbyMiddleWare (line 12) | function createAbbyMiddleWare<
FILE: packages/node/src/utils/MemoryStorage.ts
class InMemoryStorageService (line 3) | class InMemoryStorageService implements IStorageService {
method constructor (line 5) | constructor() {
method get (line 8) | get(key: string): string | null {
method set (line 11) | set(key: string, value: string): void {
method remove (line 14) | remove(key: string): void {
FILE: packages/node/tests/koa.test.ts
constant SERVER_URL (line 9) | let SERVER_URL = "http://localhost:";
FILE: packages/react/src/StorageService.ts
constant DEFAULT_COOKIE_AGE (line 10) | const DEFAULT_COOKIE_AGE = 365;
class ABStorageService (line 12) | class ABStorageService implements IStorageService {
method get (line 13) | get(projectId: string, testName: string): string | null {
method set (line 20) | set(
method remove (line 33) | remove(projectId: string, testName: string): void {
class FFStorageService (line 38) | class FFStorageService implements IStorageService {
method get (line 39) | get(projectId: string, flagName: string): string | null {
method set (line 46) | set(projectId: string, flagName: string, value: string): void {
method remove (line 52) | remove(projectId: string, flagName: string): void {
class RCStorageService (line 57) | class RCStorageService implements IStorageService {
method get (line 58) | get(projectId: string, key: string): string | null {
method set (line 63) | set(projectId: string, key: string, value: string): void {
method remove (line 69) | remove(projectId: string, key: string): void {
FILE: packages/react/src/context.tsx
type withDevtoolsFunction (line 26) | type withDevtoolsFunction = (
type ABTestReturnValue (line 33) | type ABTestReturnValue<Lookup, TestVariant> = Lookup extends undefined
function createAbby (line 39) | function createAbby<
FILE: packages/react/src/helpers.ts
type Tuple (line 2) | type Tuple<T, N extends number> = N extends N
type _TupleOf (line 7) | type _TupleOf<T, N extends number, R extends unknown[]> = R["length"] ex...
function getRandomDecimal (line 14) | function getRandomDecimal() {
function weightedRand2 (line 25) | function weightedRand2<T extends Record<string, number>>(spec: T): keyof...
function getWeightedRandomVariant (line 38) | function getWeightedRandomVariant<
function validateWeights (line 64) | function validateWeights<
FILE: packages/react/tests/ssr.test.tsx
constant OLD_ENV (line 4) | const OLD_ENV = process.env;
FILE: packages/react/tests/types.test.tsx
constant OLD_ENV (line 5) | const OLD_ENV = process.env;
FILE: packages/react/tests/useAbby.test.tsx
constant OLD_ENV (line 8) | const OLD_ENV = process.env;
FILE: packages/remix/src/cache.ts
class PromiseCache (line 1) | class PromiseCache<T> {
method constructor (line 6) | constructor(ttl = 1000 * 60) {
method get (line 10) | public async get(key: string, fn: () => Promise<T>): Promise<T> {
FILE: packages/remix/src/index.tsx
constant ABBY_DATA_KEY (line 15) | const ABBY_DATA_KEY = "__ABBY_PROJECT_DATA__";
function createAbby (line 24) | function createAbby<
FILE: packages/remix/tests/ssr.test.tsx
function MyComponent (line 14) | function MyComponent() {
method loader (line 33) | async loader(ctx) {
FILE: packages/remix/tests/types.test.tsx
constant OLD_ENV (line 5) | const OLD_ENV = process.env;
FILE: packages/svelte/src/lib/StorageService.ts
class ABStorageService (line 10) | class ABStorageService implements IStorageService {
method get (line 11) | get(projectId: string, testName: string): string | null {
method set (line 18) | set(
method remove (line 28) | remove(projectId: string, testName: string): void {
class FFStorageService (line 33) | class FFStorageService implements IStorageService {
method get (line 34) | get(projectId: string, flagName: string): string | null {
method set (line 41) | set(projectId: string, flagName: string, value: string): void {
method remove (line 45) | remove(projectId: string, flagName: string): void {
class RCStorageService (line 50) | class RCStorageService implements IStorageService {
method get (line 51) | get(projectId: string, key: string): string {
method set (line 55) | set(projectId: string, key: string, value: string): void {
method remove (line 58) | remove(projectId: string, key: string): void {
FILE: packages/svelte/src/lib/createAbby.ts
type ABTestReturnValue (line 19) | type ABTestReturnValue<Lookup, TestVariant> = Lookup extends undefined
function createAbby (line 25) | function createAbby<
Condensed preview — 722 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (9,969K chars).
[
{
"path": ".changeset/README.md",
"chars": 510,
"preview": "# Changesets\n\nHello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that wo"
},
{
"path": ".changeset/config.json",
"chars": 275,
"preview": "{\n \"$schema\": \"https://unpkg.com/@changesets/config@2.3.0/schema.json\",\n \"changelog\": \"@changesets/cli/changelog\",\n \""
},
{
"path": ".dockerignore",
"chars": 66,
"preview": ".git\napps/angular-example\napps/docs\nnode_modules/\n**/node_modules/"
},
{
"path": ".github/workflows/publish.yaml",
"chars": 1193,
"preview": "name: Changesets\non:\n push:\n branches:\n - main\nenv:\n CI: true\n PNPM_CACHE_FOLDER: .pnpm-store\njobs:\n version"
},
{
"path": ".github/workflows/pull_request.yaml",
"chars": 315,
"preview": "name: Lint and Format\n\non:\n push:\n pull_request:\n\njobs:\n quality:\n runs-on: ubuntu-latest\n steps:\n - name:"
},
{
"path": ".github/workflows/tests.yaml",
"chars": 1063,
"preview": "name: Package Tests\n\non:\n push:\n paths:\n - \"packages/**\"\n pull_request:\n paths:\n - \"packages/**\"\n\njobs"
},
{
"path": ".gitignore",
"chars": 392,
"preview": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\nnode_modules\n.pnp\n"
},
{
"path": ".nvmrc",
"chars": 6,
"preview": "22.8.0"
},
{
"path": ".vscode/extensions.json",
"chars": 50,
"preview": "{\n \"recommendations\": [\"svelte.svelte-vscode\"]\n}\n"
},
{
"path": ".vscode/settings.json",
"chars": 293,
"preview": "{\n \"editor.formatOnSave\": true,\n \"[svelte]\": {\n \"editor.defaultFormatter\": \"svelte.svelte-vscode\"\n },\n \"[typescri"
},
{
"path": "Dockerfile",
"chars": 1613,
"preview": "FROM node:20-alpine AS base\nENV PNPM_HOME=\"/pnpm\"\nENV PATH=\"$PNPM_HOME:$PATH\"\nRUN corepack enable\n\nFROM base AS builder\n"
},
{
"path": "LICENSE",
"chars": 34523,
"preview": " GNU AFFERO GENERAL PUBLIC LICENSE\n Version 3, 19 November 2007\n\n Copyright (C)"
},
{
"path": "README.md",
"chars": 2907,
"preview": "\n\n# About Abby\n\nAbby is a open source feature management and A/B testing platfor"
},
{
"path": "TRACKING.md",
"chars": 2917,
"preview": "# Tracking\n\nThe following table shows what we are tracking on our landing page and through\nour API.\n\n| Event Name "
},
{
"path": "apps/cdn/.gitignore",
"chars": 124,
"preview": "node_modules\ndist\n.wrangler\n.dev.vars\n\n# Change them to your taste:\nwrangler.toml\npackage-lock.json\nyarn.lock\npnpm-lock."
},
{
"path": "apps/cdn/README.md",
"chars": 56,
"preview": "```\nnpm install\nnpm run dev\n```\n\n```\nnpm run deploy\n```\n"
},
{
"path": "apps/cdn/package.json",
"chars": 348,
"preview": "{\n \"name\": \"@tryabby/cdn\",\n \"private\": true,\n \"scripts\": {\n \"dev\": \"wrangler dev src/index.ts\",\n \"deploy\": \"wra"
},
{
"path": "apps/cdn/src/index.ts",
"chars": 1552,
"preview": "import { ABBY_WINDOW_KEY, type AbbyDataResponse } from \"@tryabby/core\";\nimport { Hono } from \"hono\";\nimport { ZoneCache "
},
{
"path": "apps/cdn/src/lib/cache.ts",
"chars": 2111,
"preview": "import type { Context } from \"hono\";\n\nexport type CacheConfig = {\n /**\n * How long an entry should be fresh in millis"
},
{
"path": "apps/cdn/src/lib/config.ts",
"chars": 1105,
"preview": "import { type AbbyDataResponse, HttpService } from \"@tryabby/core\";\n\nimport type { Context } from \"hono\";\nimport { endTi"
},
{
"path": "apps/cdn/tsconfig.json",
"chars": 309,
"preview": "{\n \"compilerOptions\": {\n \"target\": \"ESNext\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"node\",\n \"esModuleIn"
},
{
"path": "apps/docs/.eslintrc.json",
"chars": 44,
"preview": "{\n \"root\": true,\n \"extends\": [\"custom\"]\n}\n"
},
{
"path": "apps/docs/.gitignore",
"chars": 385,
"preview": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\n/node_modules\n/.pn"
},
{
"path": "apps/docs/CHANGELOG.md",
"chars": 101,
"preview": "# docs\n\n## 0.2.0\n\n### Minor Changes\n\n- add edge/api function helpers and non-react a/b test function\n"
},
{
"path": "apps/docs/README.md",
"chars": 1582,
"preview": "This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js"
},
{
"path": "apps/docs/next.config.js",
"chars": 484,
"preview": "const withNextra = require(\"nextra\")({\n theme: \"nextra-theme-docs\",\n themeConfig: \"./theme.config.jsx\",\n defaultShowC"
},
{
"path": "apps/docs/package.json",
"chars": 532,
"preview": "{\n \"name\": \"docs\",\n \"version\": \"0.2.0\",\n \"private\": true,\n \"scripts\": {\n \"dev\": \"next dev\",\n \"build\": \"next bu"
},
{
"path": "apps/docs/pages/_app.mdx",
"chars": 235,
"preview": "import PlausibleProvider from \"next-plausible\";\n\nexport default function MyApp({ Component, pageProps }) {\n return (\n "
},
{
"path": "apps/docs/pages/_meta.json",
"chars": 682,
"preview": "{\n \"index\": \"Getting Started\",\n \"integrations\": \"Integrations\",\n \"reference\": \"Reference\",\n \"-- Guides --\": {\n \"t"
},
{
"path": "apps/docs/pages/a-b-testing.mdx",
"chars": 503,
"preview": "# A/B Tests\n\nAbby allows you to define different tests for your application.\nA test is uniquely identified by a name. Af"
},
{
"path": "apps/docs/pages/config.mdx",
"chars": 7760,
"preview": "import { Callout } from \"nextra-theme-docs\";\n\n# Configuration as Code\n\n## Introduction\n\nAbby aims to have the best Devel"
},
{
"path": "apps/docs/pages/devtools.mdx",
"chars": 2273,
"preview": "import { Tab, Tabs, Callout } from \"nextra-theme-docs\";\n\n# Devtools\n\nAbby comes with a Devtools that allows you to see t"
},
{
"path": "apps/docs/pages/environments.mdx",
"chars": 565,
"preview": "# Environments\n\nEnvironments in Abby allow you to reflect the different environments that your application may be deploy"
},
{
"path": "apps/docs/pages/feature-flags.mdx",
"chars": 2503,
"preview": "# Feature Flags\n\nA feature flag in Abby is basically just a boolean that can be toggled via the Dashboard in Abby.\nThis "
},
{
"path": "apps/docs/pages/index.mdx",
"chars": 931,
"preview": "# Introduction\n\nAbby is an open-source, fully-typed Feature Flagging & Remote Config service made for developers.\n\nIt ai"
},
{
"path": "apps/docs/pages/integrations/_meta.json",
"chars": 170,
"preview": "{\n \"nextjs\": \"Next.js\",\n \"react\": \"React\",\n \"remix\": \"Remix\",\n \"svelte\": \"Svelte\",\n \"angular\": \"Angular\",\n \"node\":"
},
{
"path": "apps/docs/pages/integrations/angular.mdx",
"chars": 4530,
"preview": "import { Tab, Tabs, Callout } from \"nextra-theme-docs\";\n\n# Angular\n\nOur Angular integration works with Angular 15 or lat"
},
{
"path": "apps/docs/pages/integrations/express.mdx",
"chars": 3021,
"preview": "import { Tab, Tabs, Callout } from \"nextra-theme-docs\";\n\n# Express\n\nOur Express package allows you to use Abby within al"
},
{
"path": "apps/docs/pages/integrations/koa.mdx",
"chars": 2827,
"preview": "import { Tab, Tabs, Callout } from \"nextra-theme-docs\";\n\n# Koa\n\nOur Koa package allows you to use Abby within all server"
},
{
"path": "apps/docs/pages/integrations/nextjs.mdx",
"chars": 2880,
"preview": "import { Tab, Tabs, Callout } from \"nextra-theme-docs\";\n\n# Next.js\n\nOur Next.js integration works with Next.js 12 or lat"
},
{
"path": "apps/docs/pages/integrations/node.mdx",
"chars": 2666,
"preview": "import { Tab, Tabs, Callout } from \"nextra-theme-docs\";\n\n# Node.js\n\nOur Node.js package allows you to use Abby within al"
},
{
"path": "apps/docs/pages/integrations/react.mdx",
"chars": 4205,
"preview": "import { Tab, Tabs, Callout } from \"nextra-theme-docs\";\n\n# React\n\nOur React integration works with React 16.8.0 or later"
},
{
"path": "apps/docs/pages/integrations/remix.mdx",
"chars": 3544,
"preview": "import { Tab, Tabs, Callout } from \"nextra-theme-docs\";\n\n# Remix\n\nOur Remix integration works with Remix v2 or later. It"
},
{
"path": "apps/docs/pages/integrations/svelte.mdx",
"chars": 4045,
"preview": "import { Tab, Tabs, Callout } from \"nextra-theme-docs\";\n\n# Svelte\n\nOur Svelte integration works with Svelte version??? I"
},
{
"path": "apps/docs/pages/nextjs.mdx",
"chars": 5803,
"preview": "import { Tab, Tabs } from \"nextra-theme-docs\";\n\n# Using Abby with Next.js\n\nAbby was built to be the best solution for Fe"
},
{
"path": "apps/docs/pages/reference/_meta.json",
"chars": 178,
"preview": "{\n \"nextjs\": \"Next.js\",\n \"react\": \"React\",\n \"remix\": \"Remix\",\n \"svelte\": \"Svelte\",\n \"angular\": \"Angular\",\n \"http\":"
},
{
"path": "apps/docs/pages/reference/angular.mdx",
"chars": 8323,
"preview": "# @tryabby/angular\n\n## AbbyModule\n\nThe AbbyModule is an Angular module that provides a service and some directives to wo"
},
{
"path": "apps/docs/pages/reference/cli.mdx",
"chars": 5258,
"preview": "import { Tab, Tabs, Callout } from \"nextra-theme-docs\";\n\n# Command Line Interface (CLI)\n\nThe Abby CLI works with Node 10"
},
{
"path": "apps/docs/pages/reference/http.mdx",
"chars": 1743,
"preview": "# API Reference (HTTP API)\n\n## Endpoints\n\n- [GET `/api/v1/data/:projectId`](#get-apiv1dataprojectid)\n- [GET `/api/v1/dat"
},
{
"path": "apps/docs/pages/reference/nextjs.mdx",
"chars": 12735,
"preview": "# API Reference (Next.js)\n\n## createAbby\n\n### Parameters\n\nThe `createAbby` function takes an object as a parameter. The "
},
{
"path": "apps/docs/pages/reference/operators.mdx",
"chars": 3164,
"preview": "# Rule Operators\n\nWhen configuring conditional rules for feature flags, you can use different operators based on the pro"
},
{
"path": "apps/docs/pages/reference/react.mdx",
"chars": 11082,
"preview": "# API Reference (React)\n\n## createAbby\n\n### Parameters\n\nThe `createAbby` function takes an object as a parameter. The ob"
},
{
"path": "apps/docs/pages/reference/remix.mdx",
"chars": 10494,
"preview": "# API Reference (Remix)\n\n## createAbby\n\n### Parameters\n\nThe `createAbby` function takes an object as a parameter. The ob"
},
{
"path": "apps/docs/pages/reference/svelte.mdx",
"chars": 7598,
"preview": "# API Reference (Svelte)\n\n## createAbby\n\n### Parameters\n\nThe `createAbby` function takes an object as a parameter. The o"
},
{
"path": "apps/docs/pages/remote-config.mdx",
"chars": 554,
"preview": "# Remote Configuration variables\n\nRemote Configuration variables are custom String, Number and JSON values, which you ca"
},
{
"path": "apps/docs/pages/user-segments.mdx",
"chars": 2774,
"preview": "# User Segments Guide\n\nThis guide demonstrates how to implement user-based targeting with feature flags in a real applic"
},
{
"path": "apps/docs/snippets/ReactApi.mdx",
"chars": 2263,
"preview": "## createAbby\n\n### Parameters\n\n**Options** - Object\n\n- `projectId`: The ID of your project in Abby\n- `apiUrl` _(optional"
},
{
"path": "apps/docs/theme.config.jsx",
"chars": 1541,
"preview": "import { useRouter } from \"next/router\";\n\nexport default {\n useNextSeoProps() {\n const router = useRouter();\n con"
},
{
"path": "apps/docs/tsconfig.json",
"chars": 145,
"preview": "{\n \"extends\": \"tsconfig/nextjs.json\",\n \"include\": [\"next-env.d.ts\", \"**/*.ts\", \"**/*.tsx\", \"theme.config.jsx\"],\n \"exc"
},
{
"path": "apps/web/.gitignore",
"chars": 645,
"preview": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\n/node_modules\n/.pn"
},
{
"path": "apps/web/CHANGELOG.md",
"chars": 7388,
"preview": "# web\n\n## 0.2.42\n\n### Patch Changes\n\n- Updated dependencies\n - @tryabby/devtools@8.0.2\n - @tryabby/next@7.0.1\n\n## 0.2."
},
{
"path": "apps/web/Dockerfile",
"chars": 1775,
"preview": "FROM node:22.8.0-alpine AS base\nENV PNPM_HOME=\"/pnpm\"\nENV PATH=\"$PNPM_HOME:$PATH\"\nRUN npm i -g corepack@^0.31.0\nRUN core"
},
{
"path": "apps/web/README.md",
"chars": 1341,
"preview": "# Create T3 App\n\nThis is a [T3 Stack](https://create.t3.gg/) project bootstrapped with `create-t3-app`.\n\n## What's next?"
},
{
"path": "apps/web/abby.config.ts",
"chars": 941,
"preview": "import { defineConfig } from \"@tryabby/core\";\nimport * as validation from \"@tryabby/core/validation\";\n\nexport default de"
},
{
"path": "apps/web/components.json",
"chars": 328,
"preview": "{\n \"$schema\": \"https://ui.shadcn.com/schema.json\",\n \"style\": \"default\",\n \"rsc\": false,\n \"tsx\": true,\n \"tailwind\": {"
},
{
"path": "apps/web/docker-compose.mailhog.yaml",
"chars": 190,
"preview": "version: '3.4'\n\nservices:\n mailhog:\n image: mailhog/mailhog\n logging:\n driver: 'none' # disable saving logs"
},
{
"path": "apps/web/emails/ContactFormularEmail.tsx",
"chars": 2474,
"preview": "import { Container } from \"@react-email/container\";\nimport { Head } from \"@react-email/head\";\nimport { Html } from \"@rea"
},
{
"path": "apps/web/emails/index.tsx",
"chars": 1084,
"preview": "import { render } from \"@react-email/render\";\nimport { env } from \"env/server.mjs\";\nimport { createTransport } from \"nod"
},
{
"path": "apps/web/emails/invite.tsx",
"chars": 3748,
"preview": "import type { Project } from \"@prisma/client\";\nimport { Button } from \"@react-email/button\";\nimport { Container } from \""
},
{
"path": "apps/web/next-sitemap.config.js",
"chars": 359,
"preview": "/** @type {import('next-sitemap').IConfig} */\nmodule.exports = {\n siteUrl: process.env.SITE_URL || \"https://www.tryabby"
},
{
"path": "apps/web/next.config.mjs",
"chars": 3166,
"preview": "// @ts-check\nimport { remarkCodeHike } from \"@code-hike/mdx\";\nimport bundleAnalzyer from \"@next/bundle-analyzer\";\nimport"
},
{
"path": "apps/web/package.json",
"chars": 5278,
"preview": "{\n \"name\": \"web\",\n \"version\": \"0.2.42\",\n \"private\": true,\n \"scripts\": {\n \"prebuild\": \"pnpm run db:generate\",\n "
},
{
"path": "apps/web/postcss.config.cjs",
"chars": 83,
"preview": "module.exports = {\n plugins: {\n tailwindcss: {},\n autoprefixer: {},\n },\n};\n"
},
{
"path": "apps/web/prisma/generateCoupons.ts",
"chars": 674,
"preview": "import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { PrismaClient } from \"@prisma/client\";\n\nconst p"
},
{
"path": "apps/web/prisma/migrations/20221205112748_init_db/migration.sql",
"chars": 2039,
"preview": "-- CreateTable\nCREATE TABLE `Example` (\n `id` VARCHAR(191) NOT NULL,\n `createdAt` DATETIME(3) NOT NULL DEFAULT CUR"
},
{
"path": "apps/web/prisma/migrations/20221205131914_bruh/migration.sql",
"chars": 718,
"preview": "-- CreateTable\nCREATE TABLE `Project` (\n `id` VARCHAR(191) NOT NULL,\n `createdAt` DATETIME(3) NOT NULL DEFAULT CUR"
},
{
"path": "apps/web/prisma/migrations/20221205132203_/migration.sql",
"chars": 397,
"preview": "/*\n Warnings:\n\n - You are about to drop the `ProjectMemeber` table. If the table is not empty, all the data it contain"
},
{
"path": "apps/web/prisma/migrations/20221205133208_/migration.sql",
"chars": 782,
"preview": "-- CreateTable\nCREATE TABLE `Test` (\n `projectId` VARCHAR(191) NULL,\n `id` VARCHAR(191) NOT NULL,\n `createdAt` "
},
{
"path": "apps/web/prisma/migrations/20221205162949_make_name_and_project_id_unique_identifier_for_test/migration.sql",
"chars": 472,
"preview": "/*\n Warnings:\n\n - A unique constraint covering the columns `[projectId,name]` on the table `Test` will be added. If th"
},
{
"path": "apps/web/prisma/migrations/20221207080237_add_event_table/migration.sql",
"chars": 465,
"preview": "-- CreateTable\nCREATE TABLE `Event` (\n `id` VARCHAR(191) NOT NULL,\n `testId` VARCHAR(191) NOT NULL,\n `type` INT"
},
{
"path": "apps/web/prisma/migrations/20221208123701_add_project_invites/migration.sql",
"chars": 582,
"preview": "-- CreateTable\nCREATE TABLE `ProjectInvite` (\n `id` VARCHAR(191) NOT NULL,\n `createdAt` DATETIME(3) NOT NULL DEFAU"
},
{
"path": "apps/web/prisma/migrations/20221208134716_use_decimal_for_weights/migration.sql",
"chars": 275,
"preview": "/*\n Warnings:\n\n - You are about to alter the column `chance` on the `Option` table. The data in that column could be l"
},
{
"path": "apps/web/prisma/migrations/20221208152910_add_project_user/migration.sql",
"chars": 553,
"preview": "-- CreateTable\nCREATE TABLE `ProjectUser` (\n `id` VARCHAR(191) NOT NULL,\n `createdAt` DATETIME(3) NOT NULL DEFAULT"
},
{
"path": "apps/web/prisma/migrations/20221208172715_/migration.sql",
"chars": 249,
"preview": "/*\n Warnings:\n\n - You are about to drop the column `userId` on the `Project` table. All the data in the column will be"
},
{
"path": "apps/web/prisma/migrations/20221210195541_add_stripe_info_to_projects/migration.sql",
"chars": 804,
"preview": "/*\n Warnings:\n\n - A unique constraint covering the columns `[stripeCustomerId]` on the table `Project` will be added. "
},
{
"path": "apps/web/prisma/migrations/20221212063242_add_plan_to_project/migration.sql",
"chars": 117,
"preview": "-- AlterTable\nALTER TABLE `Project` ADD COLUMN `plan` ENUM('FREE', 'STARTER', 'ENTERPRISE') NOT NULL DEFAULT 'FREE';\n"
},
{
"path": "apps/web/prisma/migrations/20230101140121_use_role_enum_for_project_users/migration.sql",
"chars": 303,
"preview": "/*\n Warnings:\n\n - You are about to alter the column `role` on the `ProjectUser` table. The data in that column could b"
},
{
"path": "apps/web/prisma/migrations/20230104071050_add_feature_flags/migration.sql",
"chars": 1002,
"preview": "-- CreateTable\nCREATE TABLE `FeatureFlag` (\n `id` VARCHAR(191) NOT NULL,\n `createdAt` DATETIME(3) NOT NULL DEFAULT"
},
{
"path": "apps/web/prisma/migrations/20230104080059_make_featureflag_name_unique_per_project/migration.sql",
"chars": 289,
"preview": "/*\n Warnings:\n\n - A unique constraint covering the columns `[projectId,name]` on the table `FeatureFlag` will be added"
},
{
"path": "apps/web/prisma/migrations/20230104081514_fix/migration.sql",
"chars": 410,
"preview": "/*\n Warnings:\n\n - A unique constraint covering the columns `[projectId,name,environmentId]` on the table `FeatureFlag`"
},
{
"path": "apps/web/prisma/migrations/20230115171608_remove/migration.sql",
"chars": 185,
"preview": "/*\n Warnings:\n\n - You are about to drop the column `plan` on the `Project` table. All the data in the column will be l"
},
{
"path": "apps/web/prisma/migrations/20230210162012_add_history/migration.sql",
"chars": 491,
"preview": "-- CreateTable\nCREATE TABLE `FeatureFlagHistory` (\n `id` VARCHAR(191) NOT NULL,\n `createdAt` DATETIME(3) NOT NULL "
},
{
"path": "apps/web/prisma/migrations/20230222182342_add_sort_index_for_env/migration.sql",
"chars": 277,
"preview": "/*\n Warnings:\n\n - A unique constraint covering the columns `[projectId,sortIndex]` on the table `Environment` will be "
},
{
"path": "apps/web/prisma/migrations/20230302165144_add_description_to_feature_flag/migration.sql",
"chars": 84,
"preview": "-- AlterTable\nALTER TABLE `FeatureFlag` ADD COLUMN `description` VARCHAR(191) NULL;\n"
},
{
"path": "apps/web/prisma/migrations/20230303082044_use_text_for_description_for_longer_texts/migration.sql",
"chars": 72,
"preview": "-- AlterTable\nALTER TABLE `FeatureFlag` MODIFY `description` TEXT NULL;\n"
},
{
"path": "apps/web/prisma/migrations/20230303121237_add_flag_value_table/migration.sql",
"chars": 2181,
"preview": "DROP INDEX `FeatureFlagHistory_featureFlagId_idx` ON `FeatureFlagHistory`;\n\n-- AlterTable\nALTER TABLE `FeatureFlagHistor"
},
{
"path": "apps/web/prisma/migrations/20230303130553_/migration.sql",
"chars": 189,
"preview": "/*\n Warnings:\n\n - You are about to drop the column `name` on the `FlagValue` table. All the data in the column will be"
},
{
"path": "apps/web/prisma/migrations/20230303181212_update_history/migration.sql",
"chars": 849,
"preview": "/*\n Warnings:\n\n - You are about to drop the column `environmentId` on the `FeatureFlagHistory` table. All the data in "
},
{
"path": "apps/web/prisma/migrations/20230303181813_remove_env_flag_relation/migration.sql",
"chars": 286,
"preview": "/*\n Warnings:\n\n - You are about to drop the column `environmentId` on the `FeatureFlag` table. All the data in the col"
},
{
"path": "apps/web/prisma/migrations/20230303182053_make_id_for_flag_values_unique/migration.sql",
"chars": 322,
"preview": "/*\n Warnings:\n\n - A unique constraint covering the columns `[id]` on the table `FlagValue` will be added. If there are"
},
{
"path": "apps/web/prisma/migrations/20230305160755_rename_flag_value_and_add_index_for_faster_access/migration.sql",
"chars": 100,
"preview": "-- CreateIndex\nCREATE INDEX `Environment_projectId_name_idx` ON `Environment`(`projectId`, `name`);\n"
},
{
"path": "apps/web/prisma/migrations/20230326163301_make_payment_interval_required/migration.sql",
"chars": 617,
"preview": "/*\n Warnings:\n\n - You are about to drop the column `stripeCurrentPeriodEnd` on the `Project` table. All the data in th"
},
{
"path": "apps/web/prisma/migrations/20230511063052_add_coupon_codes_table/migration.sql",
"chars": 477,
"preview": "-- CreateTable\nCREATE TABLE `CouponCodes` (\n `id` VARCHAR(191) NOT NULL,\n `createdAt` DATETIME(3) NOT NULL DEFAULT"
},
{
"path": "apps/web/prisma/migrations/20230511064125_renmae_price_id_field_for_code/migration.sql",
"chars": 397,
"preview": "/*\n Warnings:\n\n - You are about to drop the column `planId` on the `CouponCodes` table. All the data in the column wil"
},
{
"path": "apps/web/prisma/migrations/20230601155320_add_multivariate_flags/migration.sql",
"chars": 607,
"preview": "/*\n Warnings:\n\n - You are about to drop the column `isEnabled` on the `FlagValue` table. All the data in the column wi"
},
{
"path": "apps/web/prisma/migrations/20230601161058_update_flag_history/migration.sql",
"chars": 517,
"preview": "/*\n Warnings:\n\n - You are about to alter the column `oldValue` on the `FeatureFlagHistory` table. The data in that col"
},
{
"path": "apps/web/prisma/migrations/20230602080502_remove_json_field_from_flagtype_enum/migration.sql",
"chars": 270,
"preview": "/*\n Warnings:\n\n - The values [JSON] on the enum `FlagValue_type` will be removed. If these variants are still used in "
},
{
"path": "apps/web/prisma/migrations/20230611180244_move_flag_type_to_flag_instead_of_value/migration.sql",
"chars": 312,
"preview": "/*\n Warnings:\n\n - You are about to drop the column `type` on the `FlagValue` table. All the data in the column will be"
},
{
"path": "apps/web/prisma/migrations/20230628081242_add_api_key_table/migration.sql",
"chars": 546,
"preview": "-- CreateTable\nCREATE TABLE `APIKey` (\n `id` VARCHAR(191) NOT NULL,\n `name` VARCHAR(191) NOT NULL,\n `hashedKey`"
},
{
"path": "apps/web/prisma/migrations/20230630140739_add_json_type/migration.sql",
"chars": 126,
"preview": "-- AlterTable\nALTER TABLE `FeatureFlag` MODIFY `type` ENUM('BOOLEAN', 'STRING', 'NUMBER', 'JSON') NOT NULL DEFAULT 'BOOL"
},
{
"path": "apps/web/prisma/migrations/20230731133223_rename_apikey/migration.sql",
"chars": 713,
"preview": "/*\n Warnings:\n\n - You are about to drop the `APIKey` table. If the table is not empty, all the data it contains will b"
},
{
"path": "apps/web/prisma/migrations/20230803094512_change_api_key_validity_logic/migration.sql",
"chars": 568,
"preview": "/*\n Warnings:\n\n - You are about to drop the column `isRevoked` on the `ApiKey` table. All the data in the column will "
},
{
"path": "apps/web/prisma/migrations/20230901064929_add_requests/migration.sql",
"chars": 445,
"preview": "-- CreateTable\nCREATE TABLE `ApiRequest` (\n `id` VARCHAR(191) NOT NULL,\n `createdAt` DATETIME(3) NOT NULL DEFAULT "
},
{
"path": "apps/web/prisma/migrations/20230901065851_remove_hashed_ip_field/migration.sql",
"chars": 199,
"preview": "/*\n Warnings:\n\n - You are about to drop the column `hashedIp` on the `ApiRequest` table. All the data in the column wi"
},
{
"path": "apps/web/prisma/migrations/20230903075910_add_user_onboarding_information/migration.sql",
"chars": 345,
"preview": "-- AlterTable\nALTER TABLE `User` ADD COLUMN `experienceLevelFlags` INTEGER NULL,\n ADD COLUMN `experienceLevelTests` I"
},
{
"path": "apps/web/prisma/migrations/20231207205533_add_api_version_to_request/migration.sql",
"chars": 181,
"preview": "-- AlterTable\nALTER TABLE `ApiRequest` ADD COLUMN `apiVersion` VARCHAR(191) NOT NULL DEFAULT 'v0',\n MODIFY `type` ENU"
},
{
"path": "apps/web/prisma/migrations/20231207205701_add_apiversion_enum/migration.sql",
"chars": 315,
"preview": "/*\n Warnings:\n\n - You are about to alter the column `apiVersion` on the `ApiRequest` table. The data in that column co"
},
{
"path": "apps/web/prisma/migrations/20240620195120_add_apirequest_type/migration.sql",
"chars": 137,
"preview": "-- AlterTable\nALTER TABLE `ApiRequest` MODIFY `type` ENUM('GET_CONFIG', 'GET_CONFIG_SCRIPT', 'TRACK_VIEW', 'TRACK_CONVER"
},
{
"path": "apps/web/prisma/migrations/20240621084922_add_indices_for_apirequest/migration.sql",
"chars": 161,
"preview": "-- CreateIndex\nCREATE INDEX `ApiRequest_createdAt_idx` ON `ApiRequest`(`createdAt`);\n\n-- CreateIndex\nCREATE INDEX `ApiRe"
},
{
"path": "apps/web/prisma/migrations/20240826064116_add_integrations/migration.sql",
"chars": 494,
"preview": "-- CreateTable\nCREATE TABLE `Integration` (\n `id` VARCHAR(191) NOT NULL,\n `createdAt` DATETIME(3) NOT NULL DEFAULT"
},
{
"path": "apps/web/prisma/migrations/20240903210250_add_anonymous_id_to_event/migration.sql",
"chars": 78,
"preview": "-- AlterTable\nALTER TABLE `Event` ADD COLUMN `anonymousId` VARCHAR(191) NULL;\n"
},
{
"path": "apps/web/prisma/migrations/20250131071445_add_flag_rulesets/migration.sql",
"chars": 990,
"preview": "-- CreateTable\nCREATE TABLE `UserSegment` (\n `id` VARCHAR(191) NOT NULL,\n `projectId` VARCHAR(191) NOT NULL,\n `"
},
{
"path": "apps/web/prisma/migrations/migration_lock.toml",
"chars": 121,
"preview": "# Please do not edit this file manually\n# It should be added in your version-control system (i.e. Git)\nprovider = \"mysql"
},
{
"path": "apps/web/prisma/schema.prisma",
"chars": 8795,
"preview": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\ngenerator clien"
},
{
"path": "apps/web/prisma/seedEvents.ts",
"chars": 3722,
"preview": "import crypto from \"node:crypto\";\nimport { type Prisma, PrismaClient } from \"@prisma/client\";\nimport { AbbyEventType } f"
},
{
"path": "apps/web/prisma/sql/getEventsByTestIdForAllTime.sql",
"chars": 573,
"preview": "-- @param {String} $1:testId\n-- @param {Int} $2:type\n-- @param {String} $3:testIdAgain\n-- @param {Int} $4:typeAgain\n\nSEL"
},
{
"path": "apps/web/prisma/sql/getEventsByTestIdForDay.sql",
"chars": 427,
"preview": "-- @param {String} $1:testId\n-- @param {Int} $2:type\n-- @param {DateTime} $3:date\n\nSELECT\n\tCOUNT(DISTINCT CASE WHEN anon"
},
{
"path": "apps/web/prisma/sql/getEventsByTestIdForLast30Days.sql",
"chars": 423,
"preview": "-- @param {String} $1:testId\n-- @param {Int} $2:type\n\nSELECT\n\tCOUNT(DISTINCT CASE WHEN anonymousId IS NOT NULL THEN\n\t\t\ta"
},
{
"path": "apps/web/sentry.client.config.ts",
"chars": 592,
"preview": "// This file configures the initialization of Sentry on the client.\n// The config you add here will be used whenever a u"
},
{
"path": "apps/web/sentry.edge.config.ts",
"chars": 738,
"preview": "// This file configures the initialization of Sentry for edge features (middleware, edge routes, and so on).\n// The conf"
},
{
"path": "apps/web/sentry.server.config.ts",
"chars": 583,
"preview": "// This file configures the initialization of Sentry on the server.\n// The config you add here will be used whenever the"
},
{
"path": "apps/web/src/api/helpers.ts",
"chars": 923,
"preview": "import { env } from \"env/server.mjs\";\nimport type { MiddlewareHandler } from \"hono\";\nimport { getCookie } from \"hono/coo"
},
{
"path": "apps/web/src/api/index.ts",
"chars": 1020,
"preview": "import { makeConfigRoute } from \"api/routes/v1_config\";\nimport { makeProjectDataRoute } from \"api/routes/v1_project_data"
},
{
"path": "apps/web/src/api/routes/health.test.ts",
"chars": 519,
"preview": "import { testClient } from \"hono/testing\";\nimport { makeHealthRoute } from \"./health\";\n\nvi.mock(\"server/db/client\", () ="
},
{
"path": "apps/web/src/api/routes/health.ts",
"chars": 374,
"preview": "import { Hono } from \"hono\";\nimport { prisma } from \"server/db/client\";\nimport { redis } from \"server/db/redis\";\n\nexport"
},
{
"path": "apps/web/src/api/routes/integrations.ts",
"chars": 4292,
"preview": "import { zValidator } from \"@hono/zod-validator\";\nimport { Webhooks } from \"@octokit/webhooks\";\nimport { authMiddleware "
},
{
"path": "apps/web/src/api/routes/legacy_project_data.test.ts",
"chars": 2937,
"preview": "import type {\n FeatureFlag,\n FeatureFlagValue,\n Option,\n Test,\n} from \"@prisma/client\";\nimport type { Decimal } from"
},
{
"path": "apps/web/src/api/routes/legacy_project_data.ts",
"chars": 3065,
"preview": "import { type Context, Hono } from \"hono\";\nimport { endTime, startTime, timing } from \"hono/timing\";\n\nimport { zValidato"
},
{
"path": "apps/web/src/api/routes/v1_config.test.ts",
"chars": 4992,
"preview": "import { testClient } from \"hono/testing\";\nimport { prisma } from \"server/db/client\";\nimport { type handleGET, handlePUT"
},
{
"path": "apps/web/src/api/routes/v1_config.ts",
"chars": 2139,
"preview": "import { zValidator } from \"@hono/zod-validator\";\nimport type { ApiKey } from \"@prisma/client\";\nimport { abbyConfigSchem"
},
{
"path": "apps/web/src/api/routes/v1_event.test.ts",
"chars": 2044,
"preview": "import { AbbyEventType } from \"@tryabby/core\";\nimport { testClient } from \"hono/testing\";\nimport { prisma } from \"server"
},
{
"path": "apps/web/src/api/routes/v1_event.ts",
"chars": 1893,
"preview": "import { zValidator } from \"@hono/zod-validator\";\nimport { abbyEventSchema } from \"@tryabby/core\";\nimport { Hono } from "
},
{
"path": "apps/web/src/api/routes/v1_project_data.test.ts",
"chars": 4171,
"preview": "import type {\n FeatureFlag,\n FeatureFlagValue,\n Option,\n Test,\n} from \"@prisma/client\";\nimport type { Decimal } from"
},
{
"path": "apps/web/src/api/routes/v1_project_data.ts",
"chars": 4529,
"preview": "import { zValidator } from \"@hono/zod-validator\";\nimport { ABBY_WINDOW_KEY, type AbbyDataResponse } from \"@tryabby/core\""
},
{
"path": "apps/web/src/api/routes/v2_project_data.ts",
"chars": 4908,
"preview": "import { zValidator } from \"@hono/zod-validator\";\nimport { ABBY_WINDOW_KEY, type AbbyDataResponse } from \"@tryabby/core\""
},
{
"path": "apps/web/src/components/AddABTestModal.tsx",
"chars": 3380,
"preview": "import { TRPCClientError } from \"@trpc/client\";\nimport { TRPC_ERROR_CODES_BY_KEY } from \"@trpc/server/rpc\";\nimport { Mod"
},
{
"path": "apps/web/src/components/AddFeatureFlagModal.tsx",
"chars": 7033,
"preview": "import { FeatureFlagType } from \"@prisma/client\";\nimport { TRPCClientError } from \"@trpc/client\";\nimport { TRPC_ERROR_CO"
},
{
"path": "apps/web/src/components/AsyncCodeExample.tsx",
"chars": 480,
"preview": "import { trpc } from \"utils/trpc\";\nimport { BaseCodeSnippet } from \"./CodeSnippet\";\nimport { LoadingSpinner } from \"./Lo"
},
{
"path": "apps/web/src/components/Avatar.tsx",
"chars": 1331,
"preview": "import * as RadixAvatar from \"@radix-ui/react-avatar\";\nimport type { ComponentProps } from \"react\";\nimport { twMerge } f"
},
{
"path": "apps/web/src/components/BlogLayout.tsx",
"chars": 2144,
"preview": "import dayjs from \"dayjs\";\nimport { NextSeo } from \"next-seo\";\nimport Image from \"next/image\";\nimport type { PostMeta } "
},
{
"path": "apps/web/src/components/Button.tsx",
"chars": 760,
"preview": "import type React from \"react\";\nimport { twMerge } from \"tailwind-merge\";\n\ninterface ButtonProps<T extends React.Element"
},
{
"path": "apps/web/src/components/CodeSnippet.tsx",
"chars": 3452,
"preview": "import clsx from \"clsx\";\nimport { useState } from \"react\";\nimport toast from \"react-hot-toast\";\nimport { FaCopy, FaReact"
},
{
"path": "apps/web/src/components/CodeSnippetModalButton.tsx",
"chars": 2561,
"preview": "import { Dialog } from \"@headlessui/react\";\nimport { useProjectId } from \"lib/hooks/useProjectId\";\nimport { useTracking "
},
{
"path": "apps/web/src/components/CreateAPIKeyModal.tsx",
"chars": 1480,
"preview": "import { TRPCClientError } from \"@trpc/client\";\nimport { TRPC_ERROR_CODES_BY_KEY } from \"@trpc/server/rpc\";\nimport { use"
},
{
"path": "apps/web/src/components/CreateEnvironmentModal.tsx",
"chars": 1936,
"preview": "import { TRPCClientError } from \"@trpc/client\";\nimport { TRPC_ERROR_CODES_BY_KEY } from \"@trpc/server/rpc\";\nimport { use"
},
{
"path": "apps/web/src/components/CreateProjectModal.tsx",
"chars": 2090,
"preview": "import { useTracking } from \"lib/tracking\";\nimport { useSession } from \"next-auth/react\";\nimport { useRouter } from \"nex"
},
{
"path": "apps/web/src/components/DashboardButton.tsx",
"chars": 238,
"preview": "import type { ComponentPropsWithRef } from \"react\";\nimport { Button } from \"./ui/button\";\n\ntype Props = ComponentPropsWi"
},
{
"path": "apps/web/src/components/DashboardHeader.tsx",
"chars": 468,
"preview": "import { useTracking } from \"lib/tracking\";\nimport { CodeSnippetModalButton } from \"./CodeSnippetModalButton\";\n\ntype Pro"
},
{
"path": "apps/web/src/components/DashboardSection.tsx",
"chars": 775,
"preview": "import { twMerge } from \"tailwind-merge\";\n\nexport function DashboardSection({\n children,\n className,\n}: {\n children: "
},
{
"path": "apps/web/src/components/DeleteProjectModal.tsx",
"chars": 1581,
"preview": "import { useProjectId } from \"lib/hooks/useProjectId\";\nimport { useSession } from \"next-auth/react\";\nimport { useRouter "
},
{
"path": "apps/web/src/components/DevtoolsArrow.tsx",
"chars": 3094,
"preview": "import { AnimatePresence, motion } from \"framer-motion\";\nimport { useTracking } from \"lib/tracking\";\nimport { CornerRigh"
},
{
"path": "apps/web/src/components/Divider.tsx",
"chars": 255,
"preview": "import { twMerge } from \"tailwind-merge\";\n\nexport function Divider({ className }: { className?: string }) {\n return (\n "
},
{
"path": "apps/web/src/components/Dropdown.tsx",
"chars": 2212,
"preview": "import * as DropdownMenu from \"@radix-ui/react-dropdown-menu\";\nimport { cn } from \"lib/utils\";\nimport type React from \"r"
},
{
"path": "apps/web/src/components/DropdownMenu.tsx",
"chars": 7341,
"preview": "\"use client\";\n\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { Check, ChevronRight, Cir"
},
{
"path": "apps/web/src/components/Editor.tsx",
"chars": 7756,
"preview": "import TextAlign from \"@tiptap/extension-text-align\";\nimport {\n EditorContent,\n type Editor as TipTapEditor,\n useEdit"
},
{
"path": "apps/web/src/components/EventCounter.tsx",
"chars": 811,
"preview": "import { AnimatePresence, motion } from \"framer-motion\";\nimport { trpc } from \"utils/trpc\";\n\nexport function EventCounte"
},
{
"path": "apps/web/src/components/Feature.tsx",
"chars": 857,
"preview": "import type { LucideIcon } from \"lucide-react\";\nimport type { IconType } from \"react-icons\";\n\ntype Props = {\n children:"
},
{
"path": "apps/web/src/components/FeatureFlag.tsx",
"chars": 11037,
"preview": "import {} from \"components/ui/popover\";\nimport dayjs from \"dayjs\";\nimport { P, match } from \"ts-pattern\";\n\nimport type {"
},
{
"path": "apps/web/src/components/FlagIcon.tsx",
"chars": 939,
"preview": "import type { FeatureFlagType } from \"@prisma/client\";\nimport { Baseline, CurlyBraces, Hash, ToggleLeft } from \"lucide-r"
},
{
"path": "apps/web/src/components/FlagPage.tsx",
"chars": 15570,
"preview": "import type { FeatureFlagType } from \"@prisma/client\";\nimport type { inferRouterOutputs } from \"@trpc/server\";\nimport { "
},
{
"path": "apps/web/src/components/Footer.tsx",
"chars": 2936,
"preview": "import { DOCS_URL } from \"@tryabby/core\";\nimport { Github } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { "
},
{
"path": "apps/web/src/components/Input.tsx",
"chars": 796,
"preview": "import * as React from \"react\";\n\nimport { cn } from \"lib/utils\";\n\nexport interface InputProps\n extends React.InputHTMLA"
},
{
"path": "apps/web/src/components/Integrations.tsx",
"chars": 4651,
"preview": "import { DOCS_URL } from \"@tryabby/core\";\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport { cn } from \"l"
},
{
"path": "apps/web/src/components/JSONEditor.tsx",
"chars": 401,
"preview": "import { Editor } from \"@monaco-editor/react\";\n\ntype Props = {\n value: string;\n onChange: (value: string) => void;\n};\n"
},
{
"path": "apps/web/src/components/Layout.tsx",
"chars": 3869,
"preview": "import { DOCS_URL } from \"@tryabby/core\";\nimport { Button } from \"components/ui/button\";\nimport { useProjectId } from \"l"
},
{
"path": "apps/web/src/components/LoadingSpinner.tsx",
"chars": 1023,
"preview": "import { twMerge } from \"tailwind-merge\";\n\nexport function LoadingSpinner({\n height,\n width,\n className,\n}: {\n heigh"
},
{
"path": "apps/web/src/components/Logo.tsx",
"chars": 206,
"preview": "type Props = {\n as?: React.ElementType;\n};\n\nexport default function Logo({ as: Component = \"span\" }: Props) {\n return "
},
{
"path": "apps/web/src/components/MarketingLayout.tsx",
"chars": 2602,
"preview": "import clsx from \"clsx\";\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport { cn } from \"lib/utils\";\nimport"
},
{
"path": "apps/web/src/components/Modal.tsx",
"chars": 1670,
"preview": "import {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogTitle,\n} from \"components/ui/dialog\";\ni"
},
{
"path": "apps/web/src/components/Navbar/index.tsx",
"chars": 9714,
"preview": "import { Menu, Transition } from \"@headlessui/react\";\nimport { DOCS_URL } from \"@tryabby/core\";\nimport clsx from \"clsx\";"
},
{
"path": "apps/web/src/components/Pricing.tsx",
"chars": 6694,
"preview": "import clsx from \"clsx\";\nimport { cn } from \"lib/utils\";\nimport { Info } from \"lucide-react\";\nimport { useSession } from"
},
{
"path": "apps/web/src/components/Progress.tsx",
"chars": 988,
"preview": "import { twMerge } from \"tailwind-merge\";\n\ntype Props = {\n currentValue: number;\n maxValue: number;\n};\n\nexport functio"
},
{
"path": "apps/web/src/components/ProjectSwitcher.tsx",
"chars": 6666,
"preview": "\"use client\";\n\nimport {\n CaretSortIcon,\n CheckIcon,\n PlusCircledIcon,\n} from \"@radix-ui/react-icons\";\nimport * as Rea"
},
{
"path": "apps/web/src/components/RadioGroup.tsx",
"chars": 854,
"preview": "import {\n RadioGroup,\n RadioGroupItem as RadixRadioGroupItem,\n} from \"components/ui/radio-group\";\n\nexport type RadioGr"
},
{
"path": "apps/web/src/components/RadioSelect.tsx",
"chars": 1558,
"preview": "import * as RadioGroup from \"@radix-ui/react-radio-group\";\nimport { cn } from \"lib/utils\";\nimport React from \"react\";\n\nt"
},
{
"path": "apps/web/src/components/RemoveUserModal.tsx",
"chars": 1270,
"preview": "import type { User } from \"@prisma/client\";\nimport { useProjectId } from \"lib/hooks/useProjectId\";\nimport { toast } from"
},
{
"path": "apps/web/src/components/Select.tsx",
"chars": 3937,
"preview": "import { Listbox, Transition } from \"@headlessui/react\";\nimport clsx from \"clsx\";\nimport { Fragment } from \"react\";\nimpo"
},
{
"path": "apps/web/src/components/SignupButton.tsx",
"chars": 831,
"preview": "import { useAbby } from \"lib/abby\";\nimport Link from \"next/link\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport func"
},
{
"path": "apps/web/src/components/Test/CreateTestSection.tsx",
"chars": 15474,
"preview": "import { Button } from \"components/ui/button\";\nimport { Card, CardContent, CardHeader } from \"components/ui/card\";\nimpor"
},
{
"path": "apps/web/src/components/Test/Metrics.tsx",
"chars": 643,
"preview": "import { DonutChart } from \"components/charts/Donut\";\nimport type { ProjectClientEvents } from \"pages/projects/[projectI"
},
{
"path": "apps/web/src/components/Test/Section.tsx",
"chars": 7034,
"preview": "import type { Test } from \"@prisma/client\";\nimport * as Popover from \"@radix-ui/react-popover\";\nimport { Modal } from \"c"
},
{
"path": "apps/web/src/components/Test/Serves.tsx",
"chars": 640,
"preview": "import { DonutChart } from \"components/charts/Donut\";\nimport type { ProjectClientEvents } from \"pages/projects/[projectI"
},
{
"path": "apps/web/src/components/Test/Weights.tsx",
"chars": 12945,
"preview": "import { Button } from \"components/ui/button\";\nimport { Input } from \"components/ui/input\";\nimport {\n Select,\n SelectC"
},
{
"path": "apps/web/src/components/TitleEdit.tsx",
"chars": 1501,
"preview": "import { useState } from \"react\";\nimport { AiOutlineEdit, AiOutlineSave } from \"react-icons/ai\";\nimport { Button } from "
},
{
"path": "apps/web/src/components/Toggle.tsx",
"chars": 654,
"preview": "import { useId } from \"react\";\nimport { Switch } from \"./ui/switch\";\nexport function Toggle({\n label,\n onChange,\n isC"
},
{
"path": "apps/web/src/components/Tooltip.tsx",
"chars": 1296,
"preview": "\"use client\";\n\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport * as React from \"react\";\n\nimport { cn"
},
{
"path": "apps/web/src/components/UsedBy.tsx",
"chars": 1489,
"preview": "import Image from \"next/image\";\nimport Link from \"next/link\";\nimport DynabaseLogo from \"../../public/img/companies/dynab"
},
{
"path": "apps/web/src/components/UserAuthForm.tsx",
"chars": 2749,
"preview": "\"use client\";\n\nimport type * as React from \"react\";\n\nimport { cn } from \"lib/utils\";\n\nimport { Button } from \"components"
},
{
"path": "apps/web/src/components/UserInfo.tsx",
"chars": 1797,
"preview": "import {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from \"components/DropdownMe"
},
{
"path": "apps/web/src/components/analytics/EventGraph.tsx",
"chars": 3600,
"preview": "\"use client\";\n\nimport * as React from \"react\";\nimport { CartesianGrid, Line, LineChart, XAxis, YAxis } from \"recharts\";\n"
}
]
// ... and 522 more files (download for full content)
About this extraction
This page contains the full source code of the tryabby/abby GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 722 files (8.5 MB), approximately 2.3M tokens, and a symbol index with 592 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.