Skip to content

rtweera/compfigurator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compfigurator

Compfigurator is a rule-based expert system for recommending complete PC builds based on a user’s intended workload and budget.

It uses:

  • Experta for the knowledge-engine/rule system
  • Streamlit for an interactive chat-style UI
  • A JSON knowledge base containing tasks, budget allocation rules, components, and explanations

What it does

Given:

  1. a target workload (for example, gaming or machineLearning)
  2. a budget

the system selects compatible components and returns:

  • a best configuration
  • alternative configurations
  • a confidence/score and itemized pricing
  • short per-component explanations (task-aware where available)

Supported workload types

Current workload/task keys in the knowledge base:

  • scientific
  • machineLearning
  • graphicDesign
  • engineering
  • gaming
  • office
  • softwareDevelopment
  • videoEditingAndAnimation
  • contentCreation
  • homeTheatre
  • general

Repository structure

compfigurator/
├── compfigurator/
│   ├── __init__.py
│   ├── main.py               # Expert system engine (CLI entry style)
│   ├── streamlit_app.py      # Streamlit UI
│   └── knowledge_base.json   # Tasks, components, and explanation rules
├── tests/
├── pyproject.toml
└── README.md

Prerequisites

  • Python (project currently declares ^3.12 in pyproject.toml)
  • Poetry for dependency management

Install Poetry (if needed):

pip install poetry

Setup

From the repository root:

poetry install

Optional Poetry environment commands:

poetry env use python3.12
poetry shell

Exit the virtual environment:

exit

Running the application

1) Streamlit UI (recommended)

From repository root:

poetry run streamlit run compfigurator/streamlit_app.py

What to expect:

  • On startup, the app lists available workload types.
  • You provide workload, then budget.
  • The app returns the best build and can show alternatives.
  • “View Knowledge Base” displays loaded data in tabs.

2) CLI flow (expert engine)

From repository root:

poetry run python compfigurator/main.py

The CLI prompts for workload and budget, then prints the selected configuration and an alternative.

How selection works (high level)

The engine progressively applies compatibility and budget constraints in this order:

  1. CPU
  2. Motherboard (socket/chipset compatibility)
  3. GPU (PCIe slot and budget constraints)
  4. RAM (DDR type + speed constraints)
  5. Storage (interface compatibility)
  6. Monitor (remaining budget suitability)

Then it:

  • computes a configuration score
  • keeps the best-scoring option
  • stores other valid options as alternatives

Knowledge base and customization

Main data file:

  • compfigurator/knowledge_base.json

You can customize:

  • workload/task definitions (taskRequirements)
  • budget allocation percentages (budgetAlloc)
  • component catalogs (processors, motherboards, gpus, ram, storage, monitors)
  • explanation strings per component (explain)

When changing schema keys, ensure compfigurator/main.py still matches expected names.

Development commands

Install/update/remove dependencies:

poetry add <package_name>
poetry remove <package_name>
poetry update

Run any command in the Poetry environment:

poetry run <command>

Run tests:

poetry run pytest

Troubleshooting

poetry: command not found

Install Poetry first:

pip install poetry

Experta compatibility issues

This repository currently declares Python ^3.12 in pyproject.toml.
If you encounter runtime/dependency issues with experta in your local environment, use the same Python version configured for the project and recreate the Poetry environment:

poetry env remove --all
poetry env use python3.12
poetry install

Path issues on Windows vs Unix-like systems

Use / separators in shell commands from this README. If you adapt commands for Windows shells, adjust paths accordingly.

About

Computer configurator expert system developed using Experta and Streamlit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages