Skip to content

Commit a5e536c

Browse files
authored
Merge pull request #2 from victorhuangwq/feat/reddit
Feat/reddit
2 parents c726d11 + 3a5a309 commit a5e536c

File tree

15 files changed

+1064
-567
lines changed

15 files changed

+1064
-567
lines changed

.env.local.example

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
# Google AI API Key
1+
# Google AI API Key (required)
22
# Get your API key from https://aistudio.google.com/apikey
33
GOOGLE_AI_API_KEY=your_google_ai_api_key_here
44

5+
# Google AI API Key for text generation (optional)
6+
# If present, this key will be used for text generation instead of the main key
7+
# Get your API key from https://aistudio.google.com/apikey
8+
GOOGLE_AI_TEXT_API_KEY=your_google_ai_text_api_key_here
9+
510
# Google Analytics Measurement ID
611
# Get this from your Google Analytics 4 property settings
712
# Format: G-XXXXXXXXXX

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Transform your written stories into stunning visual manga or comic book pages us
3434
## Features
3535

3636
- **Multi-Style Generation**: Choose between Japanese manga or American comic book styles
37+
- **Import from Reddit**: Automatically fetch stories from Reddit by visiting `storytomanga.com/r/<subreddit>/comments/...`
3738
- **Character Consistency**: AI generates character reference sheets and maintains visual consistency across panels
3839
- **Progressive Display**: See character designs first, then comic pages as they're generated
3940
- **State Persistence**: Your work is automatically saved - refresh without losing progress
@@ -80,6 +81,14 @@ Edit `.env.local` and add your API key:
8081
GOOGLE_AI_API_KEY=your_actual_api_key_here
8182
```
8283

84+
**Optional**: If you want to use a separate API key for text generation (story analysis and chunking), you can also set:
85+
86+
```
87+
GOOGLE_AI_TEXT_API_KEY=your_text_generation_api_key_here
88+
```
89+
90+
If `GOOGLE_AI_TEXT_API_KEY` is provided, it will be used for text generation operations. If not, `GOOGLE_AI_API_KEY` will be used for all operations.
91+
8392
### 4. Run Development Server
8493

8594
```bash
@@ -110,6 +119,17 @@ Visit **[app.storytomanga.com](https://app.storytomanga.com)** or run locally:
110119
- Generates individual panels
111120
5. Download individual panels or create a shareable composite image
112121

122+
## Importing from Reddit
123+
124+
You can automatically load a story from a Reddit post by going to a URL with the path to the post.
125+
126+
**Example:**
127+
```
128+
https://app.storytomanga.com/r/<subreddit>/comments/...
129+
```
130+
131+
This will load the story from the URL and automatically start the comic generation process.
132+
113133
## Deployment to AWS Amplify
114134

115135
1. Push your code to GitHub

next.config.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,19 @@ import type { NextConfig } from "next";
33
const nextConfig: NextConfig = {
44
serverExternalPackages: ["pino", "pino-pretty"],
55
outputFileTracingRoot: __dirname,
6+
async headers() {
7+
return [
8+
{
9+
source: "/(.*)",
10+
headers: [
11+
{
12+
key: "Access-Control-Allow-Origin",
13+
value: "*",
14+
},
15+
],
16+
},
17+
];
18+
},
619
};
720

821
export default nextConfig;

package-lock.json

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
"devDependencies": {
2727
"@biomejs/biome": "2.2.4",
2828
"@tailwindcss/postcss": "4.1.13",
29-
"@types/node": "24.3.1",
30-
"@types/react": "19.1.12",
29+
"@types/node": "24.4.0",
30+
"@types/react": "19.1.13",
3131
"@types/react-dom": "19.1.9",
3232
"knip": "5.63.1",
3333
"postcss": "8.5.6",

pnpm-lock.yaml

Lines changed: 20 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)