You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This creates a directory `gds-idea-app-my-dashboard/` containing:
50
+
51
+
-`app.py` -- CDK entry point
52
+
-`cdk.json` -- CDK configuration
53
+
-`app_src/` -- your application code, Dockerfile, and dependencies
54
+
-`.devcontainer/` -- VS Code dev container configuration
55
+
-`dev_mocks/` -- mock auth data for local development
56
+
-`.gitignore` -- pre-configured for Python, CDK, and dev artifacts
22
57
23
-
# Update tool-managed files in an existing project
58
+
The tool runs `cdk init`, `uv init`, copies template files, installs CDK dependencies, and makes an initial git commit. All of this happens automatically.
Then open the project in VS Code and reopen in the dev container when prompted.
84
+
85
+
## Migrating an existing project
86
+
87
+
If you have a project created from the [gds-idea-app-templates](https://github.com/co-cddo/gds-idea-app-templates) template repository, migrate it to `idea-app`:
88
+
89
+
```bash
90
+
cd gds-idea-app-my-existing-project
91
+
idea-app migrate
92
+
```
93
+
94
+
The command is interactive and will:
95
+
96
+
1. Read your existing `[tool.webapp]` configuration
97
+
2. Ask you to confirm before making changes
98
+
3. Build a manifest from your current tracked files
99
+
4. Remove old `template/` directory, `[project.scripts]`, and `[build-system]` sections
100
+
5. Offer to update your files to the latest templates (with a dry-run preview first)
101
+
102
+
Run this on a clean branch so you can review the changes:
103
+
104
+
```bash
105
+
git checkout -b migrate-to-idea-app
106
+
idea-app migrate
107
+
git diff
108
+
git add -A && git commit -m "Migrate to idea-app"
109
+
```
110
+
111
+
## Updating template files
112
+
113
+
When `idea-app` is upgraded with new template changes (Dockerfile improvements, devcontainer updates, etc.), update your project:
114
+
115
+
```bash
24
116
cd gds-idea-app-my-dashboard
25
117
idea-app update
118
+
```
119
+
120
+
The update command manages files like the Dockerfile, devcontainer config, and docker-compose. It does not touch your application code, `cdk.json`, or `pyproject.toml`.
121
+
122
+
### How updates work
123
+
124
+
Each tracked file is compared against the manifest hash from the last update:
125
+
126
+
| File state | What happens |
127
+
|---|---|
128
+
| Unchanged since last update | Overwritten with the latest template |
129
+
| Locally modified | Skipped. A `.new` file is written alongside for you to review |
130
+
| Missing from project | Created |
131
+
132
+
When files are skipped, you'll see instructions to compare and merge:
133
+
134
+
```
135
+
diff app_src/Dockerfile app_src/Dockerfile.new
136
+
```
26
137
27
-
# Build and health-check the production Docker image
28
-
idea-app smoke-test
138
+
### Options
29
139
30
-
# Provide AWS credentials to dev container
31
-
idea-app provide-role
140
+
```bash
141
+
idea-app update [--dry-run] [--force]
32
142
```
33
143
34
-
## Commands
144
+
-`--dry-run`: show what would change without writing anything
145
+
-`--force`: overwrite all files, including ones you've modified locally
35
146
36
-
| Command | Description |
37
-
|---------|-------------|
38
-
|`idea-app init <framework> <name> [--python 3.13]`| Scaffold a new project |
0 commit comments