Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

ย 

History

57 Commits

Folders and files

Repository files navigation

CraftNepal - Modern Minecraft Server Hub

A sleek, modern web platform for the CraftNepal Minecraft server, built with cutting-edge web technologies. Experience player statistics, leaderboards, guides, and community features in a beautifully animated interface.

๐Ÿš€ Features

  • Player Statistics Dashboard - Search and view detailed player stats
  • Global Leaderboards - Compete across multiple categories (playtime, kills, level, blocks)
  • Server Guides - Comprehensive searchable documentation
  • Community Feed - Share moments with the community
  • Real-time Updates - Powered by React Query with automatic caching
  • Smooth Animations - Framer Motion animations throughout
  • Fully Responsive - Mobile-first design that works on all devices
  • Dark Theme - Minecraft-inspired dark aesthetic with teal and purple gradients

๐Ÿ› ๏ธ Tech Stack

Technology Purpose
React 19 UI framework with latest features
Vite Lightning-fast build tool and dev server
TypeScript Type-safe code development
Tailwind CSS Utility-first styling framework
Framer Motion Advanced animations
React Query Server state management
React Router Client-side routing
Axios HTTP client

๐Ÿ“ฆ Quick Start

Prerequisites

  • Node.js 16+ and npm/bun

Installation

# Install dependencies
npm install

# Copy environment variables
cp .env.example .env

# Update VITE_API_URL in .env to your backend

Development

# Start dev server (hot reload enabled)
npm run dev

Visit http://localhost:5174 in your browser.

Build for Production

# Build and type-check
npm run build

# Preview production build
npm run preview

๐Ÿ“ Project Structure

src/
โ”œโ”€โ”€ app/                 # Application shell & layouts
โ”œโ”€โ”€ shared/              # Shared utilities, types, API config
โ”œโ”€โ”€ features/            # Feature modules (players, leaderboard, guides, feed)
โ”œโ”€โ”€ pages/               # Page components
โ””โ”€โ”€ main.tsx            # Entry point

See MIGRATION.md for detailed architecture documentation.

๐ŸŽจ Theming

Customize the theme in tailwind.config.ts:

colors: {
  primary: '#1f3e47',    // Teal
  secondary: '#090515',  // Dark Purple
  accent: '#eb5569',     // Red
}

๐Ÿ”Œ API Integration

Update the API endpoint in .env:

VITE_API_URL=https://your-api.com/api

The app expects API endpoints like:

  • GET /players/:username - Player stats
  • GET /leaderboards/:type - Leaderboards
  • GET /guides - Server guides
  • GET /posts - Feed posts

๐Ÿš€ Deployment

Vercel (Recommended)

# Install Vercel CLI
npm i -g vercel

# Deploy
vercel

GitHub Pages

npm run build
# Deploy the dist/ folder

Traditional Hosting

npm run build
# Upload dist/ folder to your hosting

๐Ÿ“ Development Commands

npm run dev      # Start dev server
npm run build    # Build for production
npm run preview  # Preview production build
npm run lint     # Run TypeScript & ESLint checks

๐ŸŽฏ Key Pages

Page Route Features
Home / Hero, features, top players
Leaderboard /leaderboard Multi-tab rankings
Guides /guides Search, filter, categories
Stats /stats Player search & detailed stats
Feed /feed Posts, likes, comments

๐Ÿ’ก Usage Examples

Using API Hooks

import { usePlayer } from '@/features/players/hooks/usePlayer';

function PlayerCard({ username }) {
  const { data: player, isLoading } = usePlayer(username);
  
  if (isLoading) return <Skeleton />;
  
  return <Card>{player.username}</Card>;
}

Creating Animations

import { motion } from 'framer-motion';

<motion.div
  initial={{ opacity: 0, y: 20 }}
  animate={{ opacity: 1, y: 0 }}
  transition={{ duration: 0.5 }}
>
  Content
</motion.div>

๐Ÿ› Troubleshooting

Port Already in Use

Vite automatically uses the next available port. Check terminal output.

API Connection Issues

  • Verify VITE_API_URL in .env
  • Ensure backend is running
  • Check browser console for CORS errors

Build Errors

npm run lint    # Check for TypeScript errors
npm run build   # Full build test

๐Ÿ“– Documentation

๐Ÿค Contributing

  1. Create a feature branch: git checkout -b feature/amazing-feature
  2. Commit changes: git commit -m 'Add amazing feature'
  3. Push to branch: git push origin feature/amazing-feature
  4. Open a Pull Request

๐Ÿ“„ License

CraftNepal ยฉ 2024. All rights reserved.

๐ŸŽฎ Join Us

Experience the CraftNepal Minecraft server and join our community of 2000+ active players!


Built with โค๏ธ for the CraftNepal Community!

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages