English | 한국어
A personal blog application
- User authentication via Supabase Auth
- Dynamic content creation using Markdown & stored in the database
- Image upload via Supabase Storage
- Tagging system for records
- Comment creation for both authors and anonymous users
- SEO optimization & dynamic OpenGraph image generation
- Email notifications to record authors on new comments
- Frontend: Next.js
- Backend: Supabase
- Database: PostgreSQL (via Supabase)
- Deployment: Vercel, Supabase
- Email Notification Provider: Resend
Note
This repository is used for my personal blog and is not ready to use out-of-the-box. Some modifications may be needed before using it for your own project.
$ git clone https://github.com/chemistryx/suhan.io.git
$ cd suhan.io/$ npm install- Create
.env.localfile in the root directory of the project. - Copy the contents from
.env.sampleto.env.localand fill in your own information.
$ npm run devMake sure Supabase CLI is installed and configured properly before proceeding.
Apply migrations from the supabase/migrations folder:
$ supabase db pushThis will create necessary tables(records, comments, etc.), triggers, and RLS policies.
Deploy Edge Functions and configure webhooks to enable features like email notifications on new comments.
- Setup secrets using:
$ supabase secrets set RESEND_API_KEY=your_api_key- Deploy the function:
$ supabase functions deploy send-comment-mail-
Configure Database Webhooks
You can configure webhooks from Supabase Dashboard:
3.1. Go to Integrations > Database Webhooks and click the
Create a new hookbutton.
3.2. In the prompt:
- Under General, enter a name for your webhook.
- Under Conditions to fire webhook, selectcommentstable and choose the event type Insert.
- Under Webhook configuration, selectSupabase Edge Functionsas the webhook type.
- Under Edge Function, select the pre-deployed Edge Function from the list.
- Leave the remaining options as default.