Skip to content
/ Osewa- Public

Osewa is a data-rich osu! companion web app built with Next.js (App Router), NextAuth, Prisma, Tailwind CSS, and the osu! v2 API. It enables advanced beatmap search, in-depth player metrics (PP breakdown, recent plays, rank history), PP farm detection, favorites/bookmarks, and optional Discord identity sync.

Notifications You must be signed in to change notification settings

fentz26/Osewa-

Repository files navigation

Osewa!

Osewa! is a darker, data-rich osu! companion that helps you:

  • Search beatmaps with mode, ranked status, and popularity filters while surfacing tags and difficulty details.
  • Inspect players deeply—PP breakdown, recent (including fails), rank history, and total performance metrics.
  • Spot PP farm maps by analysing a player's most played beatmapsets.
  • Bookmark favourites & recall searches so you can jump back into promising maps instantly.
  • Sync Discord to carry your community avatar and identity across the app.

Built with Next.js (App Router), NextAuth, Prisma, Tailwind CSS 4, and the osu! v2 API.

Local Setup

  1. Copy the environment template and provide secrets:

    cp env.example .env.local

    Fill in:

    • DATABASE_URL (SQLite path is fine for dev).
    • NEXTAUTH_URL (usually http://localhost:3000).
    • NEXTAUTH_SECRET (generate with openssl rand -base64 32).
    • OSU_CLIENT_ID / OSU_CLIENT_SECRET from your osu! OAuth application.
    • DISCORD_CLIENT_ID / DISCORD_CLIENT_SECRET from the Discord Developer Portal.
  2. Install dependencies:

    npm install
  3. Apply Prisma migrations & generate the client:

    npx prisma migrate dev
  4. Run the development server:

    npm run dev
  5. Visit http://localhost:3000, sign in with osu!, and head to /settings to link Discord or adjust avatar preferences.

Key Directories

  • src/app/page.tsx – landing page + authenticated dashboard entry point.
  • src/components/dashboard/ – beatmap search UI, results grid, player insight panels.
  • src/app/api/osu/* – server routes that proxy osu! API queries with client-credential caching.
  • src/auth.config.ts / src/auth.ts – NextAuth configuration (osu! + Discord, refresh handling, Prisma adapter).
  • prisma/schema.prisma – User/session models plus bookmark & history tables.
  • src/app/settings/page.tsx – account settings (avatar source toggle, Discord connect/disconnect).

Deploying to Vercel

  • Mirror the environment variables from .env.local into the Vercel dashboard.
  • If you move beyond SQLite, point DATABASE_URL to a production database (PlanetScale, Neon, Supabase, etc.) and run npx prisma migrate deploy during build.
  • osu! & Discord redirect URIs must match the production domain: https://your-domain.com/api/auth/callback/{provider}.
  • Enable the “Prisma generate” build step or run it manually after deploy to keep the client in sync.

Scripts

npm run dev      # Start local dev server
npm run build    # Production build
npm run start    # Run the production build locally
npm run lint     # ESLint checks

Security Notes

  • Keep .env.local out of source control.
  • Tokens are stored per-user in the database and refreshed automatically.
  • All /api/user/* and /api/osu/* endpoints enforce authentication.

About

Osewa is a data-rich osu! companion web app built with Next.js (App Router), NextAuth, Prisma, Tailwind CSS, and the osu! v2 API. It enables advanced beatmap search, in-depth player metrics (PP breakdown, recent plays, rank history), PP farm detection, favorites/bookmarks, and optional Discord identity sync.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published