Skip to content

Commit

Permalink
chore: Remove unnecessary console.log statements and update user crea…
Browse files Browse the repository at this point in the history
…tion in auth.server.ts and userService.ts (#10)
  • Loading branch information
ttizze authored Jul 14, 2024
1 parent 77f40e2 commit 6436101
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 66 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ dist-ssr
*.sw?

.env
.env*
.env
bun.lockb
test-results
47 changes: 15 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ EveEve(Everyone Translate Everything)は、インターネットに公開さ
このプロジェクトでは、インターネット上で公開されているテキストを対象としています。ただし、著作権法を遵守し、適切な許可なく著作物を使用しないよう細心の注意を払ってください。

## システム構成
- バックエンド:
- 現在: Hono(API用)
- 将来的に: Remix
- フロントエンド:
- React (Remix SSRモード)
- React (Remix SSRモード)
- 翻訳エンジン: Gemini(現在はコンテキスト長のメリットからこれのみを使用)

## 使用方法
Expand All @@ -43,39 +39,32 @@ EveEve(Everyone Translate Everything)は、インターネットに公開さ
2. 必要な依存関係をインストールします:
```
cd eveeve
bun run install
cd web
bun i
```
3. supabaseを設定します
3. 環境変数ファイルを作成し、必要な値を設定します
```
cd server
bun supabase start
bun supabase db reset
cp .env.example .env
```
4. 環境変数を設定します:
`.env` ファイルを開き、以下の変数を適切な値に設定してください:
- SESSION_SECRET
4. dockerを起動します:
```
touch server/.dev.vars
# .dev.varsに以下の内容を記述します
GEMINI_API_KEY="YOUR_GEMINI_API_KEY"
SUPABASE_URL="YOUR_SUPABASE_URL"
SUPABASE_ANON_KEY="YOUR_SUPABASE_ANON_KEY"
touch web/.env
# .envに以下の内容を記述します
VITE_PUBLIC_API_BASE_URL="http://localhost:8787"
docker compose up -d
```
5. dbの設定を行います:
```
4. 起動します:
bunx prisma migrate dev
```
bun run start
6. 起動します:
```
bun run dev
```
6. ブラウザで `http://localhost:5173` にアクセスして、eveeve を使用開始します。


## 貢献方法
翻訳、プログラミング、デザイン、ドキュメンテーションなど、あらゆる形の貢献を歓迎します。現在特に以下の分野での貢献を求めています:
- Remixへのバックエンドの移行
- 全体設計の壁打ち
- remix-authでの認証認可システムの実装
- prismaでのデータベース管理
- 複数フォーマット対応の実装
- 文字サイズや色の変更機能

Expand All @@ -86,12 +75,6 @@ EveEve(Everyone Translate Everything)は、インターネットに公開さ
- 出力フォーマットは現在限られています。
- 長文テキストの処理に制限があります。

## アーキテクチャに関する注記
現在のアーキテクチャは、APIはHonoを使用して実装され、フロントエンドのRemixとは分離されています。
他プロジェクトで使用していたHonoを流用したためです。全てをRemixへ移行する予定です。
デプロイ先としてCloudflareを使用しています。
しかし将来的にはRenderに移行する予定です。

## ライセンス
このプロジェクトはMITライセンスの下で公開されています。詳細はLICENSEファイルをご覧ください。

Expand Down
File renamed without changes.
20 changes: 0 additions & 20 deletions package.json

This file was deleted.

2 changes: 2 additions & 0 deletions web/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DATABASE_URL="postgres://postgres:password@localhost:5432/postgres"
SESSION_SECRET=
2 changes: 1 addition & 1 deletion web/app/routes/_index/utils/gemini.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export async function getGeminiModelResponse(
target_language: string,
) {
const genAI = new GoogleGenerativeAI(
import.meta.env.VITE_GEMINI_API_KEY ?? "",
import.meta.env.GEMINI_API_KEY ?? "",
);
const safetySetting = [
{
Expand Down
12 changes: 0 additions & 12 deletions web/app/utils/auth.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,6 @@ const formStrategy = new FormStrategy(async ({ form }) => {

authenticator.use(formStrategy, 'user-pass')

if (
!(
process.env.GOOGLE_CLIENT_ID &&
process.env.GOOGLE_CLIENT_SECRET &&
process.env.CLIENT_URL
)
) {
throw new Error(
'GOOGLE_CLIENT_ID、GOOGLE_CLIENT_SECRET、CLIENT_URLが設定されていません。',
)
}

const googleStrategy = new GoogleStrategy<User>(
{
clientID: process.env.GOOGLE_CLIENT_ID || '',
Expand Down

0 comments on commit 6436101

Please sign in to comment.