🤖 AI Integration Points for Hackathon Demo

This document outlines exciting places to integrate Friendli.ai to create a truly impressive AI-powered project manager that will wow the judges!

🎯 Strategic AI Features to Impress Judges

1. AI Task Generation from Project Description ⭐⭐⭐⭐⭐

Demo Impact: VERY HIGH - Shows AI understanding complex project requirements

Where: Project creation or "Generate Tasks" button on project page How: Stream AI-generated tasks in real-time as they're being created

// Add to ProjectsController
func (c *ProjectsController) handleGenerateTasks(w http.ResponseWriter, r *http.Request) {
    projectID := r.FormValue("project_id")
    project, _ := models.GetProjectByID(projectID)

    client, _ := friendli.NewClient(os.Getenv("FRIENDLI_API_KEY"))

    prompt := fmt.Sprintf(`You are a project manager. Break down this project into 5-8 specific, actionable tasks.

Project: %s
Description: %s

For each task, provide:
1. Title (brief, actionable)
2. Description (1-2 sentences)
3. Priority (low/medium/high)

Format each task as:
TASK: [title]
DESC: [description]
PRIORITY: [priority]
---`, project.Name, project.Description)

    req := friendli.NewChatCompletionRequest(
        "meta-llama-3.1-70b-instruct",
        []friendli.Message{
            friendli.NewSystemMessage("You are a helpful project management assistant."),
            friendli.NewUserMessage(prompt),
        },
    ).WithTemperature(0.7).WithMaxTokens(1000)

    stream, _ := client.Chat.CreateCompletionStream(r.Context(), req)
    defer stream.Close()

    // Stream to HTMX as server-sent events
    w.Header().Set("Content-Type", "text/event-stream")
    flusher, _ := w.(http.Flusher)

    for {
        chunk, err := stream.Recv()
        if err == io.EOF { break }
        if err != nil { return }

        if len(chunk.Choices) > 0 {
            content := chunk.Choices[0].Delta.Content
            fmt.Fprintf(w, "data: %s\n\n", content)
            flusher.Flush()
        }
    }
}

UI Component:

<button class="btn btn-primary"
        hx-post="/ai/generate-tasks"
        hx-target="#ai-suggestions"
        hx-swap="innerHTML">
    ✨ AI: Generate Tasks
</button>
<div id="ai-suggestions" class="mt-4"></div>

Judge Appeal: Real-time streaming shows AI "thinking", very visual and impressive


2. Smart Task Breakdown Assistant ⭐⭐⭐⭐

Demo Impact: HIGH - Practical feature developers actually need

Where: Task detail modal - "Get AI Help" button How: AI suggests implementation steps and provides code examples

func (c *ProjectsController) handleTaskBreakdown(w http.ResponseWriter, r *http.Request) {
    taskID := r.FormValue("task_id")
    task, _ := models.GetTaskByID(taskID)

    client, _ := friendli.NewClient(os.Getenv("FRIENDLI_API_KEY"))

    prompt := fmt.Sprintf(`Break down this development task into implementation steps with code examples.

Task: %s
Description: %s

Provide:
1. Step-by-step implementation plan
2. Code snippets for key parts
3. Potential challenges and solutions
4. Estimated time

Use markdown formatting.`, task.Title, task.Description)

    req := friendli.NewChatCompletionRequest(
        "meta-llama-3.1-70b-instruct",
        []friendli.Message{
            friendli.NewSystemMessage("You are a senior software engineer helping plan implementation."),
            friendli.NewUserMessage(prompt),
        },
    ).WithTemperature(0.5)

    stream, _ := client.Chat.CreateCompletionStream(r.Context(), req)
    defer stream.Close()

    // Stream markdown response
    w.Header().Set("Content-Type", "text/event-stream")
    // ... stream to UI
}

Judge Appeal: Shows practical AI assistance for developers, code examples make it tangible


3. AI Project Status Summary ⭐⭐⭐⭐⭐

Demo Impact: VERY HIGH - Executive summary of entire project

Where: Dashboard or "AI Summary" button How: AI analyzes all tasks, identifies blockers, suggests next steps

func (c *ProjectsController) handleProjectSummary(w http.ResponseWriter, r *http.Request) {
    projectID := r.PathValue("project")
    project, _ := models.GetProjectByID(projectID)
    tasks, _ := project.GetTasks()

    // Build context from all tasks
    taskSummary := ""
    for _, task := range tasks {
        taskSummary += fmt.Sprintf("- [%s] %s: %s\n", task.Status, task.Title, task.Description)
    }

    client, _ := friendli.NewClient(os.Getenv("FRIENDLI_API_KEY"))

    prompt := fmt.Sprintf(`Analyze this project and provide an executive summary.

Project: %s
Description: %s

Tasks:
%s

Provide:
1. **Overall Progress** - percentage complete and health status
2. **Key Achievements** - what's been done
3. **Current Blockers** - tasks stuck in progress
4. **Recommended Next Steps** - prioritized actions
5. **Timeline Estimate** - realistic completion estimate

Keep it concise and actionable.`, project.Name, project.Description, taskSummary)

    req := friendli.NewChatCompletionRequest(
        "meta-llama-3.1-70b-instruct",
        []friendli.Message{
            friendli.NewSystemMessage("You are an AI project manager analyzing project health."),
            friendli.NewUserMessage(prompt),
        },
    ).WithTemperature(0.3) // Lower temperature for factual analysis

    stream, _ := client.Chat.CreateCompletionStream(r.Context(), req)
    defer stream.Close()

    // Stream to dashboard
    // ... implementation
}

Judge Appeal: Shows AI can analyze complex data and provide insights, very "executive-friendly"


4. Intelligent Task Prioritization ⭐⭐⭐⭐

Demo Impact: HIGH - AI making smart decisions

Where: Project page - "AI: Reprioritize Tasks" button How: AI analyzes dependencies and suggests optimal task order

func (c *ProjectsController) handleReprioritizeTasks(w http.ResponseWriter, r *http.Request) {
    // Get all tasks and ask AI to suggest priority order based on:
    // - Dependencies
    // - Current progress
    // - Business value
    // - Risk factors

    // Stream back reprioritization suggestions with reasoning
}

Judge Appeal: Shows AI making strategic decisions, not just generating text


5. Smart Comment Assistant ⭐⭐⭐

Demo Impact: MEDIUM-HIGH - Helpful for collaboration

Where: Comment section on tasks How: AI suggests helpful responses or solutions based on conversation

func (c *ProjectsController) handleSmartReply(w http.ResponseWriter, r *http.Request) {
    taskID := r.FormValue("task_id")
    task, _ := models.GetTaskByID(taskID)
    comments, _ := task.GetComments()

    // Build conversation context
    conversation := ""
    for _, comment := range comments {
        conversation += fmt.Sprintf("%s: %s\n", comment.Author, comment.Content)
    }

    prompt := fmt.Sprintf(`Task: %s
Recent discussion:
%s

Suggest a helpful response that moves the task forward. Consider:
- Technical solutions
- Asking clarifying questions
- Suggesting resources
- Offering to help`, task.Title, conversation)

    // Stream AI-suggested reply
}

Judge Appeal: Shows AI understanding context and participating in team conversations


6. Auto-Documentation Generator ⭐⭐⭐⭐

Demo Impact: HIGH - Developers hate documentation!

Where: Completed tasks - "Generate Docs" button How: AI creates markdown documentation from task details

func (c *ProjectsController) handleGenerateDocs(w http.ResponseWriter, r *http.Request) {
    projectID := r.PathValue("project")
    project, _ := models.GetProjectByID(projectID)
    doneTasks, _ := /* get completed tasks */

    prompt := fmt.Sprintf(`Generate project documentation in markdown format.

Project: %s
Description: %s

Completed Features:
%s

Create a README.md style document with:
1. Project Overview
2. Features Implemented
3. Setup Instructions (inferred from tasks)
4. Usage Guide
5. Next Steps (from incomplete tasks)`, /* ... */)

    // Stream markdown documentation
}

Judge Appeal: Practical, saves time, shows AI can write technical content


🎨 UI/UX Integration Ideas

Streaming Indicators

<!-- Pulsing AI indicator while streaming -->
<div class="flex items-center gap-2 text-primary">
    <span class="loading loading-dots loading-sm"></span>
    <span>AI is thinking...</span>
</div>

Real-time Task Cards

<!-- Task card that appears as AI generates it -->
<div class="card bg-base-200 shadow animate-fade-in">
    <div class="card-body">
        <div class="badge badge-primary">AI Generated</div>
        <h4>{{ task.Title }}</h4>
        <p>{{ task.Description }}</p>
    </div>
</div>

AI Confidence Indicators

<!-- Show AI's confidence in suggestions -->
<div class="flex gap-2 mt-2">
    <div class="badge badge-success">High Confidence</div>
    <button class="btn btn-xs">Use Suggestion</button>
    <button class="btn btn-xs btn-ghost">Edit</button>
</div>

🏆 Demo Script for Judges

Opening (30 seconds)

"Let me show you an AI-powered project manager that helps developers actually get things done."

Feature 1: Task Generation (1 minute)

  1. Create new project: "Build a REST API for a todo app"
  2. Click "AI: Generate Tasks"
  3. Watch as AI streams tasks in real-time
  4. Show 5-8 well-structured tasks appear
  5. Wow factor: "Notice how it broke down the project logically and assigned priorities"

Feature 2: Smart Breakdown (45 seconds)

  1. Click on a task
  2. Click "Get AI Help"
  3. Watch AI stream implementation steps with code examples
  4. Wow factor: "It's giving me actual code I can use"

Feature 3: Project Summary (1 minute)

  1. Add some tasks to different columns (todo, in progress, done)
  2. Click "AI Summary"
  3. Watch AI analyze the entire project and stream insights
  4. Wow factor: "It identified blockers I didn't even notice"

Closing (30 seconds)

"All powered by Friendli.ai's Llama 3.1 70B model - 468,000+ models available, blazing fast streaming, and it costs pennies per request."


📊 Metrics to Highlight

  • Streaming Speed: "250 tokens per second from Friendli.ai"
  • Cost: "This entire demo cost less than $0.10"
  • Model Access: "468,834 open-source models available"
  • No Vendor Lock-in: "OpenAI-compatible API, easy to swap models"

🚀 Quick Implementation Priority

For the hackathon, implement in this order:

  1. Task Generation - Easiest, most visual
  2. Project Summary - Shows analytical power
  3. Task Breakdown - Practical and impressive
  4. 💡 Smart Prioritization - If time permits

🔧 Environment Setup

export FRIENDLI_API_KEY="flp_your_key_here"

# Get free API key from https://suite.friendli.ai
# $5 in free credits = hundreds of demo runs

💡 Pro Tips for Demo

  1. Pre-create example project so judges don't wait for setup
  2. Show streaming every time - it's the most impressive part
  3. Use longer responses to show sustained streaming (set max_tokens=800)
  4. Have fallback data in case API is slow
  5. Explain model choice: "Using Llama 3.1 70B for quality, but can switch to 8B for speed"

🎯 Judging Criteria Alignment

Criteria How We Address It
Innovation AI-powered PM tool with streaming responses
Technical Excellence Clean Go code, HTMX/HATEOAS, Skykit framework
Practical Use Solves real developer pain points
GitHub Integration Built for GitHub HackNight, developer-focused
Demo Quality Real-time streaming is visually impressive

Next Steps: Pick 2-3 features from above and implement them for maximum demo impact! 🚀

cdf282b

Adding demo video

Connor McCutcheon
@connor
0 stars

Basic AI powered project manager

Sign in to comment Sign In