a tool that guides users through creating bylaws for co-operatives using ai-powered generation with ollama models.
- multi-step form for collecting co-operative information
- 12 ollama models to choose from (70B, 32B, and 8B parameter sizes)
- jurisdiction-specific bylaw generation (canadian provinces and territories)
- pdf export functionality
- real-time job processing with status updates
- works within vercel free tier (5-minute function timeout)
npm installfor async job processing:
- go to upstash.com and create a free account
- create a new redis database (free tier: 10,000 commands/day)
- copy the REST URL and token
copy the example file:
cp .env.example .envrequired environment variables:
# authentication
APP_PASSWORD=your-secure-password
# upstash redis (for job queue)
UPSTASH_REDIS_REST_URL=https://your-redis-instance.upstash.io
UPSTASH_REDIS_REST_TOKEN=your_upstash_token
# ollama api
OLLAMA_URL=https://roo.ai.hypha.coop/api/generate
OLLAMA_USERNAME=your-username
OLLAMA_PASSWORD=your-password
# frontend (for cors)
FRONTEND_URL=http://localhost:3000
REACT_APP_API_URL=# start both proxy server and react app
npm run devor run separately:
# terminal 1: proxy server
npm run proxy
# terminal 2: react app
npm startapp available at http://localhost:3000
# install vercel cli
npm i -g vercel
# run locally
vercel devsimulates production vercel environment locally.
-
push to github (make repo public for auto-deploy)
-
connect repository in vercel dashboard
-
set environment variables in vercel:
UPSTASH_REDIS_REST_URLUPSTASH_REDIS_REST_TOKENAPP_PASSWORDOLLAMA_URLOLLAMA_USERNAMEOLLAMA_PASSWORDFRONTEND_URL(your production url)REACT_APP_API_URL(empty string)
-
deploy:
git push origin mainor manually:
vercel --prod- ✅ automatic https
- ✅ serverless scaling
- ✅ built-in ci/cd
- ✅ 5-minute function timeout (hobby plan)
- ✅ free tier available
- qwen 3.5 35b (23 GB)
- gpt oss 120b (65 GB)
- mistral large (73 GB)
- cogito 70b (42 GB)
- deepseek r1 70b (42 GB)
- llama 3.3 70b (42 GB)
- hermes 3 70b (39 GB)
- qwen 3.5 9b (6 GB) - default
- qwen 3.5 27b (17 GB)
- qwen 3 32b (20 GB)
- gpt oss 20b (13 GB)
- qwen 3 coder (18 GB)
- qwen 3.5 2b (2.7 GB)
- qwen 3 8b (5.2 GB)
- hermes 3 8b (4.7 GB)
- gemma 3 (3.3 GB)
- submit job (
/api/jobs/submit): accepts form data, starts processing - poll status (
/api/jobs/status): frontend polls for progress - get results: results delivered when complete
- ✅ no timeout issues (processes within 5-minute limit)
- ✅ real-time progress updates
- ✅ fault tolerant (jobs persist in redis)
- ✅ works on vercel free tier
POST /api/auth/login- authenticate with APP_PASSWORDPOST /api/auth/logout- end sessionGET /api/auth/status- check auth status
POST /api/jobs/submit- submit bylaw generation jobGET /api/jobs/status?jobId=xxx- check job status and get results
- password-protected access
- secure session cookies
- cors restricted to frontend domain
- encrypted credentials support (optional)
npm run buildbuilds optimized production bundle to build/ folder.
see LICENSE file for details.