A comprehensive full-stack community platform built to empower Muslim communities with seamless features for connection, commerce, education, and social engagement.
Frontend Repository — Built with modern web technologies for a responsive, performant, and user-friendly experience.
- Overview
- Key Features
- Tech Stack
- Getting Started
- Project Structure
- Available Scripts
- Architecture & Patterns
- Development Conventions
- Contributing
Musliem Community Project is a vibrant platform designed to bring Muslim communities together. It provides tools for:
- Community Building — Create and manage groups, organize events
- E-Commerce — Sell products, offer services, and explore halal businesses
- Messaging & Chat — Real-time communication with private messaging and group chat
- Membership & Payments — Subscription plans, donations, and payment processing
- Content Sharing — Advertisements, product listings, and business directories
- Education — Quranic tutoring and educational services
- 👥 Create & Manage Groups — Build communities around shared interests
- 📅 Event Management — Organize, schedule, and manage community events
- 💬 Real-time Messaging — Socket.io powered messaging system
- 👤 Member Profiles — Customizable user profiles with verification
- 🛍️ Product Listings — Sell and browse products in a halal-focused marketplace
- 🏪 Service Marketplace — Business services including babysitting and tutoring
- 📢 Advertisements — Create and manage product/service advertisements
- 💼 Halal Business Directory — Curated directory of halal-certified businesses
- 🎓 Quranic Tutoring — Connect with qualified Quran tutors
- 💳 Membership Plans — Tiered subscription system for premium features
- 💰 Payment Processing — Secure payment integration
- 🎁 Donations — Support community through donations
- 📊 Payment History — Track and manage all transactions
- 🔍 Content Approval Workflows — Admin dashboard for reviewing submitted content
- ✅ Pending Reviews — Manage advertisements, events, products, and services
- 📈 Analytics Dashboard — Monitor platform activity and user engagement
| Technology | Purpose |
|---|---|
| React 19 | UI framework and component library |
| TypeScript 5.8 | Type-safe JavaScript |
| Vite 7 | Lightning-fast build tool |
| Tailwind CSS 3.4 | Utility-first CSS framework |
| Zustand | Lightweight state management |
| React Context API | Additional state management |
| React Router v7 | Client-side routing |
| TanStack Query 5 | Server state management |
| Library | Use Case |
|---|---|
| Axios | HTTP client for API requests |
| Socket.io | Real-time bidirectional communication |
| Framer Motion | Smooth animations and transitions |
| Recharts | Data visualization charts |
| React Icons / Lucide | Icon libraries |
| Embla Carousel | Carousel/slider component |
| Date-fns | Date manipulation |
| Lodash | Utility functions |
| ESLint | Code quality & linting |
- Node.js 16+
- npm or yarn
- Backend API running on
VITE_BASE_URLenvironment variable
-
Clone the repository
git clone https://github.com/your-org/Musliem-Community-Project.git cd Musliem-Community-Project/frontend -
Install dependencies
npm install # or yarn install -
Configure environment variables Create a
.env.localfile in the root directory:VITE_BASE_URL=http://localhost:5000 VITE_SOCKET_URL=http://localhost:5000
-
Start development server
npm run dev
The app will be available at
http://localhost:3001
src/
├── features/ # Feature modules (Events, Groups, Auth, etc.)
│ ├── Advertise/
│ ├── Latest-Events/
│ ├── OurGroups/
│ ├── login/
│ ├── register/
│ └── ...
├── layouts/ # Page layouts and full-page components
│ ├── Home/
│ ├── ProfilePage/
│ ├── sell-products-page/
│ └── ...
├── components/ # Reusable UI components
│ ├── common/ # Shared across app (Navbar, Footer)
│ ├── ui/ # Generic UI elements
│ └── interfaces/ # Component prop types
├── context/ # React Context providers
│ ├── authContext.ts
│ ├── groupContext.ts
│ └── ...
├── store/ # Zustand state management stores
├── hooks/ # Custom React hooks
│ ├── useAuth.ts
│ ├── useGroups.ts
│ ├── useDebounce.ts
│ └── ...
├── services/ # API service abstraction
│ ├── authService.tsx
│ ├── groupService.tsx
│ └── ...
├── api/ # Raw API utilities
├── types/ # TypeScript type definitions
├── routes/ # Route configuration (AppRoutes.tsx)
├── utils/ # Utility functions
└── assets/ # Images, icons, fonts
# Development
npm run dev # Start dev server (port 3001)
npm run build:check # Type check without building
# Production
npm run build # Build for production
npm run preview # Preview production build
# Code Quality
npm run lint # Run ESLintEach major feature (Events, Groups, Products) is self-contained in src/features/ with its own components, logic, and styling.
- Global State: User authentication and profile →
useAuthStore/useProfileStore - Shared Context: Groups, Events, Products → Context API in
src/context/ - Server State: API responses → TanStack Query
All backend communication flows through service files in src/services/. This centralizes API calls and makes mocking/testing easier.
Example:
// ✅ Good: Use service
import { authService } from '@/services/authService';
const { data } = await authService.login(credentials);
// ❌ Avoid: Direct API calls
const { data } = await axios.post('/auth/login', credentials);All routes are defined in src/routes/AppRoutes.tsx. Routes use lazy loading for code splitting and optimal performance.
All styling uses Tailwind CSS. Avoid inline styles and custom CSS when possible.
Example:
// ✅ Good
<button className="px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600">
Click me
</button>
// ❌ Avoid
<button style={{ padding: '8px 16px', backgroundColor: '#3B82F6' }}>
Click me
</button>Use @/ alias (configured in tsconfig.json) for cleaner imports:
// ✅ Preferred
import { useAuthStore } from '@/store/authStore';
import { Button } from '@/components/ui/Button';
// ❌ Avoid
import { useAuthStore } from '../../../store/authStore';
import { Button } from '../../../components/ui/Button';- Use
useDebouncefrom@/hooks/useDebouncefor search inputs to avoid excessive API calls - Access auth/profile via
useAuthStoreanduseProfileStorefrom@/store/
Use placeholder images for missing profile pictures:
const profileImage = user?.avatar || 'https://via.placeholder.com/150';Define all component props with TypeScript interfaces in src/components/interfaces/ or inline for small components.
- Base URL: Set via
VITE_BASE_URLenvironment variable - Services Location:
src/services/ - Examples:
authService.tsx,groupService.tsx,productService.tsx
- Socket.io Client: Configured in
src/context/socketContext.tsx - Use Cases: Live messaging, notifications, real-time updates
- Icons: Use
react-iconsorlucide-react - Animations: Use
framer-motionfor smooth transitions - Charts: Use
rechartsfor data visualization
- ✅ Always use TypeScript — no
anytypes without explicit reason - ✅ Use ESLint — run
npm run lintbefore committing - ✅ Follow the established folder structure
- ✅ Use absolute imports with
@/alias - ✅ Write meaningful commit messages
- Create a folder in
src/features/YourFeature/ - Add components, hooks, and logic
- Update routes in src/routes/AppRoutes.tsx
- Add any new API methods to
src/services/ - Test thoroughly before submitting PR
- Code follows project conventions
- No ESLint errors (
npm run lint) - TypeScript type checks pass (
npm run build:check) - Tested on development server
- Updated relevant documentation
This project is licensed under the ISC License — see LICENSE file for details.
For questions or issues:
- 📧 Contact the development team
- 🐛 Report bugs through GitHub Issues
- 💡 Suggest features via GitHub Discussions
Happy Coding! 🚀 Let's build an amazing community together!