A modern, full-featured media management dashboard built with Next.js 16, featuring advanced file upload, preview, editing, and organization capabilities.
- π€ Media Upload: Drag-and-drop file upload with React Dropzone
- πΌοΈ Media Gallery: Grid and single view layouts with virtual scrolling
- ποΈ Preview & Download: Built-in media preview with download functionality
- βοΈ Edit & Delete: Manage media files with edit and delete operations
- π― Media Picker: Reusable media picker component for selecting files
- π Theme Support: Dark/light mode with next-themes
- π± Responsive Design: Mobile-first responsive UI
- π State Management: Redux Toolkit with RTK Query for efficient data fetching
- π¨ Modern UI: shadcn/ui components with Radix Nova style
- β Form Validation: React Hook Form with Zod schema validation
- Framework: Next.js 16 (App Router)
- Language: TypeScript 5
- Package Manager: pnpm
- Component Library: shadcn/ui (Radix Nova)
- CSS Framework: Tailwind CSS 4
- Icons: Lucide React
- Animations: tw-animate-css
- Theme: next-themes
- State Management: Redux Toolkit
- API Layer: RTK Query
- React Integration: react-redux
- Form Handling: React Hook Form
- Validation: Zod
- Resolver: @hookform/resolvers
- File Upload: react-dropzone
- Notifications: Sonner
- UI Primitives: @base-ui/react, radix-ui
dashboard/
βββ src/
β βββ app/ # Next.js App Router
β β βββ layout.tsx # Root layout
β β βββ page.tsx # Home page (Media Template)
β β βββ globals.css # Global styles
β βββ components/ # Reusable UI components
β β βββ ui/ # shadcn/ui components
β βββ templates/ # Feature templates
β β βββ Media/ # Media management feature
β β βββ Components/ # Media-specific components
β β βββ Contexts/ # React Context providers
β β βββ Hooks/ # Custom hooks
β β βββ Redux/ # Redux slices & API
β β βββ Types/ # TypeScript definitions
β β βββ Utils/ # Utility functions
β β βββ Validators/ # Zod schemas
β βββ redux/ # Redux store configuration
β βββ lib/ # Shared utilities
β βββ core/ # Core configuration
β βββ providers/ # React providers
βββ public/ # Static assets
βββ @types/ # Custom type definitions
- Node.js 20+
- pnpm 8+
-
Clone the repository
git clone <repository-url> cd dashboard
-
Install dependencies
pnpm install
-
Set up environment variables
Create a
.env.localfile in the root directory:NEXT_PUBLIC_API_URL=your_api_url NEXT_PUBLIC_FRONTEND_URL=your_frontend_url
-
Run the development server
pnpm dev
-
Open your browser
Navigate to http://localhost:3000
pnpm dev- Start development serverpnpm build- Build for productionpnpm start- Start production serverpnpm lint- Run ESLintpnpm format- Format code with Prettier
The media library follows a modular architecture:
Media/
βββ MediaTemplate.tsx # Main template container
βββ MediaPicker.tsx # Media picker component
βββ Components/
β βββ MediaGridView.tsx # Grid layout view
β βββ MediaSingleView.tsx # Single item view
β βββ MediaUploaderBox.tsx # Upload interface
β βββ MediaPreview.tsx # Media preview
β βββ MediaEditModal.tsx # Edit modal
β βββ MediaDeleteAlert.tsx # Delete confirmation
βββ Contexts/
β βββ MediaContext.tsx # Media state context
βββ Redux/
β βββ MediaAPISlice.ts # RTK Query API
βββ Hooks/
βββ useMediaDownload.ts # Download functionality
next.config.ts- Next.js configurationtailwind.config.js- Tailwind CSS configurationtsconfig.json- TypeScript configurationcomponents.json- shadcn/ui configurationeslint.config.mjs- ESLint configurationpostcss.config.mjs- PostCSS configuration
| Variable | Description | Required |
|---|---|---|
NEXT_PUBLIC_API_URL |
Backend API URL | β |
NEXT_PUBLIC_FRONTEND_URL |
Frontend URL | β |
- Drag-and-drop interface powered by react-dropzone
- Multiple file support
- Upload progress tracking
- File type validation
- View uploaded media in grid or single view
- Preview images and videos
- Download media files
- Edit media metadata
- Delete media with confirmation
- Centralized state with Redux Toolkit
- Efficient data fetching with RTK Query
- Optimistic updates for better UX
- Automatic cache invalidation
- Next.js Documentation - Learn about Next.js features and API
- Learn Next.js - Interactive Next.js tutorial
- Next.js GitHub - Contribute to Next.js
The easiest way to deploy this Next.js app is using Vercel:
- Push your code to GitHub/GitLab/Bitbucket
- Import your repository to Vercel
- Configure environment variables
- Deploy!
For more details, check the Next.js deployment documentation.
This application can be deployed on any platform that supports Node.js:
- Netlify
- AWS Amplify
- Digital Ocean
- Railway
- Self-hosted with Docker
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License.
Your Name / Team Name
- Next.js - The React Framework
- shadcn/ui - Beautifully designed components
- Redux Toolkit - State management
- Tailwind CSS - Utility-first CSS framework
Built with β€οΈ using Next.js and TypeScript