BikeControl (SwiftControl)
Use Zwift Click, Zwift Play, Shimano Di2, or any Bluetooth controller with MyWhoosh, Rouvy, Zwift, and more. Free to try on iOS, Android, Windows, and macOS.
大学体育館のバドミントンコートをオンラインで予約できるシステム
Translation pending
Sports & fitnessTypeScript · PLpgSQLGitHub @oga-0923OnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Loading the full README. The saved excerpt is shown below.
大学体育館のバドミントンコート予約システム。海外大学の学生体育会向けに無償提供することを想定した、紙ベース予約(コピー配布)を置き換えるアプリです。 • Next.js (App Router) + TypeScript + Tailwind CSS • Supabase (Auth + PostgreSQL + Row Level Security) • Stripe (決済・返金 / 未実装、後日連携予定) • PWA (manifest + Service Worker、QRコードからブラウザ直接アクセス) • 日本語 / English / 中文 の3言語切り替え(カスタム軽量i18n、ヘッダー常時表示) 1. 予約カレンダー画面 (/reserve): コート × 時間枠の空き状況をカレンダー表示。予約・キャンセル操作。 2. アカウント登録・ログイン (/signup, /login): 大学メールアドレスでのメール確認付きサインアップ、プロフィール入力(/profile)。 3. 最小限のバックエンド: Supabase のテーブル設計・RLSポリシー・二重予約防止(ユニーク制約)。Read the full README ↗
大学体育館のバドミントンコート予約システム。海外大学の学生体育会向けに無償提供することを想定した、紙ベース予約(コピー配布)を置き換えるアプリです。
/reserve): コート × 時間枠の空き状況をカレンダー表示。予約・キャンセル操作。/signup, /login): 大学メールアドレスでのメール確認付きサインアップ、プロフィール入力(/profile)。決済(Stripe)連携、体育会スタッフ/管理者向け管理画面、CSV出力、レンタル機能(将来拡張)は未実装です。DB設計はレンタル機能を見据えた形(equipment / equipment_loans テーブル)にしてあります。
supabase.com で新規プロジェクトを作成し、Project Settings > API から URL と anon key を取得します。
Supabase ダッシュボードの SQL Editor で以下を順に実行してください。
supabase/migrations/0001_init.sql -- テーブル・RLS・関数
supabase/seed.sql -- (任意) サンプルコートの投入
もしくは Supabase CLI を使う場合:
supabase link --project-ref <project-ref>
supabase db push
.env.example を .env.local にコピーして値を設定します。
cp .env.example .env.local
NEXT_PUBLIC_SUPABASE_URL / NEXT_PUBLIC_SUPABASE_ANON_KEY: Supabase の Project Settings > APINEXT_PUBLIC_ALLOWED_EMAIL_DOMAINS: サインアップを許可する大学メールドメイン(カンマ区切り)。未設定なら制限なしhttp://localhost:3000/auth/callback(本番URLも追加)を登録してください。npm install
npm run dev
http://localhost:3000 にアクセスします。
app/
(auth)/login, signup # 認証画面
(main)/reserve, profile # 予約カレンダー / プロフィール
auth/callback # Supabase メール確認コールバック
api/reservations # 予約作成・キャンセル API
components/ # UI コンポーネント
lib/supabase/ # Supabase クライアント(browser/server/middleware)
lib/i18n/ # 多言語辞書・Context
lib/reservation/ # 時間枠生成・キャンセル期限などのルール
supabase/migrations/ # DBスキーマ (SQL)
types/database.ts # テーブル型定義
profiles.role に student / staff / admin を保持します(RLSで制御)。現時点では一般学生の予約フローのみ実装済みで、スタッフ/管理者向け画面は未実装です。
reservations テーブルに (court_id, reservation_date, start_time) の部分ユニークインデックス(status in ('pending_payment','confirmed'))を設定し、同時アクセスでも二重予約が発生しないようにしています。status = 'pending_payment' とし、hold_expires_at を過ぎた仮予約は expire_stale_reservations() 関数(pg_cron 等での定期実行を想定)で自動失効させる設計です。MVPでは決済ステップがないため、予約は即座に confirmed になります。