Skip to content

uxlabspk/codehunts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CodeHunts - Professional Web Platform

A modern, high-performance website built with React, TypeScript, and Tailwind CSS.

πŸš€ Features

  • Modern Stack: Built with React 19, TypeScript 5.8, and Vite 7
  • Type-Safe: Full TypeScript coverage with strict typing
  • Responsive Design: Mobile-first approach with Tailwind CSS 4
  • Performance Optimized: Code splitting, lazy loading, and optimized assets
  • Accessible: ARIA-compliant components following WCAG guidelines
  • Form Validation: Robust client-side validation with helpful error messages
  • Code Quality: ESLint, Prettier, and automated formatting

πŸ“‹ Prerequisites

  • Node.js 18+
  • npm 9+ or yarn 1.22+

πŸ› οΈ Installation

  1. Clone the repository:
git clone https://github.com/uxlabspk/codehunts.git
cd codehunts
  1. Install dependencies:
npm install
  1. Copy environment variables:
cp .env.example .env
  1. Update .env with your configuration

πŸ’» Development

Start the development server:

npm run dev

The app will be available at http://localhost:5173

πŸ—οΈ Build

Create a production build:

npm run build

Preview the production build:

npm run preview

πŸ§ͺ Code Quality

Type Checking

npm run type-check

Linting

npm run lint          # Check for issues
npm run lint:fix      # Auto-fix issues

Formatting

npm run format        # Format all files
npm run format:check  # Check formatting

Validate All

Run all checks at once:

npm run validate

πŸ“ Project Structure

src/
β”œβ”€β”€ assets/          # Static assets (images, icons)
β”œβ”€β”€ components/      # React components
β”‚   β”œβ”€β”€ common/     # Shared components
β”‚   β”œβ”€β”€ form/       # Form components
β”‚   β”œβ”€β”€ landing/    # Landing page sections
β”‚   β”œβ”€β”€ portfolio/  # Portfolio components
β”‚   β”œβ”€β”€ services/   # Service-related components
β”‚   └── ui/         # Base UI components
β”œβ”€β”€ config/         # Configuration files
β”œβ”€β”€ constants/      # App constants and enums
β”œβ”€β”€ hooks/          # Custom React hooks
β”œβ”€β”€ lib/            # Utility functions
β”œβ”€β”€ pages/          # Page components
β”œβ”€β”€ services/       # API and external services
└── types/          # TypeScript type definitions

🎨 Component Guidelines

Creating New Components

  1. Use TypeScript and define prop interfaces
  2. Export components as named exports
  3. Include proper TypeScript types
  4. Add JSDoc comments for complex components

Example:

interface ButtonProps {
  label: string;
  onClick: () => void;
  variant?: "primary" | "secondary";
}

/**
 * Reusable button component
 */
export function Button({ label, onClick, variant = "primary" }: ButtonProps) {
  // Component logic
}

Styling

  • Use Tailwind CSS utility classes
  • Extract repeated patterns to component variants
  • Use cn() utility for conditional classes

πŸ”§ Configuration Files

  • vite.config.ts: Vite configuration
  • tsconfig.json: TypeScript configuration
  • eslint.config.js: ESLint rules
  • .prettierrc: Prettier formatting rules

🌐 Environment Variables

See .env.example for all available variables:

  • VITE_APP_NAME: Application name
  • VITE_API_URL: API endpoint URL
  • VITE_CONTACT_EMAIL: Contact email address

πŸ“¦ Key Dependencies

  • React 19: UI library
  • React Router 7: Client-side routing
  • Tailwind CSS 4: Utility-first CSS framework
  • Radix UI: Accessible component primitives
  • Lucide React: Icon library
  • TypeScript 5.8: Type safety

🀝 Contributing

  1. Create a feature branch: git checkout -b feature/your-feature
  2. Make your changes
  3. Run validation: npm run validate
  4. Commit changes: git commit -m "feat: your feature"
  5. Push to branch: git push origin feature/your-feature
  6. Create a Pull Request

Commit Convention

Follow Conventional Commits:

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation changes
  • style: Code style changes (formatting)
  • refactor: Code refactoring
  • test: Adding tests
  • chore: Build process or auxiliary tool changes

πŸ“ License

Copyright Β© 2024 CodeHunts. All rights reserved.

πŸ“§ Contact

πŸ™ Acknowledgments

Built with modern web technologies and best practices.

export default tseslint.config([
  globalIgnores(["dist"]),
  {
    files: ["**/*.{ts,tsx}"],
    extends: [
      // Other configs...

      // Remove tseslint.configs.recommended and replace with this
      ...tseslint.configs.recommendedTypeChecked,
      // Alternatively, use this for stricter rules
      ...tseslint.configs.strictTypeChecked,
      // Optionally, add this for stylistic rules
      ...tseslint.configs.stylisticTypeChecked,

      // Other configs...
    ],
    languageOptions: {
      parserOptions: {
        project: ["./tsconfig.node.json", "./tsconfig.app.json"],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
]);

You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:

// eslint.config.js
import reactX from "eslint-plugin-react-x";
import reactDom from "eslint-plugin-react-dom";

export default tseslint.config([
  globalIgnores(["dist"]),
  {
    files: ["**/*.{ts,tsx}"],
    extends: [
      // Other configs...
      // Enable lint rules for React
      reactX.configs["recommended-typescript"],
      // Enable lint rules for React DOM
      reactDom.configs.recommended,
    ],
    languageOptions: {
      parserOptions: {
        project: ["./tsconfig.node.json", "./tsconfig.app.json"],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
]);

About

A Dedicated Software Development Company Based in Pakistan Official Website.

Topics

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages