{"repo":"goktugcy/hono-boilerplate","free":true,"listed":false,"github":"https://github.com/goktugcy/hono-boilerplate","clone":"git clone https://github.com/goktugcy/hono-boilerplate.git","description":"This project is a backend boilerplate built using the Hono framework. Cloudfare Workers are used to host the backend. It includes integration with Supabase and handles user authentication and authorization.","language":"TypeScript","stars":94,"topics":["backend","boilerplate","cloudflare-workers","hono","supabase","typescript","serverless"],"license":"MIT","category":"saas-starters-boilerplates","readme_excerpt":"🔥 Hono + ⚡️ Supabase Boilerplate This project is a backend boilerplate built using the Hono framework. Cloudfare Workers are used to host the backend. It includes integration with Supabase and handles user authentication and authorization. Installation 🚀 After cloning the repository, install the necessary dependencies by running: Configuration ✨ Edit the .wrangler.toml file to include the necessary environment variables: Structure 🎄 Usage 🍻 To start the server, run: Deploy the server to Cloudfare Workers by running: Authentication 🛡 The boilerplate includes an authentication middleware that checks if the user is authenticated. The middleware is used in the routes.ts file to protect routes that require authentication. Token Extraction: The middleware extracts the accessToken and refreshToken from the request cookies. Token Verification: If the accessToken is expired but the refreshToken is valid, it requests a new accessToken using the refreshToken. If both tokens are missing, it responds with an error. If the accessToken is present, it verifies the token using Supabase's authentication service. Supabase Client Usage ⚡️ The project uses two Supabase clients: supabaseAnon and supabaseService . These clients are created in the getSupabaseClient function in src/db/supabaseClient.ts. supabaseAnon The supabaseAnon client is used for operations that do not require elevated privileges. It is created using the anonymous key ( SUPABASE ANON KEY ) and is configured to not automatic","default_branch":null,"files":null,"tree":[],"storefront":"/r/goktugcy","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/goktugcy/hono-boilerplate/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}