{"id":31763381,"url":"https://github.com/ijas9118/hono-tasks-api","last_synced_at":"2026-04-27T16:32:33.862Z","repository":{"id":318341286,"uuid":"1070765137","full_name":"ijas9118/hono-tasks-api","owner":"ijas9118","description":"Tasks API using Hono JS","archived":false,"fork":false,"pushed_at":"2025-10-08T03:06:55.000Z","size":131,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-08T05:31:35.791Z","etag":null,"topics":["docker","drizzle-orm","honojs","postgresql"],"latest_commit_sha":null,"homepage":"","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/ijas9118.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-06T12:10:13.000Z","updated_at":"2025-10-08T03:06:58.000Z","dependencies_parsed_at":"2025-10-08T05:31:53.024Z","dependency_job_id":null,"html_url":"https://github.com/ijas9118/hono-tasks-api","commit_stats":null,"previous_names":["ijas9118/tasks-api","ijas9118/hono-tasks-api"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ijas9118/hono-tasks-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ijas9118%2Fhono-tasks-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ijas9118%2Fhono-tasks-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ijas9118%2Fhono-tasks-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ijas9118%2Fhono-tasks-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ijas9118","download_url":"https://codeload.github.com/ijas9118/hono-tasks-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ijas9118%2Fhono-tasks-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32345802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["docker","drizzle-orm","honojs","postgresql"],"created_at":"2025-10-09T23:20:12.891Z","updated_at":"2026-04-27T16:32:33.844Z","avatar_url":"https://github.com/ijas9118.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Built with Hono](https://img.shields.io/badge/Built%20with-Hono-orange?logo=hono\u0026logoColor=white)](https://hono.dev)\n\n# Tasks API\n\nWelcome to the **Tasks API**, a robust and lightweight RESTful API built with [Hono.js](https://hono.dev/) for managing tasks with full CRUD (Create, Read, Update, Delete) functionality.\n\n- This API leverages [Drizzle ORM](https://orm.drizzle.team/) for seamless database interactions with [PostgreSQL](https://www.postgresql.org/), is containerized using [Docker](https://www.docker.com/), and orchestrated with [Docker Compose](https://docs.docker.com/compose/).\n- The API is fully documented using [Scalar](https://www.scalar.com/) for an interactive and user-friendly API documentation experience.\n\n\u003cimg width=\"1470\" height=\"837\" alt=\"Scalar API Docs UI\" src=\"https://github.com/user-attachments/assets/3581778a-0e07-4c6c-967d-4ec7dbc96886\" /\u003e\n\n## 🛠️ Tech Stack\n\n- **Framework**: Hono.js\n- **ORM**: Drizzle ORM\n- **Database**: PostgreSQL\n- **Containerization**: Docker, Docker Compose\n- **Documentation**: Scalar API\n- **Package Manager**: PNPM\n\n## 📋 Prerequisites\n\nTo run this project locally, ensure you have the following installed:\n\n- [Docker](https://www.docker.com/get-started) and [Docker Compose](https://docs.docker.com/compose/install/)\n- [Node.js](https://nodejs.org/) (v20 or higher, optional for local development outside Docker)\n- [PNPM](https://pnpm.io/) (optional, if running without Docker)\n- [Git](https://git-scm.com/) (for cloning the repository)\n\n## 🏃‍♂️ Getting Started\n\nFollow these steps to clone and run the Tasks API locally:\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/ijas9118/hono-tasks-api.git\ncd tasks-api\n```\n\n### 2. Set Up Environment Variables\n\nCreate a `.env` file in the root directory by copying the `.env.example` file and filling in the required variables.\n\n```bash\ncp .env.example .env\n```\n\n**Note**: Ensure the `DATABASE_URL` matches the PostgreSQL credentials defined in the `docker-compose.yml` file (`POSTGRES_USER`, `POSTGRES_PASSWORD`, `POSTGRES_DB`).\n\n### 3. Build and Run with Docker Compose\n\nRun the following command to build the Docker images and start the services (PostgreSQL and the Hono.js app):\n\n```bash\ndocker compose up -d --build\n```\n\nThis command:\n\n- Builds the API image using the `Dockerfile`.\n- Starts the PostgreSQL database and the API in detached mode (`-d`).\n- Maps port `8080` for the API and `5432` for PostgreSQL on your local machine.\n\n### 4. Verify the Setup\n\n- **API**: Open your browser or use a tool like [Postman](https://www.postman.com/) or `curl` to access `http://localhost:8080`. You should see the API's root endpoint or a welcome message (depending on your implementation).\n\n- **API Documentation**: Visit `http://localhost:8080/scalar` to explore the interactive API documentation.\n\n### 5. Stop the Services\n\nTo stop the running containers:\n\n```bash\ndocker compose down\n```\n\nTo also remove the PostgreSQL data volume:\n\n```bash\ndocker compose down -v\n```\n\n## 📚 API Documentation\n\nThe API is documented using [Scalar](https://www.scalar.com/), providing an interactive interface to explore endpoints, test requests, and view schemas. Access it at:\n\n```\nhttp://localhost:8080/scalar\n```\n\n### Example Endpoints\n\n- **GET /tasks**: Retrieve a list of all tasks.\n- **POST /tasks**: Create a new task.\n- **GET /tasks/:id**: Retrieve a specific task by ID.\n- **PUT /tasks/:id**: Update a task by ID.\n- **DELETE /tasks/:id**: Delete a task by ID.\n\nRefer to the Scalar documentation for detailed request/response formats and examples.\n\n## 📂 Project Structure\n\n```\nhono-tasks-api/\n├── docker-compose.yaml\n├── Dockerfile\n├── drizzle.config.ts\n├── entrypoint.sh\n├── eslint.config.js\n├── package.json\n├── tsconfig.json\n├── .dockerignore\n├── .env.example\n└── src/\n    ├── app.ts                        # Initializes main Hono app \u0026 configs\n    ├── index.ts                      # Server entry point  \n    ├── config/\n    │   └── env.ts                 \n    ├── db/\n    │   ├── index.ts               \n    │   └── schema.ts              \n    ├── lib/\n    │   ├── configure-open-api.ts     # OpenAPI setup\n    │   ├── create-app.ts             # Hono app factory\n    │   ├── default-hook.ts           # Default middleware hooks\n    │   └── types.ts                  # Shared types\n    ├── middlewares/\n    │   ├── not-found.ts              # 404 handler\n    │   ├── on-error.ts               # Error handler\n    │   └── pino-logger.ts            # Logger middleware\n    ├── routes/\n    │   ├── index.routes.ts           # Root routes\n    │   └── tasks/\n    │       ├── tasks.handlers.ts     # Task logic\n    │       ├── tasks.index.ts        # Task module export\n    │       └── tasks.routes.ts       # Task endpoints\n    └── utils/\n        ├── create-error-schema.ts    # Error schema\n        ├── create-message-object.ts  # Response messages\n        ├── http-status-codes.ts      # HTTP codes\n        ├── http-status-phrases.ts    # HTTP phrases\n        ├── id-params.ts              # ID param validation\n        ├── json-content-required.ts  # JSON body check\n        ├── json-content.ts           # JSON parser\n        └── not-found-schema.ts       # 404 schema\n\n```\n\n---\n\n## 🤝 Contributing\n\nContributions are welcome! To contribute:\n\n1. Fork the repository.\n2. Create a feature branch (`git checkout -b feature/your-feature`).\n3. Commit your changes (`git commit -m \"Add your feature\"`).\n4. Push to the branch (`git push origin feature/your-feature`).\n5. Open a pull request.\n\nPlease ensure your code follows the project's coding standards and includes tests where applicable.\n\n## 📜 License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fijas9118%2Fhono-tasks-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fijas9118%2Fhono-tasks-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fijas9118%2Fhono-tasks-api/lists"}