Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 0 additions & 3 deletions .eslintrc.json

This file was deleted.

12 changes: 0 additions & 12 deletions .github/workflows/eslint.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Format

on: [push, pull_request]

jobs:
Format:
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}

steps:
- uses: actions/checkout@v4

- uses: oven-sh/setup-bun@v1

- name: Install modules
run: bun install

- name: Run Format
run: bun run format
21 changes: 21 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Lint

on: [push, pull_request]

jobs:
Lint:
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}

steps:
- uses: actions/checkout@v4

- uses: oven-sh/setup-bun@v1

- name: Install modules
run: bun install

- name: Run ESLint
run: bun run lint
21 changes: 21 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Test

on: [push, pull_request]

jobs:
Test:
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}

steps:
- uses: actions/checkout@v4

- uses: oven-sh/setup-bun@v1

- name: Install modules
run: bun install

- name: Run Tests
run: bun test
21 changes: 21 additions & 0 deletions .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Typecheck

on: [push, pull_request]

jobs:
Typecheck:
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}

steps:
- uses: actions/checkout@v4

- uses: oven-sh/setup-bun@v1

- name: Install modules
run: bun install

- name: Run Typecheck
run: bun run typecheck
55 changes: 7 additions & 48 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,56 +1,15 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
pnpm-lock.yaml

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
node_modules
.next/
out/
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.env
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

# venv for python processors
venv/
.venv/

# vscode settings
.vscode/
.env

# raw game data
/src/research/raw_data/*.json
/scripts/content/**/*.json

# local saves for testing and inspection
/save_files

# python stuff
.turbo
venv
.venv
__pycache__/
# Sentry Config File
.sentryclirc
3 changes: 0 additions & 3 deletions .prettierrc

This file was deleted.

3 changes: 3 additions & 0 deletions apps/stardew.app/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
9 changes: 9 additions & 0 deletions apps/stardew.app/drizzle.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConfig } from "drizzle-kit";
export default defineConfig({
schema: "./src/db/schema.ts",
out: "./src/drizzle",
dialect: "mysql",
dbCredentials: {
url: process.env.DATABASE_URL!,
},
});
41 changes: 41 additions & 0 deletions apps/stardew.app/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
redirects: async () => {
return [
{
source: "/discord",
destination: "https://discord.gg/9K3TgZaPkT",
permanent: true,
},
{
source: "/github",
destination: "https://github.com/communitycenter/stardew.app",
permanent: true,
},
{
source: "/social",
destination: "/relationships",
permanent: true,
},
{
source: "/artifacts",
destination: "/museum",
permanent: true,
},
];
},
images: {
unoptimized: true,
remotePatterns: [
{
protocol: "https",
hostname: "stardewvalleywiki.com",
port: "",
pathname: "/mediawiki/images/**",
},
],
},
};

module.exports = nextConfig;
82 changes: 82 additions & 0 deletions apps/stardew.app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"name": "stardew.app",
"version": "2.3.0",
"private": true,
"scripts": {
"build": "next build",
"build:turbo": "next build --turbopack",
"clean": "rimraf .next .turbo",
"dev": "next dev",
"dev:turbo": "next dev --turbopack",
"format": "bun run prettier . --check",
"lint": "next lint",
"start": "next start",
"typecheck": "tsgo --noEmit"
},
"dependencies": {
"@heroicons/react": "^2.0.18",
"@hookform/resolvers": "^3.9.1",
"@marsidev/react-turnstile": "^0.5.3",
"@next/bundle-analyzer": "^14.0.4",
"@planetscale/database": "^1.10.0",
"@radix-ui/react-accordion": "^1.1.2",
"@radix-ui/react-avatar": "^1.0.3",
"@radix-ui/react-checkbox": "^1.0.4",
"@radix-ui/react-context-menu": "^2.1.4",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-dropdown-menu": "^2.0.5",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-popover": "^1.0.6",
"@radix-ui/react-progress": "^1.0.3",
"@radix-ui/react-scroll-area": "^1.0.4",
"@radix-ui/react-select": "^1.2.2",
"@radix-ui/react-separator": "^1.0.3",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-switch": "^1.0.3",
"@radix-ui/react-tabs": "^1.0.4",
"@radix-ui/react-toast": "^1.1.4",
"@radix-ui/react-toggle": "^1.1.9",
"@radix-ui/react-toggle-group": "^1.1.10",
"@radix-ui/react-tooltip": "^1.0.6",
"@react-hook/media-query": "^1.1.1",
"@tabler/icons-react": "^2.30.0",
"@types/node": "20.4.0",
"@types/react": "18.2.14",
"@types/react-dom": "18.2.6",
"autoprefixer": "10.4.14",
"axios": "^1.7.2",
"class-variance-authority": "^0.6.1",
"clsx": "^1.2.1",
"cmdk": "^0.2.0",
"cookies-next": "^2.1.2",
"drizzle-orm": "^0.31.2",
"eslint": "8.44.0",
"eslint-config-next": "13.4.12",
"fast-xml-parser": "^4.2.6",
"lucide-react": "^0.522.0",
"mysql2": "^3.10.1",
"next": "^14.2.3",
"next-themes": "^0.2.1",
"postcss": "8.4.24",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-dropzone": "^14.2.3",
"react-hook-form": "^7.45.4",
"semver": "^7.5.4",
"sonner": "^1.3.1",
"swr": "^2.2.1",
"tailwind-merge": "^1.13.2",
"tailwindcss": "3.3.2",
"tailwindcss-animate": "^1.0.6",
"typescript": "5.1.6",
"vaul": "^0.8.0",
"zod": "^3.23.8"
},
"devDependencies": {
"@0x57/prettier-config": "^1.0.0",
"drizzle-kit": "^0.22.7",
"prettier": "^3.2.5",
"prettier-plugin-tailwindcss": "^0.5.11"
}
}
6 changes: 6 additions & 0 deletions apps/stardew.app/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
2 changes: 2 additions & 0 deletions apps/stardew.app/prettier.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import config from "@0x57/prettier-config";
export default config;
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
60 changes: 60 additions & 0 deletions apps/stardew.app/src/components/cards/achievement-card.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import Image from "next/image";

import type { Achievement } from "@/types/items";

import { usePlayers } from "@/contexts/players-context";
import { cn } from "@/lib/utils";

interface Props {
achievement: Achievement;
additionalDescription?: string;
completed: boolean;
}

export const AchievementCard = ({
achievement,
additionalDescription,
completed,
}: Props) => {
/* -------------------- clickable classes (not used yet) -------------------- */
/*
let checkedClass = completed
? "border-green-900 bg-green-500/20 hover:bg-green-500/30 dark:bg-green-500/10 hover:dark:bg-green-500/20 hover:cursor-pointer"
: "border-neutral-200 bg-white dark:border-neutral-800 dark:bg-neutral-950 hover:bg-neutral-100 dark:hover:bg-neutral-800 hover:cursor-pointer";
*/
let checkedClass = completed
? "border-green-900 bg-green-500/20 dark:bg-green-500/10"
: "border-neutral-200 bg-white dark:border-neutral-800 dark:bg-neutral-950";

const { activePlayer } = usePlayers();
if (
activePlayer?.general?.achievements &&
achievement.gameID &&
activePlayer.general.achievements.includes(achievement.gameID)
) {
completed = true;
}

return (
<div
className={cn(
"flex select-none items-center space-x-3 rounded-lg border px-5 py-4 text-neutral-950 shadow-sm transition-colors dark:text-neutral-50",
checkedClass,
)}
>
<Image
src={achievement.iconURL}
alt={achievement.name}
className={completed ? "rounded-sm" : "rounded-sm grayscale"}
width={48}
height={48}
/>
<div className="min-w-0 flex-1">
<p className="truncate font-medium">{achievement.name}</p>
<p className="truncate text-sm text-neutral-500 dark:text-neutral-400">
{achievement.description + (additionalDescription ?? "")}
</p>
</div>
</div>
);
};
Loading
Loading