MCPcopy Index your code
hub / github.com/camphor-/relaym-server

github.com/camphor-/relaym-server @v1.4.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.4.2 ↗ · + Follow
530 symbols 2,132 edges 89 files 324 documented · 61%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Relaym Server

Relaym のサーバーサイド API を管理するリポジトリです。

test_and_lint codecov

API 仕様はこちら

開発に参加するには?

  1. CAMPHOR- Code of Conductに同意してください。
  2. CAMPHOR- Labに参加しましょう!

開発を始める前に

STEP1 サービス内容を理解する

詳しくはこちらのリンクを参照してください。 Relaym PRD (プロダクト要求仕様書)

単語の定義もdocs/definition.mdからご覧ください。

STEP2 アーキテクチャを理解する

API リクエストは HTTP で受け付けています。曲の操作にSpotify Web APIを使用しています。

詳しくは docs/architecture.mdをご覧ください。

STEP3 データベースの設計を理解する

Relaym では MySQL をデータベースとして採用しています。

詳しくは docs/database.mdをご覧ください。

STEP4 アプリケーションアーキテクチャを理解する

DDD や Clean Architecture ライクなアーキテクチャを採用しています。

詳しくは docs/application_architecture.mdをご覧ください。

開発

ローカル開発環境のセットアップ

詳しくは docs/development.mdをご覧ください。

一般的な開発ルール

  • GitHub Flow を用いたブランチ管理を行います。
  • 設計は GitHub Issue を使って行います。
  • 新規機能の場合は必ず Issue を立てます。
  • PR, Issue, Commit, Comment は全て日本語を可とします。

レビュー

PR のマージにはレビュワーの Approve を必要とします。

レビューで確認すべき一般的な事項はGoogle エンジニアリング・プラクティス ドキュメントに従います。

Go に関する作法は以下のドキュメントに従います。

Extension points exported contracts — how you extend this code

Player (Interface)
Player はSpotifyの曲の操作に関連するAPIを呼び出すためのインターフェースです。 [4 implementers]
domain/spotify/player.go
Session (Interface)
Session はsessionを管理するためのリポジトリです。 [3 implementers]
domain/repository/session.go
Pusher (Interface)
Pusher はイベントを対応したセッションIDに向けて送信するインターフェースです。 [3 implementers]
domain/event/pusher.go
TransactionDAO (Interface)
(no doc)
database/transaction.go
TrackClient (Interface)
TrackClient はSpotifyの音楽に関連したAPIを呼び出すためのインターフェイスです。 [3 implementers]
domain/spotify/track.go
Auth (Interface)
Auth は認証・認可に関する永続化を担当するリポジトリです。
domain/repository/auth.go
Auth (Interface)
Auth はSpotify OAuthに関連したAPIを呼び出すためのインターフェイスです。
domain/spotify/auth.go
User (Interface)
User はユーザの永続化を担当するリポジトリです。
domain/repository/user.go

Core symbols most depended-on inside this repo

EXPECT
called by 182
domain/mock_spotify/auth.go
Run
called by 82
web/ws/hub.go
FindByID
called by 51
domain/repository/user.go
Update
called by 36
domain/repository/user.go
New
called by 34
log/log.go
Push
called by 32
domain/event/pusher.go
Insert
called by 25
database/transaction.go
FindByIDForUpdate
called by 23
domain/repository/session.go

Shape

Method 287
Function 151
Struct 80
Interface 9
TypeAlias 3

Languages

Go100%
TypeScript1%

Modules by API surface

domain/entity/session.go26 symbols
domain/mock_spotify/player.go20 symbols
domain/mock_repository/session.go20 symbols
usecase/session_timer.go18 symbols
domain/mock_repository/auth.go18 symbols
web/handler/session.go16 symbols
usecase/session_state.go16 symbols
database/session.go16 symbols
domain/entity/sync_check_timer.go15 symbols
spotify/player.go13 symbols
usecase/session_test.go12 symbols
domain/mock_repository/user.go12 symbols

Datastores touched

(mysql)Database · 1 repos

For agents

$ claude mcp add relaym-server \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact