Skip to content
TheChatArchiveThe Chat Archive
Grok 4.1 Fast· xaiHugging Face Frontier Reasoning Traces

Create a capstone project marketplace with sponsor scoring.

  1. User

    Create a capstone project marketplace with sponsor scoring.

  2. Assistant
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>CapstoneHub - Capstone Project Marketplace with Sponsor Scoring</title>
        <style>
            * { margin: 0; padding: 0; box-sizing: border-box; }
            body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; color: #333; }
            .container { max-width: 1200px; margin: 0 auto; padding: 20px; }
            header { background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); border-radius: 20px; padding: 20px; margin-bottom: 30px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
            h1 { text-align: center; color: #4a5568; margin-bottom: 10px; }
            nav { display: flex; justify-content: center; gap: 20px; margin-top: 10px; }
            button, .btn { background: linear-gradient(45deg, #667eea, #764ba2); color: white; border: none; padding: 10px 20px; border-radius: 25px; cursor: pointer; font-weight: bold; transition: all 0.3s; }
            button:hover, .btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
            .view { display: none; }
            .view.active { display: block; }
            .projects-grid, .sponsors-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 20px; margin-top: 20px; }
            .card { background: white; border-radius: 15px; padding: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); transition: transform 0.3s; }
            .card:hover { transform: translateY(-5px); }
            .card h3 { color: #4a5568; margin-bottom: 10px; }
            .score-badge { display: inline-block; background: linear-gradient(45deg, #48bb78, #38a169); color: white; padding: 5px 15px; border-radius: 20px; font-weight: bold; font-size: 0.9em; }
            .low-score { background: linear-gradient(45deg, #f56565, #e53e3e); }
            .medium-score { background: linear-gradient(45deg, #ed8936, #dd6b20); }
            .tech-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; }
            .tech-tag { background: #e2e8f0; padding: 5px 10px; border-radius: 15px; font-size: 0.8em; }
            form { background: white; border-radius: 15px; padding: 30px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); max-width: 500px; margin: 20px auto; }
            input, textarea, select { width: 100%; padding: 12px; margin: 10px 0; border: 1px solid #e2e8f0; border-radius: 10px; font-size: 1em; }
            .rating { display: flex; gap: 5px; align-items: center; }
            .stars { color: #fbbf24; font-size: 1.5em; }
            .modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; }
            .modal.active { display: flex; align-items: center; justify-content: center; }
            .modal-content { background: white; padding: 30px; border-radius: 15px; max-width: 400px; width: 90%; }
            .close { float: right; font-size: 2em; cursor: pointer; color: #999; }
            .search-filter { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
            .search-filter input, .search-filter select { flex: 1; min-width: 200px; }
            @media (max-width: 768px) { .projects-grid, .sponsors-grid { grid-template-columns: 1fr; } nav { flex-direction: column; align-items: center; } }
        </style>
    </head>
    <body>
        <div class="container">
            <header>
                <h1>🛠️ CapstoneHub</h1>
                <p style="text-align: center; color: #666;">Marketplace for Capstone Projects • Sponsors Scored by Reliability & Feedback</p>
                <nav>
                    <button onclick="showView('projects')">Projects</button>
                    <button onclick="showView('sponsors')">Sponsors</button>
                    <button onclick="showView('add-project')">Add Project</button>
                    <button onclick="showView('add-sponsor')">Sponsor Project</button>
                </nav>
            </header>
    
            <!-- Projects View -->
            <div id="projects" class="view active">
                <div class="search-filter">
                    <input type="text" id="projectSearch" placeholder="Search projects..." oninput="filterProjects()">
                    <select id="techFilter" onchange="filterProjects()">
                        <option value="">All Tech Stacks</option>
                        <option value="React">React</option>
                        <option value="Node.js">Node.js</option>
                        <option value="Python">Python</option>
                        <option value="ML">ML</option>
                    </select>
                </div>
                <div id="projectsGrid" class="projects-grid"></div>
            </div>
    
            <!-- Sponsors View -->
            <div id="sponsors" class="view">
                <div class="search-filter">
                    <input type="text" id="sponsorSearch" placeholder="Search sponsors..." oninput="filterSponsors()">
                    <select id="scoreFilter" onchange="filterSponsors()">
                        <option value="">All Scores</option>
                        <option value="high">4+ Stars</option>
                        <option value="medium">3+ Stars</option>
                    </select>
                </div>
                <div id="sponsorsGrid" class="sponsors-grid"></div>
            </div>
    
            <!-- Add Project Form -->
            <div id="add-project" class="view">
                <form onsubmit="addProject(event)">
                    <h2>Add Your Capstone Project</h2>
                    <input type="text" id="projectTitle" placeholder="Project Title" required>
                    <textarea id="projectDesc" placeholder="Description" rows="4" required></textarea>
                    <input type="text" id="projectTech" placeholder="Tech Stack (comma-separated)" required>
                    <input type="url" id="projectDemo" placeholder="Demo Link (optional)">
                    <button type="submit">Submit Project</button>
                </form>
            </div>
    
            <!-- Sponsor Project Form -->
            <div id="add-sponsor" class="view">
                <form onsubmit="sponsorProject(event)">
                    <h2>Sponsor a Project</h2>
                    <input type="text" id="sponsorName" placeholder="Your Company/Name" required>
                    <input type="text" id="sponsorOffer" placeholder="Offer (e.g., $5000 funding, internship)" required>
                    <select id="targetProject" required>
                        <option value="">Select Project</option>
                    </select>
                    <button type="submit">Sponsor</button>
                </form>
            </div>
        </div>
    
        <!-- Rate Sponsor Modal -->
        <div id="rateModal" class="modal">
            <div class="modal-content">
                <span class="close" onclick="closeModal()">&times;</span>
                <h3>Rate Sponsor: <span id="currentSponsor"></span></h3>
                <form onsubmit="rateSponsor(event)">
                    <div class="rating">
                        <div class="stars" id="stars">⭐⭐⭐⭐⭐</div>
                        <input type="range" id="rating" min="1" max="5" value="5" step="1" onchange="updateStars()">
                    </div>
                    <textarea id="feedback" placeholder="Feedback (optional)" rows="3"></textarea>
                    <button type="submit">Submit Rating</button>
                </form>
            </div>
        </div>
    
        <script>
            // Data Storage (LocalStorage for demo persistence)
            let projects = JSON.parse(localStorage.getItem('projects')) || [
                { id: 1, title: 'AI Chatbot', desc: 'Real-time AI assistant using GPT-like models.', tech: ['Python', 'ML'], demo: 'https://example.com/demo1', sponsors: [] },
                { id: 2, title: 'E-Commerce App', desc: 'Full-stack shop with payments.', tech: ['React', 'Node.js'], demo: 'https://example.com/demo2', sponsors: [] },
                { id: 3, title: 'Data Dashboard', desc: 'Interactive analytics viz.', tech: ['React', 'Python'], demo: null, sponsors: [] }
            ];
            let sponsors = JSON.parse(localStorage.getItem('sponsors')) || [
                { id: 1, name: 'TechCorp', offer: '$10k + Internship', projectsSponsored: [1], ratings: [5, 4], avgScore: 4.5 },
                { id: 2, name: 'Innovate Inc', offer: 'Mentorship', projectsSponsored: [2], ratings: [3], avgScore: 3.0 },
                { id: 3, name: 'FutureLabs', offer: '$5k Funding', projectsSponsored: [], ratings: [5,5,4], avgScore: 4.7 }
            ];
    
            function saveData() {
                localStorage.setItem('projects', JSON.stringify(projects));
                localStorage.setItem('sponsors', JSON.stringify(sponsors));
            }
    
            function showView(viewId) {
                document.querySelectorAll('.view').forEach(v => v.classList.remove('active'));
                document.getElementById(viewId).classList.add('active');
                if (viewId === 'add-sponsor') populateProjectSelect();
                if (viewId === 'sponsors') renderSponsors();
                if (viewId === 'projects') renderProjects();
            }
    
            function renderProjects(filtered = projects) {
                const grid = document.getElementById('projectsGrid');
                grid.innerHTML = filtered.map(p => `
                    <div class="card">
                        <h3>${p.title}</h3>
                        <p>${p.desc}</p>
                        <div class="tech-tags">${p.tech.map(t => `<span class="tech-tag">${t}</span>`).join('')}</div>
                        ${p.demo ? `<a href="${p.demo}" target="_blank" class="btn" style="display:block;margin-top:10px;width:100%;text-align:center;">Live Demo</a>` : ''}
                        <div>Sponsored by: ${p.sponsors.length ? p.sponsors.map(s => `<span class="score-badge">${s.name} (${s.score})</span>`).join(' ') : 'None yet'}</div>
                    </div>
                `).join('');
            }
    
            function renderSponsors(filtered = sponsors) {
                const grid = document.getElementById('sponsorsGrid');
                grid.innerHTML = filtered.map(s => {
                    const scoreClass = s.avgScore >= 4 ? '' : s.avgScore >= 3 ? 'medium-score' : 'low-score';
                    return `
                        <div class="card">
                            <h3>${s.name}</h3>
                            <p><strong>Offer:</strong> ${s.offer}</p>
                            <span class="score-badge ${scoreClass}">⭐ ${s.avgScore.toFixed(1)} (${s.ratings.length} reviews)</span>
                            <p>Projects: ${s.projectsSponsored.length}</p>
                            <button class="btn" onclick="openRateModal('${s.name}', ${s.id})" style="margin-top:10px;">Rate Sponsor</button>
                        </div>
                    `;
                }).join('');
            }
    
            function filterProjects() {
                const search = document.getElementById('projectSearch').value.toLowerCase();
                const tech = document.getElementById('techFilter').value;
                const filtered = projects.filter(p =>
                    p.title.toLowerCase().includes(search) ||
                    p.desc.toLowerCase().includes(search) ||
                    p.tech.some(t => t.toLowerCase().includes(search)) &&
                    (!tech || p.tech.includes(tech))
                );
                renderProjects(filtered);
            }
    
            function filterSponsors() {
                const search = document.getElementById('sponsorSearch').value.toLowerCase();
                const scoreFilter = document.getElementById('scoreFilter').value;
                let filtered = sponsors.filter(s =>
                    s.name.toLowerCase().includes(search)
                );
                if (scoreFilter === 'high') filtered = filtered.filter(s => s.avgScore >= 4);
                else if (scoreFilter === 'medium') filtered = filtered.filter(s => s.avgScore >= 3);
                renderSponsors(filtered);
            }
    
            function addProject(e) {
                e.preventDefault();
                const newProject = {
                    id: Date.now(),
                    title: document.getElementById('projectTitle').value,
                    desc: document.getElementById('projectDesc').value,
                    tech: document.getElementById('projectTech').value.split(',').map(t => t.trim()),
                    demo: document.getElementById('projectDemo').value || null,
                    sponsors: []
                };
                projects.unshift(newProject);
                saveData();
                showView('projects');
                e.target.reset();
                renderProjects();
            }
    
            function populateProjectSelect() {
                const select = document.getElementById('targetProject');
                select.innerHTML = '<option value="">Select Project</option>' + projects.map(p => `<option value="${p.id}">${p.title}</option>`).join('');
            }
    
            function sponsorProject(e) {
                e.preventDefault();
                const name = document.getElementById('sponsorName').value;
                const offer = document.getElementById('sponsorOffer').value;
                const projectId = parseInt(document.getElementById('targetProject').value);
                const project = projects.find(p => p.id === projectId);
                if (!project) return alert('Select a project!');
                
                const newSponsor = {
                    id: Date.now(),
                    name,
                    offer,
                    projectsSponsored: [...sponsors.find(s => s.name === name)?.projectsSponsored || [], projectId],
                    ratings: [],
                    avgScore: 0
                };
                
                // Merge if sponsor exists
                const existing = sponsors.find(s => s.name === name);
                if (existing) {
                    existing.projectsSponsored.push(projectId);
                    existing.avgScore = existing.ratings.reduce((a,b)=>a+b,0)/existing.ratings.length || 0;
                } else {
                    sponsors.push(newSponsor);
                }
                
                project.sponsors.push({ name, score: newSponsor.avgScore || 0 });
                saveData();
                showView('projects');
                e.target.reset();
                renderProjects();
            }
    
            // Rating Modal
            let currentSponsorId = null;
            function openRateModal(name, id) {
                document.getElementById('currentSponsor').textContent = name;
                currentSponsorId = id;
                document.getElementById('rateModal').classList.add('active');
                document.getElementById('rating').value = 5;
                updateStars();
            }
    
            function closeModal() {
                document.getElementById('rateModal').classList.remove('active');
            }
    
            function updateStars() {
                const rating = document.getElementById('rating').value;
                document.getElementById('stars').innerHTML = '⭐'.repeat(rating) + '☆'.repeat(5 - rating);
            }
    
            function rateSponsor(e) {
                e.preventDefault();
                const sponsor = sponsors.find(s => s.id === currentSponsorId);
                if (!sponsor) return;
                const rating = parseInt(document.getElementById('rating').value);
                sponsor.ratings.push(rating);
                sponsor.avgScore = sponsor.ratings.reduce((a,b)=>a+b,0) / sponsor.ratings.length;
                
                // Update project sponsors
                projects.forEach(p => {
                    const sp = p.sponsors.find(ps => ps.name === sponsor.name);
                    if (sp) sp.score = sponsor.avgScore;
                });
                
                saveData();
                renderSponsors();
                renderProjects();
                closeModal();
                e.target.reset();
            }
    
            // Initial Render
            renderProjects();
            renderSponsors();
    
            // Close modal on outside click
            document.getElementById('rateModal').onclick = (e) => { if (e.target.classList.contains('modal')) closeModal(); };
        </script>
    </body>
    </html>
    

    🚀 CapstoneHub - Fully Functional Demo

    Copy-paste the code above into an HTML file (e.g., capstonehub.html) and open it in any browser. It's a complete, self-contained single-page app with:

    ✨ Key Features

    • Project Marketplace: Browse, search, filter by tech stack. Add new projects with title, desc, tech tags, demo link.
    • Sponsor System: Sponsors offer funding/internships. Link to projects. Auto-merges duplicate sponsors.
    • Sponsor Scoring:
      • Avg rating (1-5 stars) from student feedback.
      • Visual badges (green ≥4, orange ≥3, red <3).
      • Track # reviews, projects sponsored.
      • Rate via modal after browsing sponsors.
    • Persistence: LocalStorage saves data across sessions.
    • Responsive Design: Mobile-friendly.
    • Filters & Search: Real-time on projects/sponsors.

    🏗️ Architecture (Scalable Blueprint)

    This is a prototype. For production:

    Frontend: React/Vue + Tailwind CSS
    Backend: Node.js/Express + MongoDB (schemas below)
    Auth: JWT/Firebase Auth
    Deployment: Vercel/Netlify (FE) + Heroku/Railway (BE)
    Real-time: Socket.io for notifications
    Payments: Stripe for funding
    

    DB Schema (MongoDB):

    // Projects
    { _id, title, desc, tech: [String], demo: String, sponsors: [{ sponsorId: ObjectId, score: Number }] }
    
    // Sponsors
    { _id, name, offer: String, projectsSponsored: [ObjectId], ratings: [Number], avgScore: Number }
    

    📈 Sponsor Scoring Logic

    • Avg = sum(ratings) / count
    • Updated live on projects/sponsor cards.
    • Students rate post-sponsorship (in prod, gate behind verification).

    Try it now: Add projects, sponsor them, rate sponsors—watch scores update dynamically! For full-stack code or expansions (e.g., user auth, matching algo), reply with details. 🕵️‍♂️

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.