{"id":18828531,"url":"https://github.com/lostovayne/high-performance-api","last_synced_at":"2025-04-11T12:22:11.150Z","repository":{"id":261695732,"uuid":"885040796","full_name":"Lostovayne/High-Performance-Api","owner":"Lostovayne","description":"Experience the power of lightning-fast search with our cutting-edge API, built on a robust foundation of Hono,Nextjs, and Cloudflare.","archived":false,"fork":false,"pushed_at":"2025-02-06T19:37:40.000Z","size":359,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T08:42:32.686Z","etag":null,"topics":["bun","cloudflare","hono","next15","reddis"],"latest_commit_sha":null,"homepage":"https://fast-api-khalest.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/Lostovayne.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-11-07T21:06:02.000Z","updated_at":"2025-02-12T15:39:41.000Z","dependencies_parsed_at":"2024-11-07T23:33:21.431Z","dependency_job_id":"2b374019-c6e9-4641-bdca-dd9c534497cc","html_url":"https://github.com/Lostovayne/High-Performance-Api","commit_stats":null,"previous_names":["lostovayne/high-performance-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lostovayne%2FHigh-Performance-Api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lostovayne%2FHigh-Performance-Api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lostovayne%2FHigh-Performance-Api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lostovayne%2FHigh-Performance-Api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lostovayne","download_url":"https://codeload.github.com/Lostovayne/High-Performance-Api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248401159,"owners_count":21097324,"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":["bun","cloudflare","hono","next15","reddis"],"created_at":"2024-11-08T01:30:20.764Z","updated_at":"2025-04-11T12:22:11.125Z","avatar_url":"https://github.com/Lostovayne.png","language":"TypeScript","readme":"# FAST API\n\n\u003cdiv\u003e\n\t\u003cimg src=\"https://img.shields.io/badge/-Hono_js-orange?logo=hono\" alt=\"honojs\" /\u003e\n\t\u003cimg src=\"https://img.shields.io/badge/-Bun_js-black?logo=bun\" alt=\"bunjs\" /\u003e\n\t\u003cimg src=\"https://img.shields.io/badge/-Redis-black?logo=redis\" alt=\"redis\" /\u003e\n\u003c/div\u003e\n\nFAST API is a complete and efficient API built with modern technologies such as Cloudflare, Hono, Bun, TypeScript, Tailwind, and Redis. This project is designed to be fast, scalable, and easy to use.\n\n## Technologies Used\n\n- **Cloudflare**: Provides security and performance through its content delivery network (CDN).\n- **Hono**: A lightweight and fast web framework for building applications in TypeScript.\n- **Bun**: A JavaScript and TypeScript runtime that offers superior performance.\n- **TypeScript**: A superset of JavaScript that adds static typing.\n- **Tailwind CSS**: A utility-first CSS framework that allows for rapid and responsive design.\n- **Redis**: An in-memory database used for caching and session management.\n\n## Installation\n\nFollow these steps to install and set up the project on your local machine:\n\n1. **Clone the repository**:\n   ```bash\n   git clone https://github.com/yourusername/fast-api.git\n   cd fast-api\n   ```\n\n2. **Install Bun** (if not already installed):\n   ```bash\n   curl -fsSL https://bun.sh/install | bash\n   ```\n\n3. **Install dependencies**:\n   ```bash\n   bun install\n   ```\n\n4. **Configure Redis**:\n   - Ensure Redis is installed and running. You can install it using Docker:\n     ```bash\n     docker run --name redis -d -p 6379:6379 redis\n     ```\n\n5. **Set up environment variables**:\n   - Create a `.env` file in the root of the project and add the following variables:\n     ```env\n     REDIS_URL=redis://localhost:6379\n     ```\n\n## Dependencies\n\nEnsure the following dependencies are included in your `package.json`:\n\n```json\n{\n  \"dependencies\": {\n    \"hono\": \"^3.0.0\",\n    \"redis\": \"^4.0.0\",\n    \"tailwindcss\": \"^2.0.0\"\n  },\n  \"devDependencies\": {\n    \"typescript\": \"^4.0.0\",\n    \"bun-types\": \"^0.1.0\"\n  }\n}\n```\n\n## Integrations\n\n### Cloudflare\n\nTo use Cloudflare, follow these steps:\n\n1. Sign up at [Cloudflare](https://www.cloudflare.com/).\n2. Add your domain and configure the DNS records.\n3. Set up firewall rules and performance settings as needed.\n\n### Hono\n\nTo create routes in Hono, you can use the following example:\n\n```typescript\nimport { Hono } from 'hono';\n\nconst app = new Hono();\n\napp.get('/', (c) =\u003e c.text('Hello, FAST API!'));\n\napp.listen(3000);\n```\n\n### Redis\n\nTo interact with Redis, you can use the following code:\n\n```typescript\nimport { createClient } from 'redis';\n\nconst client = createClient();\n\nclient.on('error', (err) =\u003e console.log('Redis Client Error', err));\n\nasync function connectRedis() {\n  await client.connect();\n}\n\nconnectRedis();\n```\n\n## Styles with Tailwind CSS\n\nTo set up Tailwind CSS, follow these steps:\n\n1. Create a Tailwind configuration file:\n   ```bash\n   npx tailwindcss init\n   ```\n\n2. Configure your `tailwind.config.js` file:\n   ```javascript\n   module.exports = {\n     content: ['./src/**/*.{html,js,ts}'],\n     theme: {\n       extend: {},\n     },\n     plugins: [],\n   };\n   ```\n\n3. Import Tailwind in your CSS file:\n   ```css\n   @tailwind base;\n   @tailwind components;\n   @tailwind utilities;\n   ```\n\n## Running the API\n\nTo run the API, use the following command:\n\n```bash\nbun run start\n```\n\n## Deploy in Cloudflare\n\nTo deploy the API on Cloudflare, use the following command:\n\n```bash\nbun add -D @opennextjs/cloudflare\n```\n\nCreate the `wrangler.toml` file:\n\n```toml\ncompatibility_date = \"2024-11-08\"\nname = \"fastapi\"\n\n[vars]\nUPSTASH_REDIS_REST_TOKEN = \"..................\"\nUPSTASH_REDIS_REST_URL = \"................\"\n\n# wrangler.toml (wrangler v3.79.0^)\n[observability]\nenabled = true\nhead_sampling_rate = 1\n```\n\n## Contributing\n\nContributions are welcome. If you would like to contribute, please follow these steps:\n\n1. Fork the repository.\n2. Create a new branch (`git checkout -b feature/new-feature`).\n3. Make your changes and commit (`git commit -m 'Add new feature'`).\n4. Push to the branch.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Contact\n\nFor more information, you can contact me at [epsa@example.com](mailto:your_email@example.com).","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flostovayne%2Fhigh-performance-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flostovayne%2Fhigh-performance-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flostovayne%2Fhigh-performance-api/lists"}