Skip to content

Latest commit

 

History

History
119 lines (92 loc) · 3.15 KB

File metadata and controls

119 lines (92 loc) · 3.15 KB

Quick Start Guide

Step 1: Install Dependencies

cd /home/anthony/wikip.co/alchemy-app
pip install -r requirements.txt

Step 2: Initialize Database

python -m import.import_articles --init --db health.db

This creates the database schema. You should see: "Database schema initialized"

Step 3: Import Articles

python -m import.import_articles --db health.db --articles ../site/source/_posts/Natural\ Healing

This will:

  • Scan all markdown files in the Natural Healing directory
  • Parse each article
  • Extract citations, healing properties, treatments, etc.
  • Import everything into the database

You should see progress messages like:

Found X markdown files to import
Processing: article-name.md (Natural Healing/Category)
  ✓ Imported: Article Title

Step 4: Run the Application

python run.py

Or:

export FLASK_APP=app
flask run

The app will start on http://localhost:5000 (or http://127.0.0.1:5000)

Step 5: Test the Application

Test Article Browsing

  1. Open http://localhost:5000 in your browser
  2. Click "Articles" in the navigation
  3. You should see a list of imported articles
  4. Click on any article to view details

Test Search

  1. Click "Search" in the navigation
  2. Enter a search term (e.g., "garlic", "antioxidant")
  3. View search results

Test Alchemy Builder

  1. Click "Alchemy" in the navigation
  2. Use the search/filter to find articles
  3. Click "Add to Protocol" on some items
  4. Enter a protocol name and description
  5. Click "Create Protocol"

Test Protocol Management

  1. Click "Protocols" in the navigation
  2. View your created protocols
  3. Click on a protocol to see details and combined properties
  4. Try editing or deleting a user-created protocol

Test Citation Linking

  1. Open any article detail page
  2. Look for citation references like [1] in the content
  3. Click on a citation reference - it should scroll to the citation
  4. Check the citations section at the bottom

Troubleshooting

Import Errors

  • Make sure the path to Natural Healing directory is correct
  • Check that markdown files are readable
  • Look for error messages in the import output

Database Errors

  • If database doesn't exist, run --init first
  • Check file permissions on the database file
  • Try deleting health.db and re-initializing

Flask Errors

  • Make sure all dependencies are installed: pip install -r requirements.txt
  • Check that the database file exists
  • Look at the Flask console output for error messages

Template Errors

  • Make sure you're accessing the app through the Flask server (not directly opening HTML files)
  • Check browser console for JavaScript errors

Testing Checklist

  • Database initialized successfully
  • Articles imported (check count in import output)
  • Home page loads
  • Articles page shows list of articles
  • Article detail page displays content
  • Search returns results
  • Category browsing works
  • Alchemy builder allows item selection
  • Protocol creation works
  • Protocol detail shows combined properties
  • Citations are linked and clickable
  • Protocol editing works
  • Protocol deletion works