Skip to content

ricvale/proposal-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Proposal Engine

Turn a rough client brief into a polished, structured project proposal — generated by AI, editable in the browser, exportable as a PDF.

How it works

  1. Brief — fill in the client brief (title, project type, budget/timeline hints, tech stack) at /proposals/create.
  2. Generate — the ProposalWriter agent (built on Laravel AI) produces a structured proposal, personalized with your profile context from /profile.
  3. Edit — refine the generated sections in the proposal editor.
  4. Export — download the finished proposal as a PDF (dompdf).

Stack

  • PHP 8.3 / Laravel 13, Livewire 4
  • Laravel AI with structured outputs (provider-agnostic: Ollama locally, Anthropic for production-quality output)
  • SQLite, database queue
  • barryvdh/laravel-dompdf for PDF export
  • Pest, Larastan (PHPStan), Pint

Installation

Requirements: PHP 8.3+, Composer, Node.js 20+, and (for local AI) Ollama. SQLite is used out of the box — no database server needed.

git clone https://github.com/ricvale/proposal-engine.git
cd proposal-engine
composer setup

composer setup does everything in one go: installs PHP and npm dependencies, creates .env, generates the app key, runs migrations, and builds frontend assets. Prefer manual steps? They are:

composer install
cp .env.example .env
php artisan key:generate
php artisan migrate
npm install
npm run build

AI provider

Proposal generation is configured in config/proposal.php via two env vars:

AI_PROVIDER=ollama
AI_MODEL="granite4.1:3b"
  • Ollama (default, free, offline): install Ollama and pull the model: ollama pull granite4.1:3b. On a 16 GB machine, granite4.1:3b is the model known to work reliably with schema-constrained generation — larger models grind or don't fit.
  • Anthropic (client-quality output): set AI_PROVIDER=anthropic, ANTHROPIC_API_KEY=..., and an exact model ID such as AI_MODEL=claude-sonnet-5 (wrong IDs return 404).

Running

composer dev

Then open http://localhost:8000. This single command runs the HTTP server, queue worker, and Vite together. Generation itself runs synchronously in the request (expect a wait of a minute or two with local models), so the queue worker isn't strictly required.

Using Laravel Herd, the app is served at http://proposalengine.test; run npm run dev alongside it for assets (or use the built assets from npm run build).

Testing & quality checks

composer test                  # Pest test suite
vendor/bin/phpstan analyse     # static analysis (Larastan)
vendor/bin/pint --test         # code style check (drop --test to fix)

Routes

Route Purpose
GET /proposals List proposals
GET /proposals/create New brief form
POST /proposals Generate a proposal
GET /proposals/{proposal}/edit Edit a proposal
GET /proposals/{proposal}/pdf Download as PDF
DELETE /proposals/{proposal} Delete a proposal
GET /profile Edit profile context used to personalize generation

About

AI-powered proposal generator: client brief in, structured draft out, edit in the browser, export as PDF.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages