Skip to content

MianAliKhalid/client

Repository files navigation

Modern Web Application

A full-featured web application built with React, featuring user authentication, admin dashboard, file management, and service handling.

πŸš€ Features

  • User Authentication

    • Register & Login functionality
    • Profile management with avatar upload
    • Password update capabilities
    • JWT-based authentication
  • Admin Dashboard

    • User management
    • Service management
    • Contact form responses
    • Query approval system
  • File Management

    • File upload functionality
    • Status tracking (Approved/Pending)
    • Image preview and download
    • Secure file handling
  • Service Management

    • Service listing
    • Service details view
    • Admin service CRUD operations
    • Price and provider management

πŸ› οΈ Tech Stack

Frontend

  • React.js - UI library
  • Vite - Build tool and development server
  • Tailwind CSS - Utility-first CSS framework
  • React Router Dom (v6) - Client-side routing
  • React Icons - Icon components
  • React Toastify - Toast notifications

State Management & Authentication

  • React Context API - Global state management
  • JWT - Token-based authentication
  • localStorage - Client-side storage

File Management

  • File API - File handling and uploads
  • URL API - URL handling and preview

Development Tools

  • ESLint - Code linting
  • Prettier - Code formatting
  • npm - Package management

Security

  • dotenv - Environment variable management
  • HTTP-Only Cookies - Secure token storage
  • CORS - Cross-Origin Resource Sharing

UI/UX Features

  • Responsive design
  • Dark/Light theme support
  • Modern glassmorphism effects
  • Interactive loading states
  • Form validation
  • Error handling

πŸ—οΈ Project Structure

client/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ Layouts/
β”‚   β”‚   β”‚   β”œβ”€β”€ Pages/         # Admin dashboard pages
β”‚   β”‚   β”‚   └── components/    # Reusable admin components
β”‚   β”‚   └── Navbar.jsx         # Main navigation
β”‚   β”œβ”€β”€ pages/                 # Main application pages
β”‚   β”œβ”€β”€ store/                 # Auth context and state management
β”‚   └── json/                  # Static configuration files
└── public/                    # Static assets

🚦 Getting Started

  1. Clone the repository
  2. Install dependencies:
    npm install
  3. Create a .env file with:
    VITE_BASE_URL=your_backend_url
    
  4. Start the development server:
    npm run dev

πŸ” Environment Variables

  • VITE_BASE_URL: Backend API URL

πŸ”‘ Authentication

The application uses JWT tokens for authentication. Tokens are stored in LocalStorage and managed through the Auth context.

πŸ‘₯ User Roles

  • Regular Users

    • Can view services
    • Upload files
    • Update profile
    • Contact support
  • Administrators

    • Full CRUD operations
    • User management
    • Query approval
    • Service management

🎨 Styling

The application uses Tailwind CSS for styling with a dark theme option and modern UI components.

βš™οΈ API Integration

All API calls are made to the backend specified in the VITE_BASE_URL environment variable.

πŸ”„ State Management

  • Uses React Context API for auth state
  • Local state management with useState
  • Form handling with controlled components

πŸ“ License

MIT License

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Open a Pull Request

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages