yassir-jeraidi/full-calendar
À propos
Une application de calendrier riche en fonctionnalités, développée avec React, TypeScript et les composants ShadCN UI. Elle propose une expérience interactive et personnalisable, avec plusieurs vues, la gestion des événements et une interface moderne.
Développement web et applicatifWhat you can do
- 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
Progression mesurée des étoiles
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
OriginalFull 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.
Explorer des projets similaires
Chargement…