# π Terraforming-Planet image-gen
### An image generation platform for visual learning and experimentation in terrain formation, self-sustaining photovoltaic vehicles, and planetary engineering
# βVisualize first engineer wisely ,every planet is a system. Every system can be understood.β

**Solution technology for the Planet**

Terraforming-Planet is an educational project focused on terrain formation, water retention, and photovoltaic vehicles.
We combine science with visualization to support land restoration, environmental protection, and energy transition.
**Try the test image generation at this link**
# π **[Click here and test the image generation model](https://terraformingplanet.terraforming-planet.workers.dev/)**
Below is a screenshot from image generator tests:

---
βAI is not the answer. Itβs the tool we use to ask better questions.β

βTechnology serves best when it teaches before it transforms.β

βLearning planetary engineering through visualization.β
# π Terraforming Planet β Image Generation Lab
> **Experimental AI image generation laboratory**
> An educational and engineering project demonstrating how **GPT Image + Codex + Cloudflare Workers**
> can be used to learn terraformating, terrain shaping, and future-oriented technology design.
---
## β¨ Project Idea
**Terraforming Planet** is a hands-on experiment showing the complete process of building
an AI image generator β from concept, through code architecture, to a working web application.
The project does not focus solely on image aesthetics.
Its goal is to **understand processes**:
- planetary terraforming,
- terrain shaping (mountains, valleys, deserts, oceans),
- energy utilization (e.g. photovoltaic machines),
- and using AI as an engineering and educational tool.
---
## π§ How was the generator built?
1. **Concept**
Terraforming visualization as a learning and analysis tool.
2. **Codex**
Iterative design of repository structure and code refinement.
3. **GPT Image API**
Generation of realistic images (returned as base64).
4. **Cloudflare Workers**
Secure API β the OpenAI key never reaches the frontend.
5. **Vite + Vanilla JS**
Lightweight, fast frontend without heavy frameworks.
6. **GitHub Actions**
Automated build and deployment.
The repository documents the **entire creation journey**, not just the final result.
---
## π§± Repository Structure
/apps
ββ web/ β Frontend (Vite + Vanilla JS)
β ββ src/
β β ββ styles/ β main UI styles
β β ββ assets/ β SVGs, icons, backgrounds
β ββ dist/ β production build
β
ββ worker/ β Image generation API
ββ Cloudflare Workers + OpenAI
---
π¨ What does the app offer?
π§ͺ Image laboratory
βοΈ Prompt editor (style, format, size)
πΌοΈ AI image generation
π Prompt copying and result analysis
β‘ Rendering via data_url (no temporary links)
---
π Local Setup
Frontend
cd apps/web
npm install
npm run dev
Address:
http://localhost:5173
---
Worker (Cloudflare)
cd apps/worker
npm install
npx wrangler deploy
In Cloudflare Dashboard β Worker β Settings β Variables
Add Secret:
OPENAI_API_KEY
Tests:
GET /health
POST /generate
Body:
{
"prompt": "a solar excavator terraforming desert",
"size": "1024x1024"
}
> GPT Image models return base64 β the worker maps it to data_url.
---
π Web β Worker Configuration
.env file in apps/web:
VITE_API_BASE=https://your-worker.workers.dev
VITE_WORKER_URL=https://your-worker.workers.dev
---
π¦ Deployment (GitHub Pages)
Workflow:
.github/workflows/pages.yml
Automatically:
builds apps/web,
publishes apps/web/dist,
sets environment variables.
Requirements:
1. Correct base in vite.config.js
2. GitHub Pages β Source: GitHub Actions
3. Push to main
---
βοΈ Deployment (Cloudflare Pages β optional)
cd apps/web
npm install
npm run build
Settings:
Build command: npm run build
Output: apps/web/dist
Root directory: apps/web
---
π Environment Variables
Variable Description
OPENAI_API_KEY API key (worker only)
VITE_API_BASE Worker API address
VITE_WORKER_URL Worker URL alias
---
β FAQ
I donβt see an image after clicking βGenerateβ.
Check the worker and VITE_API_BASE.
βMissing OPENAI_API_KEYβ error.
Check the Secret in Cloudflare Worker.
The page does not start.
Run npm install in apps/web.
---
π± Why this project?
AI as an engineering tool, not magic
Learning through visualization
Real architecture: frontend + worker + API
Ready to fork and extend
---
π€ Community & OpenAI
Created as part of the Community Dev Challenge
and open for further experimentation.
π Online generator:
π https://terraformingplanet.terraforming-planet.workers.dev/
---
Made with βοΈ AI, βοΈ engineering, and π future-focused thinking
---
This is ONE FILE.
If anything changes β we edit THIS, not add new ones.
---
The project serves education and the common good.
We encourage collaboration and knowledge sharing.
Image generation model
Terraforming Planet β’ Cloudflare Worker
Image Generator (OpenAI)
example screen

https://github.com/user-attachments/assets/2056e93e-3a26-46dd-bf37-fd376d03bc29
https://github.com/user-attachments/assets/ac951fc0-bcb3-4261-8d82-3ef418f17b65
We create open demos and tools
that turn terraforming ideas into images, concepts, and educational processes.
From valleys and mountain ranges to megastructures β explored through image generators and well-designed prompts.
π Home β’ π§ͺ Demos β’ π― Mission β’ π§ How generators help learning β’ π€ Collaboration β’ βοΈ Responsibility

π What is this project?
Terraforming-Planet is an organization focused on learning, prototyping, and storytelling around:
terrain formation (mountains, valleys, deltas, basins),
futuristic construction and photovoltaic machines,
planetary-scale engineering β presented visually.
Main idea:
image generators + good prompts = fast exploration of engineering concepts
without building heavy simulations or 3D pipelines.
π― Mission
We aim to:
Teach how terrain is shaped (geology + engineering thinking),
Prototype landscape-forming machines (e.g. PV excavators, autonomous builders),
Visualize βwhat-ifβ scenarios for planets and ecosystems,
Connect people: artists, developers, and engineers working for the common good.
Why it matters: images simplify complex systems and make them easier to understand, analyze, and develop.
π§ How image generators help learning terraforming
Generative graphics can act as an educational laboratory:
1) Rapid hypothesis testing
Instant variations:
stronger / weaker gravity,
different planetary crust materials,
erosion intensity,
water cycles and river deltas,
construction strategies (terraces, canals, dams).
2) Concept iteration and communication
A single β4-in-1β image can show:
initial state β intervention β intermediate stage β final result
perfect for documentation, learning, and discussion.
3) Designing machines together with the environment
Machines evolve alongside the landscape they create:
PV excavators carving valleys,
autonomous vehicles stabilizing terrain,
modular systems building mountains and flood barriers.
4) Prompt-based scientific thinking
Good prompts enforce:
constraints,
measurable effects,
process stages,
coherent framing and perspective.
This project is open to discussion, ideas, and constructive feedback.
π Leave a comment or start a discussion here:
π
π Add a comment or share generated images
You can:
- ask questions
- share ideas
- report issues
- propose improvements
- discuss scientific or engineering concepts
Every voice helps improve the project π
Example graphic drawn in GIMP used to train an educational OpenAI AI model (copy)
xxx.
