Skip to content

Installation

Donate Me – Maintenance Mode Addon Setup

Download the Addon

You can download the Maintenance Mode addon for the Donate Me application from the following link:

Download Maintenance Mode Addon

Installation Instructions

Drag and drop the folders from the provided package into your Donate Me root folder,
or manually place each file into the appropriate locations.

⚠️ Manual placement is recommended.

All folder and file structures are already correct in the downloaded package —
follow the existing structure as-is.

Make sure to also drag middleware.ts to the root folder of your Donate Me project.

Configuration Steps

1. Open config.ts

Add the following code at the very top, above const config:

export const maintenance = {
enabled: false,
// IP addresses that are allowed to bypass maintenance mode
whitelistedIps: ['127.0.0.1', '192.168.1.1'],
};

2. Scroll down to the messages section

Add the following right below messages:

maintenance: {
title: "We'll be back soon!",
message: "Our website is currently undergoing scheduled maintenance. We appreciate your patience and understanding.",
color: "#1d4ed8",
},

If you’d like to hide the navbar and footer while in maintenance mode:

  1. Add this import right after the config import:
import { usePathname, useRouter } from "next/navigation"
  1. Inside both your Navbar and Footer components, locate:
if (!config.navbar.enabled) return null
// or
if (!config.footer.enabled) return null
  1. Below that line, add:
const pathname = usePathname()
if (pathname === "/maintenance") return null

This will prevent the components from rendering on the /maintenance page.

Final Step

After completing the steps above, restart your project.

⚠️ It’s highly recommended to enable maintenance mode only when actively performing maintenance.