Stefan Hardegger 5a48ebcfeb Implement shared HTML sanitization configuration
**Backend Changes:**
- Add html-sanitization-config.json with allowedTags, allowedAttributes, and allowedCssProperties
- Create HtmlSanitizationConfigDto for configuration data transfer
- Update HtmlSanitizationService to load configuration from JSON file with fallback
- Add HtmlSanitizationController with public API endpoint at /api/config/html-sanitization
- Update SecurityConfig to allow public access to /api/config/** endpoints

**Frontend Changes:**
- Add configApi.getHtmlSanitizationConfig() to fetch backend configuration
- Create sanitization.ts utility with sanitizeHtml() and sanitizeHtmlSync() functions
- Update story reading page to use shared sanitization configuration
- Add preloadSanitizationConfig() for early configuration loading
- Handle TrustedHTML type conversion and DOMPurify config compatibility

**Benefits:**
- Consistent HTML sanitization rules between frontend and backend
- Centralized configuration in JSON file for easy maintenance
- Automatic fallback to safe defaults if configuration loading fails
- API-driven approach allows runtime configuration updates
- Maintains security while providing flexibility for content formatting

Resolves HTML sanitization inconsistencies and provides foundation for configurable content safety rules.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-23 16:18:03 +02:00
2025-07-21 08:47:52 +02:00
2025-07-21 08:47:52 +02:00
2025-07-22 21:49:40 +02:00
2025-07-22 21:49:40 +02:00
2025-07-21 08:47:52 +02:00
2025-07-21 08:47:52 +02:00
2025-07-22 21:49:40 +02:00

StoryCove

A self-hosted web application for storing, organizing, and reading short stories from various internet sources.

Quick Start

  1. Copy environment variables:
cp .env.example .env
  1. Edit .env with secure values for all variables

  2. Start the application:

docker-compose up -d
  1. Access the application at http://localhost

Architecture

  • Frontend: Next.js (Port 3000)
  • Backend: Spring Boot (Port 8080)
  • Database: PostgreSQL (Port 5432)
  • Search: Typesense (Port 8108)
  • Proxy: Nginx (Port 80)

Development

Frontend Development

cd frontend
npm install
npm run dev

Backend Development

cd backend
./mvnw spring-boot:run

Commands

  • docker-compose up -d - Start all services
  • docker-compose down - Stop all services
  • docker-compose logs -f [service] - View logs
  • docker-compose build - Rebuild containers

Features

  • Story management with HTML content support
  • Author profiles with ratings and metadata
  • Tag-based categorization
  • Full-text search capabilities
  • Responsive reading interface
  • JWT-based authentication
  • Docker-based deployment

For detailed specifications, see storycove-spec.md.

Description
No description provided
Readme 314 MiB
Languages
Java 56.2%
TypeScript 42.5%
Dockerfile 0.5%
Shell 0.3%
CSS 0.3%
Other 0.2%