Building real things live โ one season at a time.
Watch live on Twitch, YouTube, or Kick ๐ All social links & more: linktr.ee/ali_run
This repo documents how the stream is structured: seasons, episodes, and the "frameworks" we use to build real things live.
Each season is focused on building or evolving one main project.
| Season | Project | Description |
|---|---|---|
| 1 | StreamSaga | Viewer proposal + voting app |
| 2+ | TBD | Decided later (possibly via StreamSaga) |
Every season starts with a Season Planning episode.
Each episode is one stream inside a season.
- Starts with an Episode Planning segment
- Defines what we try to ship today
- Pulls from: Season goals, Chat proposals, StreamSaga votes
A constantly evolving methodology for how we approach different parts of the work.
Reusable methodologies, checklists, and best practices. Contributions welcome!
| Framework | Description | Status |
|---|---|---|
| ๐ PRD | Product Requirements Documents | โ Available |
| ๐๏ธ Architecture | System design & patterns | โ Available |
| ๐ป Development | Development practices & tooling | โ Available |
| DevOps | CI/CD, deployment, infrastructure | ๐ Coming soon |
| DeFi | Decentralized finance protocols | ๐ Coming soon |
| Trading | Trading systems & strategies | ๐ Coming soon |
| Security | Security practices & audits | ๐ Coming soon |
| Testing | Test strategies & automation | ๐ Coming soon |
| Debugging | Troubleshooting methodologies | ๐ Coming soon |
| Reverse Engineering | Code analysis & understanding | ๐ Coming soon |
Over time, these frameworks should become more concrete: principles, checklists, do/don't, common patterns.
Tagline: Every episode forged by you
๐ Project: github.com/Alirun/StreamSaga
Goal: Build a web app that lets viewers:
- Log in via Email or Twitch
- Propose ideas for the stream / next episodes
- Vote on proposals
- Use it live on stream as the decision layer
๐ Tech Stack
- Frontend: Next.js
- Backend: Supabase (database + vector search + auth)
- Deployment: Cloudflare Workers + OpenNext
๐ Season 1 Documentation
| Document | Description |
|---|---|
| ๐ PRD | Product Requirements Document |
| โ TODO | Current tasks & backlog |
๐ฅ Episodes
Focus:
- Define the PRD for StreamSaga:
- User roles (viewer, host)
- Proposal model
- Voting rules & weight system
- First UI flow sketches
- Download, install, and test Google Antigravity
- Use Antigravity to generate/assist with the first features of the app
Focus:
- Define AI Coding Rules to control agent behavior:
- Enforcing implementation plans
- Preventing hallucinations
- Create and enforce the Architecture Documentation (
ARCHITECTURE.md) as a source of truth - Implement Supabase Authentication:
- Email/Password flows (Sign up, Sign in)
- Handling auth callbacks and email confirmation
- Integrating Twitch OAuth
- Explore Google Antigravity features:
- Setting up
.agent/rules - Creating custom Workflows to automate documentation updates
- Setting up
Focus:
- Refine AI Coding Rules:
- Add rules for "Feature Planning Notes" and Architecture updates
- Integrate the PRD into the agent's context
- Implement Access Control Level (ACL):
- Role-based middleware to protect Admin routes
- Using Supabase
app_metadatato manage Admin roles - Gated UI access (hiding Admin menus for non-admins)
- Build Topic Management with Realtime updates:
- Create "Add Topic" workflow
- Implement Supabase Realtime for instant list updates
- Refactor logic into a Service Layer pattern
- Implement Vector Search:
- Generate embeddings for topics using OpenAI API
- Store vectors in Supabase (using
pgvector) - Create a "Pre-insert Search" to find similar topics via vector similarity
Focus:
- Address critical React Server Components (RSC) Vulnerability:
- Identify Remote Code Execution (RCE) risk in current version
- Upgrade React and Next.js packages to patch the security hole
- Connect Dashboard to Real Data:
- Replace mock UI data with live Supabase fetching
- Implement real-time UI updates for new topics
- Implement Vector Search for Proposals:
- Generate OpenAI embeddings for new proposals
- Detect and prevent duplicate submissions via semantic similarity
- Tune similarity thresholds to balance strictness
- Troubleshooting AI & Database Migrations:
- Recover from corrupted migration history (AI modified applied migrations)
- Enforce "never modify applied migrations" rule
- Implement Service Role Admin Client:
- Resolve Row Level Security (RLS) errors on archive actions
- Create a secure server-side client to bypass RLS for privileged operations
Focus:
- Complete Core Functionality:
- Implement Vote & Unvote logic (using soft deletes to preserve data)
- Enforce database integrity with unique indexes (preventing duplicate votes)
- Fix critical UI interactions (Vote button triggering form submissions)
- Build Admin Resolution Workflow:
- Create "Manage Topic" interface for Admins
- Implement "Resolve Topic" logic: Approve winning proposals and Close the topic simultaneously
- Lock down closed topics to prevent further edits or submissions
- Implement Security & Rate Limits:
- Analyze abuse vectors (OpenAI Embeddings costs, Supabase limits)
- Integrate Cloudflare Rate Limiter bindings
- Apply rate limiting specifically to the Embeddings generation to prevent API cost overruns
- Production Deployment to Cloudflare:
- Configure the Next.js app for Cloudflare Workers using OpenNext
- Setup Wrangler for deployment management and secret handling
- Manage production environment variables (Supabase keys, OpenAI keys)
- Go Live: First successful deployment to a public URL
Focus:
- Production Domain Setup:
- Connect custom domain (streamsaga.space) via Cloudflare
- Update Wrangler configuration (wrangler.toml) for production routes and DNS management
- Full System Reset & Testing:
- Wipe Supabase database to validate the complete user onboarding flow from scratch
- Identify critical bugs in the sign-up process (broken redirects, confusing UX)
- Debugging Cloudflare & Supabase Auth:
- Troubleshoot email confirmation links incorrectly redirecting to localhost
- Deep dive into Cloudflare Worker logs (Observability, wrangler tail, structured logging) to trace request headers
- Configure Supabase SITE_URL and redirect allow-lists to support specific production environments
- Resolve environment variable conflicts between local development and production builds
- UX Polish:
- Replace default "ugly" Supabase email templates with custom, professionally designed HTML templates
- Fix post-signup redirection logic to ensure users land on the correct login/dashboard pages
Focus:
- Authentication Polish & Web3 Integration:
- Fix email confirmation redirects to ensure users are automatically logged in upon verification
- Implement "Sign in with Ethereum" using Supabase Auth and MetaMask
- Handle wallet-only user sessions and verify database integrity for users without emails
- Complete Password Reset Architecture:
- Build the full "Forgot Password" and "Update Password" UI flows
- Implement server-side actions to handle secure password recovery
- Apply custom HTML styling to the password reset email templates
- Critical Security & Maintenance:
- Perform urgent upgrade of React and Next.js to patch newly discovered security vulnerabilities
- Audit dependencies to ensure a clean security state before production use
- Admin Features & UI Refinement:
- Implement logic to Close and Archive topics in the Admin panel
- Switch global date formatting to relative time (e.g., "2 hours ago") for better UX
- Conduct full end-to-end testing of the application (User and Admin roles)
Focus:
- Infrastructure & Email Reliability:
- Bypass Supabase default email rate limits by integrating Resend as a custom SMTP server
- Configure essential DNS records (MX, SPF, DKIM) for the streamsaga.space domain to ensure deliverability
- Troubleshoot spam classification and URL mismatch issues in password reset flows
- User Identity & Experience:
- Implement a Deterministic Identity System to replace raw User IDs/Emails in the UI
- Generate consistent, "fun" usernames (e.g., "Plasma Circuit") and unique avatars for every user based on their ID
- Build Auth Guardian middleware to redirect unauthenticated users when accessing protected actions (like "Submit Proposal")
- Feature Completion & Optimization:
- Activate "Top" and "Newest" sorting logic for proposals
- Refactor Sorting Logic: Move from inefficient database queries to client-side sorting to reduce DB read costs
- Fix UX bugs: Auto-select the correct topic when navigating to submission forms
- SEO & Production Polish:
- Implement standard SEO files: robots.txt and dynamic sitemap.xml
- Add dynamic page titles and description metadata
- Dashboard Redesign: Restructure UI into a "tree view" and move Search to the global header (wip)
Focus:
- Final UI Polish & Search Implementation:
- Re-implement the Global Search feature (previously cut) to find topics and proposals.
- Fix Sidebar navigation bugs to maintain active state on selected topics.
- Optimize mobile layout responsiveness for smaller screens.
- Performance Optimization:
- Audit and refactor data fetching to eliminate redundant network requests.
- Improve application speed and reduce server load before final launch.
- SEO & Social Infrastructure:
- Build dynamic Open Graph (OG) image generation for rich social media previews.
- Ensure shared links on X/Twitter and LinkedIn display custom branding and context.
- Privacy-First Analytics:
- Integrate Rybit to track user metrics without requiring GDPR cookie consent banners.
- Verify live traffic tracking on the production environment.
- Deployment & Season 2 Announcement:
- Successfully deploy the finalized StreamSaga application to production (streamsaga.space).
- Reveal Season 2 Roadmap: Building a PolyMarket Trading Bot.
- Outline goals for Season 2: Reverse engineering APIs, automated market making, and Web3 integration.
Season 2 will be a new project, chosen later (possibly via StreamSaga once it's live).
Stay updated and join the live builds:
- ๏ฟฝ Twitch: twitch.tv/ali_run
- ๐บ YouTube: youtube.com/@ali_run
- ๐ข Kick: kick.com/ali-run
- ๐ณ Linktree: linktr.ee/ali_run (All social links)
| Resource | Link |
|---|---|
| ๐ฎ Twitch | twitch.tv/ali_run |
| ๐บ YouTube | youtube.com/@ali_run |
| ๐ข Kick | kick.com/ali-run |
| ๐ณ Linktree (Socials) | linktr.ee/ali_run |
| ๐ StreamSaga Project | github.com/Alirun/StreamSaga |
| ๐ Season 1 PRD | seasons/1_StreamSaga/prd.md |
| โ Season 1 TODO | seasons/1_StreamSaga/todo.md |
| ๐ PRD Framework | frameworks/prd.md |