{"id":28996775,"url":"https://github.com/hunkim/solar-writer","last_synced_at":"2025-06-25T05:11:30.614Z","repository":{"id":295650194,"uuid":"990787184","full_name":"hunkim/solar-writer","owner":"hunkim","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-26T17:30:30.000Z","size":151,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-26T17:45:30.061Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://solar-writer.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hunkim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-26T16:25:41.000Z","updated_at":"2025-05-26T17:30:33.000Z","dependencies_parsed_at":"2025-05-26T17:45:33.803Z","dependency_job_id":"e72be8ba-c959-44d1-9f0a-9c4198943a67","html_url":"https://github.com/hunkim/solar-writer","commit_stats":null,"previous_names":["hunkim/solar-writer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hunkim/solar-writer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunkim%2Fsolar-writer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunkim%2Fsolar-writer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunkim%2Fsolar-writer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunkim%2Fsolar-writer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hunkim","download_url":"https://codeload.github.com/hunkim/solar-writer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hunkim%2Fsolar-writer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261808072,"owners_count":23212694,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-25T05:11:29.961Z","updated_at":"2025-06-25T05:11:30.591Z","avatar_url":"https://github.com/hunkim.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Solar Writer App\n\nAn AI-powered content creation application that helps you generate professional content from various sources including documents and web pages.\n\n## Features\n\n- **Document Processing**: Upload PDF, DOC, DOCX, or TXT files and extract content using Upstage Document Parse API\n- **Web Content Extraction**: Extract clean content from web pages using Firecrawl API\n- **AI Content Generation**: Multi-phase content generation with SolarLLM:\n  - **Section Refinement**: Analyzes and optimizes your outline structure\n  - **Content Writing**: Generates high-quality content for each section\n  - **Coherence Improvement**: Refines the complete document for consistency and flow\n- **Interactive Refinement**: Real-time chat interface for content adjustments:\n  - Change tone, style, and length\n  - Add or remove details\n  - Restructure sections\n  - Multiple refinement iterations\n\n## Setup\n\n### Prerequisites\n\n- Node.js 18 or higher\n- npm or pnpm package manager\n\n### Installation\n\n1. Clone the repository\n2. Install dependencies:\n   ```bash\n   npm install\n   ```\n\n### Environment Variables\n\nCreate a `.env.local` file in the root directory with the following variables:\n\n```env\n# Upstage API Key for Document Parse and SolarLLM\nUPSTAGE_API_KEY=your_upstage_api_key_here\n\n# Firecrawl API Key for URL content extraction\nFIRECRAWL_API_KEY=your_firecrawl_api_key_here\n\n# Tavily API Key for real-time search enhancement (optional)\nTAVILY_API_KEY=your_tavily_api_key_here\n\n# Upstage Model Name (optional, defaults to solar-pro2-preview)\nUPSTAGE_MODEL_NAME=solar-pro2-preview\n```\n\n#### Getting API Keys\n\n1. **Upstage API Key**: \n   - Visit [Upstage Console](https://console.upstage.ai/)\n   - Sign up or log in\n   - Navigate to API Keys section\n   - Create a new API key for Document Parse and SolarLLM\n\n2. **Firecrawl API Key**:\n   - Visit [Firecrawl](https://firecrawl.dev/)\n   - Sign up or log in\n   - Get your API key from the dashboard\n\n3. **Tavily API Key** (Optional but recommended):\n   - Visit [Tavily](https://tavily.com/)\n   - Sign up or log in\n   - Get your API key from the dashboard\n   - Note: Without this key, content generation will work but won't include real-time search enhancement\n\n4. **Upstage Model Configuration** (Optional):\n   - Set `UPSTAGE_MODEL_NAME` to specify which Upstage model to use\n   - Defaults to `solar-pro2-preview` if not specified\n   - Available models: `solar-pro2-preview`, `solar-pro`, etc.\n\n### Running the Application\n\n```bash\nnpm run dev\n```\n\nThe application will be available at `http://localhost:3000`.\n\n## Usage\n\n1. **Create a Project**: Start by entering a title for your content project\n2. **Add Sources** (optional):\n   - **Text**: Paste reference text directly\n   - **URL**: Enter a web page URL and click \"Extract Content\" to scrape it\n   - **Upload**: Upload documents (PDF, DOC, DOCX, TXT) for automatic content extraction\n3. **Select Content Type**: Choose the type of content you want to generate\n4. **Provide Outline**: Enter a structured outline for your content\n5. **AI Generation Process**:\n   - **Phase 1**: Section analysis and refinement using your sources\n   - **Phase 2**: Enhanced content generation with real-time search\n     - Automatic keyword extraction for each section\n     - Real-time web search using Tavily API\n     - Integration of current information with your provided sources\n   - **Phase 3**: Coherence and consistency refinement\n6. **Interactive Refinement**: Use the chat interface to:\n   - Request tone or style changes\n   - Adjust content length\n   - Add specific details or examples\n   - Make structural improvements\n   - Continue refining until satisfied\n\n## API Integrations\n\n### Upstage SolarLLM\n\nUsed for intelligent content generation and refinement:\n- **Content Planning**: Analyzes outlines and optimizes section structure\n- **Content Writing**: Generates professional, contextual content\n- **Coherence Refinement**: Ensures consistency and flow across sections\n- **Interactive Chat**: Real-time content modifications based on user feedback\n\n### Upstage Document Parse\n\nUsed for extracting text content from uploaded documents. Supports:\n- PDF files\n- Microsoft Word documents (.doc, .docx)\n- Plain text files (.txt)\n\n### Firecrawl\n\nUsed for extracting clean, structured content from web pages. Features:\n- Automatic content extraction\n- Removes navigation, ads, and other non-content elements\n- Returns markdown-formatted text\n- Extracts metadata like title, description, and author\n\n### Tavily Search API\n\nEnhances content generation with real-time search capabilities:\n- Intelligent keyword extraction from section context\n- Advanced web search with raw content inclusion\n- Current and factual information retrieval\n- Seamless integration with existing content sources\n- Automatically filters out low-quality sources (social media, forums)\n\n## Tech Stack\n\n- **Framework**: Next.js 15 with App Router\n- **UI**: React with Tailwind CSS and Radix UI components\n- **Document Processing**: Upstage Document Parse API\n- **Web Scraping**: Firecrawl API\n- **TypeScript**: Full type safety throughout the application\n\n## Development\n\nThe project uses:\n- TypeScript for type safety\n- Tailwind CSS for styling\n- Radix UI for accessible components\n- Next.js API routes for backend functionality\n\n## License\n\nThis project is licensed under the MIT License. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhunkim%2Fsolar-writer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhunkim%2Fsolar-writer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhunkim%2Fsolar-writer/lists"}