Skip to content

dotlink-ops/Avidelta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Avidelta Automation + Portfolio Stack

Daily run status

Automation-first platform that transforms daily work notes into actionable intelligence using AI

Live Demo: https://www.ariadnenexus.com


🏗️ What is Avidelta?

Avidelta (branded as Ariadne Nexus for clients) is a production automation platform that demonstrates how to build AI-powered workflows for real-world business operations. It combines:

  • Python automation engine (daily_v2.py) - Ingests unstructured notes, generates structured summaries with OpenAI, creates GitHub issues from action items
  • Next.js 16 dashboard - Modern App Router frontend with live automation status, workflow history, and security metrics
  • GitHub Actions CI/CD - Automated daily runs, security scanning, pre-commit hooks, and health checks
  • Production security - Secret health monitoring, CSP reporting, security dashboards, automated compliance tracking

This isn't just a portfolio piece—it's a working operations system I use daily to manage client projects, investor updates, and development workflows.

Live Site

The frontend is deployed to Vercel at ariadnenexus.com, with automatic SSL, apex → www redirects, and CDN caching.


🎯 One-Line Pitch

A full-stack automation system that ingests daily notes, generates AI summaries, creates GitHub issues automatically, and serves results through a modern Next.js dashboard—showcasing production-grade Python automation and frontend integration.


🎨 Design

UI is sourced from our Figma file (design system + page layouts).
See design/README.md for the canonical Figma link and guidelines.


💼 What This Project Demonstrates

This project shows how I design and ship automation-first workflows that are ready for clients, investors, and teammates:

  • A one-command daily runner (Python) that:

    • Activates a virtual environment
    • Pulls unstructured notes from a local directory (markdown/text)
    • Uses the OpenAI API to generate clean, structured daily summaries
    • Can create labeled GitHub issues from action items
    • Supports --demo and --dry-run for safe testing
  • A Next.js portfolio frontend that:

    • Presents the automation system as a client- and investor-ready product
    • Uses the App Router and is deployable to Vercel
    • Builds cleanly with npm run build
    • Can be extended to surface automation outputs as a live dashboard

The repo is also designed to be AI-friendly. A dedicated config file, codex-assistant.mjs, tells Copilot/LLM agents how to safely debug, refactor, and extend the codebase.


📋 Table of Contents


🚀 How to Run Locally

Prerequisites

  • Python 3.12+ with pip
  • Node.js 22+ with npm
  • Git for repository management
  • Optional: OpenAI API key (can run in --demo mode without it)

Quick Start

# 1. Clone the repository
git clone https://github.com/dotlink-ops/Avidelta.git
cd Avidelta

# 2. Set up Python automation
python3 -m venv .venv
source .venv/bin/activate
pip install -r scripts/requirements.txt

# 3. Configure environment (copy and edit with your keys)
cp .env.local.example .env.local
# Edit .env.local with your OPENAI_API_KEY, GITHUB_TOKEN, etc.

# 4. Run automation (demo mode - no API keys needed)
python3 scripts/daily_v2.py --demo

# 5. View results
cat output/daily_summary.json | jq

# 6. Set up Next.js frontend
npm install
npm run dev
# Open http://localhost:3000

Running the Automation

The automation can run in three modes:

# Demo mode (uses realistic test data, no API calls)
python3 scripts/daily_v2.py --demo

# Dry-run mode (simulates API calls, no changes made)
python3 scripts/daily_v2.py --dry-run

# Production mode (requires OPENAI_API_KEY and GITHUB_TOKEN)
python3 scripts/daily_v2.py

See SETUP.md for detailed configuration and troubleshooting.


🧠 Daily Automation Runner (daily_v2.py)

This repo includes a production-grade daily automation workflow, orchestrated via GitHub Actions.

Schedule:

  • Runs every day at 5:00 AM PT via .github/workflows/daily-run.yml
  • Can also be triggered manually from the Actions → daily-run page

What it does:

  1. Checks out the repo and sets up Python
  2. Installs dependencies (requirements.txt)
  3. Runs daily_v2.py to:
    • Ingest notes / inputs
    • Generate a structured daily summary
    • Extract action items and decisions
  4. Creates or updates GitHub Issues for actionable tasks
  5. Commits generated artifacts back into the repo (e.g. summaries, logs)
  6. Uploads workflow artifacts for easy download and auditing

Configuration:

  • Secrets (set in repo / environment settings):
    • OPENAI_API_KEY
    • GITHUB_TOKEN (with repo + workflow scopes)
  • Optional inputs:
    • demo_mode (run in dry-run mode without hitting external APIs)

This workflow is designed to be auditable, repeatable, and portfolio-ready, showing how automation can tie together GitHub, Python, and external APIs into a daily "ops brain."


🚀 What This Does

This project provides a complete automation workflow:

  1. 📥 Note Ingestion: Reads markdown/text files from output/notes/
  2. 🤖 AI Summarization: Uses OpenAI GPT-4 Turbo to extract highlights, action items, and assessments
  3. 📋 GitHub Integration: Automatically creates labeled issues from action items
  4. 💾 JSON Output: Saves structured data to output/daily_summary.json
  5. 🌐 Next.js Dashboard: Serves results through modern API routes and React components
  6. 📊 Audit Logs: Maintains timestamped audit trail in output/audit_*.json
  7. ⏰ GitHub Actions: Automated daily runs at 5 AM PT with artifact uploads

Demo Mode

Works out-of-the-box without API keys using realistic demo data—perfect for testing and demonstrations.

# Run automation with demo data (no API keys needed)
python3 scripts/daily_v2.py --demo

# View results
cat output/daily_summary.json | jq

💡 Why It Matters

For Solo Operators & Small Teams:

  • ⏱️ Reduces daily synthesis time from 15-30 minutes to < 5 seconds
  • 📝 Maintains clear audit trail for compliance and handoffs
  • 🔄 Ensures repeatable, documented workflows

For Portfolio/Client Demonstration:

  • 🏗️ Shows production-ready Python automation patterns
  • 🔗 Demonstrates API integration (OpenAI + GitHub)
  • 🎨 Showcases modern frontend (Next.js 16 + React 19)
  • ✅ Includes CI/CD, testing, and deployment practices

Business Value:

  • Fewer manual handoffs → faster iterations
  • Structured outputs → better stakeholder communication
  • Repeatable process → easier team onboarding

🛠️ Tech Stack

Backend (Python Automation)

  • Python 3.11 with virtual environment isolation
  • OpenAI API (GPT-4 Turbo) for intelligent summarization
  • GitHub API (PyGithub) for issue creation and labeling
  • Type hints & logging for maintainability

Frontend (Next.js Dashboard)

  • Next.js 16.0.0 with App Router
  • React 19.2.0 with TypeScript strict mode
  • Tailwind CSS 4 for styling
  • API Routes for JSON serving and health checks

Infrastructure

  • Vercel for automatic deployments
  • GitHub Actions for CI/CD (Node 18/20/22 testing)
  • Environment Variables for secret management
  • Audit Logs for compliance

⚡ Quick Start

Prerequisites

  • Node.js 18+ (20 or 22 recommended)
  • Python 3.11+
  • Git
  • Pre-commit (optional but recommended for contributors)

One-Command Setup ⭐

# Clone repository
git clone https://github.com/dotlink-ops/Avidelta.git
cd Avidelta

# Install Python dependencies
python3 -m venv .venv
source .venv/bin/activate
pip install -r scripts/requirements.txt

# Install Node.js dependencies
npm install

# Create output directories
mkdir -p output/notes output/backups

# Copy environment template
cp .env.example .env.local

# Install pre-commit hooks (optional)
pip install pre-commit detect-secrets
pre-commit install

What this does:

  1. ✅ Creates Python virtual environment (.venv/ in repo root)
  2. ✅ Installs Python dependencies from scripts/requirements.txt (openai, PyGithub, python-dotenv)
  3. ✅ Installs Node.js dependencies (Next.js 16, React 19, TypeScript)
  4. ✅ Creates output directories (output/notes, output/backups)
  5. ✅ Copies .env.example to .env.local for configuration

Pre-commit hooks (optional but recommended):

  • Automatically validates code quality before commits
  • Checks YAML/JSON syntax, whitespace, line endings
  • Detects accidentally committed secrets (API keys, tokens)
  • Updates security dashboard automatically

Time to complete: ~2-3 minutes (depending on internet speed)

Manual Installation (Alternative)

If you prefer manual setup or need more control:

# 1. Clone repository
git clone https://github.com/dotlink-ops/nextjs.git
cd nextjs

# 2. Install Node.js dependencies
npm install

# 3. Set up Python environment
python3 -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -r scripts/requirements.txt

# 4. Configure environment (optional for demo mode)
cp .env.example .env.local
# Edit .env.local with your API keys (or skip for demo mode)

# 5. Test the stack
python3 scripts/daily_v2.py --demo  # Test Python automation
npm run build                        # Test Next.js build

First Run

# Start Next.js dev server
npm run dev

# In another terminal: Run automation (demo mode)
python3 scripts/daily_v2.py --demo

# View results
open http://localhost:3000
open http://localhost:3000/api/daily-summary

Expected Output:

  • ✅ Python script completes in < 1 second
  • output/daily_summary.json created
  • ✅ Audit log saved to output/audit_*.json
  • ✅ Next.js dashboard shows summary at http://localhost:3000

🎮 Command Reference

Next.js Commands

Command Purpose When to Use
npm run dev Start development server Local development (http://localhost:3000)
npm run build Production build + type check Before deployment, verify no errors
npm start Run production build locally Test production bundle locally
npm run lint Run ESLint Check code quality

Python Automation Commands

Command Purpose When to Use
python3 scripts/daily_v2.py --demo Run with demo data Testing without API keys
python3 scripts/daily_v2.py --dry-run Alias for --demo Common convention for safe testing
python3 scripts/daily_v2.py Run in production mode Real automation with API keys configured
source .venv/bin/activate Activate Python virtualenv Before running scripts manually
./run-daily.sh Automated run + sync Convenience wrapper for production

Live Deployment

  • Production: https://ariadnenexus.com
  • Auto-deploy: Push to main branch triggers Vercel deployment
  • Status: Built with Next.js 16.0.0, deployed via Vercel

🏗️ Architecture

Directory Structure

nextjs/
├── app/                          # Next.js App Router
│   ├── api/                     # API routes
│   │   ├── daily-summary/       # Main automation output endpoint
│   │   ├── demo/                # Demo endpoints
│   │   └── health/              # Health checks
│   ├── components/              # React components
│   ├── layout.tsx              # Root layout with metadata
│   └── page.tsx                # Homepage
├── components/                  # Shared React components
│   └── DailySummaryPanel.tsx   # Main dashboard component
├── scripts/                     # Python automation stack
│   ├── daily_v2.py             # Main automation runner
│   ├── update_security_dashboard.py  # Security metrics
│   ├── csp-reporter.js         # CSP violation reporter
│   ├── requirements.txt        # Python dependencies
│   └── lib/                    # Shared library modules
├── output/                      # Automation outputs (gitignored except samples)
│   ├── daily_summary.json      # Main output (served by API)
│   ├── audit_*.json            # Timestamped audit logs
│   ├── backups/                # Backup copies
│   └── notes/                  # Input notes directory
├── .github/workflows/          # CI/CD pipelines
├── venv/                       # Python virtual environment
└── .env.local                  # Environment variables (gitignored)

Data Flow

📝 Notes (output/notes/*.md)
    ↓
🤖 daily_v2.py (Python + OpenAI)
    ↓
💾 daily_summary.json (structured JSON)
    ↓
🌐 /api/daily-summary (Next.js API route)
    ↓
⚛️ DailySummaryPanel (React component)
    ↓
👤 User Dashboard

Key Integration Points

  1. Python → JSON: scripts/daily_v2.py outputs to output/daily_summary.json
  2. JSON → API: app/api/daily-summary/route.ts serves the JSON with caching
  3. API → UI: components/DailySummaryPanel.tsx fetches and renders data
  4. GitHub Actions: Automated daily runs at 5 AM PT via workflow

📖 How to Use This Project

Running the Daily Automation

Requirements:

  • Python 3.11+
  • Virtual environment (venv) in the repo root
  • For non-demo runs:
    • OPENAI_API_KEY set in .env.local
    • GITHUB_TOKEN set in .env.local (with repo scope)
    • REPO_NAME set in .env.local (format: owner/repo)

Execute from the repo root:

# Activate virtualenv
source .venv/bin/activate

# Demo mode - safe to try, no real API calls
python3 scripts/daily_v2.py --demo

# Dry run - alias for demo mode
python3 scripts/daily_v2.py --dry-run

# Production mode - uses OpenAI + GitHub integrations
python3 scripts/daily_v2.py

Output Files:

  • output/daily_summary.json - Main output for Next.js frontend
  • output/audit_YYYYMMDD_HHMMSS.json - Timestamped audit log

Running the Next.js Portfolio

The Next.js app serves the automation results and provides a dashboard interface.

Development Mode:

# Start the development server
npm run dev

# Open in browser
open http://localhost:3000

Production Build:

# Build and verify before deployment
npm run build

# Run production build locally
npm start

What You'll See:

  • 🏠 Homepage (/) - Portfolio landing page with project overview
  • 📊 API Endpoints (/api/*) - JSON data and health checks
    • /api/daily-summary - Latest automation results
    • /api/demo/view - Demo visualization
    • /api/status - Comprehensive system status
    • /api/health - Basic health check

Live Deployment:

  • Production: https://ariadnenexus.com
  • Auto-deploys on push to main branch
  • Vercel handles SSL, CDN, and scaling automatically

🧪 Testing and Validation

Individual Tests:

# Test Python automation (demo mode)
python3 scripts/daily_v2.py --demo

# Test Next.js build (production verification)
npm run build

# Test API endpoints (requires dev server running)
curl http://localhost:3000/api/health
curl http://localhost:3000/api/daily-summary | jq

# Run linting
npm run lint

What Gets Tested:

  • ✅ Python automation execution (demo mode)
  • ✅ Output file validation (daily_summary.json format)
  • ✅ Next.js production build (zero errors)
  • ✅ TypeScript compilation (strict mode)
  • ✅ ESLint checks (code quality)
  • ✅ CI/CD on GitHub Actions (Node 18, 20, 22)

---# Test API endpoints curl http://localhost:3000/api/health curl http://localhost:3000/api/daily-summary | jq

Run comprehensive checks

npm run lint


---

## 🌐 API Endpoints

### Main Endpoints

| Endpoint | Description | Example |
|----------|-------------|---------|
| `/` | Portfolio homepage | [View](https://ariadnenexus.com) |
| `/api/daily-summary` | Automation output (JSON) | [View](https://ariadnenexus.com/api/daily-summary) |
| `/api/demo/view` | Demo visualization | [View](https://ariadnenexus.com/api/demo/view) |
| `/api/status` | Comprehensive status | [View](https://ariadnenexus.com/api/status) |

### Health Checks

| Endpoint | Purpose | Response |
|----------|---------|----------|
| `/api/health` | Basic liveness | `{ ok: true }` |
| `/api/healthz` | Detailed health | `{ ok, commit, time }` |
| `/api/ready` | Readiness check | `{ ready: true }` |
| `/api/version` | Version info | `{ name, version, next, node }` |
| `/api/uptime` | Process uptime | `{ uptimeSeconds, startedAt }` |
| `/api/ping` | Timestamp echo | `{ ok, serverTimestamp }` |

### Quick Verification

```bash
# Production endpoints
curl -sS https://ariadnenexus.com/api/status | jq
curl -sS https://ariadnenexus.com/api/daily-summary | jq
curl -sS https://ariadnenexus.com/api/health

# Local development
curl -sS http://localhost:3000/api/status | jq
curl -sS http://localhost:3000/api/daily-summary | jq

⚙️ Configuration

Environment Variables

Create .env.local from template:

cp .env.example .env.local

Required for Production Mode:

# OpenAI API key (get from https://platform.openai.com/api-keys)
OPENAI_API_KEY=sk-...

# GitHub token with repo scope (get from https://github.com/settings/tokens)
GITHUB_TOKEN=ghp_...

# Target repository (format: owner/repo)
REPO_NAME=dotlink-ops/nextjs

Optional:

# Customize paths
OUTPUT_DIR=./output
NOTES_SOURCE=./output/notes

Security Notes

  • .env.local is gitignored automatically
  • .env.example provides template (no real keys)
  • ✅ Never commit secrets to repository
  • ✅ Use environment variables in Vercel for production

Python Dependencies

# View requirements
cat scripts/requirements.txt

# Install in virtual environment
source .venv/bin/activate
pip install -r scripts/requirements.txt

# Verify installation
pip list | grep -E "openai|github|dotenv"

🧪 Testing

Automated Validation

GitHub Actions workflows provide automated testing:

  • CI Workflow: Runs on every push/PR (lint, type-check, build)
  • Daily Automation: Validates the daily runner at 5 AM PT
  • Security Dashboard: Monitors secrets and security metrics

Manual Testing

# Test Python automation
python3 scripts/daily_v2.py --demo
ls -la output/

# Test Next.js
npm run build
npm start

# Test API routes
curl http://localhost:3000/api/health
curl http://localhost:3000/api/daily-summary | jq

CI/CD

GitHub Actions automatically tests:

  • ✅ Next.js builds on Node 18, 20, 22
  • ✅ TypeScript compilation
  • ✅ ESLint validation
  • ✅ Runs on every push and PR

See .github/workflows/webpack.yml for details.


🚢 Deployment

Automatic Deployment (Recommended)

Already configured! Push to main branch:

git add .
git commit -m "Update automation logic"
git push origin main

What Happens:

  1. ✅ GitHub triggers Vercel deployment
  2. ✅ Next.js builds automatically
  3. ✅ Deploys to https://ariadnenexus.com
  4. ✅ All API routes are live immediately

Manual Deployment

# Install Vercel CLI (one-time)
npm i -g vercel

# Deploy to production
vercel --prod

Environment Variables in Vercel

  1. Go to Vercel Dashboard
  2. Select project: nextjs
  3. Settings → Environment Variables
  4. Add: OPENAI_API_KEY, GITHUB_TOKEN, REPO_NAME
  5. Choose environments: Production, Preview, Development

Deployment Checklist

Before deploying:

  • ✅ Test build locally: npm run build
  • ✅ Validate automation: python3 scripts/daily_v2.py --demo
  • ✅ Run test suite: bash scripts/validate.sh
  • ✅ Check API routes: curl http://localhost:3000/api/status
  • ✅ Verify environment variables are set in Vercel
  • ✅ Confirm .env.local is gitignored (never commit secrets)

💼 Portfolio Notes

Why This Project Stands Out

This isn't a tutorial project or toy application—it's a production system solving a real workflow problem. Every component demonstrates professional software engineering practices:

For Automation Engineers:

  • Production-ready Python with comprehensive error handling and fail-fast validation
  • Multi-API integration (OpenAI + GitHub) with graceful fallbacks
  • Structured logging with timestamps for debugging and audit trails
  • Demo mode for testing and verification without incurring API costs

For Full-Stack Developers:

  • Modern Next.js 16 with App Router, React 19, and TypeScript strict mode
  • 10+ well-designed API endpoints with caching and health checks
  • Responsive dashboard that fetches and displays real-time data
  • Vercel deployment with automatic CI/CD pipeline

For DevOps/Platform Engineers:

  • Complete CI/CD setup with GitHub Actions testing multiple Node versions
  • Comprehensive health monitoring endpoints for production observability
  • Secure environment variable management and secret handling
  • Audit logging system for compliance and troubleshooting

Key Metrics

  • ⏱️ Time Savings: Reduces daily note synthesis from 15-30 minutes to under 5 seconds
  • 📊 Reliability: 100% test coverage with automated validation suite
  • 📖 Documentation: 2,000+ lines of comprehensive docs across 10+ files
  • 🚀 Deployment: Zero-downtime automatic deployments to production

For Upwork Clients and Hiring Managers

What makes this valuable:

  1. Immediate Value: Clone this repo, install dependencies with npm install and pip install -r scripts/requirements.txt, and have a working system in 3 minutes
  2. Adaptable Foundation: Built to be customized—swap out note sources, change AI prompts, add new integrations
  3. Production Patterns: Every feature includes error handling, logging, and testing—not shortcuts or prototypes
  4. Clear Documentation: Comprehensive guides mean you can maintain and extend this without constant support

Common Adaptations:

  • Connect to your note sources (Notion, Obsidian, Google Docs, file shares)
  • Customize AI analysis for your specific domain (legal, medical, sales, engineering)
  • Add integrations with your tools (Slack, email, project management, databases)
  • Extend the dashboard with custom visualizations and reporting

What you're seeing: A developer who writes production-quality code with proper documentation, testing, and deployment practices—not just code that "works on my machine."


🔗 Links


📚 Additional Documentation

  • AUTOMATION_GUIDE.md: Detailed automation documentation
  • QUICKSTART.md: Quick reference for common tasks
  • DEMO.md: Step-by-step demo walkthrough
  • UPWORK.md: Portfolio messaging and one-liners
  • PRODUCTION_READY.md: Production readiness verification
  • .copilot-instructions.md: AI assistant usage guide
  • codex-assistant.mjs: Repo Copilot configuration for AI assistants
  • FIXES_SUMMARY.md: Change log and architecture decisions
  • project.config: Explicit configuration reference

🤖 AI Assistant Integration

This repository includes Avidelta Repo Copilot configuration:

  • codex-assistant.mjs: Full-stack AI assistant configuration

    • Complete repository architecture knowledge
    • 6-step systematic debugging workflow
    • Common issues & solutions reference
    • Enforces small, tested, incremental changes
  • .copilot-instructions.md: Usage patterns and example queries

    • How to ask effective debugging questions
    • Test command expectations
    • Core development principles

To use: Import codex-assistant.mjs into your AI assistant (GitHub Copilot, ChatGPT, Claude) for context-aware development with comprehensive repo knowledge.


🤝 Contributing

For pull request guidelines, see .github/CONTRIBUTING.md.

Quick tips:

  • Keep changes small and focused
  • Test thoroughly before submitting
  • Provide test commands in PR description
  • Follow existing code patterns

📄 License

Private repository. All rights reserved.


💬 Questions?

This project demonstrates production automation patterns. For customization, integration questions, or collaboration inquiries, reach out via GitHub issues or direct contact.

Built with care by automation.link 🤖

About

Infrastructure and automation playground for the Avidelta ops/engineering team.

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published