Commit graph

903 commits

Author SHA1 Message Date
TheFlow
47818bade1 feat: add governance document and core utilities
Core Values (TRA-VAL-0001):
- Adapt STR-VAL-0001 for Tractatus AI Safety Framework
- Define 6 core values: Sovereignty, Transparency, Harmlessness,
  Human Judgment Primacy, Community, Biodiversity
- Establish AI governance principles and decision framework
- Document Te Tiriti commitment as strategic baseline
- Create values alignment metrics and review process

Database Utilities:
- MongoDB connection with retry logic and health checks
- Singleton pattern for connection management
- Comprehensive error handling and reconnection

Logger Utility:
- Winston-based logging (console + file)
- Request logging middleware
- Error log separation
- Configurable log levels

JWT Utility:
- Token generation and verification
- Secure admin authentication
- Header extraction methods

Markdown Utility:
- Markdown to HTML conversion with syntax highlighting
- XSS protection via sanitization
- Table of contents extraction
- Front matter parsing
- Slug generation

Status: Core infrastructure utilities complete
2025-10-06 23:34:40 +13:00
TheFlow
4f8de209f3 feat: add MongoDB systemd service and database initialization
- Create mongodb-tractatus.service for systemd management
- Add installation script for service setup
- Create init-db.js with complete collection schemas and indexes
- Configure 10 MongoDB collections: documents, blog_posts, media_inquiries,
  case_submissions, resources, moderation_queue, users, citations,
  translations, koha_donations
- Add indexes for performance optimization
- Include verification and statistics output

MongoDB Port: 27017
Database: tractatus_dev
Status: Ready for service installation
2025-10-06 23:28:42 +13:00
TheFlow
4445b0e8d0 feat: initialize tractatus project with complete directory structure
- Create comprehensive project structure (29 directories)
- Add CLAUDE.md with project context and conventions
- Add package.json with dependencies and scripts
- Add .gitignore and .env.example
- Add README.md with project overview
- Configure ports: MongoDB 27017, Application 9000
- Establish Tractatus governance framework baseline
- Document Te Tiriti approach and indigenous perspective
- Set up infrastructure for Phase 1 implementation

Project Status: Development - Phase 1 Foundation Complete
Next: MongoDB instance setup and systemd service configuration
2025-10-06 23:26:26 +13:00