Go to file
directlx 38c59264fe Increase nav logo size
Bump logo from h-9 to h-14 and nav height from h-16 to h-20.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 08:07:24 -05:00
instance Initial commit 2026-01-24 18:58:24 -05:00
static Redesign site to dark SaaS aesthetic with original brand colors 2026-03-01 07:31:57 -05:00
templates Increase nav logo size 2026-03-02 08:07:24 -05:00
venv Apply .gitignore to existing files 2026-01-24 19:01:24 -05:00
.env.example Initial commit 2026-01-24 18:58:24 -05:00
.gitignore Add venv/ and instance/ to .gitignore 2026-01-26 12:41:18 -05:00
README.md Initial commit 2026-01-24 18:58:24 -05:00
app.py Configure app for Nginx Proxy Manager reverse proxy. Add ProxyFix middleware to Flask and X-Forwarded-Host header to nginx config for proper proxy header handling. 2026-01-25 16:49:39 -05:00
config.py Fix SECRET_KEY property issue 2026-01-25 11:22:20 -05:00
deploy.sh Initial commit 2026-01-24 18:58:24 -05:00
directlx.service Initial commit 2026-01-24 18:58:24 -05:00
models.py Initial commit 2026-01-24 18:58:24 -05:00
nginx.conf Add default_server to nginx listen directive to handle requests without matching Host header from Nginx Proxy Manager 2026-01-26 12:40:35 -05:00
package-lock.json Initial commit 2026-01-24 18:58:24 -05:00
package.json Initial commit 2026-01-24 18:58:24 -05:00
requirements.txt Initial commit 2026-01-24 18:58:24 -05:00
tailwind.config.js Redesign site to dark SaaS aesthetic with original brand colors 2026-03-01 07:31:57 -05:00
wsgi.py Initial commit 2026-01-24 18:58:24 -05:00

README.md

DirectLX.dev

Company website for DirectLX built with Flask, HTMX, and Tailwind CSS.

Tech Stack

  • Backend: Python Flask with Flask-SQLAlchemy
  • Database: SQLite
  • Frontend: HTMX for dynamic interactions, Tailwind CSS for styling
  • Templating: Jinja2
  • Production: Gunicorn + Nginx

Features

  • Company pages (Home, About, Services, Contact)
  • Blog with search and pagination
  • Community forum with categories, topics, and replies
  • HTMX-powered forms and dynamic content loading
  • Responsive design

Project Structure

directlx.dev/
├── app.py                 # Flask application & routes
├── config.py              # Configuration settings
├── models.py              # SQLAlchemy models
├── wsgi.py                # WSGI entry point
├── requirements.txt       # Python dependencies
├── package.json           # Node dependencies (Tailwind)
├── tailwind.config.js     # Tailwind configuration
├── templates/
│   ├── base.html          # Base layout
│   ├── index.html         # Home page
│   ├── about.html         # About page
│   ├── services.html      # Services page
│   ├── contact.html       # Contact page
│   ├── blog/              # Blog templates
│   └── forum/             # Forum templates
├── static/
│   ├── css/
│   │   ├── input.css      # Tailwind source
│   │   └── styles.css     # Compiled CSS
│   ├── js/
│   │   └── htmx.min.js    # HTMX library
│   └── images/
│       └── directLX_small.png
├── instance/
│   └── directlx.db        # SQLite database
├── nginx.conf             # Nginx configuration
├── directlx.service       # Systemd service
└── deploy.sh              # Deployment script

Local Development

Prerequisites

  • Python 3.10+
  • Node.js (for Tailwind CSS)

Setup

# Clone and enter directory
cd directlx.dev

# Create Python virtual environment
python3 -m venv venv
source venv/bin/activate

# Install Python dependencies
pip install -r requirements.txt

# Install Node dependencies and build CSS
npm install
npm run build:css

# Run development server
python app.py

Open http://localhost:5000

Tailwind CSS

Watch for changes during development:

npm run watch:css

Rebuild CSS after template changes:

npm run build:css

Production Deployment

Automated Deployment

sudo ./deploy.sh

Manual Deployment

  1. Copy files to server:

    sudo mkdir -p /var/www/html/directlx.dev
    sudo cp -r app.py config.py models.py wsgi.py requirements.txt templates static /var/www/html/directlx.dev/
    
  2. Set up Python environment:

    cd /var/www/html/directlx.dev
    sudo python3 -m venv venv
    sudo venv/bin/pip install -r requirements.txt
    
  3. Create environment file:

    echo "SECRET_KEY=$(python3 -c 'import secrets; print(secrets.token_hex(32))')" | sudo tee .env
    
  4. Set permissions:

    sudo chown -R www-data:www-data /var/www/html/directlx.dev
    sudo chmod -R 755 /var/www/html/directlx.dev
    
  5. Install systemd service:

    sudo cp directlx.service /etc/systemd/system/
    sudo systemctl daemon-reload
    sudo systemctl enable --now directlx
    
  6. Configure Nginx:

    sudo cp nginx.conf /etc/nginx/sites-available/directlx.dev
    sudo ln -sf /etc/nginx/sites-available/directlx.dev /etc/nginx/sites-enabled/
    sudo nginx -t && sudo systemctl reload nginx
    

Useful Commands

# Check application status
sudo systemctl status directlx

# View application logs
sudo journalctl -u directlx -f

# Restart application
sudo systemctl restart directlx

# Reload Nginx
sudo systemctl reload nginx

Environment Variables

Variable Description Required
SECRET_KEY Flask secret key for sessions Yes (production)
DATABASE_URL Database connection string No (defaults to SQLite)

Database Models

  • User - User accounts with authentication
  • BlogPost - Blog articles with slugs
  • ForumCategory - Forum category organization
  • ForumTopic - Discussion topics
  • ForumReply - Topic replies
  • ContactMessage - Contact form submissions

API Routes

Route Description
/ Home page
/about About page
/services Services page
/contact Contact page
/blog Blog listing
/blog/<slug> Single blog post
/forum Forum categories
/forum/<slug> Category topics
/forum/<slug>/<id> Topic with replies

License

All rights reserved.