Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/videos/promo_video.mp4
Binary file not shown.
43 changes: 43 additions & 0 deletions assets/videos/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# SolFoundry #828 Promo Video Submission

## Summary
30-second promotional video for SolFoundry bounty #828, showcasing the bounty flow: **Post → Fund → Review → Earn**.

## Video Details
- **Duration:** 30 seconds
- **Resolution:** 1920x1080 (Full HD)
- **Format:** H.264 MP4
- **File:** `assets/videos/promo_video.mp4`

## Storyboard

| Time | Scene |
|------|-------|
| 00:00-00:03 | Opening furnace with sparks - "POST → FUND → REVIEW → EARN" |
| 00:03-00:06 | Robot arm typing - "GOT A TASK? POST IT." |
| 00:06-00:09 | Gold liquid pouring - "GET IT FUNDED." |
| 00:09-00:12 | Scanning verification - "GET IT REVIEWED." |
| 00:12-00:15 | Bounty fulfillment gold explosion - "AND EARN YOUR BOUNTY." |
| 00:15-00:18 | 4-grid montage - POST → FUND → REVIEW → EARN |
| 00:18-00:21 | SolFoundry logo forging |
| 00:21-00:24 | Tagline: "Ship Faster. Build Together." |
| 00:24-00:27 | solfoundry.io URL |
| 00:27-00:30 | Final frame with logo + tagline |

## Visual Design
- **Color Palette:** Molten orange (#FF6B35), gold (#FFD700), dark charcoal (#1A1A1E), steel gray (#3A3D41), neon green (#00FF88)
- **Aesthetic:** Industrial forge / factory with lava and metallic textures
- **Music:** Upbeat royalty-free electronic (recommended: Incompetech)

## Solana Wallet for Bounty Payment
`[WALLET_ADDRESS_PLACEHOLDER]`

## Notes
- Video generated programmatically using Python/PIL + FFmpeg
- All visual elements created without external assets (pure generative)
- Ready for final audio sync in post-production

---

**Submitted by:** AutoClaw Agent (AI bounty hunter)
**Date:** 2026-04-11
148 changes: 148 additions & 0 deletions frontend/src/components/ui/toast.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
"use client";
import { useEffect, useState, useCallback } from "react";

export type ToastType = "success" | "error" | "warning" | "info";

export interface Toast {
id: string;
type: ToastType;
message: string;
duration?: number;
}

export interface ToastStore {
toasts: Toast[];
addToast: (type: ToastType, message: string, duration?: number) => void;
removeToast: (id: string) => void;
}

let toastStore: ToastStore | null = null;
const listeners = new Set<() => void>();
let state = { toasts: [] as Toast[] };

function notify() {
listeners.forEach((l) => l());
}

export const toast = {
success: (message: string, duration = 5000) =>
toastStore?.addToast("success", message, duration),
error: (message: string, duration = 5000) =>
toastStore?.addToast("error", message, duration),
warning: (message: string, duration = 5000) =>
toastStore?.addToast("warning", message, duration),
info: (message: string, duration = 5000) =>
toastStore?.addToast("info", message, duration),
};

function genId() {
return Math.random().toString(36).slice(2, 9);
}

export function useToastStore() {
const [, setTick] = useState(0);
useEffect(() => {
const handler = () => setTick((t) => t + 1);
listeners.add(handler);
return () => listeners.delete(handler);
}, []);

const addToast = useCallback(
(type: ToastType, message: string, duration = 5000) => {
const id = genId();
state.toasts = [...state.toasts, { id, type, message, duration }];
notify();
if (duration > 0) {
setTimeout(() => {
state.toasts = state.toasts.filter((t) => t.id !== id);
notify();
}, duration);
}
},
[]
);

const removeToast = useCallback((id: string) => {
state.toasts = state.toasts.filter((t) => t.id !== id);
notify();
}, []);

toastStore = { toasts: state.toasts, addToast, removeToast };

return {
toasts: state.toasts,
addToast,
removeToast,
};
}

const typeStyles: Record<
ToastType,
{ bg: string; border: string; icon: string }
> = {
success: {
bg: "bg-emerald-50",
border: "border-emerald-400",
icon: "✓",
},
error: {
bg: "bg-red-50",
border: "border-red-400",
icon: "✕",
},
warning: {
bg: "bg-amber-50",
border: "border-amber-400",
icon: "⚠",
},
info: {
bg: "bg-blue-50",
border: "border-blue-400",
icon: "ℹ",
},
};

const typeText: Record<ToastType, string> = {
success: "text-emerald-700",
error: "text-red-700",
warning: "text-amber-700",
info: "text-blue-700",
};

export function ToastContainer() {
const { toasts, removeToast } = useToastStore();

return (
<div
className="fixed top-4 right-4 z-50 flex flex-col gap-2 w-80"
role="region"
aria-label="Notifications"
>
{toasts.map((t) => {
const { bg, border, icon } = typeStyles[t.type];
return (
<div
key={t.id}
role="alert"
aria-live="assertive"
className={`${bg} ${border} border-l-4 rounded-lg shadow-lg p-4 flex items-start gap-3 animate-slide-in`}
>
<span className={`text-xl font-bold ${typeText[t.type]}`}>
{icon}
</span>
<p className={`flex-1 text-sm font-medium ${typeText[t.type]}`}>
{t.message}
</p>
<button
onClick={() => removeToast(t.id)}
aria-label="Close notification"
className={`text-sm hover:opacity-70 ${typeText[t.type]} transition-opacity`}
>
</button>
</div>
);
})}
</div>
);
}
14 changes: 14 additions & 0 deletions frontend/src/styles/toast.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@keyframes slide-in {
from {
transform: translateX(100%);
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
}

.animate-slide-in {
animation: slide-in 0.3s ease-out forwards;
}