Spaces:
Running
Running
File size: 3,188 Bytes
60e766b 2e8ed7b 60e766b d438808 60e766b d438808 60e766b 4d0f530 d438808 60e766b d438808 60e766b 59baa12 d438808 60e766b d438808 60e766b 4d0f530 d438808 106df7f 60e766b d438808 60e766b d438808 59baa12 d438808 4d0f530 84af49c 4d0f530 84af49c 4d0f530 84af49c d438808 4d0f530 60e766b 4d0f530 851ed7a 993599f 851ed7a 09f6f9a 851ed7a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | ---
title: Demand Solution Board
emoji: 📌
colorFrom: blue
colorTo: green
sdk: docker
app_port: 7860
---
# Demand Solution Board
Community Demand -> Requirements Board.
Users submit product ideas and the app generates structured specs (features + tasks). Community members validate demand, developers coordinate implementation, and submitters approve solutions.
## Stack
- Next.js (App Router) + TypeScript
- Tailwind CSS
- Prisma + PostgreSQL (Supabase recommended)
- NextAuth (OIDC) + Prisma Adapter
- OpenAI API (optional; fallback generation if key is missing)
## Features
- OIDC login support (Google) for now
- Anonymous posting by default; logged-in submitters can show visible name
- Developer profiles (display name, headline, bio, links)
- Idea/task work votes: developers signal they are working on specific scope
- Task claim/unclaim, status updates, implementation links
- Solution submissions (app URL / GitHub repo / other)
- Idea submitter can approve a solution
- Solution like/unlike voting and threaded solution comments
- Cookie-based anonymous identity still supported for non-auth usage
## Run Locally
```bash
npm install
npm run prisma:generate
npx prisma db push
npm run dev
```
Open [http://localhost:3000](http://localhost:3000).
## Environment Variables
Copy `.env.example` to `.env`.
Required baseline:
- `DATABASE_URL` (set to Supabase Postgres URL)
- `AUTH_SECRET` (required for auth sessions)
- `AUTH_URL` (required in proxied hosting; for HF use your `.hf.space` domain)
Optional LLM:
- `OPENAI_API_KEY`
- `OPENAI_MODEL` (default: `gpt-4.1-mini`)
OIDC provider (currently enabled):
- `AUTH_GOOGLE_ID`, `AUTH_GOOGLE_SECRET`
## Supabase setup
1. Create a Supabase project.
2. In Supabase -> Settings -> Database, copy the connection string (URI).
3. In HF Space secrets, set:
- `DATABASE_URL` to Supabase Postgres URI
- keep `AUTH_SECRET`, `AUTH_GOOGLE_ID`, `AUTH_GOOGLE_SECRET`
4. Redeploy/restart Space.
The app runs `prisma db push` on startup, so schema is applied to your Supabase DB automatically.
## Deploy to Hugging Face Spaces (Docker)
This repo includes a `Dockerfile` for Spaces. `DATABASE_URL` is required at runtime; if missing, container startup fails fast with a clear error.
For OIDC in Spaces, set `AUTH_URL` to your direct Space domain (for this app: `https://jacksuyu-demandsolution-codex.hf.space`) and configure Google callback URL:
- `https://jacksuyu-demandsolution-codex.hf.space/api/auth/callback/google`
## Daily Social Requirement Sync (GitHub Actions)
This repo includes a daily workflow to collect user requirements from free social sources (Hacker News + StackOverflow), LLM-filter to clear software requirements, and auto-post accepted requirements into the live DemandSolution board (tagged `_social_`).
- Workflow file: `/Users/jacksu/projects/demandsolution_codex/.github/workflows/daily-social-requirements.yml`
- Schedule: daily at `13:15 UTC`
Required GitHub repository settings:
- Secret: `OPENAI_API_KEY` (optional; if invalid/missing, workflow falls back to heuristic acceptance)
- Variable: `DEMANDSOLUTION_SITE_URL` (example: `https://jacksuyu-demandsolution-codex.hf.space/`)
|