Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

allthingslinux/allthingslinux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

442 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

All Things Linux

Deploy to Production Deploy to Dev

The official website for All Things Linux (allthingslinux.org).

πŸš€ Quick Start

# Clone & setup
git clone https://github.com/allthingslinux/allthingslinux.git
cd allthingslinux
pnpm install

# Set up secrets
cp .env.secrets.example .env.secrets
# Edit .env.secrets with your actual secrets

# Start development
pnpm run dev:all

Open http://localhost:3000 for Next.js dev, or http://localhost:8788 for Cloudflare Workers simulation.

πŸ“‹ Tech Stack

  • Framework: Next.js 15 (App Router)
  • Styling: Tailwind CSS
  • Content: Contentlayer (MDX blogs)
  • Deployment: Cloudflare Workers + OpenNext
  • Background Jobs: Trigger.dev
  • Package Manager: pnpm

πŸ“‹ Prerequisites

  • Node.js (see package.json engines field)
  • pnpm - npm install -g pnpm
  • Cloudflare Account (for deployments & secrets)
  • Trigger.dev Account (for background jobs)

πŸ› οΈ Setup & Development

1. Clone & Install

git clone https://github.com/allthingslinux/allthingslinux.git
cd allthingslinux
pnpm install

2. Configure Secrets

# Copy templates for environment-specific secrets
cp .env.secrets.dev.example .env.secrets.dev    # Development (sandbox)
cp .env.secrets.prod.example .env.secrets.prod  # Production
# Edit each file with appropriate credentials (gitignored)

# Upload secrets to Cloudflare (when needed for deployment)
# pnpm run secrets:dev   # Upload dev/sandbox secrets
# pnpm run secrets:prod  # Upload production secrets

3. Start Development

pnpm run dev:all  # Next.js + Wrangler + Trigger.dev

URLs:

πŸš€ Deployment

Automatic Deployments

Git-based deployments via Cloudflare Workers Builds:

Branch Environment URL
main Production allthingslinux.org
dev Development allthingslinux-dev.allthingslinux.workers.dev

Setup: See Workers Builds Setup Guide for detailed configuration.

Quick setup: Connect your GitHub repo in Cloudflare Dashboard β†’ Workers β†’ Builds and configure:

  • Production branch deploy: pnpm install && pnpm run build:all && pnpm exec opennextjs-cloudflare deploy -- --env prod
  • Non-production branch deploy: pnpm install && pnpm run build:all && pnpm exec opennextjs-cloudflare deploy -- --env dev

Manual Deployments

Quick Deploy (Immediate)

pnpm run deploy:dev     # Deploy immediately to dev
pnpm run deploy:prod    # Deploy immediately to prod
pnpm run deploy         # Quick production deploy

Version Management (Safer Production)

pnpm run version:upload # Upload version to production
pnpm run version:list   # List all versions
pnpm run version:deploy # Deploy latest version

Benefits:

  • Rollback capability: Quickly revert to previous versions
  • Audit trail: Track deployment history
  • Risk reduction: Test versions before full deployment

Build Process

# Full production build
pnpm run build

# Preview build locally
pnpm run preview

πŸ” Secrets & Environment

Quick Setup

# 1. Copy templates for each environment
cp .env.secrets.dev.example .env.secrets.dev    # Sandbox credentials
cp .env.secrets.prod.example .env.secrets.prod  # Production credentials

# 2. Edit with real values
# .env.secrets.dev: Sandbox QuickBooks + other dev secrets
# .env.secrets.prod: Production QuickBooks + other prod secrets

# 3. Upload to Cloudflare (when needed)
pnpm run secrets:dev    # Dev environment (uses .env.secrets.dev)
pnpm run secrets:prod   # Production (uses .env.secrets.prod)

Security Notes

  • Never commit .env.secrets.* (they're gitignored)
  • Secrets are encrypted and managed via wrangler secret put
  • Use .dev.vars only for non-sensitive local config
  • Environment variables are defined in wrangler.jsonc per environment
  • Environment-specific secrets automatically selected by upload scripts

πŸ“ Project Structure

β”œβ”€β”€ app/                 # Next.js App Router pages
β”œβ”€β”€ components/          # React components
β”œβ”€β”€ content/            # MDX blog content
β”œβ”€β”€ lib/                # Utilities & integrations
β”œβ”€β”€ public/             # Static assets
β”œβ”€β”€ scripts/            # Build & utility scripts
β”œβ”€β”€ trigger/            # Background job definitions
└── wrangler.jsonc      # Cloudflare Workers config

πŸ› οΈ Development Scripts

# Development
pnpm run dev:all        # Full stack (Next.js + Wrangler + Trigger)
pnpm run dev            # Next.js development server
pnpm run dev:turbo      # Next.js with TurboPack (faster)
pnpm run wrangler       # Cloudflare Workers dev server
pnpm run trigger        # Trigger.dev background jobs

# Building
pnpm run build:all      # Build Next.js + OpenNext
pnpm run build          # Next.js build only
pnpm run build:opennext # Cloudflare OpenNext build

# Testing
pnpm run preview        # Test built Cloudflare app locally
pnpm run check          # Run all code quality checks
pnpm run lint           # ESLint
pnpm run format         # Prettier
pnpm run check:ts       # TypeScript check

# Deployment
pnpm run deploy:dev     # Deploy to development
pnpm run deploy:prod    # Deploy to production
pnpm run deploy         # Quick production deploy

# Version Management
pnpm run version:upload # Upload version to production
pnpm run version:list   # List all versions
pnpm run version:deploy # Deploy latest version

# Secrets
pnpm run secrets:dev    # Upload to dev env
pnpm run secrets:prod   # Upload to prod env

# Infrastructure
pnpm run cf:typegen      # Generate Cloudflare types
pnpm run coc:generate    # Generate Code of Conduct

See PNPM_SCRIPTS.md for detailed script explanations.

πŸ› Troubleshooting

Common Issues

Build fails with "Module not found"

# Clear caches and reinstall
rm -rf node_modules .next .open-next
pnpm install

Wrangler secrets not working

# Check secrets are uploaded
npx wrangler secret list --env local

# Re-upload if needed
# Local secrets are handled via .dev.vars

Trigger.dev not connecting

# Check Trigger.dev CLI is running
pnpm run trigger

Environment variables not loading

  • Check .dev.vars syntax (KEY=value, one per line)
  • Ensure NODE_ENV is set correctly (Next.js sets this automatically - use only development, production, or test)
  • Restart development servers after changes

Need Help?

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/your-feature
  3. Make your changes and test locally
  4. Submit a pull request

See CONTRIBUTING.md for detailed guidelines.


Built with ❀️ by the All Things Linux community.

Sponsor this project

  •  

Contributors