chore: remove frontend files
This commit is contained in:
34
frontend/.gitignore
vendored
34
frontend/.gitignore
vendored
@ -1,34 +0,0 @@
|
||||
# dependencies (bun install)
|
||||
node_modules
|
||||
|
||||
# output
|
||||
out
|
||||
dist
|
||||
*.tgz
|
||||
|
||||
# code coverage
|
||||
coverage
|
||||
*.lcov
|
||||
|
||||
# logs
|
||||
logs
|
||||
_.log
|
||||
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
|
||||
|
||||
# dotenv environment variable files
|
||||
.env
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
.env.local
|
||||
|
||||
# caches
|
||||
.eslintcache
|
||||
.cache
|
||||
*.tsbuildinfo
|
||||
|
||||
# IntelliJ based IDEs
|
||||
.idea
|
||||
|
||||
# Finder (MacOS) folder config
|
||||
.DS_Store
|
@ -1,15 +0,0 @@
|
||||
# podcast-frontend
|
||||
|
||||
To install dependencies:
|
||||
|
||||
```bash
|
||||
bun install
|
||||
```
|
||||
|
||||
To run:
|
||||
|
||||
```bash
|
||||
bun run src/index.tsx
|
||||
```
|
||||
|
||||
This project was created using `bun init` in bun v1.2.15. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.
|
@ -1,50 +0,0 @@
|
||||
{
|
||||
"lockfileVersion": 1,
|
||||
"workspaces": {
|
||||
"": {
|
||||
"name": "podcast-frontend",
|
||||
"dependencies": {
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0",
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/bun": "latest",
|
||||
"@types/react": "^18.0.0",
|
||||
"@types/react-dom": "^18.0.0",
|
||||
"bun-types": "^0.1.0",
|
||||
"typescript": "^4.0.0",
|
||||
},
|
||||
},
|
||||
},
|
||||
"packages": {
|
||||
"@types/bun": ["@types/bun@1.2.15", "", { "dependencies": { "bun-types": "1.2.15" } }, "sha512-U1ljPdBEphF0nw1MIk0hI7kPg7dFdPyM7EenHsp6W5loNHl7zqy6JQf/RKCgnUn2KDzUpkBwHPnEJEjII594bA=="],
|
||||
|
||||
"@types/node": ["@types/node@22.15.29", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-LNdjOkUDlU1RZb8e1kOIUpN1qQUlzGkEtbVNo53vbrwDg5om6oduhm4SiUaPW5ASTXhAiP0jInWG8Qx9fVlOeQ=="],
|
||||
|
||||
"@types/prop-types": ["@types/prop-types@15.7.14", "", {}, "sha512-gNMvNH49DJ7OJYv+KAKn0Xp45p8PLl6zo2YnvDIbTd4J6MER2BmWN49TG7n9LvkyihINxeKW8+3bfS2yDC9dzQ=="],
|
||||
|
||||
"@types/react": ["@types/react@18.3.23", "", { "dependencies": { "@types/prop-types": "*", "csstype": "^3.0.2" } }, "sha512-/LDXMQh55EzZQ0uVAZmKKhfENivEvWz6E+EYzh+/MCjMhNsotd+ZHhBGIjFDTi6+fz0OhQQQLbTgdQIxxCsC0w=="],
|
||||
|
||||
"@types/react-dom": ["@types/react-dom@18.3.7", "", { "peerDependencies": { "@types/react": "^18.0.0" } }, "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ=="],
|
||||
|
||||
"bun-types": ["bun-types@0.1.11", "", {}, "sha512-a5G9LZtF5qBsDMjGnS5FfTvIeg1bS0PzI3Q2LqShEjJWdhZTB56xO8ewqZ83J+3my5rW/PPPWT/udAofRQ3zdg=="],
|
||||
|
||||
"csstype": ["csstype@3.1.3", "", {}, "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="],
|
||||
|
||||
"js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="],
|
||||
|
||||
"loose-envify": ["loose-envify@1.4.0", "", { "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, "bin": { "loose-envify": "cli.js" } }, "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q=="],
|
||||
|
||||
"react": ["react@18.3.1", "", { "dependencies": { "loose-envify": "^1.1.0" } }, "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ=="],
|
||||
|
||||
"react-dom": ["react-dom@18.3.1", "", { "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.2" }, "peerDependencies": { "react": "^18.3.1" } }, "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw=="],
|
||||
|
||||
"scheduler": ["scheduler@0.23.2", "", { "dependencies": { "loose-envify": "^1.1.0" } }, "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ=="],
|
||||
|
||||
"typescript": ["typescript@4.9.5", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g=="],
|
||||
|
||||
"undici-types": ["undici-types@6.21.0", "", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="],
|
||||
|
||||
"@types/bun/bun-types": ["bun-types@1.2.15", "", { "dependencies": { "@types/node": "*" } }, "sha512-NarRIaS+iOaQU1JPfyKhZm4AsUOrwUOqRNHY0XxI8GI8jYxiLXLcdjYMG9UKS+fwWasc1uw1htV9AX24dD+p4w=="],
|
||||
}
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
{
|
||||
"name": "podcast-frontend",
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^4.0.0",
|
||||
"@types/react": "^18.0.0",
|
||||
"@types/react-dom": "^18.0.0",
|
||||
"bun-types": "^0.1.0",
|
||||
"@types/bun": "latest"
|
||||
},
|
||||
"type": "module",
|
||||
"private": true
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="ja">
|
||||
<head>
|
||||
<base href="/" />
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>ポッドキャスト管理画面</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="../build/index.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -1,14 +0,0 @@
|
||||
import React from "react";
|
||||
import FeedList from "../components/FeedList";
|
||||
import EpisodeList from "../components/EpisodeList";
|
||||
|
||||
export default function App() {
|
||||
return (
|
||||
<div style={{ padding: "20px", fontFamily: "sans-serif" }}>
|
||||
<h1>ポッドキャスト自動生成サービス 管理画面</h1>
|
||||
<FeedList />
|
||||
<hr style={{ margin: "20px 0" }} />
|
||||
<EpisodeList />
|
||||
</div>
|
||||
);
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
import React from "react";
|
||||
import FeedList from "../components/FeedList";
|
||||
import EpisodeList from "../components/EpisodeList";
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<div style={{ padding: "20px", fontFamily: "sans-serif" }}>
|
||||
<h1>ポッドキャスト自動生成サービス 管理画面</h1>
|
||||
<FeedList />
|
||||
<hr style={{ margin: "20px 0" }} />
|
||||
<EpisodeList />
|
||||
</div>
|
||||
);
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
|
||||
interface Episode {
|
||||
id: string;
|
||||
title: string;
|
||||
pubDate: string;
|
||||
audioPath: string;
|
||||
sourceLink: string;
|
||||
}
|
||||
|
||||
export default function EpisodeList() {
|
||||
const [episodes, setEpisodes] = useState<Episode[]>([]);
|
||||
|
||||
useEffect(() => {
|
||||
fetch("/api/episodes")
|
||||
.then((res) => res.json())
|
||||
.then((data) => setEpisodes(data));
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h2>エピソード一覧</h2>
|
||||
<table style={{ width: "100%", borderCollapse: "collapse" }}>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style={{ border: "1px solid #ccc", padding: "8px" }}>
|
||||
タイトル
|
||||
</th>
|
||||
<th style={{ border: "1px solid #ccc", padding: "8px" }}>
|
||||
公開日時
|
||||
</th>
|
||||
<th style={{ border: "1px solid #ccc", padding: "8px" }}>
|
||||
プレビュー
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{episodes.map((ep) => (
|
||||
<tr key={ep.id}>
|
||||
<td style={{ border: "1px solid #ccc", padding: "8px" }}>
|
||||
{ep.title}
|
||||
</td>
|
||||
<td style={{ border: "1px solid #ccc", padding: "8px" }}>
|
||||
{new Date(ep.pubDate).toLocaleString("ja-JP")}
|
||||
</td>
|
||||
<td style={{ border: "1px solid #ccc", padding: "8px" }}>
|
||||
<audio controls preload="none">
|
||||
<source
|
||||
src={`/podcast_audio/${ep.id}.mp3`}
|
||||
type="audio/mpeg"
|
||||
/>
|
||||
お使いのブラウザは audio タグに対応していません。
|
||||
</audio>
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
);
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
|
||||
export default function FeedList() {
|
||||
const [feeds, setFeeds] = useState<string[]>([]);
|
||||
const [newUrl, setNewUrl] = useState("");
|
||||
|
||||
useEffect(() => {
|
||||
fetch("/api/feeds")
|
||||
.then((res) => res.json())
|
||||
.then((data) => setFeeds(data));
|
||||
}, []);
|
||||
|
||||
const addFeed = async () => {
|
||||
if (!newUrl) return;
|
||||
await fetch("/api/feeds", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ feedUrl: newUrl }),
|
||||
});
|
||||
setNewUrl("");
|
||||
const updated = await fetch("/api/feeds").then((res) => res.json());
|
||||
setFeeds(updated);
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h2>RSSフィード管理</h2>
|
||||
<ul>
|
||||
{feeds.map((url) => (
|
||||
<li key={url}>{url}</li>
|
||||
))}
|
||||
</ul>
|
||||
<input
|
||||
type="text"
|
||||
placeholder="RSSフィードURLを入力"
|
||||
value={newUrl}
|
||||
onChange={(e) => setNewUrl(e.target.value)}
|
||||
style={{ width: "300px" }}
|
||||
/>
|
||||
<button onClick={addFeed} style={{ marginLeft: "8px" }}>
|
||||
追加
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
@ -1 +0,0 @@
|
||||
// This file can be removed since Next.js handles the entry point automatically
|
@ -1,20 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noEmit": true,
|
||||
"esModuleInterop": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
Reference in New Issue
Block a user