Introduction
Welcome to the comprehensive developer's guide for the Spec-Up-T system. This documentation will guide you through contributing to Spec-Up-T, whether you're adding features, fixing bugs, or creating custom extensions for your specific needs.
The Spec-Up-T tool is written in JavaScript (client-side) and Node.js (build-time).
When we say "build-time," in this context, we mean that Node.js runs locally on a developer's computer during the build process, where the index.html is generated through Node.js scripts.
After that, the index.html can be placed anywhere on a web server, but GitHub Pages are preferable because they allow you to take advantage of GitHub's power. The fact that it is an HTML file means that there are minimal hosting requirements.
What is Spec-Up-T?
Spec-Up-T is a technical specification and standardization tool with a special focus on terminology. Built as an enhanced version of DIF's Spec-Up, it enables you to create rich specification documents and glossaries using an extended version of Markdown.
Key characteristics:
- Enhanced Markdown Support: Advanced syntax highlighting, notice blocks, complex tables, charts, UML diagrams, and more
- Interrelated Specifications: Reference or embed terms from external specifications, creating a connected web of interrelated documents
- Version Management: Track changes and manage snapshots for streamlined version control
- GitHub Integration: Hosted on GitHub for seamless collaboration and accessibility
- Minimal Hosting Requirements: Designed to operate efficiently with basic hosting setup
Architecture Overview
Spec-Up-T follows a hybrid architecture combining client-side and build-time JavaScript:
Build-Time (Node.js)
The build-time components run locally on a developer's computer during the compilation process, where the index.html is generated through Node.js scripts. This includes:
- Build Process: Markdown files are processed and compiled into a single HTML specification
- Term Processing: Terminology definitions and references are linked and validated
- External References: Integration with external specification databases (like specref.org)
- Asset Compilation: CSS and JavaScript files are bundled and optimized
- PDF Generation: Specifications can be exported to PDF format
Client-Side (Browser JavaScript)
The client-side code provides interactive features in the generated specification:
- Syntax Highlighting: Via Prism.js for beautiful code display
- Interactive Tooltips: Using Tippy.js for enhanced user experience
- Diagram Rendering: Mermaid.js for creating flowcharts and diagrams
- Charts and Visualizations: Chart.js for data presentation
- Navigation Enhancements: Search functionality and interactive menus
Static Output
The final product is a standalone index.html file that:
- Can be hosted on any web server
- Works optimally with GitHub Pages
- Requires minimal hosting infrastructure
- Contains all assets embedded or linked
Repository Structure
Spec-Up-T consists of two main repositories:
1. Spec-Up-T Starter Pack
- Purpose: Installation and boilerplate generation
- npm package:
create-spec-up-t - Contents:
- Boilerplate directory with sample content
- Installation scripts that copy the boilerplate
- Default configuration files