yassir-jeraidi/full-calendar
حول
تطبيق تقويم غني بالميزات، مبني باستخدام React وTypeScript ومكونات ShadCN UI. يوفر المشروع تجربة تقويم تفاعلية قابلة للتخصيص، مع طرق عرض متعددة وإدارة للأحداث وواجهة مستخدم عصرية.
تطوير الويب والتطبيقاتما يمكنك فعله
- Multiple Views: Day, Week, Month, Year, and Agenda views
- Event Management: Create, edit, and delete events
- Drag & Drop: Move events between time slots and dates
- Event Resizing: Resize events in day and week views with smooth animations
النمو المقاس للنجوم
- خلال 24 ساعة
- ٠
- خلال 7 أيام
- ٠
- خلال 15 يومًا
- ٠
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصلFull Calendar
A feature-rich calendar application built with React, TypeScript, and ShadCN UI components. This project provides a customizable and interactive calendar experience with multiple views, event management, and a modern UI.
Live Demo: https://calendar.jeraidi.dev
Key Features
- Multiple Views: Day, Week, Month, Year, and Agenda views
- Event Management: Create, edit, and delete events
- Drag & Drop: Move events between time slots and dates
- Event Resizing: Resize events in day and week views with smooth animations
- User Management: Multi-user support with user filtering
- Color Coding: Events can be color-coded for better organization
- Responsive Design: Works seamlessly across all device sizes
- Dark Mode: Full dark mode support
- 24/12 Hour Format: Toggle between 24-hour and 12-hour time formats
Installation
Use your preferred package manager to install the calendar component directly from the custom ShadCN UI registry:
npx shadcn@latest add "https://calendar.jeraidi.dev/r/full-calendar.json"
Usage
Import and use the Calendar component in your page:
import React, { Suspense } from "react";
import { Calendar } from "@/features/calendar/calendar";
import { CalendarSkeleton } from "@/features/calendar/skeletons/calendar-skeleton";
export default function CalendarPage() {
return (
<Suspense fallback={<CalendarSkeleton />}>
<Calendar />
</Suspense>
);
}
Tech Stack
- Framework: Next.js 16 (Turbopack) & React 19
- Language: TypeScript 5
- Styling: Tailwind CSS 4
- Components: ShadCN UI & Radix UI
- Animations: Motion 12 (formerly framer-motion)
- State Management: React Context + Hooks
- Validation: Zod 4
- Date Handling: date-fns & React Day Picker 9
Project Structure
Here's an overview of the important files and directories in the project:
src/
├── features/
│ └── calendar/
│ ├── calendar.tsx # Main entry point component. Fetches data and wraps the app in providers.
│ ├── contexts/
│ │ ├── calendar-context.tsx # Core state management (events, users, view state, filters).
│ │ └── dnd-context.tsx # Drag-and-drop context provider.
│ ├── header/
│ │ └── calendar-header.tsx # Top navigation bar (view switcher, date nav, filters).
│ ├── views/ # Contains specific view components (Day, Week, Month, Year, Agenda).
│ ├── calendar-body.tsx # Renders the active view based on current state.
│ ├── helpers.ts # Core utility functions for date manipulation and calendar logic.
│ ├── hooks.ts # Custom hooks for calendar logic.
│ └── types.ts # TypeScript definitions for events, users, and views.
How It Works
The project is architected around a central context provider that manages the state of the calendar. Here is the high-level flow:
Initialization:
- The
Calendarcomponent (src/components/calendar/calendar.tsx) serves as the entry point. - It fetches initial data (events and users) and initializes the
CalendarProvider.
- The
State Management:
CalendarContextholds the application state, including the current view (Day, Week, Month, etc.), selected date, list of events, and active filters.- It uses
localStorageto persist user preferences such as the preferred view, time format (12h/24h), and badge styles.
Rendering Logic:
- The
CalendarHeaderallows users to navigate dates, switch views, and apply filters. - The
CalendarBodylistens to theviewstate from the context and dynamically renders the appropriate view component (e.g.,MonthView,WeekView).
- The
Interactions:
- Drag & Drop: The
DndProviderwraps the calendar to enable drag-and-drop functionality for events. When an event is moved, the context updates the event's start and end times. - Event Management: Functions like
addEvent,updateEvent, andremoveEventin the context handle CRUD operations, ensuring the UI stays in sync with the data.
- Drag & Drop: The
Running Locally
To run the project locally, follow these steps:
Clone the repository:
git clone https://github.com/yassir-jeraidi/full-calendar.git cd full-calendarInstall dependencies:
pnpm installStart the development server:
pnpm devOpen the application:
Open http://localhost:3000 in your browser to view the application.
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
License
MIT License - see LICENSE file for details.
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…