Configuration

Environment variables and configuration guide

Configuration

This guide details the configuration options and environment variables for each project.

Backend API (mdanamulhasan-api)

The backend uses wrangler.toml for Cloudflare configuration and .dev.vars for local secrets.

Environment Variables (.dev.vars)

Variable Description Required
JWT_SECRET Secret key for signing JWT tokens Yes
RESEND_API_KEY API key for Resend email service Yes
RESEND_FROM_EMAIL Sender email address Yes
RESEND_TO_EMAIL Recipient email for contact form Yes
MAILCHIMP_API_KEY API key for Mailchimp Yes
MAILCHIMP_SERVER_PREFIX Mailchimp server prefix (e.g., us1) Yes
MAILCHIMP_AUDIENCE_ID Mailchimp audience ID Yes
FRONTEND_URL URL of the frontend (for CORS) Yes
CMS_URL URL of the CMS (for CORS) Yes

Wrangler Configuration (wrangler.toml)

name = "mdanamulhasan-api"
main = "src/index.ts"
compatibility_date = "2024-01-01"

[[d1_databases]]
binding = "DB"
database_name = "mdanamulhasan-db"
database_id = "your-database-id"

CMS Dashboard (mdanamulhasan-cms)

The CMS uses Nuxt runtime config.

Environment Variables (.env)

Variable Description Default
NUXT_PUBLIC_API_BASE Base URL of the backend API http://localhost:8787/api

Nuxt Configuration (nuxt.config.ts)

export default defineNuxtConfig({
  runtimeConfig: {
    public: {
      apiBase: process.env.NUXT_PUBLIC_API_BASE
    }
  }
})

Frontend (mdanamulhasan)

The frontend also uses Nuxt runtime config.

Environment Variables (.env)

Variable Description Default
NUXT_PUBLIC_SITE_URL URL of the deployed site http://localhost:3000
NUXT_PUBLIC_API_BASE_URL Base URL of the backend API http://localhost:8787/api

Site Configuration (app/config/site.ts)

You can configure static site metadata in app/config/site.ts:

export const siteConfig = {
  name: "Md Anamul Hasan",
  title: "Portfolio & Blog",
  description: "Full-stack developer portfolio",
  // ...
};
Last updated: 12/8/2025