Skip to content

NetherixMC/website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

NetherixMC Website ๐ŸŽฎ

Website resmi NetherixMC - Minecraft Server Indonesia dengan dashboard modern dan sistem manajemen player yang powerful.

Tech Stack:

  • Frontend: Vite + React
  • Backend: Node.js
  • Database: SQLite (default, using better-sqlite3). MySQL/MariaDB optional (requires extra configuration)

๐Ÿ“‹ Prerequisites

Pastikan sudah terinstall:


๐Ÿš€ Quick Start

1. Clone Repository

git clone https://github.com/NetherixMC/website.git
cd website

2. Install Dependencies

npm install

3. Setup Database

Project ini menggunakan SQLite (default) melalui better-sqlite3. Tidak perlu membuat database secara manual; file data.db akan dibuat otomatis saat server dijalankan.

Jika Anda ingin menggunakan MySQL/MariaDB, tambahkan dukungan dan konfigurasi di .env sesuai kebutuhan.

4. Konfigurasi Environment

Buat file .env di root folder dan sesuaikan dengan konfigurasi Anda:

# Database Configuration
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=your_password
DB_NAME=netherixmc
DB_PORT=3306

# Server Configuration
PORT=3000
NODE_ENV=development

# Frontend URL (untuk CORS)
FRONTEND_URL=http://localhost:5173

5. Jalankan Migrasi Database (jika ada)

npm run migrate

๐Ÿ’ป Development

Jalankan Frontend (Development Mode)

npm run dev

Akses frontend di: http://localhost:5173

Frontend akan auto-reload saat ada perubahan kode.

Jalankan Backend Server

Di terminal terpisah, jalankan:

npm start

API endpoint tersedia di: http://localhost:3000

Jalankan Keduanya Sekaligus

npm run dev:all

(Jika script ini tersedia di package.json)


๐Ÿ—๏ธ Build untuk Production

Build Frontend

npm run build

File hasil build akan berada di folder dist/

Preview Build

Untuk melihat preview hasil build:

npm run preview

๐Ÿ“ Struktur Project

website/
โ”œโ”€โ”€ public/              # Static assets
โ”œโ”€โ”€ src/                 # Source code frontend
โ”‚   โ”œโ”€โ”€ components/      # React components
โ”‚   โ”œโ”€โ”€ pages/          # Page components
โ”‚   โ”œโ”€โ”€ assets/         # Images, fonts, etc
โ”‚   โ”œโ”€โ”€ api/            # API service functions
โ”‚   โ”œโ”€โ”€ utils/          # Utility functions
โ”‚   โ”œโ”€โ”€ App.jsx         # Main App component
โ”‚   โ””โ”€โ”€ main.jsx        # Entry point
โ”œโ”€โ”€ server/             # Backend code
โ”‚   โ”œโ”€โ”€ routes/         # API routes
โ”‚   โ”œโ”€โ”€ controllers/    # Route controllers
โ”‚   โ”œโ”€โ”€ models/         # Database models
โ”‚   โ”œโ”€โ”€ middleware/     # Express middleware
โ”‚   โ”œโ”€โ”€ config/         # Configuration files
โ”‚   โ””โ”€โ”€ server.js       # Server entry point
โ”œโ”€โ”€ .env                # Environment variables (jangan commit!)
โ”œโ”€โ”€ .gitignore          # Git ignore rules
โ”œโ”€โ”€ package.json        # Dependencies & scripts
โ”œโ”€โ”€ vite.config.js      # Vite configuration
โ””โ”€โ”€ README.md           # Documentation (file ini)

๐Ÿ”ง Available Scripts

Command Deskripsi
npm install Install semua dependencies
npm run dev Jalankan frontend development server (Vite)
npm start Jalankan backend server (Node.js)
npm run build Build frontend untuk production
npm run preview Preview production build
npm run lint Check kode dengan ESLint
npm test Run tests (jika ada)

๐ŸŒ API Endpoints

Player Management

  • GET /api/players - Get all players
  • GET /api/players/:id - Get player by ID
  • POST /api/players - Create new player
  • PUT /api/players/:id - Update player
  • DELETE /api/players/:id - Delete player

Server Stats

  • GET /api/stats - Get server statistics
  • GET /api/status - Get server status

Authentication

  • POST /api/auth/login - Login
  • POST /api/auth/register - Register
  • POST /api/auth/logout - Logout

(Sesuaikan dengan endpoint yang ada di project Anda)


๐ŸŽจ Fitur Website

  • โšก Fast & Modern: Dibangun dengan Vite untuk performance optimal
  • ๐Ÿ“ฑ Responsive Design: Tampilan sempurna di semua device
  • ๐ŸŽฎ Player Dashboard: Manajemen player dan statistik
  • ๐Ÿ“Š Real-time Stats: Monitor server secara real-time
  • ๐Ÿ” Secure Authentication: Sistem login yang aman
  • ๐ŸŒ™ Dark Mode: Support tema gelap dan terang
  • ๐Ÿš€ SEO Optimized: Optimal untuk search engine

๐Ÿ› Troubleshooting

Port sudah digunakan

Jika port 5173 atau 3000 sudah digunakan:

# Ubah port di vite.config.js untuk frontend
# Ubah PORT di .env untuk backend

Error koneksi database

  • Pastikan MySQL/MariaDB sudah running
  • Cek kredensial di file .env
  • Pastikan database sudah dibuat

Module tidak ditemukan

# Hapus node_modules dan install ulang
rm -rf node_modules
npm install

Build error

# Clear cache dan build ulang
npm run clean
npm run build

๐Ÿค Contributing

Kami menerima kontribusi dari komunitas! Ikuti langkah berikut:

  1. Fork repository ini
  2. Buat branch baru: git checkout -b feature/fitur-baru
  3. Commit changes: git commit -m 'Menambahkan fitur baru'
  4. Push ke branch: git push origin feature/fitur-baru
  5. Submit Pull Request

Coding Standards

  • Gunakan ESLint configuration yang sudah ada
  • Tulis kode yang clean dan readable
  • Tambahkan comment untuk logic yang kompleks
  • Test fitur sebelum submit PR

๐Ÿ“ Environment Variables

Buat file .env dengan variabel berikut:

# Database
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=your_password
DB_NAME=netherixmc
DB_PORT=3306

# Server
PORT=3000
NODE_ENV=development

# Frontend
VITE_API_URL=http://localhost:3000
VITE_APP_NAME=NetherixMC

# JWT (jika menggunakan authentication)
JWT_SECRET=your_secret_key
JWT_EXPIRE=7d

# Optional: External APIs
MINECRAFT_API_KEY=your_api_key

โš ๏ธ PENTING: Jangan commit file .env ke repository!


๐Ÿ“ฆ Deployment

Deploy Frontend (Vercel/Netlify)

# Build terlebih dahulu
npm run build

# Deploy folder dist/ ke hosting pilihan Anda

Deploy Backend (VPS/Cloud)

# Di server, clone repository
git clone https://github.com/NetherixMC/website.git
cd website

# Install dependencies
npm install --production

# Setup environment variables
nano .env

# Jalankan dengan PM2 (recommended)
npm install -g pm2
pm2 start server/server.js --name netherixmc
pm2 startup
pm2 save

Deploy Full Stack (Docker - Optional)

# Build dan run dengan Docker
docker-compose up -d

๐Ÿ“ž Support & Contact


๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ‘ฅ Team

  • Lead Developer: [Nama]
  • Frontend Developer: [Nama]
  • Backend Developer: [Nama]
  • UI/UX Designer: [Nama]

๐Ÿ™ Acknowledgments

  • React Team untuk framework yang amazing
  • Vite untuk build tool yang super cepat
  • Node.js community
  • Dan semua contributor yang telah membantu project ini

๐Ÿ“Š Project Status

GitHub last commit GitHub issues GitHub pull requests GitHub stars


โญ Star repository ini jika Anda merasa terbantu!

Made with โค๏ธ by NetherixMC Team

Website โ€ข Discord โ€ข Report Bug

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors