diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 77d7a6b6..75c4120b 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -4,11 +4,35 @@ Thank you for your interest in contributing to OpenCut! This document provides g ## Getting Started +### Prerequisites + +- [Node.js](https://nodejs.org/en/) (v18 or later) +- [Bun](https://bun.sh/docs/installation) + (for `npm` alternative) +- [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/) + +> **Note:** Docker is optional, but it's essential for running the local database and Redis services. If you're planning to contribute to frontend features, you can skip the Docker setup. If you have followed the steps below in [Setup](#setup), you're all set to go! + +### Setup + 1. Fork the repository 2. Clone your fork locally 3. Navigate to the web app directory: `cd apps/web` -4. Install dependencies: `bun install` -5. Start the development server: `bun run dev` +4. Copy `.env.example` to `.env.local`: + + ```bash + # Unix/Linux/Mac + cp .env.example .env.local + + # Windows Command Prompt + copy .env.example .env.local + + # Windows PowerShell + Copy-Item .env.example .env.local + ``` + +5. Install dependencies: `bun install` +6. Start the development server: `bun run dev` > **Note:** If you see an error like `Unsupported URL Type "workspace:*"` when running `npm install`, you have two options: > @@ -18,6 +42,7 @@ Thank you for your interest in contributing to OpenCut! This document provides g ## What to Focus On **🎯 Good Areas to Contribute:** + - Timeline functionality and UI improvements - Project management features - Performance optimizations @@ -26,6 +51,7 @@ Thank you for your interest in contributing to OpenCut! This document provides g - Documentation and testing **⚠️ Areas to Avoid:** + - Preview panel enhancements (text fonts, stickers, effects) - Export functionality improvements - Preview rendering optimizations @@ -38,12 +64,6 @@ If you're unsure whether your idea falls into the preview category, feel free to ## Development Setup -### Prerequisites - -- Node.js 18+ -- Bun (latest version) -- Docker (for local database) - ### Local Development 1. Start the database and Redis services: diff --git a/.gitignore b/.gitignore index 4869b9bd..38711b81 100644 --- a/.gitignore +++ b/.gitignore @@ -9,8 +9,6 @@ # debug /apps/web/npm-debug.log* -/apps/web/yarn-debug.log* -/apps/web/yarn-error.log* # env files (can opt-in for committing if needed) /apps/web/.env* @@ -18,7 +16,6 @@ # typescript /apps/web/next-env.d.ts -/apps/web/yarn.lock # asdf version management .tool-versions diff --git a/README.md b/README.md index ad9a6d38..1378b15a 100644 --- a/README.md +++ b/README.md @@ -39,26 +39,36 @@ Before you begin, ensure you have the following installed on your system: +- [Node.js](https://nodejs.org/en/) (v18 or later) - [Bun](https://bun.sh/docs/installation) + (for `npm` alternative) - [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/) -- [Node.js](https://nodejs.org/en/) (for `npm` alternative) + +> **Note:** Docker is optional, but it's essential for running the local database and Redis services. If you're planning to run the frontend or want to contribute to frontend features, you can skip the Docker setup. If you have followed the steps below in [Setup](#setup), you're all set to go! ### Setup 1. Fork the repository 2. Clone your fork locally 3. Navigate to the web app directory: `cd apps/web` -4. Install dependencies: `bun install` -5. Start the development server: `bun dev` +4. Copy `.env.example` to `.env.local`: + + ```bash + # Unix/Linux/Mac + cp .env.example .env.local + + # Windows Command Prompt + copy .env.example .env.local + + # Windows PowerShell + Copy-Item .env.example .env.local + ``` + +5. Install dependencies: `bun install` +6. Start the development server: `bun dev` ## Development Setup -### Prerequisites - -- Node.js 18+ -- Bun (latest version) -- Docker (for local database) - ### Local Development 1. Start the database and Redis services: diff --git a/apps/web/src/app/projects/page.tsx b/apps/web/src/app/projects/page.tsx index 499b999a..04270aee 100644 --- a/apps/web/src/app/projects/page.tsx +++ b/apps/web/src/app/projects/page.tsx @@ -5,6 +5,7 @@ import { useState } from "react"; import { Button } from "@/components/ui/button"; import { Card, CardContent } from "@/components/ui/card"; import { Checkbox } from "@/components/ui/checkbox"; +import { Input } from "@/components/ui/input"; import { ChevronLeft, Plus, @@ -14,6 +15,7 @@ import { Loader2, X, Trash2, + Search, } from "lucide-react"; import { TProject } from "@/types/project"; import Image from "next/image"; @@ -28,6 +30,13 @@ import { useProjectStore } from "@/stores/project-store"; import { useRouter } from "next/navigation"; import { DeleteProjectDialog } from "@/components/delete-project-dialog"; import { RenameProjectDialog } from "@/components/rename-project-dialog"; +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/components/ui/select"; export default function ProjectsPage() { const { @@ -36,6 +45,7 @@ export default function ProjectsPage() { isLoading, isInitialized, deleteProject, + getFilteredAndSortedProjects, } = useProjectStore(); const router = useRouter(); const [isSelectionMode, setIsSelectionMode] = useState(false); @@ -43,6 +53,8 @@ export default function ProjectsPage() { new Set() ); const [isBulkDeleteDialogOpen, setIsBulkDeleteDialogOpen] = useState(false); + const [searchQuery, setSearchQuery] = useState(""); + const [sortOption, setSortOption] = useState("createdAt-desc"); const handleCreateProject = async () => { const projectId = await createNewProject("New Project"); @@ -62,7 +74,7 @@ export default function ProjectsPage() { const handleSelectAll = (checked: boolean) => { if (checked) { - setSelectedProjects(new Set(savedProjects.map((p) => p.id))); + setSelectedProjects(new Set(sortedProjects.map((p) => p.id))); } else { setSelectedProjects(new Set()); } @@ -82,10 +94,13 @@ export default function ProjectsPage() { setIsBulkDeleteDialogOpen(false); }; + const sortedProjects = getFilteredAndSortedProjects(searchQuery, sortOption); + const allSelected = - savedProjects.length > 0 && selectedProjects.size === savedProjects.length; + sortedProjects.length > 0 && + selectedProjects.size === sortedProjects.length; const someSelected = - selectedProjects.size > 0 && selectedProjects.size < savedProjects.length; + selectedProjects.size > 0 && selectedProjects.size < sortedProjects.length; return (
+ Your search for "{searchQuery}" did not return any results. +
+ +