{"id":20324139,"url":"https://github.com/opentensor/opentensor-api","last_synced_at":"2025-04-11T19:40:25.369Z","repository":{"id":244098514,"uuid":"808315413","full_name":"opentensor/opentensor-api","owner":"opentensor","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-27T16:40:15.000Z","size":995,"stargazers_count":2,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T15:33:41.199Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://opentensor-paas-template.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opentensor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-30T20:14:33.000Z","updated_at":"2024-10-14T05:47:39.000Z","dependencies_parsed_at":"2024-06-27T20:06:32.025Z","dependency_job_id":null,"html_url":"https://github.com/opentensor/opentensor-api","commit_stats":null,"previous_names":["opentensor/opentensor-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentensor%2Fopentensor-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentensor%2Fopentensor-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentensor%2Fopentensor-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentensor%2Fopentensor-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opentensor","download_url":"https://codeload.github.com/opentensor/opentensor-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248468192,"owners_count":21108774,"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":[],"created_at":"2024-11-14T19:32:27.770Z","updated_at":"2025-04-11T19:40:25.343Z","avatar_url":"https://github.com/opentensor.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenTensor API \u0026 PaaS\n\nThis repository is designed to provide simple and easy-to-use templates (PaaS -- Product as a Service) for validators which enables:\n\n- API endpoints to Bittensor subnet services and digital commodities\n\n- Frontend and Backend templates\n\n- Monetization with stripe integration\n\nNOTE: At present, you have to manually configure your own validator to route the requests to. Reach out to koyuki@opentensor.dev for further assistance. In addition, if you need a customized design \u0026 UI beyond the templates given, the OTF team is here to help.\n\n## Deploy\n\nWe use vercel for deployment: https://opentensor-paas-template.vercel.app/\n\n## API documentation\n\nhttps://opentensor-paas-template.apidog.io/\n\n\n## Setup\n\n## 1. Clone the repository\n\nClone the opentensor-api repository to your local machine:\n\n`git clone https://github.com/opentensor/opentensor-api.git`\n\n## 2. Setup environment\n\nAfter cloning the repository, you first need to configure the project's environment variables.\n\nIn the projects root directory, rename the .env.example file to .env.\n\n### Database\n\n`DATABASE_URL:`\n\nAny postgresSQL database connection url\n\n### Stripe\n\n`STRIPE_SECRET:`\n\nGet your stripe keys: https://stripe.com/docs/keys\n\n### Email\n\n`RESEND_SECRET:`\n\n`RESEND_DOMAIN: your custom domain or 'resend.dev' `\n\nCreate a free Resend account and paste in your API key: https://resend.com\n\nConnect your domain, and replace the email in `src/lib/email/mailer.ts` file.\n\n### Auth\n\n1. Create your Google Auth Credentials here:\n   https://console.cloud.google.com/apis/\n\n   `GOOGLE_CLIENT_ID:`\n\n   `GOOGLE_CLIENT_SECRET:`\n\n2. Create your Github Auth Credentials here:\n   https://github.com/settings/developers\n\n   `GITHUB_CLIENT_ID:`\n\n   `GITHUB_CLIENT_SECRET:`\n\n3. `NEXTAUTH_URL='http://localhost:3000'` for development\n   for production, replace this with your website url\n\n   `NEXTAUTH_SECRET:` A random string is used to hash tokens, sign/encrypt cookies and generate cryptographic keys.\n\n   `APIKEY_ENCRYPT_KEY:`\n\n### Vision(SN19)\n\nModify these to set your own validator url and key\n\n`VISION_KEY_OTF_VALIDATOR:`\n\n`VISION_URL_OTF_VALIDATOR:`\n\n### Niche(SN23)\n\nModify these to set your own validator url and key\n\n`NICHE_KEY_OTF_VALIDATOR:`\n\n`NICHE_URL_OTF_VALIDATOR:`\n\nNOTE:\n\n## 3. Install\n\nNext, to install the projects dependencies, run the following command in your console inside of the projects directory:\n\n`pnpm install`\n\n## 4. Generate Prisma\n\nIn order to make sure your DB has the correct schema run:\n\n`pnpm dlx prisma db push`\n\nThen, generate the prisma client using:\n\n`pnpm dlx prisma generate`\n\n## 5. Run\n\nRun the local development server:\n\n`pnpm run dev`\n\n## 6. Notes\n\nWhen deploying to Vercel, make sure you update your environment variables.\n\n# Resources\n\nLinks\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopentensor%2Fopentensor-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopentensor%2Fopentensor-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopentensor%2Fopentensor-api/lists"}