feat(tags): Add database schema and tags module (v1.3.0 Phase 1)

Implements tag/category system backend following microformats2 p-category specification.

Database changes:
- Migration 008: Add tags and note_tags tables
- Normalized tag storage (case-insensitive lookup, display name preserved)
- Indexes for performance

New module:
- starpunk/tags.py: Tag management functions
  - normalize_tag: Normalize tag strings
  - get_or_create_tag: Get or create tag records
  - add_tags_to_note: Associate tags with notes (replaces existing)
  - get_note_tags: Retrieve note tags (alphabetically ordered)
  - get_tag_by_name: Lookup tag by normalized name
  - get_notes_by_tag: Get all notes with specific tag
  - parse_tag_input: Parse comma-separated tag input

Model updates:
- Note.tags property (lazy-loaded, prefer pre-loading in routes)
- Note.to_dict() add include_tags parameter

CRUD updates:
- create_note() accepts tags parameter
- update_note() accepts tags parameter (None = no change, [] = remove all)

Micropub integration:
- Pass tags to create_note() (tags already extracted by extract_tags())
- Return tags in q=source response

Per design doc: docs/design/v1.3.0/microformats-tags-design.md

Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-10 11:24:23 -07:00
parent 927db4aea0
commit f10d0679da
188 changed files with 601 additions and 945 deletions

View File

@@ -1,41 +0,0 @@
# Deployment Documentation Index
This directory contains deployment guides, infrastructure setup instructions, and operations documentation for StarPunk CMS.
## Deployment Guides
- **[container-deployment.md](container-deployment.md)** - Container-based deployment guide (Docker, Podman)
## Deployment Options
### Container Deployment (Recommended)
Container deployment provides:
- Consistent environment across platforms
- Easy updates and rollbacks
- Resource isolation
- Simplified dependency management
See: [container-deployment.md](container-deployment.md)
### Manual Deployment
For manual deployment without containers:
- Follow [../standards/development-setup.md](../standards/development-setup.md)
- Configure systemd service
- Set up reverse proxy (nginx/Caddy)
- Configure SSL/TLS certificates
### Cloud Deployment
StarPunk can be deployed to:
- Any container platform (Kubernetes, Docker Swarm)
- VPS providers (DigitalOcean, Linode, Vultr)
- PaaS platforms supporting containers
## Related Documentation
- **[../standards/development-setup.md](../standards/development-setup.md)** - Development environment setup
- **[../architecture/](../architecture/)** - System architecture
- **[README.md](../../README.md)** - Quick start guide
---
**Last Updated**: 2025-11-25
**Maintained By**: Documentation Manager Agent

Some files were not shown because too many files have changed in this diff Show More