{"id":21855593,"url":"https://github.com/zeropsio/recipe-hono-deno","last_synced_at":"2026-05-08T00:34:55.495Z","repository":{"id":251983948,"uuid":"839006842","full_name":"zeropsio/recipe-hono-deno","owner":"zeropsio","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-30T08:35:08.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-11T01:59:57.649Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zeropsio.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-08-06T19:24:06.000Z","updated_at":"2025-03-30T08:35:11.000Z","dependencies_parsed_at":"2024-08-07T00:43:03.001Z","dependency_job_id":"ac91167e-0ef5-4494-9b8d-a7ab36affd59","html_url":"https://github.com/zeropsio/recipe-hono-deno","commit_stats":null,"previous_names":["zeropsio/recipe-hono-deno"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zeropsio/recipe-hono-deno","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeropsio%2Frecipe-hono-deno","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeropsio%2Frecipe-hono-deno/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeropsio%2Frecipe-hono-deno/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeropsio%2Frecipe-hono-deno/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeropsio","download_url":"https://codeload.github.com/zeropsio/recipe-hono-deno/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeropsio%2Frecipe-hono-deno/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265155806,"owners_count":23719591,"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-28T02:16:30.807Z","updated_at":"2026-05-08T00:34:50.473Z","avatar_url":"https://github.com/zeropsio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hono Backend with PostgreSQL, Redis and Drizzle ORM\n\nA robust, production-ready backend API built with [Hono](https://hono.dev), PostgreSQL, Redis, and Drizzle ORM on Deno.\n\n## Features\n\n- 🚀 **Ultrafast \u0026 Lightweight**: Built on Hono, an ultrafast web framework\n- 🔐 **Authentication**: Complete JWT-based auth system with session management\n- 📊 **PostgreSQL Integration**: Efficient database operations with connection pooling\n- 🧠 **Drizzle ORM**: Type-safe database access with Drizzle ORM\n- ⚡ **Redis Caching**: Fast response times with Redis caching layer\n- 🔄 **CRUD Operations**: Complete API for task management\n- ✅ **Validation**: Request validation using Zod schemas\n- 🔒 **Security**: Secure headers, CORS, and other security best practices\n- 📝 **TypeScript**: Fully typed codebase for better developer experience\n- 🦕 **Deno Runtime**: Modern JavaScript runtime with built-in TypeScript support\n\n## Getting Started\n\n1. Clone this repository\n2. Install dependencies:\n\n```bash\ndeno cache main.ts\n```\n\n3. Generate database schema SQL (optional):\n\n```bash\ndeno task generate\n```\n\n4. Initialize the database:\n\n```bash\ndeno run --allow-net --allow-env --allow-read --allow-write scripts/init-db.ts\n```\n\n5. Start the server:\n\n```bash\ndeno task start\n```\n\nOr for development with hot reload:\n\n```bash\ndeno task dev\n```\n\nThe server will be running at http://localhost:8000\n\n## API Documentation\n\n### Authentication\n\n- **POST /auth/register** - Register a new user\n- **POST /auth/login** - Login a user\n- **GET /auth/me** - Get current user info\n- **POST /auth/logout** - Logout a user\n\n### Tasks\n\n- **GET /tasks** - Get all tasks for current user\n- **GET /tasks/:id** - Get a specific task\n- **POST /tasks** - Create a new task\n- **PUT /tasks/:id** - Update a task\n- **DELETE /tasks/:id** - Delete a task\n\n### Health Check\n\n- **GET /health** - Check health of all services\n\n## Project Structure\n\n```\n├── config/            # Configuration files\n│   └── db.ts          # Database connections\n├── db/                # Database definitions\n│   └── schema.ts      # Drizzle ORM schema\n├── middleware/        # Middleware functions\n│   ├── auth.ts        # Authentication middleware\n│   └── error.ts       # Error handling middleware\n├── migrations/        # Database migrations\n│   └── schema.sql     # Generated schema SQL\n├── models/            # Data models\n│   ├── user.ts        # User model and repository\n│   └── task.ts        # Task model and repository\n├── routes/            # API routes\n│   ├── auth.ts        # Authentication routes\n│   ├── tasks.ts       # Task management routes\n│   └── health.ts      # Health check routes\n├── scripts/           # Utility scripts\n│   ├── init-db.ts     # Database initialization\n│   └── generate-schema.ts # Schema SQL generation\n├── services/          # Business logic\n│   └── auth-service.ts # Authentication service\n├── deno.json         # Deno configuration\n├── main.ts            # Application entry point\n└── README.md          # Project documentation\n```\n\n## Drizzle ORM Integration\n\nThe application uses Drizzle ORM for database access:\n\n1. Type-safe schema definition in `db/schema.ts`\n2. Strongly-typed query building\n3. Automatic SQL query generation\n4. Efficient data mapping with TypeScript interfaces\n\n## Redis Caching Strategy\n\nThe application uses Redis for:\n\n1. Session management with automatic fallback to PostgreSQL\n2. Task caching with automatic invalidation on updates\n3. User-specific task list caching\n\n## Security Features\n\n- CORS protection\n- Secure HTTP headers\n- Request validation\n- Session-based authentication\n- Password hashing\n\n## Performance Optimizations\n\n- Connection pooling for PostgreSQL\n- Drizzle ORM for efficient querying\n- Redis caching layer\n- Response compression\n- Query optimization\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeropsio%2Frecipe-hono-deno","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeropsio%2Frecipe-hono-deno","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeropsio%2Frecipe-hono-deno/lists"}