Skip to content

Commit 00349d3

Browse files
committed
1st commit
1 parent 7e9b2ba commit 00349d3

30 files changed

Lines changed: 5949 additions & 262 deletions
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Bug report
3+
about: Laporkan bug untuk membantu kami memperbaiki masalah
4+
labels: bug
5+
---
6+
7+
## Ringkasan
8+
Jelaskan bug secara singkat.
9+
10+
## Langkah Reproduksi
11+
1.
12+
2.
13+
3.
14+
15+
## Expected Behavior
16+
Apa yang seharusnya terjadi?
17+
18+
## Actual Behavior
19+
Apa yang benar-benar terjadi?
20+
21+
## Screenshots / Rekaman
22+
Jika ada, lampirkan screenshot atau gif.
23+
24+
## Environment
25+
- OS:
26+
- Browser:
27+
- Node.js:
28+
29+
## Catatan Tambahan
30+
Tambahkan konteks lain jika perlu.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Usulkan fitur baru atau peningkatan UX
4+
labels: enhancement
5+
---
6+
7+
## Problem
8+
Masalah apa yang ingin diselesaikan?
9+
10+
## Solusi yang Diusulkan
11+
Jelaskan ide fitur secara spesifik.
12+
13+
## Alternatif
14+
Adakah alternatif lain yang sudah dipertimbangkan?
15+
16+
## Dampak
17+
Bagian mana yang terdampak? (UI, algoritma bracket, storage, dsb.)
18+
19+
## Catatan Tambahan
20+
Link referensi / mockup / contoh serupa.

.github/pull_request_template.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## Ringkasan
2+
Jelaskan perubahan utama pada PR ini.
3+
4+
## Jenis Perubahan
5+
- [ ] Bug fix
6+
- [ ] Feature baru
7+
- [ ] Refactor
8+
- [ ] Dokumentasi
9+
- [ ] Performa / UX improvement
10+
11+
## Checklist
12+
- [ ] Sudah menjalankan `npm run lint`
13+
- [ ] Sudah menjalankan `npm test`
14+
- [ ] Sudah menjalankan `npm run build`
15+
- [ ] Tidak ada perubahan breaking yang tidak didokumentasikan
16+
17+
## Screenshots (jika UI berubah)
18+
Tambahkan screenshot sebelum/sesudah.
19+
20+
## Catatan Tambahan
21+
Tambahkan konteks penting untuk reviewer.

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ["main", "master"]
6+
pull_request:
7+
branches: ["main", "master"]
8+
9+
jobs:
10+
test-and-build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 20
21+
cache: npm
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Lint
27+
run: npm run lint
28+
29+
- name: Test
30+
run: npm test
31+
32+
- name: Build
33+
run: npm run build

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,3 @@ yarn-error.log*
3838

3939
# typescript
4040
*.tsbuildinfo
41-
next-env.d.ts

README.md

Lines changed: 59 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,75 @@
1-
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
1+
## Tournament Bracket (Static Next.js)
22

3-
## Getting Started
3+
Aplikasi bracket tournament single-elimination berbasis Next.js (App Router), semua data disimpan lokal per device.
44

5-
First, run the development server:
5+
Brand: **nextdraft**
6+
7+
### Fitur Utama
8+
- Generate bracket otomatis dari daftar tim (dengan dukungan bye).
9+
- Input skor per match, pemenang maju otomatis ke ronde berikutnya.
10+
- Persist state lokal menggunakan `zustand` + `localStorage`.
11+
- Export/Import state JSON.
12+
- Share state via URL terkompresi (`?s=...`).
13+
- Reset tournament lokal.
14+
15+
### Menjalankan Project
16+
17+
1. Install dependencies:
18+
19+
```bash
20+
npm install
21+
```
22+
23+
2. Buat file env lokal dari template:
24+
25+
```bash
26+
cp .env.example .env.local
27+
```
28+
29+
3. Jalankan development server:
630

731
```bash
832
npm run dev
9-
# or
10-
yarn dev
11-
# or
12-
pnpm dev
13-
# or
14-
bun dev
1533
```
1634

17-
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
35+
Open [http://localhost:3000](http://localhost:3000).
1836

19-
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
37+
### Scripts
38+
39+
```bash
40+
npm run dev
41+
npm run lint
42+
npm test
43+
npm run build
44+
```
2045

21-
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
46+
### Build Static
2247

23-
## Learn More
48+
```bash
49+
npm run build
50+
```
2451

25-
To learn more about Next.js, take a look at the following resources:
52+
Build saat ini menghasilkan route static (`/`).
2653

27-
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28-
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
54+
### Struktur Inti
55+
- `app/page.tsx`: UI create tournament + bracket board.
56+
- `store/tournamentStore.ts`: state management + persistence.
57+
- `lib/bracket.ts`: algoritma generate/update/propagate bracket.
58+
- `lib/share.ts`: encode/decode state untuk URL.
2959

30-
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
60+
### Catatan
61+
- Penyimpanan lokal berarti data tidak sync antar device.
62+
- Untuk share antar device/user, gunakan fitur Share URL atau Export/Import JSON.
3163

32-
## Deploy on Vercel
64+
### GitHub Ready
65+
- CI GitHub Actions tersedia di `.github/workflows/ci.yml` (lint, test, build).
66+
- Issue template tersedia di `.github/ISSUE_TEMPLATE/`.
67+
- PR template tersedia di `.github/pull_request_template.md`.
68+
- Template environment tersedia di `.env.example`.
3369

34-
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
70+
### Kontribusi
71+
1. Fork repository
72+
2. Buat branch fitur/perbaikan
73+
3. Pastikan `npm run lint`, `npm test`, dan `npm run build` lolos
74+
4. Buat Pull Request
3575

36-
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.

app/favicon.ico

140 KB
Binary file not shown.

app/globals.css

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
@import "tailwindcss";
22

33
:root {
4-
--background: #ffffff;
5-
--foreground: #171717;
4+
--background: #101922;
5+
--foreground: #e2e8f0;
66
}
77

88
@theme inline {
@@ -12,15 +12,26 @@
1212
--font-mono: var(--font-geist-mono);
1313
}
1414

15-
@media (prefers-color-scheme: dark) {
16-
:root {
17-
--background: #0a0a0a;
18-
--foreground: #ededed;
19-
}
20-
}
21-
2215
body {
2316
background: var(--background);
2417
color: var(--foreground);
25-
font-family: Arial, Helvetica, sans-serif;
18+
font-family: var(--font-geist-sans), Arial, Helvetica, sans-serif;
19+
}
20+
21+
::-webkit-scrollbar {
22+
width: 8px;
23+
height: 8px;
24+
}
25+
26+
::-webkit-scrollbar-track {
27+
background: #0f172a;
28+
}
29+
30+
::-webkit-scrollbar-thumb {
31+
background: #334155;
32+
border-radius: 9999px;
33+
}
34+
35+
::-webkit-scrollbar-thumb:hover {
36+
background: #475569;
2637
}

app/layout.tsx

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import type { Metadata } from "next";
22
import { Geist, Geist_Mono } from "next/font/google";
33
import "./globals.css";
44

5+
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL ?? "http://localhost:3000";
6+
57
const geistSans = Geist({
68
variable: "--font-geist-sans",
79
subsets: ["latin"],
@@ -13,8 +15,44 @@ const geistMono = Geist_Mono({
1315
});
1416

1517
export const metadata: Metadata = {
16-
title: "Create Next App",
17-
description: "Generated by create next app",
18+
metadataBase: new URL(siteUrl),
19+
title: {
20+
default: "nextdraft | Tournament Bracket Generator",
21+
template: "%s | nextdraft",
22+
},
23+
description:
24+
"nextdraft membantu membuat dan mengelola bracket turnamen single-elimination dengan drag-and-drop, update skor, dan penyimpanan lokal.",
25+
applicationName: "nextdraft",
26+
keywords: [
27+
"nextdraft",
28+
"tournament bracket",
29+
"single elimination",
30+
"bracket generator",
31+
"esports bracket",
32+
"turnamen online",
33+
],
34+
alternates: {
35+
canonical: "/",
36+
},
37+
openGraph: {
38+
type: "website",
39+
locale: "id_ID",
40+
url: "/",
41+
siteName: "nextdraft",
42+
title: "nextdraft | Tournament Bracket Generator",
43+
description:
44+
"Buat bracket turnamen lebih cepat dengan nextdraft: drag-and-drop seeding, update skor, progress realtime, dan export/import JSON.",
45+
},
46+
twitter: {
47+
card: "summary",
48+
title: "nextdraft | Tournament Bracket Generator",
49+
description:
50+
"Kelola bracket turnamen single-elimination dengan UX modern dan flow yang cepat.",
51+
},
52+
robots: {
53+
index: true,
54+
follow: true,
55+
},
1856
};
1957

2058
export default function RootLayout({
@@ -23,7 +61,7 @@ export default function RootLayout({
2361
children: React.ReactNode;
2462
}>) {
2563
return (
26-
<html lang="en">
64+
<html lang="id" className="dark">
2765
<body
2866
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
2967
>

0 commit comments

Comments
 (0)