Skip to content

[Feature]: AI-powered template suggestionΒ #328

@varungoyal03

Description

@varungoyal03

πŸ“ Feature Description

✨ Feature Request
πŸ“ Feature Description

Implement an AI-powered template suggestion feature in the template creation page (app/templates/new/page.tsx). Users should be able to input a natural language prompt (e.g., "suggest resume for software engineer"), and the system will use the Google Gemini AI to recommend relevant templates from the existing library (e.g., templates/resume/software-engineer-resume.md) or generate a new template outline.

πŸ’‘ Why is this feature needed?
This feature enhances the user experience by making template selection more intuitive and personalized. It leverages the existing AI integration (via app/api/ai/generate-template/route.ts) to streamline the document creation process, especially for users who may not know which template best suits their needs. It complements the project's focus on AI-driven document generation, as seen in endpoints like /api/generate/resume-guidance/route.ts, and aligns with the goal of a seamless, intelligent user workflow (per Architecture.md).
πŸ“Ž Additional Context

Related Files:
app/templates/new/page.tsx: Where the feature will be integrated into the UI.
components/templates/create-template-form.tsx: Update the form to accept a prompt input and display AI-suggested templates.
lib/gemini.ts: Extend with a new function to handle template suggestion requests.
app/api/ai/generate-template/route.ts: Potentially reuse or extend this endpoint for suggestions.
templates/validation.ts: Add validation for AI-generated template suggestions.

Inspiration: Builds on the AI capabilities in CHANGELOG.md (e.g., v0.9.0 AI diagram generation) and the template system described in types/templates.ts.
Mockup Idea: Add a text input in the template creation form labeled "Describe your needs (e.g., 'resume for software engineer')", with a button to trigger AI suggestions. Display results in a gallery format (like components/templates/template-gallery.tsx).
Potential API Flow:
User enters prompt in create-template-form.tsx.
Call new Gemini function in lib/gemini.ts to process the prompt.
Return suggested templates or a new template outline.
Display in UI with options to select or refine.

βœ… Duplicate Check

I have searched existing issues to ensure this feature hasn’t already been requested.

πŸ’‘ Why is this feature needed?

No response

πŸ“Ž Additional Context

No response

βœ… Duplicate Check

  • I have searched existing issues to ensure this feature hasn’t already been requested.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions