# StoryCove A self-hosted web application for storing, organizing, and reading short stories from various internet sources. ## Quick Start ### Option 1: Using Environment-Specific Deployment (Recommended) 1. Deploy for your environment: ```bash # For development ./deploy.sh development # For staging ./deploy.sh staging # For production (edit .env.production first with your values) ./deploy.sh production ``` 2. Edit the environment file (`.env.development`, `.env.staging`, or `.env.production`) with your specific configuration ### Option 2: Manual Configuration 1. Copy environment variables: ```bash cp .env.example .env ``` 2. Edit `.env` with secure values for all variables 3. Start the application: ```bash docker-compose up -d ``` 4. Access the application at the URL specified in your environment configuration (default: http://localhost:6925) ## Architecture - **Frontend**: Next.js (Port 3000) - **Backend**: Spring Boot (Port 8080) - **Database**: PostgreSQL (Port 5432) - **Search**: Typesense (Port 8108) - **Proxy**: Nginx (Port 80) ## Environment Configuration StoryCove supports different deployment environments with specific configuration files: ### Environment Files - `.env.development` - Local development with Docker - `.env.staging` - Staging/testing environment - `.env.production` - Production deployment - `.env.example` - Template with all available options ### Key Environment Variables - `STORYCOVE_PUBLIC_URL` - The public URL where your app is accessible - `STORYCOVE_CORS_ALLOWED_ORIGINS` - Comma-separated list of allowed CORS origins - `DB_PASSWORD` - PostgreSQL database password - `JWT_SECRET` - Secret key for JWT token signing (minimum 32 characters) - `APP_PASSWORD` - Application login password - `TYPESENSE_API_KEY` - API key for Typesense search service - `NEXT_PUBLIC_API_URL` - Frontend API URL (for development only) ### Deployment Examples For a production deployment at `https://stories.example.com`: ```bash # Edit .env.production STORYCOVE_PUBLIC_URL=https://stories.example.com STORYCOVE_CORS_ALLOWED_ORIGINS=https://stories.example.com # Deploy ./deploy.sh production ``` For local development: ```bash ./deploy.sh development ``` ## Development ### Frontend Development ```bash cd frontend npm install npm run dev ``` ### Backend Development ```bash 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`.