feat: Add 'Create New App' flow to Pilot admin UI - #223
Conversation
Confidence Score: 5/5Safe to merge; all previously-reported credential and rollback issues are resolved, and the remaining findings are style/design-system nits. The core scaffolding, GitHub integration, and site-install paths are all guarded correctly. No present behavioral defects were found in this revision. pilot/tasks/create_app.py (create_github complexity) and admin/frontend/src/components/apps/CreateAppDialog.vue (raw form elements) Reviews (12): Last reviewed commit: "test(admin): update route inventory base..." | Re-trigger Greptile |
… git config, explicit sites list validation)
|
@ajmal1212 Please keep the PR description minimal and add screenshots for UI changes. |
|
Hi @ajmal1212 |
|
Hi @tanmoysrt, I'll work on it. |
|
Fixed the rollback guard in |
…ow cleanup rollback
|
@siduck can you check the design |
| @dataclass(kw_only=True) | ||
| class CreateAppTask(Task): | ||
| command: ClassVar[str] = "create-app" | ||
|
|
||
| name: str | ||
| title: str = "" | ||
| description: str = "" | ||
| publisher: str = "" | ||
| email: str = "" | ||
| app_license: str = "mit" | ||
| create_github_repo: bool = False | ||
| github_repo_private: bool = False | ||
| sites: list[str] = field(default_factory=list) | ||
|
|
||
| def run(self) -> None: | ||
| # Essential App Scaffolding & Virtualenv Installation | ||
| try: | ||
| self.scaffold() | ||
| self.install_env() | ||
| except Exception as e: | ||
| self.report(f"App creation failed: {e}. Rolling back...") | ||
| try: |
There was a problem hiding this comment.
use bench new-app command instead ?
in current bench, that's named as bench make-app ig, you can rename it to new-app for compaitability with old bench
|
Using the bench new-app command will ensure the build files are correctly added. |
|
Hi @ajmal1212 |
|
Sorry, guys. I haven't had enough time to work on it. Let's complete it today |
|
Hi @tanmoysrt, Updated this PR with the latest changes:
|
|
Please merge the base branch. There are already scaffolding code and command for creating new-app. https://github.com/frappe/pilot/blob/main/pilot/commands/apps/new.py |





Summary
This PR implements the "Create New App" capability inside the Pilot admin UI. It allows users to scaffold a new Frappe app (equivalent to running
bench new-app), automatically register/install it, optionally provision a clean repository on GitHub (via connected Git integrations), and deploy it directly onto selected sites.Key Changes
pilot/tasks/jobs/create_app_task.py):_create_app_boilerplate()non-interactively using Python snippet invocation.pip install -e), registers it inapps.txt, and builds assets.admin/backend/api/v1/apps.py):POST /apps/createendpoint that validates the proposed snake_case app name and schedules the background task.pilot/integrations/git/github.py):create_repo()to support programmatic repository creation on GitHub.CreateAppDialog.vuecontaining form fields for metadata (Title, Publisher, Email, License) and GitHub settings.