generated from nhcarrigan/template
feat: initial elysium idle game prototype
Sets up the full monorepo with pnpm workspaces. Includes shared types package, Hono API with Discord OAuth/JWT auth, Prisma v6 + MongoDB Atlas, and React + Vite frontend with game loop, five tabs, and Discord-linked save/load.
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
generator client {
|
||||
provider = "prisma-client-js"
|
||||
}
|
||||
|
||||
datasource db {
|
||||
provider = "mongodb"
|
||||
url = env("DATABASE_URL")
|
||||
}
|
||||
|
||||
model Player {
|
||||
id String @id @default(auto()) @map("_id") @db.ObjectId
|
||||
discordId String @unique
|
||||
username String
|
||||
discriminator String
|
||||
avatar String?
|
||||
characterName String @default("")
|
||||
createdAt Float
|
||||
lastSavedAt Float
|
||||
totalGoldEarned Float @default(0)
|
||||
totalClicks Float @default(0)
|
||||
}
|
||||
|
||||
model GameState {
|
||||
id String @id @default(auto()) @map("_id") @db.ObjectId
|
||||
discordId String @unique
|
||||
state Json
|
||||
updatedAt Float
|
||||
}
|
||||
|
||||
model BossDamageLog {
|
||||
id String @id @default(auto()) @map("_id") @db.ObjectId
|
||||
discordId String
|
||||
bossId String
|
||||
damage Float
|
||||
dealtAt Float
|
||||
|
||||
@@index([discordId, bossId, dealtAt])
|
||||
}
|
||||
Reference in New Issue
Block a user