Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
d55a1da
feat: begin rewriting site for next 15
jacobk999 Jan 17, 2025
8cc0bca
feat: bedwars stats
jacobk999 Jan 18, 2025
95eafde
add background mask
jacobk999 Jan 20, 2025
2e1c469
work on homepage
jacobk999 Jan 20, 2025
5f1f582
create ticker component
jacobk999 Jan 21, 2025
311d0d2
make hero look pretty
jacobk999 Jan 22, 2025
dd54191
add player commands section
jacobk999 Jan 23, 2025
f817de3
add profile previews for other games
jacobk999 Jan 23, 2025
a57a567
add bgs for each mode
jacobk999 Feb 12, 2025
7c6267c
leaderboard section
jacobk999 Feb 12, 2025
8b6eeac
aaa
jacobk999 Mar 8, 2025
8dd8c4a
begin session animation
jacobk999 Mar 8, 2025
2b5c2f6
add icons to tabs
jacobk999 Mar 9, 2025
162b77c
feat: add background fade and localize numbers
jacobk999 Mar 10, 2025
84acc72
add multiple players and style fixes
jacobk999 Mar 11, 2025
c6ef910
feat: clean up session animation and start guilds
jacobk999 Mar 13, 2025
f8acb09
guild cards
momenazhar Mar 13, 2025
b499636
card stack v1
jacobk999 Mar 14, 2025
0547a23
feat: guild carousel
jacobk999 Mar 19, 2025
c796c2e
chore: update lockfile
jacobk999 Mar 19, 2025
7f3faad
improve guild section on phone
jacobk999 Mar 19, 2025
3c9480e
drag
jacobk999 Mar 26, 2025
6ee09d6
add game icons
jacobk999 Mar 26, 2025
2548bc6
refactor: guild progression
jacobk999 Mar 28, 2025
814e42e
COOK FOOTER and FIX SECTIONS
jacobk999 Mar 29, 2025
ab89e4a
make cool button
jacobk999 Mar 31, 2025
20d5595
add prefooter
jacobk999 Apr 3, 2025
7e767a5
feat: bingo
momenazhar Apr 8, 2025
5b2d751
a
momenazhar Apr 9, 2025
11d0119
bingo was his namo
jacobk999 Apr 9, 2025
1df3dbc
styles
momenazhar Apr 9, 2025
8f415f5
bingo stats api
momenazhar Apr 10, 2025
d8131cb
remove test file in bingo
momenazhar Apr 10, 2025
324f9bf
aa
jacobk999 Apr 10, 2025
479d02e
feat: get player stats for bingo
jacobk999 Apr 10, 2025
e1621f7
bingo cards colors
momenazhar Apr 10, 2025
e1eb090
bingo search
momenazhar Apr 10, 2025
523f6ee
feat: update sw
jacobk999 Apr 11, 2025
8129406
merge main
jacobk999 Apr 11, 2025
87fe57b
Merge branch 'main' into feat/sitev2
jacobk999 Apr 11, 2025
22eba34
feat: add bingo animation and update homepage messages
jacobk999 Apr 11, 2025
4b8f822
setup routing
jacobk999 Apr 12, 2025
e6b16ec
404 page
momenazhar Apr 12, 2025
eca32bf
home page servers/commands, no player page
momenazhar Apr 12, 2025
3c89c6a
boxes
momenazhar Apr 13, 2025
e053a4b
tabs
jacobk999 Apr 13, 2025
bd72a09
divider comp
momenazhar Apr 13, 2025
6f4413c
merging
momenazhar Apr 13, 2025
2726904
start navbar
momenazhar Apr 13, 2025
581f1ec
update backgrounds
momenazhar Apr 13, 2025
bb6fa3b
remove navbar
momenazhar Apr 13, 2025
9d310a3
link 404 pages up
jacobk999 Apr 13, 2025
832c5df
make autocomplete work
jacobk999 Apr 13, 2025
c3d927f
scale down backgrounds with no blur
momenazhar Apr 13, 2025
23e9c4e
remove viewport heights on backgrounds
momenazhar Apr 13, 2025
d9e94b9
fix not found pages
momenazhar Apr 13, 2025
50ce1ac
darken backgrounds
momenazhar Apr 13, 2025
e5f46a6
cooking
jacobk999 Apr 18, 2025
a51b700
unknown error page, fixes, search 404, links
momenazhar Apr 18, 2025
203504e
refactor: container and content classes
jacobk999 Apr 18, 2025
2e55ad5
fix tailwind slot
jacobk999 Apr 20, 2025
dd03ba5
update lockfile
jacobk999 Apr 20, 2025
6faff83
replace old site
jacobk999 Apr 20, 2025
1d79c45
change site package name
jacobk999 Apr 20, 2025
177c43d
test without font
jacobk999 Apr 20, 2025
471938d
ignore linting
jacobk999 Apr 20, 2025
de66ea4
skin
jacobk999 Apr 20, 2025
db74b79
delete ticker
jacobk999 Apr 20, 2025
fe83b08
set turbo build
jacobk999 Apr 20, 2025
31171ca
use sort over toSorted
jacobk999 Apr 20, 2025
ad7a4b4
optimize font
jacobk999 Apr 20, 2025
dfce96c
unify error pages
jacobk999 Apr 20, 2025
60dd018
sorta unify max width
jacobk999 Apr 20, 2025
c9d2275
responsive styles
momenazhar Apr 22, 2025
edfe4eb
better footer styles
momenazhar Apr 22, 2025
33f36e8
fix footer text size
momenazhar Apr 22, 2025
b9d8228
fix sections center on md
momenazhar Apr 22, 2025
40bf8ae
sum sum
jacobk999 Apr 23, 2025
9c136d3
fix more
jacobk999 Apr 24, 2025
b761f0e
fix: general cleanup
jacobk999 May 7, 2025
fa2dd6d
merge main
jacobk999 Jul 16, 2025
31d18b8
feat: make command mentions copiable with a tooltip
jacobk999 Jul 16, 2025
99bacab
feat: add twitter and opengraph images
jacobk999 Jul 16, 2025
a87074a
faaaa
jacobk999 Jul 16, 2025
dfdc7ad
fix eslint and skins
jacobk999 Jul 17, 2025
29ca828
fix: remove outline from tooltip
jacobk999 Jul 17, 2025
b18d364
aaa mobile
jacobk999 Jul 17, 2025
26c34e2
Merge branch 'main' into feat/sitev2
jacobk999 Aug 11, 2025
70916db
fix: skeletons
momenazhar Aug 11, 2025
49478c5
fix: skeleton box display
jacobk999 Aug 12, 2025
9a5034a
aa
jacobk999 Aug 12, 2025
677b16f
bb
jacobk999 Aug 12, 2025
f006b4a
Merge branch 'main' into feat/sitev2
jacobk999 Aug 26, 2025
3de335f
fix: duels title progression
jacobk999 Aug 26, 2025
aa5ee3b
fix: useUrlState speed
jacobk999 Aug 26, 2025
8b2aab9
make search bar cooler
jacobk999 Aug 26, 2025
b85fba1
remove spread
jacobk999 Aug 26, 2025
b5d4107
fix logo shadow in phone
jacobk999 Aug 26, 2025
36500b7
update next
jacobk999 Aug 26, 2025
ed8b91c
metadata
jacobk999 Aug 26, 2025
b29a71e
lint
jacobk999 Aug 26, 2025
c5f68a4
aa
jacobk999 Aug 27, 2025
2a54535
fix lint
jacobk999 Aug 27, 2025
1f9e011
update vscode settings
jacobk999 Aug 27, 2025
00ee63d
remove useless use client
jacobk999 Aug 27, 2025
b4e0ad6
delete resizablepanel
jacobk999 Aug 27, 2025
263c8c4
update next-env
jacobk999 Aug 27, 2025
8c5f9bc
make typescript happy
jacobk999 Aug 27, 2025
100051c
update lockfile
jacobk999 Aug 27, 2025
963592f
fix appostrophe
jacobk999 Aug 27, 2025
8bd9861
add themeColor to metadata
jacobk999 Aug 27, 2025
951403a
disable prefetch on socials
jacobk999 Aug 27, 2025
a8afb1f
disable prefetch on priv and tos
jacobk999 Aug 27, 2025
a51240c
bbb
jacobk999 Aug 27, 2025
893338f
add speed insights
jacobk999 Aug 27, 2025
247ce97
simplify searching
jacobk999 Aug 27, 2025
d0fead4
add dynamic player favicon
jacobk999 Aug 27, 2025
4d706ab
use prod url
jacobk999 Aug 27, 2025
564dcd8
fix lint
jacobk999 Aug 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 8 additions & 20 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,10 @@
"**/.turbo/**": true,
"**/.pnpm-store/**": true
},
"[handlebars]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[typescriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[typescript]": {
"[js][ts][tsx]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[scss]": {
"[handlebars][json][jsonc][css][scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"i18n-ally.localesPaths": [
Expand All @@ -45,8 +30,11 @@
"todo-tree.tree.scanMode": "workspace only",
"testing.automaticallyOpenPeekView": "never",
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer",
"editor.defaultFormatter": "rust-lang.rust-analyzer"
},
// Uncomment this for working with skin-renderer and WASM
// "rust-analyzer.cargo.target": "wasm32-unknown-unknown"
"tailwindCSS.classAttributes": [
"className",
"containerClass",
"contentClass"
]
}
4 changes: 3 additions & 1 deletion apps/api/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
* https://github.com/Statsify/statsify/blob/main/LICENSE
*/

export { default } from "../../eslint.config.js";
import { defineConfig } from "../../eslint.config.js";

export default defineConfig({ tsconfigDirName: import.meta.dirname });
7 changes: 5 additions & 2 deletions apps/api/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,21 @@ import { TypegooseModule } from "@m8a/nestjs-typegoose";
import { UserModule } from "#user";
import { config } from "@statsify/util";

const mongoUri = await config("database.mongoUri");
const redisUrl = await config("database.redisUrl");

@Module({
imports: [
TypegooseModule.forRootAsync({
useFactory: () => ({
uri: config("database.mongoUri"),
uri: mongoUri,
maxPoolSize: 200,
minPoolSize: 20,
}),
}),
RedisModule.forRoot({
config: {
url: config("database.redisUrl"),
url: redisUrl,
},
}),
PlayerModule,
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/auth/auth.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class AuthGuard implements CanActivate {
) {}

public async canActivate(context: ExecutionContext): Promise<boolean> {
if (config("api.ignoreAuth", { required: false })) {
if (await config("api.ignoreAuth", { required: false })) {
return true;
}

Expand Down
8 changes: 3 additions & 5 deletions apps/api/src/guild/guild.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export class GuildService {
// Add all the days to the guild total exp history
Object.entries(combinedExpHistory)
.sort()
.reverse()
.toReversed()
.slice(0, 30)
.forEach(([day, exp], index) => {
member.expHistory[index] = exp;
Expand All @@ -113,16 +113,14 @@ export class GuildService {
guild.members = await Promise.all(fetchMembers);

await this.playerModel
.updateMany({ guildId: guild.id })
.where("uuid")
.in(requireGuildId)
.updateMany({ $in: { uuid: requireGuildId } }, { guildId: guild.id })
.lean()
.exec();

// Get scaled gexp
Object.entries(guildExpHistory)
.sort()
.reverse()
.toReversed()
.slice(0, 30)
.forEach(([day, exp], index) => {
const scaled = this.scaleGexp(exp);
Expand Down
4 changes: 2 additions & 2 deletions apps/api/src/hypixel/hypixel.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import { config } from "@statsify/util";
HttpModule.register({
baseURL: "https://api.hypixel.net/",
headers: {
"API-Key": config("hypixelApi.key"),
"API-Key": await config("hypixelApi.key"),
"accept-encoding": "*",
},
timeout: config("hypixelApi.timeout", { default: 5000 }),
timeout: await config("hypixelApi.timeout", { default: 5000 }),
}),
],
providers: [HypixelService],
Expand Down
14 changes: 8 additions & 6 deletions apps/api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import * as Sentry from "@sentry/node";
import handlebars from "handlebars";
import packageJson from "../package.json" assert { type: "json" };
import packageJson from "../package.json" with { type: "json" };
import { AppModule } from "./app.module.js";
import { DocumentBuilder, SwaggerModule } from "@nestjs/swagger";
import { FastifyAdapter, NestFastifyApplication } from "@nestjs/platform-fastify";
Expand All @@ -30,7 +30,7 @@ const handleError = logger.error.bind(logger);
process.on("uncaughtException", handleError);
process.on("unhandledRejection", handleError);

const sentryDsn = config("sentry.apiDsn", { required: false });
const sentryDsn = await config("sentry.apiDsn", { required: false });

if (sentryDsn) {
Sentry.init({
Expand All @@ -40,12 +40,14 @@ if (sentryDsn) {
new Sentry.Integrations.Mongo({ useMongoose: true }),
],
normalizeDepth: 3,
tracesSampleRate: config("sentry.tracesSampleRate"),
environment: config("environment"),
tracesSampleRate: await config("sentry.tracesSampleRate"),
environment: await config("environment"),
});
}

await mkdir(join(config("api.mediaRoot"), "badges"), { recursive: true });
const mediaRoot = await config("api.mediaRoot");

await mkdir(join(mediaRoot, "badges"), { recursive: true });

// Removes the `_id` fields created from sub classes of documents
setGlobalOptions({
Expand Down Expand Up @@ -96,4 +98,4 @@ const document = SwaggerModule.createDocument(app, redoc);

SwaggerModule.setup("swagger", app, document);

await app.listen(config("api.port"));
await app.listen(await config("api.port"));
4 changes: 3 additions & 1 deletion apps/api/src/user/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import { getLogoPath } from "@statsify/assets";
import { readFile, rm, writeFile } from "node:fs/promises";
import type { ReturnModelType } from "@typegoose/typegoose";

const mediaRoute = await config("api.mediaRoot");

@Injectable()
export class UserService {
public constructor(
Expand Down Expand Up @@ -149,6 +151,6 @@ export class UserService {
}

private getBadgePath(id: string) {
return `${config("api.mediaRoot")}/badges/${id}.png`;
return `${mediaRoute}/badges/${id}.png`;
}
}
4 changes: 3 additions & 1 deletion apps/discord-bot/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
* https://github.com/Statsify/statsify/blob/main/LICENSE
*/

export { default } from "../../eslint.config.js";
import { defineConfig } from "../../eslint.config.js";

export default defineConfig({ tsconfigDirName: import.meta.dirname });
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ interface TitlesTableProps {
modeIcons: DuelsModeIcons;
}

function ModeTitle({ icon, title, wins, t }: { icon: Image; title: string;wins: number;t: LocalizeFunction }) {
function ModeTitle({ icon, title, wins, t }: { icon: Image; title: string; wins: number; t: LocalizeFunction }) {
return (
<box width="100%" padding={{ left: 8, right: 8, top: 4, bottom: 4 }}>
<img image={icon} width={32} height={32} />
Expand Down
2 changes: 1 addition & 1 deletion apps/discord-bot/src/commands/gtbhelper/find-solutions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* https://github.com/Statsify/statsify/blob/main/LICENSE
*/

import words from "../../../words.json" assert { type: "json" };
import words from "../../../words.json" with { type: "json" };

export const findSolutions = (hint: string, limit?: number) => {
hint = hint.toLowerCase().replaceAll("_", "?");
Expand Down
4 changes: 3 additions & 1 deletion apps/discord-bot/src/commands/info/invite.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ import { readFile } from "node:fs/promises";
@Command({ description: (t) => t("commands.invite") })
export class InviteCommand {
public async run(): Promise<IMessage> {
const applicationId = await config("discordBot.applicationId");

const embed = new EmbedBuilder()
.title((t) => t("embeds.invite.title"))
.color(STATUS_COLORS.info)
.description((t) => {
const description = t("embeds.invite.description");

const links = [
`**${t("socials.invite", { id: config("discordBot.applicationId") })}**`,
`**${t("socials.invite", { id: applicationId })}**`,
t("socials.discord"),
t("socials.premium"),
t("socials.website"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import { Container, Multiline } from "#components";
import type { Image } from "skia-canvas/lib";
import type { Image } from "skia-canvas";
import type { LocalizeFunction } from "@statsify/discord";
import type { Server } from "./server.util.js";

Expand Down
4 changes: 2 additions & 2 deletions apps/discord-bot/src/commands/unverify.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import {
import { STATUS_COLORS } from "@statsify/logger";
import { config } from "@statsify/util";

const SUPPORT_BOT_GUILD_ID = config("supportBot.guild");
const SUPPORT_BOT_MEMBER_ROLE_ID = config("supportBot.memberRole");
const SUPPORT_BOT_GUILD_ID = await config("supportBot.guild");
const SUPPORT_BOT_MEMBER_ROLE_ID = await config("supportBot.memberRole");

@Command({ description: (t) => t("commands.unverify"), cooldown: 5 })
export class UnverifyCommand {
Expand Down
4 changes: 2 additions & 2 deletions apps/discord-bot/src/commands/verify.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import {
import { STATUS_COLORS } from "@statsify/logger";
import { config } from "@statsify/util";

const SUPPORT_BOT_GUILD_ID = config("supportBot.guild");
const SUPPORT_BOT_MEMBER_ROLE_ID = config("supportBot.memberRole");
const SUPPORT_BOT_GUILD_ID = await config("supportBot.guild");
const SUPPORT_BOT_MEMBER_ROLE_ID = await config("supportBot.memberRole");
const VERIFY_VIDEO = "https://www.youtube.com/watch?v=e5tF89tHEsg";

const VERIFY_MODAL = new ModalBuilder()
Expand Down
4 changes: 2 additions & 2 deletions apps/discord-bot/src/components/GameList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import { arrayGroup } from "@statsify/util";
import type { Box } from "@statsify/rendering";

export type GameEntry =
| [GameId, string]
| [GameId, string, Box.BoxProps | Box.BoxRenderProps];
| [GameId, string] |
[GameId, string, Box.BoxProps | Box.BoxRenderProps];

export interface GameListProps {
gameIcons: Record<GameId, Image>;
Expand Down
6 changes: 3 additions & 3 deletions apps/discord-bot/src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ interface CustomHeaderBodyProps extends BaseHeaderProps {
}

export type HeaderProps =
| SidebarlessHeaderProps
| SidebarHeaderProps
| CustomHeaderBodyProps;
| SidebarlessHeaderProps |
SidebarHeaderProps |
CustomHeaderBodyProps;

export const Header = (props: HeaderProps) => {
const skin = <Skin skin={props.skin} />;
Expand Down
4 changes: 2 additions & 2 deletions apps/discord-bot/src/components/Header/progression.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ interface UnlabeledFormatProgressionOptions extends BaseFormatProgressionOptions
}

export type FormatProgressionOptions =
| LabeledFormatProgressionOptions
| UnlabeledFormatProgressionOptions;
| LabeledFormatProgressionOptions |
UnlabeledFormatProgressionOptions;

export const formatProgression = ({
t,
Expand Down
54 changes: 27 additions & 27 deletions apps/discord-bot/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,33 +74,33 @@ const getDefaultApiMode = <T extends Mode[]>(modes: GameModes<T>) =>
modes.getApiModes()[0];

export type GamesWithBackgrounds =
| ArcadeModes
| ArenaBrawlModes
| BedWarsModes
| BlitzSGModes
| BuildBattleModes
| CopsAndCrimsModes
| DuelsModes
| GeneralModes
| ChallengeModes
| MegaWallsModes
| MurderMysteryModes
| PaintballModes
| ParkourModes
| PitModes
| QuakeModes
| SkyWarsModes
| SmashHeroesModes
| SpeedUHCModes
| TNTGamesModes
| TurboKartRacersModes
| UHCModes
| VampireZModes
| WallsModes
| WarlordsModes
| WoolGamesModes
| QuestModes
| ChallengeModes;
| ArcadeModes |
ArenaBrawlModes |
BedWarsModes |
BlitzSGModes |
BuildBattleModes |
CopsAndCrimsModes |
DuelsModes |
GeneralModes |
ChallengeModes |
MegaWallsModes |
MurderMysteryModes |
PaintballModes |
ParkourModes |
PitModes |
QuakeModes |
SkyWarsModes |
SmashHeroesModes |
SpeedUHCModes |
TNTGamesModes |
TurboKartRacersModes |
UHCModes |
VampireZModes |
WallsModes |
WarlordsModes |
WoolGamesModes |
QuestModes |
ChallengeModes;

export const mapBackground = <T extends GamesWithBackgrounds, M extends ApiModeFromGameModes<T>>(
modes: GameModes<T>,
Expand Down
Loading