Skip to content

BlockchainUNN/website-v4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

49 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

BlockchainUNN Next.js Website

A modern, fully rewritten version of the BlockchainUNN website built with Next.js 14, TypeScript, and TailwindCSS.

πŸš€ Features

  • Next.js 14 with App Router
  • TypeScript with strict type checking
  • TailwindCSS with shadcn/ui components
  • Zustand for client-side state management
  • TanStack React Query for server state management
  • Server Actions for API calls
  • Responsive Design with mobile-first approach
  • Dark/Light Theme toggle
  • Error Boundary with toast notifications
  • Content Management system with extracted content files

πŸ›  Tech Stack

  • Framework: Next.js 14 (App Router)
  • Language: TypeScript
  • Styling: TailwindCSS + shadcn/ui
  • State Management: Zustand (client) + React Query (server)
  • HTTP Client: Native Fetch API with Server Actions
  • Icons: React Icons
  • Fonts: Google Fonts (Raleway, JetBrains Mono) + Wallpoet
  • Notifications: React Toastify
  • Animations: Tailwind CSS animations

πŸ“ Project Structure

blockchain-unn-nextjs/
β”œβ”€β”€ app/                    # Next.js App Router
β”‚   β”œβ”€β”€ (dashboard)/       # Route groups
β”‚   β”œβ”€β”€ actions/           # Server Actions
β”‚   β”œβ”€β”€ globals.css        # Global styles
β”‚   β”œβ”€β”€ layout.tsx         # Root layout
β”‚   β”œβ”€β”€ page.tsx          # Home page
β”‚   └── providers.tsx      # Context providers
β”œβ”€β”€ components/            # React components
β”‚   β”œβ”€β”€ ui/               # shadcn/ui components
β”‚   β”œβ”€β”€ layout/           # Layout components
β”‚   β”œβ”€β”€ home/             # Home page components
β”‚   └── common/           # Shared components
β”œβ”€β”€ content/              # Content management
β”œβ”€β”€ hooks/                # Custom hooks
β”‚   β”œβ”€β”€ crud/             # CRUD hooks
β”‚   β”œβ”€β”€ custom/           # Custom utility hooks
β”‚   └── store/            # Zustand stores
β”œβ”€β”€ lib/                  # Utility libraries
β”œβ”€β”€ types/                # TypeScript type definitions
└── public/               # Static assets

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn or pnpm

Installation

  1. Clone the repository
git clone <repository-url>
cd blockchain-unn-nextjs
  1. Install dependencies
npm install
# or
yarn install
# or
pnpm install
  1. Set up environment variables
cp .env.example .env.local

Edit .env.local with your configuration values.

  1. Install shadcn/ui components (as needed)
npx shadcn-ui@latest add button
npx shadcn-ui@latest add input
npx shadcn-ui@latest add card
npx shadcn-ui@latest add toast
# Add other components as needed
  1. Run the development server
npm run dev
# or
yarn dev
# or
pnpm dev

Open http://localhost:3000 in your browser.

🎨 Customization

Adding New Content

Content is managed through TypeScript files in the content/ directory:

// content/home.ts
export const homeContent = {
  hero: {
    title: "Your Title",
    subtitle: "Your Subtitle",
    // ...
  },
};

Adding New API Endpoints

  1. Create Server Action in app/actions/:
"use server";
export async function myApiCall(data: MyType) {
  // API logic here
}
  1. Create React Query Hook in hooks/crud/:
export const useMyApiCall = () => {
  return useMutation({
    mutationFn: myApiCall,
    // ...
  });
};
  1. Add Query Key to lib/queryKeys.ts:
export const QUERY_KEYS = {
  myApiCall: makeQueryKey("my_api_call"),
};

Styling Components

Use the custom Text component for consistent typography:

import { Text } from "@/components/common/Text";

<Text variant="h1" size="2xl" weight="bold" color="primary">
  My Heading
</Text>;

Theme Management

Use the useTheme hook for theme-aware components:

import { useTheme } from "@/hooks/store/useTheme";

const { isDarkMode, toggleTheme } = useTheme();

πŸ”„ Migration from Original

Key Changes Made:

  1. Framework Migration: React + React Router β†’ Next.js App Router
  2. Language: JavaScript β†’ TypeScript with strict types
  3. State Management: Redux β†’ Zustand + React Query
  4. API Layer: Axios β†’ Server Actions + Fetch API
  5. Content: Hardcoded β†’ Extracted to content files
  6. Components: Class components β†’ Functional with hooks
  7. Styling: Maintained TailwindCSS, added shadcn/ui

Benefits:

  • Better SEO with Next.js SSR/SSG
  • Improved Performance with automatic optimizations
  • Type Safety with TypeScript
  • Better Developer Experience with modern tooling
  • Easier Maintenance with separated concerns
  • Scalable Architecture with modular structure

πŸ§ͺ Development

Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run start - Start production server
  • npm run lint - Run ESLint
  • npm run type-check - Run TypeScript type checking

Code Style

The project follows:

  • ESLint for code linting
  • TypeScript strict mode for type safety
  • Prettier for code formatting (recommended)
  • Next.js conventions for file structure

πŸ“ TODO

Components to Complete:

  • PhotoCurl component
  • Skills component
  • Feedback component
  • UpcomingEvents component
  • PastEvents component
  • Partners component
  • Newsletter component
  • Footer component
  • About page components
  • Community page components
  • Event registration forms
  • Hackathon dashboard

Features to Add:

  • Form validation with Zod
  • Image optimization
  • Loading states
  • Error pages (404, 500)
  • SEO optimization
  • Analytics integration
  • Performance monitoring

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

πŸ“„ License

This project is licensed under the MIT License.

πŸ†˜ Support

For support and questions:

  • Create an issue on GitHub
  • Contact the development team
  • Check the documentation

Built with ❀️ by the BlockchainUNN development team.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •