feat(scraper): implement One Piece data scraper for devil fruits and characters

- Added a new script to scrape devil fruits and characters from One Piece fandom.
- Implemented functions to fetch, normalize, and save data in JSON, CSV, and SQL formats.
- Created a structured output directory for scraped data.

feat(database): update schema for devil fruits and characters

- Defined new types for devil fruits and haki in the database schema.
- Updated the character table to include fields for age, affiliations, devil fruit, haki, bounty, height, origin, first appearance, and picture URL.

feat(ui): enhance main page and daily mode layout

- Redesigned the main page with a new layout and styling for the OnePieceDle game.
- Created a new daily mode page with sections for clues and user input for guesses.
- Removed demo authentication routes and pages to streamline the application.
This commit is contained in:
2026-02-27 01:14:44 +01:00
parent c494866a70
commit 6f7bae2307
17 changed files with 2407 additions and 165 deletions

View File

@@ -1,11 +1,44 @@
import { integer, sqliteTable, text } from 'drizzle-orm/sqlite-core';
import { integer, sqliteTable, text, real } from 'drizzle-orm/sqlite-core';
export const task = sqliteTable('task', {
// Define haki types
export type HakiType = 'Observation' | 'Armament' | 'Conqueror';
// Define devil fruit types
export type DevilFruitType = 'Paramecia' | 'Zoan' | 'Logia' | 'Unknown';
// Define the devil fruit table schema
export const devilFruit = sqliteTable('devilFruit', {
id: text('id').primaryKey(),
name: text('name').notNull().unique(),
type: text('type').$type<DevilFruitType>()
});
// Define the character table schema
export const character = sqliteTable('character', {
id: text('id').primaryKey(),
name: text('name').notNull(),
gender: text('gender'),
age: integer('age'),
affiliations: text('affiliations'),
devilFruit: text('devilFruit').references(() => devilFruit.id),
haki: text('haki', { mode: 'json' }).$type<HakiType[]>(),
bounty: integer('bounty'),
// height in meters as a float (e.g. 1.75)
height: real('height'),
origin: text('origin'),
firstAppearance: text('firstAppearance'),
pictureUrl: text('pictureUrl')
});
// Define the caracter history table schema
export const characterHistory = sqliteTable('characterHistory', {
id: text('id')
.primaryKey()
.$defaultFn(() => crypto.randomUUID()),
title: text('title').notNull(),
priority: integer('priority').notNull().default(1)
characterId: text('characterId').references(() => character.id),
date: integer('date'),
createdAt: integer('createdAt').notNull().$default(() => Date.now()),
updatedAt: integer('updatedAt').notNull().$default(() => Date.now()),
});
export * from './auth.schema';