Free kanban app: đź”— https://www.completics.co
Here's a quick guide to get the app running locally:
- Set up Supabase: Create a project on Supabase.
- Get Environment Variables:
- From your Supabase project settings (Project Settings > API), find your
Project URLandProject API keys(anonandservice_role). - From Supabase "connect" tab find your
URI(this is yourDATABASE_URL). Replace[YOUR-PASSWORD]with your database password, which you created your Supabase project. - Set your own email and password in Supabase's Authentication menu.
- Set that email as
ADMIN_ALLOWED_EMAILin.env.local(see below).
- From your Supabase project settings (Project Settings > API), find your
- Create
.env.local: In the root of the cloned repository, create a file named.env.localand add the following variables, replacing the placeholders with your actual keys and URLs:
NEXT_PUBLIC_SUPABASE_URL=[YOUR-PROJECT-ID].supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key_here
DATABASE_URL=postgres://postgres:[YOUR-PASSWORD]@db.[YOUR-PROJECT-ID].supabase.co:5432/postgres #find it in Supabase "connect" tab
## FOR LOCAL DEV YOU CAN USE DIRECT CONNECTION ##
## DATABASE_URL=postgresql://postgres:[YOUR-PASSWORD]@db.[YOUR-PROJECT-ID].supabase.co:5432/postgres?sslmode=require
ADVISORY_LOCK_KEY= 999999999999999999 #any other number that fits within a 64-bit integer range
ADMIN_ALLOWED_EMAIL=your_admin_email@example.com #this must be set (together with the password) in Supabase's Authentication menu
- Clone the repository:
git clone https://github.com/Antibody/Completics.git
- Navigate into the project directory:
cd Completics - Install dependencies:
npm install
- Run the development server:
npm run dev
- For signup confirmatory emails use either default Supabase capability (limited to 2 per hour) or setup custom SMTP server. Setting custom SMTP in Supabase go to
Project setting->Authentication->SMTP settings->Enable Custom SMTP. Then in menuURL Configurationselect the URL to send users back after signup confiramtion - Open your browser to
http://localhost:3000. Log in asADMIN_ALLOWED_EMAIL. The database schema and RLS policies will be set up automatically on admin's first login.
This is a modern, responsive Kanban board application built with Next.js (App Router) and Supabase, now enhanced for multi-user functionality. It allows registered users to create and manage their own personal Kanban workspaces, tasks, projects, and versions (vers). Key features include user sign-up and login, automatic database schema setup (triggered by an initial admin action but creates a multi-user ready schema), user-specific workspaces, dynamic task management (add, edit, delete, archive), drag-and-drop for tasks, a calendar view for tasks with due dates, and dedicated sections for managing Projects and Vers. The application uses @supabase/ssr for authentication and data handling, ensuring data isolation between users through Row Level Security (RLS). Mobile responsiveness and a theme toggle are also included. Recent updates have introduced user-defined Tags for tasks and a Rich Text Editor (Markdown) for task descriptions, including support for to-do lists.
- User Authentication (Sign-up & Login, Logout, Account Removal):
- Secure sign-up and login for all users using Supabase Auth, managed with the
@supabase/ssrlibrary. - User Logout: Users can log out via a dropdown menu accessible from their email in the header.
- Account Removal: Users can permanently remove their account and all associated data. This action is initiated from the user menu and requires confirmation via a modal.
- Secure sign-up and login for all users using Supabase Auth, managed with the
- Multi-User Kanban Workspaces: Each user can create and manage multiple personal Kanban workspaces.
- Automatic Database Setup (Multi-User Ready):
- An initial setup (typically triggered by an admin visiting
/api/admin/initialize-schemaor on first admin login viaAuthContext) configures the database for multi-user support. - Corrected RPC Function: The
create_stage_at_startRPC function (formerlycreate_column_at_start) and its references topublic.stageshave been corrected to ensure proper database schema initialization. - Creates necessary tables:
users(from Supabase Auth),workspaces(new),stages,tasks,projects,vers,tags(for user-defined tags), andtask_tags(a junction table linking tasks to tags). - The
workspacestable links toauth.users.id.stagesandtaskslink toworkspaces.id.projectsandverslink directly toauth.users.id.tagsalso link toauth.users.id.task_tagslinkstasks.idandtags.id. - Seeds default stages ("To Do", "In Progress", "Done") for each new workspace a user creates (via
POST /api/workspaces). - Sets up user-centric Row Level Security (RLS) policies to ensure users can only access and manage their own data (workspaces, stages, tasks, projects, vers, tags, and task-tag assignments) based on
auth.uid().
- An initial setup (typically triggered by an admin visiting
- Dynamic Kanban Workspace (User-Specific):
- Displays stages and non-archived tasks for the user's currently selected workspace.
- Users can switch between their workspaces.
- Task Management (Workspace-Specific):
- Add Tasks: Add new tasks to any stage on the active workspace, with title, description, due date, associated project, and ver.
- Edit Tasks: Edit details of existing tasks. Task descriptions now support Markdown formatting, including to-do lists.
- Delete Tasks: Delete tasks with confirmation.
- Search & Filter Tasks: Filter tasks on the active Kanban workspace by search term, as well as by selected Project, Ver, and Tags. Filter controls are accessible via dropdown icons in the header on desktop, and within a dedicated "Manage & Filter" modal on mobile.
- Task Archiving (User-Specific):
- Archive tasks from the "Done" stage of a user's workspace.
- Archived tasks are removed from the main workspace view but remain accessible.
- A dedicated "Archive" page (
/archive) lists the user's archived tasks, with an option to unarchive them.
- Drag & Drop: Move tasks between stages and reorder within stages on a user's workspace.
- Calendar View (User-Specific): Visualize tasks with due dates from the user's workspaces.
- Projects Management (User-Specific):
- Users can manage their own Projects (names, descriptions, colors, start/finish dates).
- UI refers to these as "Projects"; the underlying database table is
projects. - View associated tasks for each project.
- Vers Management (User-Specific):
- Users can manage their own Vers (names, descriptions, status, start_date, release_date).
- UI refers to these as "Vers"; the underlying database table is
vers.
- Workspace Sharing: Users can generate shareable links for their workspaces, with options for read-only or editable access, and revoke sharing.
- Mobile Responsiveness & Modern UI: The application is designed to be responsive. Key mobile features include:
- A horizontally scrolling Kanban workspace for optimal task viewing on smaller screens.
- A consolidated "Manage & Filter" modal accessible from the workspace controls bar, providing access to workspace selection, workspace actions (new, share), and task filtering (by Project, Ver, and Tag).
- Adaptive header and navigation elements.
- Tags (User-Defined Tags):
- Users can create, manage, and assign custom tags to their tasks.
- Tags have a name and an optional color.
- Tags are user-specific, ensuring each user has their own set of tags.
- Tags are displayed as colored badges on the Kanban tasks.
- A dedicated popup (
TagsManagerPopup) allows users to view, create, delete, and assign/unassign tags for a specific task.
- Rich Text Editor for Task Descriptions:
- Task descriptions now utilize a Markdown editor, allowing for rich text formatting.
- Supports standard Markdown syntax.
- Includes support for GitHub Flavored Markdown (GFM), specifically enabling the creation and rendering of interactive to-do lists within the task description.
- Authentication is handled using Supabase Auth, now integrated with the
@supabase/ssrlibrary for robust server-side and client-side auth in Next.js v15.3 App Router.
- Users can enable sharing for their workspaces via the UI, generating a unique shareable link.
- Sharing can be configured in two modes:
- Read-Only: Anyone with the link can view the workspace's stages, non-archived tasks, and associated projects/vers. No authentication is required to view.
- Editable: Signed-in users with the link can view and interact with the workspace (add, edit, delete, move tasks, etc.). Authentication is required for editing.
- Workspace owners can revoke the share link at any time, disabling public access.
- The
/api/workspaces/[workspaceId]/sharingAPI route (POST/DELETE) is used by the workspace owner to manage the sharing state and mode. - The
/api/public/workspaces/[shareToken]API route is used to fetch shared workspace data publicly. This route uses the Supabase Service Role Key to bypass RLS and retrieve workspace details, stages, tasks (non-archived), and associated projects/vers based on theshareToken. - The
/shared-workspace/[shareToken]page component renders the shared workspace, determining whether to enable editing based on the fetchedpublic_share_modeand the viewer's authentication status.
The /api/admin/initialize-schema route (typically triggered once by an admin) initializes the database schema for multi-user functionality:
- Corrected RPC Function: The
create_stage_at_startRPC function (formerlycreate_column_at_start) and its references topublic.stageshave been corrected to ensure proper database schema initialization. - Supports user sign-up and login.
- The
AuthContext.tsxcomponent manages the user's session state and makes it available viauseAuth(). - The
Login.tsxcomponent provides UI for both sign-in and sign-up. - Client-side Supabase instance is created using
createBrowserClientfrom@supabase/ssr(seelib/supabaseClient.ts). - API Route Handlers use
createServerClientfrom@supabase/ssrfor authenticated requests. - User Menu & Session Management:
- The user's email in the
Header.tsxcomponent acts as a trigger for a dropdown menu. - The "Logout" option calls
supabase.auth.signOut(). TheAuthContext.tsxhandles session termination and UI updates (e.g., redirecting to the login page).
- The user's email in the
- Account Removal Process:
- Initiated via a "Remove Account" button (styled in red) in the user menu.
- A confirmation modal (
DeleteAccountModal.tsx) appears, warning the user about the permanent nature of the action and data loss. - If confirmed by the user, a
DELETErequest is made fromHeader.tsxto the/api/user/remove-account/route.tsAPI endpoint. - The backend API route verifies the user's session. It then uses a Supabase admin client (initialized with the
SUPABASE_SERVICE_ROLE_KEY) to delete the user fromauth.usersusingsupabase.auth.admin.deleteUser(userId). - Database
ON DELETE CASCADEconstraints on foreign keys referencingauth.users.id(forworkspaces,projects,vers,tags) andworkspaces.id(forstages,tasks) ensure all associated user data is automatically deleted from the database. Thetask_tagstable also hasON DELETE CASCADEontask_idandtag_idto automatically clean up assignments. - The client-side then forces a logout and displays a success/error toast notification.
workspacesTable: Stores user-owned workspaces, including sharing configuration (id,user_id,name,created_at,share_token(UUID, nullable),is_shared_publicly(BOOLEAN),public_share_mode(TEXT/ENUM:'read-only'|'editable', nullable)).stagesTable: Stores stages for each workspace (id,title,order,workspace_id). New stages are added via thecreate_stage_at_startRPC function, which shifts existing stages to maintain order.tasksTable: Stores tasks for each stage/workspace (id,title,description,stage_id,workspace_id,order,due_date,project_id,ver_id,is_archived,created_at). Thedescriptionfield now stores Markdown text. Tasks are linked totagsvia thetask_tagstable.projectsTable: Stores user-owned "Projects" (UI term) (id,user_id,name,description,color,start_date,finish_date,created_at).versTable: Stores user-owned versions (id,user_id,name,description,status,start_date,release_date,created_at).tagsTable: Stores user-defined tags (id,user_id,name,color,is_global(boolean,TRUEfor predefined tags like 'Urgent', 'Requested', 'Abandoned'),created_at). Each user has their own set of tags, and can also see global tags.task_tagsTable: A junction table to associate multiple tags with a single task (task_id(UUID, FK totasks, ON DELETE CASCADE),tag_id(UUID, FK totags, ON DELETE CASCADE),assigned_at). This table has a unique constraint on(task_id, tag_id)to prevent duplicate assignments.
/api/tags(GET, POST): Fetches all tags owned by the authenticated user./api/tags/[tagId](PUT): Updates a specific tag owned by the authenticated user. RequirestagIdin the path. Accepts optionalnameandcolorfields in the body. Returns the updated tag./api/tags/[tagId](DELETE): Deletes a specific tag owned by the authenticated user. RequirestagIdin the path. Deleting a tag automatically removes its assignments from all tasks due toON DELETE CASCADEon thetask_tagstable./api/tasks/[taskId]/tags(POST): Assigns an existing tag to a specific task. RequirestaskIdin the path andtag_id(UUID) in the body. Creates an entry in thetask_tagstable./api/tasks/[taskId]/tags/[tagId](DELETE): Removes a specific tag assignment from a task. RequirestaskIdandtagIdin the path. Deletes the corresponding entry in thetask_tagstable.- Task Operations (Add, Edit, Delete, Move): These operations are handled directly from client-side components (e.g.,
AddTaskForm.tsx,KanbanBoard.tsx,KanbanTask.tsx) by interacting with the Supabase client (supabase.from('tasks').insert/update/delete). This approach leverages Supabase's Postgrest API for secure and efficient data manipulation, rather than dedicated Next.js API routes for each task action. /api/workspaces(GET, POST): Manages user's workspaces./api/workspaces/[workspaceId](GET, PUT, DELETE): Manages a specific user workspace./api/workspaces/[workspaceId]/sharing(POST, DELETE): Manages workspace sharing (generating share tokens, managing sharing modes)./api/workspaces/[workspaceId]/shared-tags(GET): Retrieves shared tags for a specific workspace./api/public/workspaces/[shareToken](GET): Retrieves shared workspace data./api/user/remove-account(DELETE): Handles user account removal./api/admin/initialize-schema(POST): Initializes the database schema and RLS policies (triggered by admin)./api/projects(GET, POST): Manages user's projects./api/projects/[projectId](GET, PUT, DELETE): Manages a specific user project./api/vers(GET, POST): Manages user's versions./api/vers/[verId](GET, PUT, DELETE): Manages a specific user version./api/stages(GET, POST): Manages stages within a workspace./api/stages/[stageId](PUT, DELETE): Manages a specific stage.
- Users sign up/log in.
app/page.tsxfetches the user's workspaces viaGET /api/workspaces. If none, prompts to create one.- When a workspace is selected, its
workspaceIdis used byKanbanBoard.tsxto fetch its specific stages and tasks. Task data now includes associated tags. ProjectsManager.tsx(for route/projects) andVersManager.tsx(for route/vers) fetch and manage projects/vers owned by the logged-in user (RLS handles data scoping).- All task operations (add, edit, delete, archive, move) are scoped to the user's workspaces and tasks. Tag management and assignment are also user-specific and scoped to the user's tasks and tags.
- These features now operate within the context of the authenticated user's selected workspace and data.
Create a .env.local file in the root of your project:
NEXT_PUBLIC_SUPABASE_URL=[YOUR-PROJECT-ID].supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key_here
DATABASE_URL=postgres://postgres:[YOUR-PASSWORD]@db.[YOUR-PROJECT-ID].supabase.co:5432/postgres #find it in Supabase "connect" tab
## FOR LOCAL DEV YOU CAN USE DIRECT CONNECTION ##
## DATABASE_URL=postgresql://postgres:[YOUR-PASSWORD]@db.[YOUR-PROJECT-ID].supabase.co:5432/postgres?sslmode=require
ADVISORY_LOCK_KEY= 999999999999999999 #any other number that fits within a 64-bit integer range
ADMIN_ALLOWED_EMAIL=your_admin_email@example.com #this must be set (together with the password) in Supabase's Authentication menu
- The
ADMIN_ALLOWED_EMAILis primarily for gating the execution of the/api/admin/initialize-schemaroute. The RLS policies created by this script are user-centric based onauth.uid(). - The
SUPABASE_SERVICE_ROLE_KEYis critical for backend operations that require bypassing RLS, such as deleting a user from theauth.userstable or fetching publicly shared workspace data without authentication. Never expose this key on the client-side or commit it to public repositories if not using a.env.localfile.
Use either default Supabase capability (limited to 2 per hour) or setup custom SMTP server.
For setting custom SMTP in Supabase go to Project setting -> Authentication-> SMTP settings -> Enable Custom SMTP.
Then in menu URL Configuration select the URL to send users back after signup confiramtion
This project uses the following key dependencies:
next: 15.3.2 - The React framework for building the application.react,react-dom: 18.2.0 - React libraries for building the UI.@supabase/supabase-js: 2.39.7 - Supabase client library for database interaction and authentication.@supabase/ssr: 0.5.0 - Supabase client libraries for database interaction and authentication, specifically for server-side and client-side auth in Next.js App Router.@supabase/auth-helpers-nextjs: (version added by npm install) - Provides utilities likecreateRouteHandlerClientandcreateServerClientfor Next.js App Router authentication.@dnd-kit/core: 6.1.0 - Libraries for implementing drag-and-drop functionality.@dnd-kit/utilities: 3.2.2 - Libraries for implementing drag-and-drop functionality.@fullcalendar/core: 6.1.11 - Libraries for the calendar view.@fullcalendar/daygrid: 6.1.11 - Libraries for the calendar view.@fullcalendar/interaction: 6.1.11 - Libraries for the calendar view.@fullcalendar/react: 6.1.10 - Libraries for the calendar view.pg: 8.11.3 - PostgreSQL client for server-side database operations (used in admin setup).react-toastify: 10.0.4 - For displaying toast notifications.uuid: 9.0.1 - For generating unique IDs (e.g., for share tokens).zod: 3.22.4 - For data validation (used in API routes).@uiw/react-md-editor: 4.3.0 - Markdown editor component for task descriptions.react-markdown: 9.0.1 - Renders Markdown content.remark-gfm: 4.0.0 - Plugin forreact-markdownto support GitHub Flavored Markdown, including task lists.