Skip to content

feat(dashboard): add template listing and pull APIs#258

Merged
ApusBerliozi merged 4 commits into
pyfenn:mainfrom
sarkarshrayan2-max:feat/dashboard-template-pull
Jul 17, 2026
Merged

feat(dashboard): add template listing and pull APIs#258
ApusBerliozi merged 4 commits into
pyfenn:mainfrom
sarkarshrayan2-max:feat/dashboard-template-pull

Conversation

@sarkarshrayan2-max

@sarkarshrayan2-max sarkarshrayan2-max commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements the backend portion of #246 for downloading Fenn templates through the dashboard.

Changes

  • adds GET /api/templates to list available public templates
  • adds POST /api/templates/pull to download a selected template
  • supports target-directory selection
  • supports force-overwrite behaviour
  • returns structured success and error responses
  • extracts reusable template listing and pull logic from the CLI
  • preserves existing CLI behaviour
  • adds tests using mocked GitHub responses and temporary directories

Endpoints

List templates

GET /api/templates

Example response:

{"templates": ["base", "chatbot"], "total": 2}

Pull a template

POST /api/templates/pull

Example request:

{"template": "base", "path": "/path/to/project", "force": false}

Example response:

{"template": "base", "path": "/path/to/project", "downloaded": true}

Testing

  • Ruff formatting passed
  • Ruff checks passed
  • Dashboard and pull tests passed: 57 passed

Scope

This PR implements the backend APIs. Dashboard UI integration and template-file preview can be handled as a follow-up.

Refs #246

@sarkarshrayan2-max

Copy link
Copy Markdown
Contributor Author

I opened #258 with the proposed backend implementation.

It adds the template-listing and template-pull APIs, target-directory and force options, structured errors, reusable CLI logic, and tests. The dashboard UI and file preview remain follow-up work.

Comment thread fenn/dashboard/app.py Outdated
Comment thread fenn/dashboard/app.py Outdated
@ApusBerliozi

Copy link
Copy Markdown
Contributor

Hey @sarkarshrayan2-max!

Everything looks fine, please fix 2 comments in the review above and I will merge your PR. Thx 4 your work :)

@ApusBerliozi

Copy link
Copy Markdown
Contributor

Thx a lot for your fixes @sarkarshrayan2-max!

Unfortunately, there is currently a merge conflict, since we had another PR related to dashboard :(

Sorry for that. Please fix it, and we will proceed

@ApusBerliozi
ApusBerliozi merged commit c004b05 into pyfenn:main Jul 17, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants