From 02ae938c238c9d18448d17a8ec92c0edd8c17463 Mon Sep 17 00:00:00 2001 From: Bertrand Yuan Date: Tue, 16 Dec 2025 00:12:49 +0800 Subject: feat(back-end): introduce payload Payload is the next.js Headless CMS and App Framework, I would like to pick it up and modify it as it is MIT licensed. Many features in Payload is not applicable for our project. So, I modify it so that it is light and clear. --- .env.example | 50 ++++++++++++-------------------------------------- 1 file changed, 12 insertions(+), 38 deletions(-) (limited to '.env.example') diff --git a/.env.example b/.env.example index bd6faec..6fabc18 100644 --- a/.env.example +++ b/.env.example @@ -1,47 +1,21 @@ -# Since the ".env" file is gitignored, you can use the ".env.example" file to -# build a new ".env" file when you clone the repo. Keep this file up-to-date -# when you add new variables to `.env`. - -# This file will be committed to version control, so make sure not to have any -# secrets in it. If you are cloning this repo, create a copy of this file named -# ".env" and populate it with your secrets. - -# When adding additional environment variables, the schema in "/src/env.js" -# should be updated accordingly. - # Database URL -# The database URL is used to connect to your database. It's used for commenting, and authentication. -DATABASE_URL="postgresql://postgres:@localhost:5432/blog" +DATABASE_URL="postgresql://username:password@localhost:5432/blog" + +# Payload CMS (generate a random secret) +PAYLOAD_SECRET="your-random-secret-key-here" +NEXT_PUBLIC_SERVER_URL="http://localhost:3000" -# Resend -# Used for the newsletter subscription and sending emails. -# @see https://resend.com -RESEND_API_KEY="" # Resend API key -RESEND_AUDIENCE_ID="" # Newsletter audience ID -EMAIL_FROM="blog@example.com" # Email address to send emails from +# Resend (optional, for email) +RESEND_API_KEY="" +RESEND_AUDIENCE_ID="" +EMAIL_FROM="blog@example.com" # Authentication -# You can generate the secret via 'openssl rand -base64 32' on Unix -# @see https://www.better-auth.com/docs/installation -BETTER_AUTH_URL="" -BETTER_AUTH_SECRET="" +BETTER_AUTH_URL="http://localhost:3000" +BETTER_AUTH_SECRET="your-random-auth-secret-here" -# Preconfigured Google OAuth provider, works out-of-the-box -# @see https://www.better-auth.com/docs/authentication/google +# OAuth (optional) GOOGLE_CLIENT_ID="" GOOGLE_CLIENT_SECRET="" - -# Preconfigured Github OAuth provider, works out-of-the-box -# @see https://www.better-auth.com/docs/authentication/github GITHUB_CLIENT_ID="" GITHUB_CLIENT_SECRET="" - -# Analytics -# Using Umami -# @see https://umami.is -NEXT_PUBLIC_UMAMI_URL="" # URL of your Umami instance -NEXT_PUBLIC_UMAMI_WEBSITE_ID="" # Website ID of your Umami instance - -# Production URL -# Used for the newsletter and site metadata generation. -VERCEL_PROJECT_PRODUCTION_URL="" -- cgit v1.2.3