import os

def create_project_structure(name):
    os.makedirs(f"{name}/STATIC", exist_ok=True)

    with open(f"{name}/__init__.py", "w") as f:
        f.write("from . import models\nfrom . import views\nfrom . import settings\n")

    with open(f"{name}/models.py", "w") as f:
        f.write(
            "from MOJIZA.models.base import Model, Field\n\n"
            "class User(Model):\n"
            "    username = Field('string')\n"
            "    email = Field('string')\n"
            "    password = Field('string')\n"
        )

    with open(f"{name}/settings.py", "w") as f:
        f.write(
            " "
        )

    with open(f"{name}/urls.py", "w") as f:
        f.write(
            "from MOJIZA.engine.routing import PAGE\n"
           )

    with open(f"{name}/views.py", "w") as f:
        f.write("from MOJIZA.engine.server import HTML\n")
        f.write("# Views will be written manually\n")

    print(f"✅ Project '{name}' created successfully.")

