Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ jobs:
- name: TypeScript (web)
run: pnpm --filter @nepp-chan/web exec tsc --noEmit

- name: TypeScript (lp)
run: pnpm --filter @nepp-chan/lp exec tsc --noEmit

test:
name: Test
runs-on: ubuntu-latest
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,33 @@ jobs:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
PUBLIC_API_URL: https://dev-api.nepp-chan.ai
PUBLIC_LP_URL: https://dev-lp.nepp-chan.ai
PUBLIC_SENTRY_DSN: ${{ secrets.SENTRY_DSN_WEB }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT_WEB: ${{ secrets.SENTRY_PROJECT_WEB }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}

deploy-lp:
name: Deploy LP
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 10

- uses: actions/setup-node@v4
with:
node-version: 24
cache: "pnpm"

- run: pnpm install --frozen-lockfile

- name: Deploy LP
run: pnpm lp:deploy:dev
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
PUBLIC_API_URL: https://dev-api.nepp-chan.ai
PUBLIC_WEB_URL: https://dev-web.nepp-chan.ai
27 changes: 27 additions & 0 deletions .github/workflows/deploy-prd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,34 @@ jobs:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
PUBLIC_API_URL: https://api.nepp-chan.ai
PUBLIC_LP_URL: https://nepp-chan.ai
PUBLIC_SENTRY_DSN: ${{ secrets.SENTRY_DSN_WEB }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT_WEB: ${{ secrets.SENTRY_PROJECT_WEB }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}

deploy-lp:
name: Deploy LP
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 10

- uses: actions/setup-node@v4
with:
node-version: 24
cache: "pnpm"

- run: pnpm install --frozen-lockfile

- name: Deploy LP
run: pnpm lp:deploy:prd
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
PUBLIC_API_URL: https://api.nepp-chan.ai
PUBLIC_WEB_URL: https://web.nepp-chan.ai
2 changes: 1 addition & 1 deletion .tagpr
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
[tagpr]
vPrefix = true
releaseBranch = develop
versionFile = package.json,server/package.json,web/package.json
versionFile = package.json,server/package.json,web/package.json,lp/package.json
release = true
changelog = true
14 changes: 8 additions & 6 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Cloudflare Workers(API)+ Pages(Web)のモノレポ構成。
# 開発
pnpm server:dev # API 開発サーバー(8787)
pnpm web:dev # Web 開発サーバー(5173)
pnpm lp:dev # LP 開発サーバー(5174)

# 品質チェック
pnpm lint # Biome + astro check + tsc
Expand All @@ -30,7 +31,8 @@ pnpm knowledge:upload:prd # prd 環境

```text
server/ → API(詳細: server/CLAUDE.md)
web/ → フロントエンド(詳細: web/CLAUDE.md)
web/ → アプリ(チャット・ダッシュボード等)(詳細: web/CLAUDE.md)
lp/ → LP(apex 配信の静的サイト)
knowledge/ → RAG 用 Markdown ファイル
```

Expand Down Expand Up @@ -128,11 +130,11 @@ wrangler secret put GOOGLE_GENERATIVE_AI_API_KEY

## デプロイ環境

| 環境 | Web | API |
| ---- | --- | --- |
| ローカル | http://localhost:5173 | http://localhost:8787 |
| dev | https://dev-web.nepp-chan.ai | https://dev-api.nepp-chan.ai |
| prd | https://web.nepp-chan.ai | https://api.nepp-chan.ai |
| 環境 | LP | Web | API |
| ---- | --- | --- | --- |
| ローカル | http://localhost:5174 | http://localhost:5173 | http://localhost:8787 |
| dev | https://dev-lp.nepp-chan.ai | https://dev-web.nepp-chan.ai | https://dev-api.nepp-chan.ai |
| prd | https://nepp-chan.ai | https://web.nepp-chan.ai | https://api.nepp-chan.ai |

## ブランチ

Expand Down
1 change: 1 addition & 0 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"**",
"!**/node_modules",
"!**/dist",
"!**/.astro",
"!**/.mastra",
"!**/.wrangler",
"!**/*.d.ts",
Expand Down
2 changes: 2 additions & 0 deletions lp/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PUBLIC_API_URL=http://localhost:8787
PUBLIC_WEB_URL=http://localhost:5173
24 changes: 24 additions & 0 deletions lp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
17 changes: 17 additions & 0 deletions lp/astro.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import react from "@astrojs/react";
import tailwindcss from "@tailwindcss/vite";
import { defineConfig } from "astro/config";

export default defineConfig({
output: "static",
server: { port: 5174 },
integrations: [react()],
vite: {
plugins: [tailwindcss()],
resolve: {
alias: {
"~": "/src",
},
},
},
});
23 changes: 23 additions & 0 deletions lp/functions/_middleware.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
interface Env {
BASIC_AUTH_USER: string;
BASIC_AUTH_PASSWORD: string;
}

export const onRequest: PagesFunction<Env> = async (context) => {
const { BASIC_AUTH_USER, BASIC_AUTH_PASSWORD } = context.env;

// Basic 認証
if (BASIC_AUTH_USER && BASIC_AUTH_PASSWORD) {
const auth = context.request.headers.get("Authorization");
const expected = `Basic ${btoa(`${BASIC_AUTH_USER}:${BASIC_AUTH_PASSWORD}`)}`;

if (auth !== expected) {
return new Response("Unauthorized", {
status: 401,
headers: { "WWW-Authenticate": 'Basic realm="Secure Area"' },
});
}
}

return context.next();
};
37 changes: 37 additions & 0 deletions lp/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "@nepp-chan/lp",
"private": true,
"version": "0.4.3",
"type": "module",
"scripts": {
"dev": "astro dev",
"build": "astro build",
"check": "astro check",
"preview": "astro preview",
"deploy": "pnpm build && wrangler pages deploy --project-name nepp-chan-lp-dev --branch develop",
"deploy:prd": "pnpm build && wrangler pages deploy --project-name nepp-chan-lp-prd --branch main"
},
"dependencies": {
"@ai-sdk/react": "^2.0.109",
"@astrojs/check": "^0.9.8",
"@astrojs/react": "^5.0.1",
"ai": "^5.0.108",
"astro": "^6.1.3",
"clsx": "^2.1.1",
"lucide-react": "^0.562.0",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"react-markdown": "^10.1.0",
"remark-gfm": "^4.0.1",
"tailwind-merge": "^3.4.0"
},
"devDependencies": {
"@tailwindcss/vite": "^4.2.2",
"@types/node": "^25.5.0",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"tailwindcss": "^4.1.10",
"typescript": "~5.9.3",
"wrangler": "^4.76.0"
}
}
Binary file added lp/public/bg-winter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions lp/public/favicon-chat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lp/public/logo-neppu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
Binary file added lp/public/mascot/expr-content.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lp/public/mascot/expr-laugh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lp/public/mascot/expr-pout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lp/public/mascot/expr-shy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lp/public/mascot/expr-startled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lp/public/mascot/expr-surprise.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lp/public/mascot/expr-wave-smile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lp/public/mascot/expr-zzz.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lp/public/mascot/pose-banzai.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lp/public/mascot/pose-fullbody-v2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lp/public/mascot/pose-fullbody-v3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lp/public/mascot/pose-nap-curled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lp/public/mascot/pose-point.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lp/public/mascot/pose-seated.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lp/public/mascot/pose-shy-stand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lp/public/mascot/pose-sleeping.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lp/public/mascot/pose-stretch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lp/public/mascot/pose-wave.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { MessageCircleIcon } from "lucide-react";
import { WEB_URL } from "~/constants/urls";
import { useScrollReveal } from "~/hooks/useScrollReveal";
import { LineIcon } from "./LineIcon";

Expand All @@ -22,7 +23,7 @@ export const FinalCTA = () => {
</p>
<div className="mt-8 flex flex-wrap items-center justify-center gap-3">
<a
href="/"
href={WEB_URL}
className="inline-flex items-center gap-2 rounded-(--r-pill) bg-(--brand) px-6 py-3.5 text-sm font-bold text-white shadow-(--shadow-brand) transition-all duration-200 hover:-translate-y-0.5 hover:bg-(--brand-hover)"
>
<MessageCircleIcon className="size-4" aria-hidden="true" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { MailIcon } from "lucide-react";
import { WEB_URL } from "~/constants/urls";

export const FooterSection = () => (
<footer className="border-t border-(--paper-200) bg-(--paper-100)/40 px-7 pb-10 pt-16">
Expand Down Expand Up @@ -33,7 +34,7 @@ export const FooterSection = () => (
<ul className="mt-3 flex flex-col gap-2 text-[13px]">
<li>
<a
href="/"
href={WEB_URL}
className="text-(--fg-2) transition-colors hover:text-(--brand)"
>
Web版で話す
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { MessageSquareIcon } from "lucide-react";
import { WEB_URL } from "~/constants/urls";
import { useScrollReveal } from "~/hooks/useScrollReveal";
import { LineIcon } from "./LineIcon";
import { MiniChat } from "./MiniChat";
Expand Down Expand Up @@ -43,7 +44,7 @@ export const Hero = () => {

<div className="mt-8 flex flex-col gap-3 sm:flex-row sm:flex-wrap sm:items-center">
<a
href="/"
href={WEB_URL}
className="flex items-center justify-center gap-2 rounded-(--r-pill) bg-(--brand) px-6 py-3.5 text-sm font-bold text-white shadow-(--shadow-brand) transition-all duration-200 ease-[cubic-bezier(0.22,1,0.36,1)] hover:-translate-y-0.5 hover:bg-(--brand-hover) hover:shadow-[0_10px_24px_rgba(15,118,110,0.32)]"
>
<MessageSquareIcon className="size-4" aria-hidden="true" />
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ArrowRightIcon, EllipsisIcon, SendIcon } from "lucide-react";
import { type FormEvent, useEffect, useMemo, useRef, useState } from "react";
import ReactMarkdown from "react-markdown";
import remarkGfm from "remark-gfm";
import { API_BASE } from "~/lib/api/client";
import { API_URL, WEB_URL } from "~/constants/urls";
import { cn } from "~/lib/class-merge";

const SAMPLE_QUESTIONS: ReadonlyArray<string> = [
Expand Down Expand Up @@ -39,7 +39,7 @@ export const MiniChat = () => {
const transport = useMemo(
() =>
new DefaultChatTransport({
api: `${API_BASE}/simple-chat`,
api: `${API_URL}/simple-chat`,
prepareSendMessagesRequest({ messages: msgs }) {
return { body: { message: msgs[msgs.length - 1] } };
},
Expand Down Expand Up @@ -232,7 +232,7 @@ export const MiniChat = () => {

{hasCompletedExchange ? (
<a
href="/"
href={WEB_URL}
className={cn(
"mt-3 flex items-center justify-center gap-2 rounded-(--r-pill)",
"bg-(--brand) px-4 py-3 text-sm font-bold text-white shadow-(--shadow-brand)",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { WEB_URL } from "~/constants/urls";

const LINKS = [
{ href: "#chat", label: "話しかける" },
{ href: "#features", label: "機能" },
Expand Down Expand Up @@ -32,7 +34,7 @@ export const Nav = () => (
</div>

<a
href="/"
href={WEB_URL}
className="ml-auto rounded-(--r-pill) bg-(--brand) px-3 py-1.5 text-xs font-semibold text-white shadow-(--shadow-sm) transition-all duration-200 hover:-translate-y-px hover:bg-(--brand-hover) hover:shadow-(--shadow-brand) sm:px-4 sm:py-2 sm:text-sm md:ml-0"
>
いますぐ話す
Expand Down
Loading
Loading