{"id":23557473,"url":"https://github.com/barkprotocol/bark-protocol-api","last_synced_at":"2025-05-15T23:30:50.566Z","repository":{"id":269778518,"uuid":"908423752","full_name":"barkprotocol/bark-protocol-api","owner":"barkprotocol","description":"BARK Protocol API using Next.js and related technologies (such as Prisma for database handling, Tailwind CSS for styling, and API routes for server-side logic.","archived":false,"fork":false,"pushed_at":"2025-02-17T04:07:09.000Z","size":289,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-17T14:45:18.843Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/barkprotocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-12-26T03:36:02.000Z","updated_at":"2024-12-26T05:46:53.000Z","dependencies_parsed_at":"2024-12-26T05:23:15.303Z","dependency_job_id":"55d34eb6-173c-49a3-a4d7-1323504f41a1","html_url":"https://github.com/barkprotocol/bark-protocol-api","commit_stats":null,"previous_names":["barkprotocol/bark-protocol-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barkprotocol%2Fbark-protocol-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barkprotocol%2Fbark-protocol-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barkprotocol%2Fbark-protocol-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barkprotocol%2Fbark-protocol-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barkprotocol","download_url":"https://codeload.github.com/barkprotocol/bark-protocol-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254442179,"owners_count":22071860,"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-12-26T14:30:56.434Z","updated_at":"2025-05-15T23:30:50.513Z","avatar_url":"https://github.com/barkprotocol.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BARK Protocol API\n\nThe BARK Protocol API is a backend service designed to manage BARK token emission schedules, fetch live token prices from various sources (CoinGecko, CoinMarketCap, Jupiter, Raydium), and handle rate-limiting for API requests. This service integrates with Solana and supports token-related data such as emission, payback, and burn rates.\n\n## Features\n\n- **Emission Schedule**: Calculate the emission, payback, and burn rates for BARK tokens over time.\n- **Live Token Price Fetching**: Fetch BARK token prices from CoinGecko, CoinMarketCap, Jupiter, and Raydium.\n- **Rate Limiting**: Prevent excessive API calls by enforcing rate limits.\n- **Environmental Configurations**: Use custom environment variables for API keys and other configuration settings.\n\n## Setup\n\n### Prerequisites\n\n- Node.js (v22.x or later)\n- pnpm or yarn\n- Next.js (v15 or later)\n\n### Installation\n\n1. Clone this repository:\n   ```bash\n   git clone https://github.com/bark-protocol/bark-protocol-api.git\n   cd bark-protocol-api\n   ```\n\n2. Install dependencies:\n   ```bash\n   pnpm install\n   ```\n\n3. Set up environment variables in a `.env` file:\n   ```env\n   COINGECKO_API_URL=https://api.coingecko.com/api/v3/simple/price\n   COINMARKETCAP_API_URL=https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest\n   JUPITER_API_URL=https://api.jupiter.com/v1/price\n   JUPITER_API_KEY=your-jupiter-api-key\n   COINMARKETCAP_API_KEY=your-coinmarketcap-api-key\n   SOLANA_RPC_URL=https://api.mainnet-beta.solana.com\n   ```\n\n4. Run the application:\n   ```bash\n   pnpm run dev\n   ```\n\nThe app will be available at `http://localhost:3000`.\n\n## API Endpoints\n\n### `/api/emission-data`\n\nFetches emission, payback, and burn rates for a given year.\n\n#### Request\n- **Method**: `GET`\n- **Query Parameters**:\n  - `year`: The year for which emission data is to be fetched. Defaults to `2025`.\n\n#### Example\n```bash\nGET http://localhost:3000/api/emission-data?year=2025\n```\n\n#### Response\n```json\n{\n  \"message\": \"Emission data for the year 2025\",\n  \"data\": {\n    \"emissionRate\": 1.75,\n    \"paybackRate\": 0.00,\n    \"burnRate\": 0.00,\n    \"totalSupply\": 18446000000,\n    \"year\": 2025\n  }\n}\n```\n\n### `/api/rate-limit`\n\nChecks and enforces rate limits for the API.\n\n#### Request\n- **Method**: `GET`\n\n#### Example\n```bash\nGET http://localhost:3000/api/rate-limit\n```\n\n#### Response\n```json\n{\n  \"message\": \"Rate limit status checked\"\n}\n```\n\n### `/api/token-price`\n\nFetches the live price of the BARK token from CoinGecko, CoinMarketCap, Jupiter, or Raydium.\n\n#### Request\n- **Method**: `GET`\n\n#### Example\n```bash\nGET http://localhost:3000/api/token-price\n```\n\n#### Response\n```json\n{\n  \"price\": 0.00001\n}\n```\n\n## Emission Schedule\n\n### Initial Supply\n- **2024**: 18,446,744,073 BARK tokens\n\n### Annual Inflation Rate\n- Starting at 2% in 2025, decreasing by 0.25% each year.\n\n### Emission Distribution\n- **50%** Staking rewards\n- **30%** Ecosystem\n- **20%** Community\n\n### Emission, Payback, and Burn Rates\n\n| Year  | Emission Rate | Payback Rate | Burn Rate |\n|-------|---------------|--------------|-----------|\n| 2025  | 2.00%         | 0.00%        | 0.00%     |\n| 2026  | 1.75%         | 0.00%        | 0.00%     |\n| 2027  | 1.50%         | 0.00%        | 0.00%     |\n| 2028  | 1.25%         | 0.00%        | 0.00%     |\n| 2029  | 1.00%         | 0.00%        | 0.00%     |\n\n## Contributing\n\nWe welcome contributions to the BARK Protocol API! To contribute, follow these steps:\n\n1. Fork the repository.\n2. Create a new branch (`git checkout -b feature-branch`).\n3. Make your changes and commit them (`git commit -am 'Add new feature'`).\n4. Push to your branch (`git push origin feature-branch`).\n5. Open a pull request.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Disclaimer\n\nThis API is based on estimated BARK token data, and values may not reflect the current blockchain state. Always verify token data with the official blockchain and external sources.\n\n---\n\nFor more information, visit the [BARK Protocol](https://barkprotocol.net).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarkprotocol%2Fbark-protocol-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarkprotocol%2Fbark-protocol-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarkprotocol%2Fbark-protocol-api/lists"}