Monorepo of all Pocket App Typescript Backend Sevices https://getpocket.com
  • TypeScript 90.7%
  • Jupyter Notebook 3.3%
  • HCL 3.1%
  • JavaScript 2.3%
  • Shell 0.5%
  • Other 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-05-22 11:07:19 -07:00
.docker feat(export): async, multi-service export (#1042) 2025-03-06 13:56:55 -08:00
.github feat(export): async, multi-service export (#1042) 2025-03-06 13:56:55 -08:00
.husky fix(deps): updating dev deps (#660) 2024-07-18 22:21:16 +00:00
.vscode feat(event-bridge): adding in event bridge utility package (#904) 2024-10-31 22:07:47 +00:00
infrastructure HNT-706: Scale out account data deleter (#1051) 2025-05-22 11:07:19 -07:00
lambdas feat(export): send email confirmation (#1041) 2025-02-19 11:15:23 -08:00
packages feat(export): async, multi-service export (#1042) 2025-03-06 13:56:55 -08:00
scripts feat(corpus:search): add syndication deduplication script (#771) 2024-09-25 17:15:33 +00:00
servers chore(export): Add Sentry alerts for data export failures (HNT-545) (#1049) 2025-05-13 11:50:44 -07:00
.dockerignore fix(image): adding in the image api from cbd7581a7675e5017d464b8ceb65c29ee6858cb5 (#1) 2023-12-15 15:06:11 -08:00
.env.example feat(display): adding in the basics of a preview item (#456) 2024-04-16 20:00:07 +00:00
.gitignore chore(export): Add Sentry alerts for data export failures (HNT-545) (#1049) 2025-05-13 11:50:44 -07:00
.nvmrc ci(deps): update dependency node to v22 (#930) 2024-11-06 13:44:49 -08:00
.prettierignore feat(shares-api): stand up basic shares-api service (#463) 2024-04-15 20:50:15 +00:00
.prettierrc feat(router): Stand up apollo router (#41) 2024-01-08 10:17:01 -08:00
.syncpackrc fix(deps): update aws-sdk-js-v3 monorepo (#998) 2025-01-02 19:15:12 +00:00
.tfcmt.yml fix(lambda): making lambda ignore git_sha changes (#329) 2024-03-22 10:26:59 -07:00
CODE_OF_CONDUCT.md docs(contributing): adding in code of conduct and contributing 2023-12-15 15:06:11 -08:00
CONTRIBUTING.md docs(contributing): adding in code of conduct and contributing 2023-12-15 15:06:11 -08:00
docker-compose.yml feat(clientapi): add operation name and errors to otel instrumentation (#1021) 2025-01-09 19:54:08 +00:00
Dockerfile ci(deps): update dependency node to v22 (#930) 2024-11-06 13:44:49 -08:00
LICENSE feat(init): initial commit 2023-12-15 15:06:08 -08:00
nodemon.json feat(dev): standardizing logging, tracing, startup and making sure all servers run (#87) 2024-01-23 10:18:30 -08:00
package.json chore(dependencies): upgrade minor and patch deps (#1029) 2025-01-17 10:38:05 -08:00
pnpm-lock.yaml feat(export): async, multi-service export (#1042) 2025-03-06 13:56:55 -08:00
pnpm-workspace.yaml feat(router): Stand up apollo router (#41) 2024-01-08 10:17:01 -08:00
README.md chore(ci): move to GitHub actions (#678) 2024-08-21 08:00:38 -07:00
renovate.json chore(config): migrate config renovate.json (#902) 2024-11-01 21:47:13 +00:00
turbo.json fix(release): ensuring that semantic release uses real version numbers (#956) 2024-11-14 08:36:04 -08:00

Pocket Monorepo

This repo contains all the Pocket Typescript systems built as a monorepo but deployed as microservices. For services that power Recomendations or Pocket Curated Content see the Content Monorepo

What's inside?

This Repo includes the following packages/servers:

Folder structure

  • servers: all our typescript microservices required for running baseline Pocket.
  • lambdas: all our lambda listeners that are made up of SQS Queue processers or API Gateways
  • infrastructure: all of the terraform infrastructure that is used to deploy each microservice
  • packages/eslint-config-custom: eslint configurations
  • packages/tsconfig: tsconfig.jsons used throughout the monorepo
  • packages/apollo-utils: holds helpers for all services that boot up graphql. It also includes tracing libraries and hoists apollo in node-modules so that we do not have to keep defining apollo in all services.
  • packages/ts-logger: helper library to add json structured logging to all our services.
  • packages/tracing: helper library to add tracing to all our services.
  • packags/terraform-modules: a set of modules built for Pocket based on the Terraform CDK, used to deploy our infrastructure.
  • .docker/aws-resources: all aws resources that are used by the monorepo, if something is used here, but owned by a service not in this repository, it resides in the legacy files, otherwise each service will have its own script or prefixed resources.
  • .docker/mysql-8-resources: all mysql resources, prefixed with a number letter system so that docker executes database creation in a specific order. All services share a single docker server, but have their own databases unless they read from our legacy (mono) database.
  • .docker/postgres-resources: similar to mysql but for services that use postgres.

Each package/app is 100% TypeScript.

Utilities

This Turborepo has some additional tools already setup for you:

Using the Repo

To build all apps and packages, run the following command:

cd pocket-monorepo
pnpm build

Develop

All

To develop all apps and packages, run the following commands:

cd pocket-monorepo
cp .env.example .env
docker compose up --wait
pnpm install
pnpm dev

This will bring up the docker shared services (MySQL, Memcached, Redis) and then run all the apps in a dev mode.

Specific Server

To run a specific server, run the following:

cd pocket-monorepo
cp .env.example .env
docker compose up --wait
pnpm install
pnpm dev --filter=annotations-api...

Where annotations-api is the server name from package.json you want to run. ... prefixed informs turborepo to include all dependent workspace packages.

You can expand this to run multiple specific servers as well like: pnpm run dev --filter=list-api... --filter=feature-flags...

Caching

This repo relies on Turbo repos caching strategies to speed up development and only execute tasks that are needed when certain files change.

More information can be found on Turbo repos site.

If you add new build outputs or inputs, you will need to add them to the necessary area in turbo.json.

If for any reason you need to bypass caching you can add --force to any command. It would be run like:

pnpm run test --force

or

pnpm run test --filter=annocations-api... --force

Testing

Updating Packages

To update packages this repository uses Renovate on a pr by pr basis and you can initiate that here

In some cases it may be easier to update packages locally, like updating all development depencies at once.

To select and update development dependencices, interactively you can use the following command ran at the root of the repository.

pnpm update -iDLr

To select and update production and optional dependencices, interactively you can use the following command ran at the root of the repository.

pnpm update -iPLr

Integration Testing

When doing an integration test, if you need aws based resources, the CI is setup to run a .sh script that corresponds to the package name you are testing. So if you need aws resources for a package named annotations-api you would create a annoations-api.sh in .docker/aws-resources that created all the necessary aws resources.

Learn more about the power of Turborepo:

Service CI Status

Account Data Deleter Account Delete Monitor Annotations API Braze Client API Feature Flags FxA Webhook Proxy Image API Instant Sync Events List API Parser GraphQL Wrapper Pocket Event Bridge Push Server Sendgrid Data Shareable Lists API Shared Snowplow Consumer Shares API Transactional Emails User API User List Search V3 Proxy API