{"id":14989324,"url":"https://github.com/ardriveapp/turbo-payment-service","last_synced_at":"2025-04-12T00:32:07.159Z","repository":{"id":184317125,"uuid":"671099577","full_name":"ardriveapp/turbo-payment-service","owner":"ardriveapp","description":"ArDrive Turbo Payment Service that manages Turbo balances.","archived":false,"fork":false,"pushed_at":"2024-09-09T18:18:14.000Z","size":1929,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-25T20:51:12.966Z","etag":null,"topics":["ardrive","arweave","ethereum","koa","nodejs","solana","stripe","turbo"],"latest_commit_sha":null,"homepage":"https://ardrive.io/turbo","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ardriveapp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-26T14:35:13.000Z","updated_at":"2024-09-09T18:18:16.000Z","dependencies_parsed_at":"2024-09-25T00:34:36.742Z","dependency_job_id":null,"html_url":"https://github.com/ardriveapp/turbo-payment-service","commit_stats":{"total_commits":14,"total_committers":4,"mean_commits":3.5,"dds":0.5714285714285714,"last_synced_commit":"4ed946598308838c15086d1537ea836d510aa589"},"previous_names":["ardriveapp/turbo-payment-service"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardriveapp%2Fturbo-payment-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardriveapp%2Fturbo-payment-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardriveapp%2Fturbo-payment-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardriveapp%2Fturbo-payment-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ardriveapp","download_url":"https://codeload.github.com/ardriveapp/turbo-payment-service/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248501409,"owners_count":21114674,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ardrive","arweave","ethereum","koa","nodejs","solana","stripe","turbo"],"created_at":"2024-09-24T14:18:08.164Z","updated_at":"2025-04-12T00:32:06.320Z","avatar_url":"https://github.com/ardriveapp.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Turbo Payment Service\n\nWelcome to the Turbo Payment Service 👋\n\n## Local Development\n\n### Requirements\n\nFor a compatible development environment, we require the following packages installed on the system:\n\n- `yarn`\n- `nvm` (optional)\n- `husky` (optional)\n- `docker` (optional)\n\n### Running Locally\n\nWith a compatible system, follow these steps to start the upload service:\n\n- `cp .env.sample .env` (and update values)\n- `yarn`\n- `yarn build`\n- `yarn db:up`\n- `yarn start`\n  - alternatively use `yarn start:watch` to run the app in development mode with hot reloading provided by `nodemon`\n\nNote: we store credentials for the service in AWS - to avoid these requests - set your NODE_ENV to `test` in your .env file.\n\n## Database\n\nThe service relies on a postgres database. The following scripts can be used to create a local postgres database via docker:\n\n- `yarn db:up`: Starts a local docker PostgreSQL container on port 5432\n- `yarn db:migrate:latest`: Runs migrations on a local PostgreSQL database\n- `yarn db:down`: Tears down local docker PostgreSQL container and deletes the db volume\n\n### Migrations\n\nKnex is used to create and run migrations. To make a migration follow these steps:\n\n1. Add migration function and logic to `schema.ts`\n2. Run the yarn command to stage the migration, which generates a new migration script in `migrations/` directory\n\n- `yarn db:make:migration MIGRATION_NAME`\n\n3. Update the new migration to call the static function created in step 1.\n\n4. Run the migration\n\n- `yarn db:migration:latest` or `yarn knex migration:up MIGRATION_NAME.TS`\n\n### Rollbacks\n\nYou can rollback knex migrations using the following command:\n\n- `yarn db:migrate:rollback` - rolls back the most recent migration\n- `yarn db:migrate:rollback --all` - rolls back all migrations\n- `yarn knex migrate:list` - lists all the migrations applied to the database\n- `yarn knex migrate:down MIGRATION_NAME.ts --knexfile src/database/knexfile.ts` - rolls back a specific migration\n\nAdditional `knex` documentation can be found [here](https://knexjs.org/guide/migrations.html).\n\n### Docker\n\nTo run this service and a connected postgres database, fully migrated.\n\n- `cp .env.sample .env` (and update values)\n- `yarn start:docker` - run the local service and postgres database in docker containers\n\nAlternatively, you can run the service in docker and connect to a local postgres database. You will need to standup `postgres` in a separate container.\n\n```bash\ndocker run --name turbo-payment-service-postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 -d postgres\ndocker run --env-file .env -p 4000:4000 ghcr.io/ardriveapp/turbo-payment-service:latest\n```\n\n## Tests\n\nUnit and integration tests can be run locally or via docker. For either, you can set environment variables for the service via a `.env` file:\n\n### Unit Tests\n\n- `yarn test:unit` - runs unit tests locally\n\n### Integration Tests\n\n- `yarn test:integration:local` - runs the integration tests locally against postgres docker container\n- `yarn test:integration:local -g \"Router\"` - runs targeted integration tests against postgres docker container\n  - `watch -n 30 'yarn test:integration:local -g \"Router'` - runs targeted integration tests on an interval (helpful when actively writing tests)\n- `yarn test:docker` - runs integration tests (and unit tests) in an isolated docker container\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fardriveapp%2Fturbo-payment-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fardriveapp%2Fturbo-payment-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fardriveapp%2Fturbo-payment-service/lists"}