DEVELOPER DOCUMENTATION

Architecture & Cloudflare Setup

100% Free Tier, zero-build, auto-deploying digital academy & marketplace on Cloudflare Pages.

1. Architecture Overview

Ahama Academy runs natively on the Cloudflare edge without expensive servers, npm build scripts, or recurring hosting bills:

2. 1-Click Deployment to Cloudflare Pages

  1. Push this repository to your GitHub account:
    git init
    git add .
    git commit -m "Ahama Academy Production Release"
    git remote add origin https://github.com/your-username/ahama-academy.git
    git push -u origin main
  2. Log in to Cloudflare Dashboard.
  3. Go to Workers & Pages → Create Application → Pages → Connect to Git.
  4. Select your repository. Under Build Settings:
    • Framework preset: None
    • Build command: (leave empty)
    • Build output directory: /
  5. Click Save and Deploy. Your site is now live with automatic deployment on every push!

3. Connecting Cloudflare D1 Database

Run the following commands using the free Wrangler CLI:

# 1. Create your free edge database
npx wrangler d1 create ahama-db

# 2. Execute the schema
npx wrangler d1 execute ahama-db --file=./d1/schema.sql

# 3. Seed demo courses, templates, and admin user
npx wrangler d1 execute ahama-db --file=./d1/seed.sql

In Cloudflare Dashboard, go to your Pages project → Settings → Functions → D1 database bindings, and add variable name DB bound to ahama-db.

4. Default Demo Credentials

👑 Admin: admin@ahama.academy / Password: admin123
👨‍🎓 Student: student@ahama.academy / Password: student123