Visit the live site: pctracker.ca
PCTracker is up and running at pctracker.ca. You can browse PC components, compare benchmarks and used-market prices, plan builds, and check eBay listings.
I run PCTracker on a Hetzner VPS. Nginx handles the public web traffic and static files, while Gunicorn runs the Django application behind it:
Browser → Nginx → Gunicorn → Django → database
The frontend uses Django templates, HTML, CSS, and JavaScript. The application stores its catalog and account/build data in a database, and its eBay integration uses server-side API credentials to fetch listing prices.
I use this repository to keep selected snapshots of PCTracker's source code and development history. The live site keeps evolving, so a snapshot may be older than what is currently deployed, contain unfinished work, or need configuration changes before it runs in another environment.
This is a snapshot archive rather than a packaged release with a maintained installer. I share it so you can explore the code and adapt it for your own use. Private runtime settings, databases, logs, and credentials are excluded. Commit dates are preserved, but the sanitized history has different commit hashes from the original private snapshots.
You can configure a snapshot as your own Django instance and connect your own database. The outline below explains the pieces involved; it is not a promise that every historical snapshot will run unchanged.
Use a Python virtual environment and install the Python dependencies from
requirements.txt. Those pins record the snapshot's environment; review and
update them for your own deployment. The live site may use newer versions.
Copy
myproject/myproject/settings.py.example
to myproject/myproject/settings.py and adapt it for your environment:
- Set your own
DJANGO_SECRET_KEYin the process environment. The snapshot does not automatically load.envfiles. - Replace the
/var/www/pctracker/paths inSTATICFILES_DIRS,STATIC_ROOT, andLOGGINGwith paths on your machine. A console logging configuration is another option for local development. - For local HTTP development, use
DEBUG = True, allowlocalhostand127.0.0.1inALLOWED_HOSTS, and setSECURE_SSL_REDIRECT,SESSION_COOKIE_SECURE, andCSRF_COOKIE_SECUREtoFalsein your local settings. Keep the production HTTPS settings for a public deployment. - Use your own email configuration and
EMAIL_HOST_PASSWORD, or replace the example's SMTP settings block with Django's console email backend for local development. - Set your own
EBAY_CLIENT_IDandEBAY_CLIENT_SECRETif you want to fetch eBay listing prices. They are not needed just to start the application.
The settings example uses SQLite, with a local myproject/db.sqlite3 file.
You can keep that for your own instance, or edit Django's DATABASES setting to
use your own database server. For example, with PostgreSQL and the appropriate
Python driver installed:
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": os.environ["DB_NAME"],
"USER": os.environ["DB_USER"],
"PASSWORD": os.environ["DB_PASSWORD"],
"HOST": os.environ.get("DB_HOST", "127.0.0.1"),
"PORT": os.environ.get("DB_PORT", "5432"),
}
}Create that database and user yourself, then supply their connection values in your environment. See Django's database documentation for backend and driver requirements. Your instance has its own catalog, accounts, and builds; it does not connect to the live PCTracker database.
After installing dependencies and configuring your settings and database, run these commands from the repository root:
python myproject/manage.py check
python myproject/manage.py migrate
python myproject/manage.py runserver 127.0.0.1:8000Open http://127.0.0.1:8000. The entry point is myproject/manage.py; if you
first change into the myproject directory, the equivalent command is
python manage.py runserver.
To load the included catalog CSVs into your own database, you can also run this from the repository root:
python myproject/manage.py seed_parts --dir dataDjango's runserver
is for development. For a public instance, configure your own production hosting,
such as the Nginx and Gunicorn setup I use for the live site.