QUICKSTART.md•7.82 kB
# Quick Start - Visual Guide
```
┌─────────────────────────────────────────────────────────────┐
│ │
│ 👉 DOUBLE-CLICK "START.bat" TO BEGIN! 👈 │
│ │
└─────────────────────────────────────────────────────────────┘
▼
╔═══════════════════════════════════════════════════════════════╗
║ ║
║ MCP QUOTING SYSTEM - MAIN LAUNCHER ║
║ ║
║ [1] First Time Setup ────────► Installs everything ║
║ [2] Start Dev Server ────────► Best for development ║
║ [3] Start Prod Server ────────► For production use ║
║ [4] Quick Test ───────────────► Automated testing ║
║ [5] Stop Server ──────────────► Shutdown safely ║
║ [6] Build Project ────────────► Compile TypeScript ║
║ [7] View Quotes ──────────────► See database ║
║ [8] Reset Database ───────────► Restore sample data ║
║ [9] Open Browser ─────────────► http://localhost:3789 ║
║ ║
╚═══════════════════════════════════════════════════════════════╝
```
## 📁 Project Structure After Setup
```
Quoting/
│
├── 🚀 START.bat ← YOUR MAIN LAUNCHER
├── 📋 BATCH-FILES-README.md ← Batch file documentation
├── 📖 README.md ← Full project documentation
├── 📝 CHANGELOG.md ← Version history
│
├── ⚙️ Batch Files (Windows Shortcuts)
│ ├── setup.bat ← First-time setup wizard
│ ├── start-dev.bat ← Start development server
│ ├── start-prod.bat ← Start production server
│ ├── stop.bat ← Stop server
│ ├── quick-test.bat ← Run automated tests
│ ├── build.bat ← Rebuild project
│ ├── view-quotes.bat ← View database
│ └── reset-database.bat ← Reset to sample data
│
├── 🔧 Configuration
│ ├── .env ← Your settings (create from .env.example)
│ ├── .env.example ← Template
│ ├── package.json ← Dependencies
│ └── tsconfig.json ← TypeScript config
│
├── 💾 data/ ← Database files
│ ├── quotes.json ← Active historical quotes
│ ├── sample-quotes.json ← Sample data (backup)
│ └── evaluations.json ← Recent RFQ evaluations
│
├── 📦 src/ ← Source code
│ ├── index.ts ← Main server & MCP endpoints
│ ├── types.ts ← Type definitions
│ ├── config.ts ← Pricing & configuration
│ ├── parser.ts ← RFP parsing logic
│ ├── matcher.ts ← Similarity matching
│ ├── estimator.ts ← Cost & lead time estimation
│ ├── generator.ts ← Quote document generation
│ ├── storage.ts ← Database operations
│ └── test-client.ts ← Testing utilities
│
├── 📦 node_modules/ ← Dependencies (auto-created)
└── 🏗️ dist/ ← Compiled files (auto-created)
```
---
## 🎯 Typical Workflow
### First Time Ever
```
1. Double-click START.bat
2. Choose [1] First Time Setup
3. Wait for installation (2-3 minutes)
4. Edit .env file if you need email
5. Done! ✅
```
### Daily Development
```
1. Double-click START.bat
2. Choose [2] Start Development Server
3. Server runs on http://localhost:3789
4. Make code changes in src/
5. Changes auto-reload!
6. Test with curl/Postman/browser
```
### Testing Your Changes
```
Option A: Automated
├─ Double-click START.bat
├─ Choose [4] Quick Test
└─ See results
Option B: Manual
├─ Start dev server (option 2)
├─ Use curl/Postman to send RFQs
└─ Check console output
```
### Production Deployment
```
1. Double-click START.bat
2. Choose [6] Build Project
3. Choose [3] Start Prod Server
4. Server optimized and running! 🚀
```
---
## 📡 API Testing Examples
### Using curl (Windows PowerShell or Git Bash)
```bash
# Get historical quotes
curl http://localhost:3789/mcp/utility/historicalQuotes
# Evaluate an RFQ
curl -X POST http://localhost:3789/mcp/invoke/evaluateRfpAndDraftQuote ^
-H "Content-Type: application/json" ^
-d "{\"rfp\":{\"rawText\":\"Need 150 pcs 6061 aluminum, CNC machined, anodized\",\"qty\":150}}"
# View health status
curl http://localhost:3789/health
```
### Using PowerShell (native)
```powershell
# Get historical quotes
Invoke-RestMethod -Uri http://localhost:3789/mcp/utility/historicalQuotes
# Evaluate an RFQ
$body = @{
rfp = @{
rawText = "Need 150 pcs 6061 aluminum, CNC machined, anodized"
qty = 150
contactEmail = "buyer@example.com"
}
} | ConvertTo-Json
Invoke-RestMethod -Uri http://localhost:3789/mcp/invoke/evaluateRfpAndDraftQuote `
-Method Post `
-Body $body `
-ContentType "application/json"
```
### Using Browser
Just open: http://localhost:3789/mcp/utility/historicalQuotes
---
## 🎨 Menu System Features
The **START.bat** launcher includes:
✅ **Color-coded** interface (green text)
✅ **Number-based** selection (just press 1-9)
✅ **Automatic** dependency checking
✅ **Clear instructions** at each step
✅ **Error handling** with helpful messages
✅ **Return to menu** after each operation
---
## 🆘 Common Issues & Solutions
### Issue: "npm is not recognized"
**Solution:** Install Node.js from https://nodejs.org/
### Issue: Port already in use
**Solution:** Run option [5] Stop Server, then try again
### Issue: Build errors
**Solution:**
1. Delete `node_modules` folder
2. Run option [1] First Time Setup
### Issue: Database empty
**Solution:** Run option [8] Reset Database
### Issue: Server won't start
**Solution:** Check console for errors, run `npm install` manually
---
## 💡 Pro Tips
- Keep START.bat open while working
- Use option [2] for development (auto-reload)
- Use option [3] for demos/production
- Reset database often during testing
- Check CHANGELOG.md for version history
- Read BATCH-FILES-README.md for advanced usage
---
## 📚 Additional Resources
- **Full Documentation:** README.md
- **Batch File Guide:** BATCH-FILES-README.md
- **Change Log:** CHANGELOG.md
- **Example Document:** MCP_Examples.docx
---
**Ready to start?** Double-click **START.bat** and choose option [1]! 🚀