A modern, responsive web application built with SvelteKit for managing vendor compliance questionnaires and vendor risk assessments.
Multiple Question Types:
Category Organization:
Split Layout Design:
Visual Progress Indicators:
Category Filtering:
Responsive Design:
src/
āāā lib/
ā āāā components/ # Reusable Svelte components
ā ā āāā VendorCard.svelte # Vendor card component
ā ā āāā ProgressBoxes.svelte # Progress indicator boxes
ā ā āāā CategoryFilter.svelte # Category filter buttons
ā ā āāā QuestionSidebar.svelte # Left sidebar with questions
ā ā āāā QuestionItem.svelte # Individual question in sidebar
ā ā āāā AnswerInput.svelte # Answer input (all types)
ā āāā data/
ā ā āāā vendors.ts # Vendor data exports
ā ā āāā comprehensive-vendor.ts # 200 question vendor
ā āāā types.ts # TypeScript interfaces
āāā routes/
ā āāā +layout.svelte # App layout with header
ā āāā +page.svelte # Vendor list page
ā āāā vendor/[id]/
ā āāā +page.ts # Page load function
ā āāā +page.svelte # Questionnaire orchestrator
āāā app.css # Global styles
āāā app.html # HTML template
The application follows proper component-based architecture:
# Install dependencies (if not already installed)
npm install
Option 1: Using npm (Recommended)
npm run dev
Option 2: Using the startup script
# Windows: Double-click start.bat or run:
start.bat
# Linux/Mac/Git Bash:
bash start.sh
Option 3: Using Node directly
node node_modules/vite/bin/vite.js dev --host
The application will be available at:
http://localhost:5173You can now access the app from any device on your network!
npm run build
npm run preview
The application comes with 4 pre-configured vendors:
TechSecure Global Services (Technology Services) - COMPREHENSIVE
CloudSecure Solutions (Technology)
DataGuard Analytics (Analytics)
PaymentTech Services (Financial Services)
Edit src/lib/data/vendors.ts to add new vendors:
{
id: 'vendor-4',
name: 'Your Vendor Name',
description: 'Vendor description',
industry: 'Industry',
questions: [
{
id: 'q1',
text: 'Your question?',
type: 'yes_no', // or 'multiple_choice' or 'text'
category: 'Data Security',
required: true,
options: ['Option 1', 'Option 2'] // for multiple_choice only
}
]
}
Edit the QuestionCategory type in src/lib/types.ts:
export type QuestionCategory =
| 'Data Security'
| 'Your New Category'
| ...;
The app uses CSS custom properties for easy theming:
Edit src/app.css to customize colors.
This project is open source and available under the MIT License.
create anopther button "Auto-Answered by AI" that auto fill the remaining unanswered questions. let's assume this is a response from the backend: [ { "question_id": {uuid}, "canonical_question_id": {uuid} "answer": { "type": "yes_no", "text" : "Y", "comment": "" }, "confidence_score": 0.87234, "status" : "LINKED }, { "question_id": {uuid}, "canonical_question_id": {uuid} "answer": { "type": "text", "text" : "We submit ISO compliance.....", "comment": "" }, "confidence_score": 0.77234, "status" : "CONFIRMATION_REQUIRED } ]
now, compare all the existing canonical_question_id from the response and matched it in the current filteredQuestions array then in order to mark it answered update the incidator