Crafter.io: Collaborative Management Platform
Crafter.io: Collaborative Management Platform
io
Web-based product management and collaboration platform
A Project Report
Submitted in partial fulfilment of the Requirements for the award of the Degree of
By
IT Co-ordinator
2024-2025
1
Date:
2
VALIA C.L COLLEGE OF
INFORMATION TECHNOLOGY
(Affiliated to University of Mumbai)
Mumbai – Maharashtra – 400053.
DEPARTMENT OF INFORMATION
TECHNOLOGY
CERTIFICATE
This is to certify that the project entitled, "[Link] (web-based product management
and collaboration platform)", is the bonafide work of Suryaprasad Yadav bearing Seat
No: 3021620 submitted in partial fulfillment of the requirements for the award of degree of
BACHELOR OF SCIENCE in INFORMATION TECHNOLOGY
from University of Mumbai.
External Examiner
The system enables real-time editing and organization of workspaces while integrating
essential features such as version control, user roles, and access permissions.
Advanced functionalities, including diagram generation, markdown support,
and AI-assisted content structuring, enhance workflow efficiency.
The project involves backend implementation using Convexdb with Node js,
ensuring robust data handling, while the frontend is built with React and [Link] for a
smooth user experience. Additional enhancements include real-time updates via
WebSockets and a dark-themed UI inspired by ShadCn Ui for a modern, user-
friendly interface.
This platform aims to provide teams with an intuitive and powerful workspace for
document collaboration, knowledge sharing, and structured project
management, ultimately boosting productivity and innovation.
4
ACKNOWLEDGEMENT
I would like to express my sincere gratitude to our Project Co-Ordinator Prof. Aarti
Patkar who has played a vital role in the development of my project Suryaprasad
Yadav. Your support, guidance, and expertise have been invaluable in creating a
system that meets the needs of our clients.
Your feedback and suggestions have helped us to improve the functionality of the
system and make it more user-friendly. Your knowledge and insights have been
crucial in ensuring that the system meets the highest standards of excellence.
We would also like to thank our college that have supported us throughout the
development process. Your partnership has been essential in enabling us to create a
system that meets the highest standards of excellence.
Once again, thank you to all the teachers who have supported us in this project. Your
contributions have been invaluable, and we are grateful for your partnership.
5
DECLARATION
This project is completed in partial fulfillment of the requirements for the award of
the degree of BACHELOR OF SCIENCE (INFORMATION TECHNOLOGY)
and is submitted as the final semester project as part of the curriculum.
Signature:
Suryaprasad Yadav
Seat No.: 3021620
6
TABLE OF CONTENTS
1 INTRODUCTION
1.1 Background 10
1.2 Objectives 11
1.3 Purpose, Scope & Applicability 11
1.3.1 Purpose 11
1.3.2 Scope 11
1.3.3 Applicability 12
1.4 Achievements 12
1.5 Organization of Report 12
2 SURVEY OF TECHNOLOGIES
2.1 HTML 13
2.2 Css 13
2.7 17
Kinde Authentication
7
8
3 REQUIREMENTS & ANALYSIS
3.1 Problem Definition 18
4 SYSTEM DESIGN
7.1 Conclusion 81
7.2 References 82
9
TABLE OF FIGURES
10
CHAPTER 1: INTRODUCTION
In modern work environments, effective product management and team collaboration play a vital
role in improving productivity and workflow efficiency. Managing documents, diagrams, and
structured content in real time is essential for teams working on complex projects.
This project, [Link] – Web-Based Product Management and Collaboration Platform, provides a real-
time, collaborative workspace where users can create, edit, and manage documents and diagrams efficiently.
It integrates [Link] for the frontend, Convex for real-time backend functionality, and Kinde for
authentication, ensuring seamless user interactions and security.
The platform supports rich-text editing using EditorJS, real-time diagramming with Excalidraw, and team-
based file management. The system ensures real-time synchronization, allowing multiple users to
collaborate seamlessly on shared workspaces.
By leveraging modern web technologies and AI-powered features, [Link] aims to enhance team
productivity, knowledge sharing, and efficient project management in a streamlined and user-friendly
manner.
1.1 Background:
In the modern digital workspace, efficient product management and seamless collaboration are
essential for teams working on complex projects. Traditional methods of document handling and
diagram creation often involve multiple disconnected tools, leading to inefficiencies, version
control issues, and collaboration barriers.
To address these challenges, [Link] – Web-Based Product Management and Collaboration Platform
provides a real-time, collaborative environment for managing documents, diagrams, and structured
content. By integrating modern web technologies like [Link], Convex, and Excalidraw, [Link] enables
teams to work together effortlessly, improving workflow efficiency and project management.
By offering a centralized, intuitive, and real-time collaborative platform, [Link] aims to streamline team
workflows, reduce inefficiencies, and enhance productivity across various industries.
11
1.2 Objective:
The primary objectives of this project, [Link] – Web-Based Product Management and
Collaboration Platform, are:
1. Real-time Document Editing:
By achieving these objectives, [Link] will serve as a powerful, real-time collaborative workspace,
enhancing productivity, teamwork, and project management efficiency.
12
1.3 Purpose, Scope and Applicability:
1.3.1 Purpose:
The purpose of this project is to develop a web-based product management and collaboration
platform that enhances team productivity through real-time document editing, diagramming, and
project organization. Inspired by [Link], this platform aims to provide an efficient and user-
friendly workspace for professionals, developers, and teams working on shared projects.
Traditional product management tools often suffer from complex interfaces, lack of real-time collaboration,
and limited integration options. This project overcomes these challenges by leveraging:
By integrating these technologies, the platform ensures seamless collaboration, efficient file organization,
and enhanced team communication, making it an essential tool for modern product teams.
1.3.2 Scope:
1. Document Editing – Real-time text editing with formatting, tables, and code blocks using
EditorJS.
2. Diagramming & Whiteboarding – Interactive sketching, flowcharts, and mind maps with
Excalidraw.
3. File & Task Management – Organizing files by priority, tags, and metadata for better
workflow management.
4. Real-time Collaboration – Multi-user editing, commenting, and version tracking powered by
Convex.
5. User Authentication & Role Management – Secure sign-ins and access controls with Kinde Auth.
6. Dark Mode & UI Enhancements – Modern, accessible, and visually appealing interface using
Tailwind CSS.
This platform is designed for teams, startups, and individuals looking for a streamlined and real-time
product management solution. Future enhancements may include AI-powered suggestions, integrations
with external tools, and advanced analytics for productivity tracking.
13
1.3.3 Applicability:
The [Link] platform has broad applicability in product management, team collaboration,
and project organization. It serves as a real-time workspace for professionals, startups, and
enterprises, enhancing productivity by enabling seamless document editing, diagramming, and file
management.
Key areas where [Link] can be applied include:
• Remote and Hybrid Teams – Enables teams to collaborate in real time with shared
documents and diagrams.
• Project & Product Management – Helps teams organize tasks, track progress, and manage
files efficiently.
• Software Development Workflows – Facilitates technical documentation, brainstorming,
and architecture planning.
• Education & Research – Supports students and educators in creating structured
notes, flowcharts, and reports.
• Business and Enterprise Solutions – Acts as a centralized workspace for planning,
execution, and communication.
By integrating Convex for real-time collaboration, Kinde Auth for authentication, and [Link] for a
seamless frontend, this platform ensures fast, scalable, and efficient team productivity.
1.4 Achievement:
Successfully developed a [Link]-based real-time product management platform.
• Implemented Convex backend for instant updates and multi-user collaboration.\
• Enabled secure authentication and role-based access control using Kinde Auth.
• Implemented real-time file organization and task prioritization with dynamic metadata.
14
CHAPTER 2: SURVEY OF TECHNOLOGIES
Technologies Used
To implement [Link] – Web-Based Product Management and Collaboration Platform, the
following technologies will be used:
Frontend:
• [Link] 14 (React framework) – Provides a fast, scalable, and interactive user interface.
• Tailwind CSS – Used for responsive and modern UI styling.
• shadcn/ui – Pre-built UI components for improved design and usability.
Backend:
Authentication:
Html 2.1
HTML (Hypertext Markup Language) is the standard language used to create web pages, describing
their structure and content. It works alongside CSS for styling and JavaScript for interactivity.
HTML uses elements, defined by tags (e.g., <img />, <p>), to structure text, images, forms, and
other content. These tags help browsers interpret and render the page, although the tags themselves
are not displayed. HTML also provides semantic meaning for document text, such as headings,
15
paragraphs, and links.
Css 2.2
Cascading Style Sheets (CSS) is a language used to define the presentation of web
documents written in HTML or XML. It separates content from design,
controlling elements like layout, colors, and fonts. This separation improves
accessibility, flexibility, and reduces redundancy by allowing multiple web pages
to share a single CSS file. Additionally, CSS files can be cached to speed up page
loading across shared pages.
TailwindCss 2.3
Tailwind CSS is a popular open-source utility-first CSS framework used for designing modern and
responsive web applications. Unlike traditional frameworks like Bootstrap, Tailwind provides low-level
utility classes that allow developers to style elements directly within HTML, enabling greater flexibility and
customization.
Tailwind’s approach eliminates the need for pre-designed components, allowing for a more consistent and
scalable design system.
Its responsive utility classes make it easy to build layouts that adapt to different screen sizes. Additionally,
Tailwind supports customization through configuration files, optimizing performance by purging unused
styles. Due to its flexibility, efficiency, and lightweight nature, Tailwind CSS is widely used for building
scalable and highly customized UI designs.
16
React 2.4
[Link] is a popular open-source JavaScript library for building dynamic and interactive user interfaces,
primarily for web applications. Developed by Facebook, React follows a component-based architecture,
enabling developers to create reusable UI elements that enhance maintainability and scalability.
Unlike traditional frameworks, React uses a virtual DOM to optimize rendering performance,
ensuring efficient updates to the user interface. With features like hooks and context API, React
simplifies state management, making it easier to handle complex application logic.
When paired with [Link], React enables server-side rendering (SSR) and static site generation (SSG),
improving performance and SEO. Additionally, React integrates seamlessly with Tailwind CSS,
providing utility-first styling for responsive and customizable UI designs.
.. Next Js 2.5
[Link] is a powerful, open-source React framework used for building modern web applications.
It provides a robust architecture for server-side rendering (SSR), static site generation (SSG),
and client-side rendering (CSR), making it highly efficient for performance and SEO.
17
Unlike traditional React applications, [Link] includes built-in routing, API handling, and automatic code
splitting, reducing the need for additional configurations. It offers middleware support, image
optimization, and incremental static regeneration (ISR), allowing dynamic content updates without
rebuilding the entire application.
[Link] seamlessly integrates with Tailwind CSS for utility-first styling and can connect with databases and
authentication providers through built-in API routes. It is commonly used for developing high-
performance web applications, e-commerce platforms, dashboards, and SaaS products. Its
combination of flexibility, scalability, and developer experience makes [Link] a go-to choice for modern
full-stack web development.
Convex 2.6
Convex is a modern backend-as-a-service platform designed for real-time data storage, queries,
and application logic. Unlike traditional databases that require manual API setup, Convex provides
serverless functions and reactive data fetching, making it an ideal choice for building dynamic
web applications with [Link].
Convex simplifies backend development by removing the need for REST or GraphQL APIs,
allowing developers to interact with the database directly using JavaScript/TypeScript functions. It
ensures strong data consistency, automatic indexing, and real-time updates without complex
configurations
Kinde 2.7
18
Kinde Auth is a modern authentication and authorization platform designed to simplify user
identity management for web applications. It provides secure login, role-based access control
(RBAC), and user session management with minimal configuration.
Kinde Auth seamlessly integrates with frameworks like [Link], enabling developers to implement OAuth,
Single Sign-On (SSO), and social logins (Google, GitHub, etc.) effortlessly. It eliminates the need for
building custom authentication logic by handling JWT-based authentication, user permissions, and
multi-tenant support.
Gemini 2.8
Google Gemini AI is an advanced artificial intelligence model developed by Google, designed for
diverse applications such as natural language understanding, code generation, and multimodal
tasks. It integrates seamlessly with various platforms, offering real-time assistance for text, image,
and data processing.
Gemini AI excels in generating human-like responses, assisting in research, brainstorming, and automating
complex workflows. It enhances productivity in software development, content creation, and problem-
solving. With deep learning capabilities, it supports multiple languages, making it a powerful tool for AI-
driven applications. Its adaptability and contextual awareness make it a valuable asset in modern AI-
powered solutions.
19
CHAPTER 3: REQUIREMENT & ANALYSIS
3. Complex User Interfaces: Many existing platforms have cluttered or overly complex
interfaces, reducing productivity and making adoption difficult for new users.
4. Limited AI-Powered Assistance: Most project management tools lack AI-driven automation
for document structuring, task suggestions, and intelligent insights.
5. Inefficient File Organization: Managing multiple files across different teams and
workspaces becomes cumbersome without a hierarchical system and intuitive search
functionality.
Proposed Solution:
1) AI-Assisted Content Generation: The system will analyze user inputs and project data
to generate structured documents and diagrams, improving workflow efficiency.
2) Real-Time Collaboration: Utilizing Convex for backend operations, the platform enables
instant updates and multi-user editing for seamless teamwork.
5) Impact: This project aims to enhance team collaboration, reduce manual effort, and optimize
project management for businesses, freelancers, and teams working remotely.
20
3.2 Requirement Specification
❖ External Interfaces
User Interfaces:
• The platform will feature a graphical user interface (GUI) optimized for seamless navigation.
• Each page will provide clear instructions to guide users through document creation, editing,
and collaboration.
• The UI will be designed using [Link], Tailwind CSS, and shadcn/ui components for a modern
and responsive experience.
• Essential instructions and messages will be displayed in designated areas to enhance user clarity.
Hardware Interfaces:
• Accessible on various devices, including laptops, tablets, and desktop monitors for an
optimal viewing experience.
• Supports both touchscreen interactions and traditional keyboard/mouse inputs for flexibility.
• Designed to function efficiently across devices with continuous power backup support.
Software Interfaces:
• Compatible with Windows, macOS, and Linux operating systems.
• Integrated with Convex for real-time database operations and Kinde for authentication.
• Requires a modern web browser (Google Chrome, Mozilla Firefox, Microsoft Edge) for
smooth operation.
21
❖ Performance Requirements:
Security:
• [Link] ensures that only authenticated users can access the platform using Kinde Auth for
secure login and role-based access control.
• User authentication is required for creating, editing, and collaborating on documents and diagrams.
• Data integrity is maintained with Convex's real-time database, ensuring secure storage and
access control.
Reliability:
• The platform guarantees high reliability, with real-time updates and consistent
document management.
• All changes are automatically saved and synchronized across users, ensuring no data loss.
Availability:
• The application is accessible from any device with an internet connection, allowing users
to collaborate remotely.
• Cloud-based deployment ensures high uptime and availability for seamless access.
Maintainability:
• The modular architecture, using [Link] components, ensures that new features and updates can
be easily integrated.
• Future enhancements, such as AI-powered suggestions or additional diagramming tools, can be
incorporated with minimal disruption.
Portability:
• [Link] is platform-independent and accessible via any modern web browser (Chrome,
Firefox, Edge).
• It does not require installation and is fully responsive for desktop.
❖ Functional Requirements:
➢ Real-Time Collaboration
Uses Convex for real-time updates, allowing multiple users to work together.
Changes are instantly reflected across all devices.
22
➢ Web Application Interface
• The platform should load quickly and provide a seamless user experience with
minimal lag.
➢ Safe and Secure
• Uses Kinde Auth for authentication and Convex for secure data storage.
• Implements data encryption, role-based access control, and regular backups.
➢ Always Available
• The system should maintain high uptime with serverless architecture for reliability.
➢ Adaptable
• The platform should scale dynamically based on user activity and team collaboration needs.
➢ Data Safe and Sound
23
3.3 : Planning and scheduling:
➢ Planning
• Identifies all core features and deliverables for the platform, including
document collaboration, diagramming, and file management.
• Defines key infrastructure such as database architecture (Convex), authentication
(Kinde Auth), and frontend framework ([Link]).
➢ Requirement Specification
➢ Resource Allocation
➢ Development Constraints
• Limited development time and resources require strategic planning for feature
rollouts and testing phases.
• Trade-offs between feature complexity, performance, and user experience must be
analyzed.
• Accounts for potential changes in user needs, scalability issues, and backend
integration challenges.
• Ensures robust testing to handle real-time collaboration scenarios and high-
concurrency usage.
• Balances costs for hosting, data storage, and API integrations with project scalability.
24
❖ GANTT Chart:
A Gantt chart may be a sort of chart that illustrates a project schedule. This chart
lists the tasks to be performed on the vertical axis, and time intervals on the horizontal axis.
The width of the horizontal bars within the graph shows the duration of every activity.
Gantt charts illustrate the beginning and finish dates of the terminal elements and summary
elements of a project. Terminal elements and summary elements constitute the work
breakdown structure of the project.
Months
July AugustSeptOct Nov Dec Jan Feb March
Phases
Research &
Analysis
Requirement
Gathering
Planning
Design
Coding
Testing
Documentations
• Estimated Time:
25
T ask Name Start Date Duration (Days) End Date
Research & 16/07/2024 28 Days 13/08/2024
Analysis
Requirement 09/08/2024 32 Days 10/09/2024
Gathering
Planning 25/08/2024 33 Days 27/09/2024
Design 21/09/2024 32 Days 23/10/2024
Coding 10/10/2024 124 Days 11/02/2025
Testing 14/11/2024 90 Days 12/02/2025
Documentation 13/02/2025 25 Days 09/03/2025
Submission - - /03/2025
1) Software Requirements-
➢ Operating System: Windows 10 or Higher / macOS / Linux
➢ Frontend: [Link], React, Tailwind CSS, ShadCN/UI
➢ Backend: [Link], Convex (real-time database & backend)
➢ Authentication: Kinde Auth
➢ State Management: Context API
➢ Database: Convex (serverless real-time storage)
➢ AI Integration: Google Gemini AI
➢ Libraries & Frameworks:
• Frontend: Framer Motion (animations), Lucide React (icons)
• Backend: Convex Database
• Collaboration: EditorJS (rich text editing), Excalidraw (diagramming)
2) Hardware Requirements-
26
3.5 Preliminary Product Description:
Developed using [Link], React, Convex, and Tailwind CSS, [Link] provides an intuitive
user interface that supports live collaboration. It leverages Convex for real-time database
updates and Kinde Auth for secure authentication. The application enables team-based
document creation, real-time updates, and structured file management with priority settings.
[Link] aims to assist teams, startups, and enterprises in efficiently managing projects and
workflows. It is scalable, secure, and cloud-based, ensuring seamless access across multiple
devices. Future enhancements may include AI-powered assistance using Google Gemini,
deeper integration with third-party tools, and mobile app development for broader
accessibility.
27
3.6 Conceptual Models:
❖ ACTIVITY DIAGRAM
An Activity UML Diagram represents the flow of control or data in a system, illustrating dynamic
aspects like workflows, processes, and algorithms. It consists of elements like actions, decisions,
swimlanes, start and end nodes, and control flows. Widely used in business process modeling
and software development, it helps visualize sequential and parallel processes. Activity
diagrams are essential in use case modeling, workflow analysis, and system behavior
representation.
28
❖ Class Diagram
29
❖ Component Diagram
30
❖ Use Case Diagram
A use case diagram is like a picture that shows how a system works and who uses it. In the
picture, you have actors (like people or other systems) and actions they can do, called use
cases (like playing music or making a playlist). It’s like a simple map that helps you see
what the system does and who interacts with it. For example, if you think about a music
player app, you are the actor, and the things you can do, like playing a song or making a
playlist, are the use cases. The diagram uses circles for actions and stick figures for users,
showing lines to connect them and how they work together. It’s an easy way to understand
the main features of a system without getting into complicated details.
31
❖ SEQUENCE DIAGRAM
A Sequence UML Diagram models the interaction between objects in a system over time,
focusing on message exchange and order of execution. It consists of lifelines, messages,
activations, and arrows to represent communication between components. Widely used in
software design, use case modeling, and system behavior analysis, it helps visualize request-
response flows, method calls, and event sequences. Sequence diagrams are essential for
understanding system dynamics, debugging interactions, and optimizing process workflows.
32
CHAPTER 4: SYSTEM DESIGN
➢ AI Assistance Module
• Integrates Google Gemini AI to assist with content
generation and suggestions.
• Provides AI-powered document enhancements and diagram insights.
34
4.2 Security Issues
1. Data Privacy – User-created documents, diagrams , and projects files must be protected to
prevent unauthorized acces ore misuse .
2. Data Encryption – Lack of encryption during data transmission could lead to security breaches.
End-to-end encryption (E2EE) should be implemented to protect user data during storage
and transfer.
4. Web Security Vulnerabilities (XSS & Injection Attacks) – The application must sanitize user
inputs to prevent Cross-Site Scripting (XSS) and SQL/NoSQL Injection attacks that could
compromise user data.
5. Model Security – If AI features (like content generation) are integrated, they must be protected from
adversarial inputs that could generate misleading or harmful content.
6. Server & Network Security – Convex and [Link] APIs should have proper security
configurations, including rate limiting, API authentication, and secure headers to prevent
unauthorized API access.
7. Data Storage Risks – User-generated files and metadata should be encrypted at rest and
stored securely with access control mechanisms to prevent data leaks.
8. DDoS Attacks – The system should implement rate-limiting and cloud-based security
solutions to mitigate Distributed Denial-of-Service (DDoS) attacks, ensuring continuous
availability.
9. Session Security – Secure cookie storage, HTTP-only and SameSite flags, and token
expiration policies should be enforced to prevent session hijacking and unauthorized access.
10. Compliance with Regulations – The system should adhere to data protection laws like
GDPR and CCPA, ensuring that user data is stored, processed, and deleted in compliance with
privacy regulations.
35
4.3 Test Case Design
• In software engineering, a test case is a specification of the inputs, execution
conditions, testing procedure, and expected results that define a single test to
be executed to achieve a particular software testing objective, such as to
exercise a particular program path or to verify compliance with a specific
requirement. Test cases underlie testing that is methodical rather than
haphazard.
• A battery of test cases can be built to produce the desired coverage of the
software being tested. Formally defined test cases allow the same tests to be run
repeatedly against successive versions of the software, allowing for effective
and consistent regression testing.
36
Test Status
Test Scenario Test Steps Expected Output
Case ID (Pass/Fail)
Perform multiple
System responds within
TC_12 Performance check operations (create, edit, acceptable time limits Pass
delete) quickly
Each test case ensures the application functions correctly, securely, and efficiently.
37
CHAPTER 5: IMPLEMENTATION AND TESTING
[Link]
"use client"
import { useKindeBrowserClient } from "@kinde-oss/kinde-auth-
nextjs"; import Header from "./_components/Header";
import Hero from
"./_components/Hero"; import {
useEffect } from "react";
[Link]
function Header() {
const { user }: any =
useKindeBrowserClient(); const
[searchQuery, setSearchQuery] =
useState('');
return (
38
<div className="flex justify-between w-full gap-4 items-center bg-gray-900 p-3">
{/* Search Input */}
{/* You can uncomment and add search logic here */}
{/* <div className="flex gap-2 items-center border border-gray-600 rounded-md
p-1 bg-
39
gray-800 text-gray-300">
<Search className="h-4 w-4 text-gray-400" />
<input
type="te
xt"
placeholder="Search"
value={searchQuery}
onChange={handleSearchChang
e}
onKeyDown={(e) => [Link] === 'Enter' && handleSearch()} // Trigger search
on Enter key press
className="bg-transparent focus:outline-none focus:ring-2 focus:ring-yellow-500
text-sm placeholder-gray-400"
/>
</div> */}
40
[Link]
function FileList() {
const { fileList_, setFileList_ } = useContext(FileListContext);
const [fileList, setFileList] = useState<FILE[]>();
const { user }: any = useKindeBrowserClient();
const router = useRouter();
// On mount or when fileList_ updates, merge cookie mapping into the file list.
useEffect(() => {
if (fileList_) {
41
let newList = fileList_;
42
// Get the cookie mapping for priorities (structured by teamId and fileName)
let mapping: Record<string, Record<string, string>> = {};
const cookieData = [Link](COOKIE_KEY);
if (cookieData) {
try {
mapping = [Link](cookieData);
} catch (error) {
[Link]("Error parsing cookie mapping:", error);
}
}
// For each file, use the mapping if available; otherwise, set a default value ("Unassigned")
newList = [Link](
(file: { teamId: string | number; fileName: string | number }) => {
if (!mapping[[Link]]) {
mapping[[Link]] = {};
}
if (!mapping[[Link]][[Link]]) {
// Set default if not present mapping[[Link]]
[[Link]] = "Unassigned";
}
return { ...file, _proirity: mapping[[Link]][[Link]] };
}
);
// Update the cookie with any new default mappings (expires in 30 days)
[Link](COOKIE_KEY, [Link](mapping), {
expires: 30,
path: "/",
});
setFileList(newList);
}
}, [fileList_]);
// Handle changing priority and update both state and cookie mapping.
const handlePriorityChange = (id: string, priority: string) => {
// Update local state and context.
const updatedList = fileList?.map((file) =>
file._id === id ? { ...file, _proirity: priority } : file
);
setFileList(updatedList);
setFileList_?.(updatedList);
return (
44
<div className="bg-gray-900 min-h-screen">
<div className="mt-10 p-4">
<div className="overflow-x-auto bg-gray-800 text-white rounded-lg shadow-lg">
<table className="min-w-full divide-y-2 divide-gray-700">
<thead className="text-left">
<tr>
<td className="whitespace-nowrap px-4 py-2 font-medium">
File Name
</td>
<td className="whitespace-nowrap px-4 py-2 font-medium">
Created At
</td>
<td className="whitespace-nowrap px-4 py-2 font-medium">
Priority
</td>
<td className="whitespace-nowrap px-4 py-2 font-medium"></td>
</tr>
</thead>
<tbody className="divide-y divide-gray-700">
{fileList &&
[Link]((file: FILE, index: number) => (
<tr
key={index}
className="odd:bg-gray-700 cursor-pointer"
onClick={() => [Link](`/workspace/${file._id}`)}
>
<td className="whitespace-nowrap px-4 py-2">
{[Link]}
</td>
<td className="whitespace-nowrap px-4 py-2">
{moment(file._creationTime).format("DD MMM YYYY, h:mm A")}
</td>
<td
className="whitespace-nowrap px-4 py-2"
onClick={(event) => [Link]()}
>
<DropdownMenu>
<DropdownMenuTrigger>
<div className="flex items-center gap-2 cursor-pointer">
<div
className={`h-4 w-4 rounded-full ${priorityFill[file._proirity]}`}
></div>
<span
className={`text-sm font-medium ${priorityTextColor[file._proirity]}`}
>
{file._proirity || "Unassigned"}
</span>
</div>
45
</DropdownMenuTrigger>
<DropdownMenuContent>
{["High", "Medium", "Low", "Unassigned"].map(
(priority) => (
<DropdownMenuItem
key={priority}
onClick={(event) => {
[Link]();
handlePriorityChange(file._id, priority);
}}
className="flex items-center gap-2 cursor-pointer"
>
<div
className={`h-4 w-4 rounded-full ${priorityFill[priority]}`}
></div>
<span
className={`text-sm font-medium ${priorityTextColor[priority]}`}
>
{priority}
</span>
</DropdownMenuItem>
)
)}
</DropdownMenuContent>
</DropdownMenu>
</td>
<td className="whitespace-nowrap px-4 py-2">
{user && (
<Image
src="/[Link]"
alt="user"
width={30}
height={30}
className="rounded-full"
/>
)}
</td>
<td className="whitespace-nowrap px-4 py-2">
<DropdownMenu>
<DropdownMenuTrigger>
<MoreHorizontal className="h-4 w-4" />
</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuItem
onClick={(event) => {
[Link]();
[Link](`/workspace/${file._id}`);
}}
46
className="flex items-center gap-3"
>
<File className="h-4 w-4" /> Open
</DropdownMenuItem>
<DropdownMenuItem
onClick={(event) => {
[Link]();
// Call the delete functionality using Convex
handleDelete(file._id);
}}
className="flex items-center gap-3"
>
<Archive className="h-4 w-4" /> Delete
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
</td>
</tr>
))}
</tbody>
</table>
</div>
</div>
</div>
);
}
[Link]
"use client"
import { Button } from
'@/components/ui/button' import { Input }
from '@/components/ui/input' import { api
} from '@/convex/_generated/api'
import { useKindeBrowserClient } from '@kinde-oss/kinde-auth-
nextjs' import { useMutation } from 'convex/react'
import Image from 'next/image'
import { useRouter } from
'next/navigation' import React, {
useState } from 'react' import { toast
} from 'sonner'
47
function CreateTeam() {
48
const [teamName, setTeamName] = useState('');
const createTeam =
useMutation([Link]); const { user
}: any = useKindeBrowserClient();
const router = useRouter();
return (
<div className='bg-black text-white flex justify-center items-
center min-h-screen'>
<div className='px-6 md:px-16'>
<div className="flex items-center space-x-2">
</div>
49
</div>
<div className='flex flex-col items-center mt-8'>
<h2 className='font-bold text-[40px] py-3 text-white'>
50
What should we call your team?
</h2>
<h2 className='text-gray-400'>
Remember project name is
permanent !.
</h2>
<div className='mt-7 w-[40%]'>
<label className='text-gray-
400'> Team Name
</label>
<Input
placeholder='Team Name'
white className='mt-3 bg-gray-800 border border-gray-600
' text-
[Link]
[Link]
"use client"
import { Button } from
51
'@/components/ui/button' import { api }
from '@/convex/_generated/api'
import { LogoutLink, useKindeBrowserClient } from
'@kinde-oss/kinde-
52
auth-nextjs'
import { useConvex, useMutation, useQuery } from
'convex/react' import React, { useEffect } from 'react'
import Header from
'./_components/Header' import FileList
from './_components/FileList'
// import AdBanner from './../../_components/AdBanner'
function Dashboard() {
const convex=useConvex();
const {user}:any=useKindeBrowserClient();
const createUser=useMutation([Link]);
useEffect(()=>{
if(user)
{
checkUser()
}
},[user])
const checkUser=async()=>{
const result=await [Link]([Link],
{email:user?.email}
); if(!
result?.length)
{
createUser({ name:user
.given_name,
email:[Link],
image:[Link]
}).then((resp)=>{ con
[Link](resp)
})
}
}
return (
<div className='p-8'>
<Header/>
53
<FileList/>
54
</div>
)
}
[Link]
"use client"
import { api } from '@/convex/_generated/api';
import { useKindeBrowserClient } from '@kinde-oss/kinde-auth-nextjs';
import { useConvex } from 'convex/react';
import { useRouter } from 'next/navigation';
import React, { useEffect, useState } from 'react'
import SideNav from './_components/SideNav';
import { FileListContext } from '@/app/_context/FilesListContext';
function DashboardLayout(
{
children,
}: Readonly<{
children: [Link];
}>
){
const convex=useConvex();
const {user}:any=useKindeBrowserClient();
const [fileList_,setFileList_]=useState();
const router=useRouter();
useEffect(()=>{ user&&checkTea
m();
},[user])
55
const checkTeam=async()=>{
const result=await [Link]([Link],
{email:user?.email});
if(!result?.length)
{
[Link]('teams/create')
}
}
return (
<div>
<[Link] value={{fileList_,setFileList_}}>
<div className='grid grid-cols-4'>
<div className='bg-gray-800 h-screen w-72 fixed'>
<SideNav/>
</div>
<div className='col-span-4 ml-72 relative'>
{children}
</div>
</div>
</[Link]>
</div>
)
}
56
[Link]
57
function FileList() {
const { fileList_, setFileList_ } = useContext(FileListContext);
const [fileList, setFileList] = useState<FILE[]>();
const { user }: any = useKindeBrowserClient();
const router = useRouter();
// On mount or when fileList_ updates, merge cookie mapping into the file list.
useEffect(() => {
if (fileList_) {
let newList = fileList_;
// Get the cookie mapping for priorities (structured by teamId and fileName)
let mapping: Record<string, Record<string, string>> = {};
const cookieData = [Link](COOKIE_KEY);
if (cookieData) {
try {
mapping = [Link](cookieData);
} catch (error) {
[Link]("Error parsing cookie mapping:", error);
}
}
// For each file, use the mapping if available; otherwise, set a default value
("Unassigned")
newList = [Link](
(file: { teamId: string | number; fileName: string | number }) => {
if (!mapping[[Link]]) {
mapping[[Link]] = {};
}
if (!mapping[[Link]][[Link]]) {
// Set default if not present mapping[[Link]]
[[Link]] = "Unassigned";
}
return { ...file, _proirity: mapping[[Link]][[Link]] };
58
}
);
// Update the cookie with any new default mappings (expires in 30 days)
[Link](COOKIE_KEY, [Link](mapping), {
expires: 30,
path: "/",
});
setFileList(newList);
}
}, [fileList_]);
// Handle changing priority and update both state and cookie mapping.
const handlePriorityChange = (id: string, priority: string) => {
// Update local state and context.
const updatedList = fileList?.map((file) =>
file._id === id ? { ...file, _proirity: priority } : file
);
setFileList(updatedList); setFileList_?.
(updatedList);
59
mapping[[Link]] = {};
}
mapping[[Link]][[Link]] = priority;
// Persist the updated mapping.
[Link](COOKIE_KEY, [Link](mapping), {
expires: 30,
path: "/",
});
}
};
60
High: "text-red-400",
Medium: "text-yellow-400",
Low: "text-green-400",
Unassigned: "text-gray-400",
};
return (
<div className="bg-gray-900 min-h-screen">
<div className="mt-10 p-4">
<div className="overflow-x-auto bg-gray-800 text-white rounded-
lg shadow-lg">
<table className="min-w-full divide-y-2 divide-gray-700">
<thead className="text-left">
<tr>
<td className="whitespace-nowrap px-4 py-2 font-medium">
File Name
</td>
<td className="whitespace-nowrap px-4 py-2 font-medium">
Created At
</td>
<td className="whitespace-nowrap px-4 py-2 font-medium">
Priority
</td>
<td className="whitespace-nowrap px-4 py-2 font-medium"></td>
</tr>
</thead>
<tbody className="divide-y divide-gray-700">
{fileList &&
[Link]((file: FILE, index: number) => (
<tr
key={index}
className="odd:bg-gray-700 cursor-pointer"
onClick={() => [Link](`/workspace/${file._id}`)}
>
<td className="whitespace-nowrap px-4 py-2">
61
{[Link]}
</td>
<td className="whitespace-nowrap px-4 py-2">
{moment(file._creationTime).format("DD MMM YYYY, h:mm
A")}
</td>
<td
className="whitespace-nowrap px-4 py-2"
onClick={(event) => [Link]()}
>
<DropdownMenu>
<DropdownMenuTrigger>
<div className="flex items-center gap-2 cursor-pointer">
<div
className={`h-4 w-4 rounded-full $
{priorityFill[file._proirity]}`}
></div>
<span
className={`text-sm font-medium $
{priorityTextColor[file._proirity]}`}
>
{file._proirity || "Unassigned"}
</span>
</div>
</DropdownMenuTrigger>
<DropdownMenuContent>
{["High", "Medium", "Low", "Unassigned"].map(
(priority) => (
<DropdownMenuItem
key={priority}
onClick={(event) => {
[Link]();
handlePriorityChange(file._id, priority);
}}
className="flex items-center gap-2 cursor-pointer"
62
>
<div
className={`h-4 w-4 rounded-full ${priorityFill[priority]}`}
></div>
<span
className={`text-sm font-medium $
{priorityTextColor[priority]}`}
>
{priority}
</span>
</DropdownMenuItem>
)
)}
</DropdownMenuContent>
</DropdownMenu>
</td>
<td className="whitespace-nowrap px-4 py-2">
{user && (
<Image
src="/[Link]"
alt="user"
width={30}
height={30}
className="rounded-full"
/>
)}
</td>
<td className="whitespace-nowrap px-4 py-2">
<DropdownMenu>
<DropdownMenuTrigger>
<MoreHorizontal className="h-4 w-4" />
</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuItem
onClick={(event) => {
63
[Link](); [Link](`/workspace/$
{file._id}`);
}}
className="flex items-center gap-3"
>
<File className="h-4 w-4" /> Open
</DropdownMenuItem>
<DropdownMenuItem
onClick={(event) => {
[Link]();
// Call the delete functionality using Convex
handleDelete(file._id);
}}
className="flex items-center gap-3"
>
<Archive className="h-4 w-4" /> Delete
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
</td>
</tr>
))}
</tbody>
</table>
</div>
</div>
</div>
);
}
64
WorkSpace Files
[Link]
useEffect(() => {
onSaveTrigger && saveWhiteboard();
}, [onSaveTrigger]);
return (
<div className="flex flex-col h-full">
{fileData && (
<Excalidraw
theme="dark"
initialData={{
65
elements: fileData?.whiteboard && [Link](fileData?.whiteboard),
}}
onChange={(excalidrawElements, appState, files) =>
setWhiteBoardData(excalidrawElements)
}
>
<MainMenu position="top-left">
<[Link] />
<[Link] />z
<[Link] />
</MainMenu>
<WelcomeScreen position="center">
<[Link] />
<[Link] />
<div className="absolute top-0 right-0 p-4">
<[Link] />
</div>
</WelcomeScreen>
</Excalidraw>
)}
<div>
{[Link]((image, index) => (
<img key={index} src={image} alt={`Local Image ${index}`}
style={{ maxWidth: '100px', margin: '10px' }} />
))}
</div>
</div>
);
}
66
[Link]
import { Button } from '@/components/ui/button';
import { ArrowLeft, Save, Share, Clipboard } from 'lucide-react';
import { FaWhatsapp, FaFacebook, FaLinkedin } from
"react-icons/fa"; import Image from 'next/image';
import React, { useState, useEffect, useRef } from 'react';
import { useRouter } from 'next/navigation';
import { api } from '@/convex/_generated/api';
import { useMutation } from 'convex/react';
import { Id } from '@/convex/_generated/dataModel';
interface WorkspaceHeaderProps {
onSave: () => void;
fileName: string;
_id: Id<"files">;
}
const shareOptions = [
{
name: 'WhatsApp',
url: `[Link] this out: ${url}`,
icon: <FaWhatsapp className="text-green-500 w-5 h-5" />,
},
{
67
name: 'Facebook',
url: `[Link]
icon: <FaFacebook className="text-blue-600 w-5 h-5" />,
},
{
name: 'LinkedIn',
url: `[Link]
icon: <FaLinkedin className="text-blue-500 w-5 h-5" />,
},
{
name: 'Copy to Clipboard',
action: () => {
[Link](url);
alert('URL copied to clipboard.');
},
icon: <Clipboard className="text-gray-300 w-5 h-5" />,
},
];
useEffect(() => {
[Link]('mousemove', handleMouseMove);
[Link]('click', handleClickOutside);
return () => {
[Link]('mousemove', handleMouseMove);
[Link]('click', handleClickOutside);
};
}, []);
68
const handleClickOutside = (event: MouseEvent) => {
if ([Link] && ) {
setIsDropdownOpen(false);
}
};
return (
<div
className={`p-3 flex justify-between items-center fixed top-0 left-1/2
transform -translate-x-1/2 z-50 transition-transform duration-300 ${
isVisible ? 'translate-y-0' : '-translate-y-full'
}`}
style={{
backgroundColor: 'rgba(34, 34, 34, 0.95)',
color: '#e0e0e0',
width: '80%',
borderRadius: '8px',
69
boxShadow: '0 4px 8px rgba(0, 0, 0, 0.5)',
}}
>
<div className="flex gap-2 items-center">
<Image
src="/[Link]"
alt="user"
width={30}
height={30}
className="rounded-full border border-gray-600"
/>
{!isEditing ? (
<h1
className="h-8 text-[16px] text-white font-bold px-2 flex items-
center cursor-pointer"
onDoubleClick={() => setIsEditing(true)}
>
<strong>{fileName || "Untitled File"}</strong>
</h1>
):(
<input
className="text-[18px] bg-[#2a2a2a] text-white px-2 py-1 rounded
border border-gray-600"
value={newFileName}
onChange={(e) => setNewFileName([Link])}
onBlur={handleRename}
autoFocus
/>
)}
</div>
<Button
className="h-8 text-[12px] gap-2 bg-blue-600 hover:bg-blue-700"
onClick={onSave}
>
<Save className="h-4 w-4" /> Save
</Button>
{isDropdownOpen && (
<div
ref={dropdownRef}
className="absolute right-0 mt-2 w-56 bg-gray-800 border border-gray-
700 rounded-lg shadow-lg"
onMouseEnter={() => setIsDropdownOpen(true)}
onMouseLeave={() => setTimeout(() => setIsDropdownOpen(false),
500)}
>
{[Link]((option, index) => (
<a
key={index}
href={[Link] || '#'}
onClick={(e) => {
if ([Link]) {
71
[Link]();
[Link]();
}
}}
target={[Link] ? '_blank' : undefined}
rel="noopener noreferrer"
className="flex items-center gap-3 px-4 py-2 text-white
hover:bg- gray-700 cursor-pointer"
>
{[Link]}
{[Link]}
</a>
))}
</div>
)}
</div>
</div>
</div>
);
}
[Link]
"use client";
import { Text, ListTodo, MessageSquareQuote, Link } from 'lucide-
react';
import React, { useEffect, useRef, useState } from 'react';
import EditorJS from '@editorjs/editorjs';
import Header from '@editorjs/header';
import List from '@editorjs/list';
import Checklist from '@editorjs/checklist';
72
import Paragraph from '@editorjs/paragraph';
import Warning from '@editorjs/warning';
import Quote from '@editorjs/quote';
import Embed from '@editorjs/embed';
import Code from '@editorjs/code';
import LinkTool from '@editorjs/link';
import Table from '@editorjs/table';
import Delimiter from '@editorjs/delimiter';
import Marker from '@editorjs/marker';
import InlineCode from '@editorjs/inline-code';
import { useMutation } from 'convex/react';
import { api } from '@/convex/_generated/api';
import { toast } from 'sonner';
import { FILE } from '../../dashboard/_components/FileList';
import { WandSparkles } from "lucide-react";
const rawDocument = {
"time": 1550476186479,
"blocks": [
{
data: {
text: '',
level: 1
},
id: "1234",
type: 'header'
},
{
data: {
text: '',
level: 3
73
},
id: "1236",
type: 'paragraph'
},
],
"version": "2.8.1"
};
return {
blocks: [
{
type: "paragraph",
data: { text: "Unexpected response format." },
id: "response-error",
},
],
74
};
} catch (error) {
[Link]("Failed to format response:", error);
return {
blocks: [
{ type: "paragraph", data: { text: "Error: Unable to process the
response." } },
],
};
}
}
useEffect(() => {
fileData && initEditor();
}, [fileData]);
useEffect(() => {
onSaveTrigger && onSaveDocument();
75
}, [onSaveTrigger]);
77
}
},
warning: Warning,
quote: Quote,
embed: Embed,
code: Code,
linkTool: {
class: LinkTool,
config: {
endpoint: '[Link]
}
},
table: Table,
delimiter: Delimiter,
marker: Marker,
inlineCode: InlineCode,
},
holder: 'editorjs',
data: fileData?.document ? [Link]([Link]) :
rawDocument
});
[Link] = editor;
};
80
border: "none",
borderRadius: "6px",
cursor: "pointer",
transition: "all 0.3s ease",
boxShadow: "0 2px 6px rgba(0, 0, 0, 0.2)",
fontSize: "14px",
display: "flex",
alignItems: "center",
justifyContent: "center",
};
const handleButtonClick = (e: [Link]) => {
if (isDragging) {
[Link]();
[Link]();
} else {
setIsPromptVisible(true);
}
};
const handlePromptSubmit = async () => {
setIsLoading(true);
try {
const { GoogleGenerativeAI } = require("@google/generative-ai");
const apiKey = "AIzaSyDm7a1Vw4-
Gp8h2GMsjHlFg438PDc2x574";
const genAI = new GoogleGenerativeAI(apiKey);
const model = [Link]({
model: "gemini-2.0-flash-exp",
});
const chatSession = [Link]({
generationConfig: {
temperature: 1,
81
topP: 0.95,
topK: 40,
maxOutputTokens: 8192,
responseMimeType: "text/plain",
},
history: [],
});
const result = await [Link](userPrompt);
const response = await [Link]();
[Link]("Response from Gemini:", response);
if ([Link]) {
[Link]();
[Link]("header", { text: userPrompt });
[Link]((block) =>
[Link]([Link], [Link])
);
}
setIsPromptVisible(false);
} catch (error) {
[Link]("Error during Gemini interaction:", error);
} finally {
setIsLoading(false);
}
};
// Helper function to format response
function formatResponseForEditorJS(response: string): { blocks: any[]
}{
82
const blocks: any[] = [];
const lines = [Link]("\n");
[Link]((line) => {
const trimmedLine = [Link]();
return { blocks };
}
83
return (
84
<div
style={{
display: 'flex',
flexDirection: 'column',
height: '100vh',
backgroundColor: '#1a202c',
color: '#e2e2e2',
padding: 0,
margin: 0,
}}
>
{/* Toolbar Wrapper */}
<div
style={{
position: 'sticky',
top: 0,
zIndex: 10,
backgroundColor: '#3b3b3b',
padding: '5px 10px',
borderRadius: '10px 10px 0 0',
boxShadow: '0 4px 10px rgba(0, 0, 0, 0.3)',
height: '40px',
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
}}
>
{/* Toolbar Buttons */}
<button className="toolbar-button hover:bg-gray-300 rounded
border inline-flex items-center h-8 px-3 text-sm"
onClick={addHeader}>
85
<Text size={18} />
<span style={{ marginLeft: '5px' }}>Header</span>
</button>
<button className="toolbar-button hover:bg-gray-300 rounded
border inline-flex items-center h-8 px-3 text-sm" onClick={addList}>
<ListTodo size={20} />
<span style={{ marginLeft: '5px' }}>List</span>
</button>
<button className="toolbar-button hover:bg-gray-300 rounded
border inline-flex items-center h-8 px-3 text-sm"
onClick={addQuote}>
<MessageSquareQuote size={20} />
<span style={{ marginLeft: '5px' }}>Quote</span>
</button>
<button className="toolbar-button hover:bg-gray-300 rounded
border inline-flex items-center h-8 px-3 text-sm"
onClick={addEmbed}>
<Link size={20} />
<span style={{ marginLeft: '5px' }}>Embed</span>
</button>
86
alignItems: 'center',
justifyContent: 'center',
gap: '5px',
}}
className="ai-button hover:bg-gradient-to-r hover:from-amber-
500 hover:to-yellow-400"
>
<WandSparkles size={18} />
<span>AI</span>
</button>
</div>
90
</div>
</div>
)}
</div>
);
}
export default Editor;
91
CHAPTER 6: RESULTS AND DISCUSSION
Output Screens
◆ Home Page
◆ About Page
92
◆ Register Page
◆ Login Page
93
◆ Teams Page
94
◆ Creating New File
95
◆ Setting Priority
96
◆ Editing the Canvas Container
97
◆ Saving The Document
98
◆ Ai Response Added
99
◆ Exported Diagram
10
0
CHAPTER 7: CONCLUSION AND
REFRENCES
The system is built using [Link] 14 for a fast and scalable frontend experience, while
Convex provides a real-time database and backend infrastructure, ensuring instant
updates and synchronization across users. The integration of Google Gemini AI
enhances the user experience by offering intelligent suggestions, automated content
generation, and contextual assistance, making tasks more intuitive and efficient. Kinde
Auth ensures a secure authentication system, safeguarding user data and managing
access control effectively.
A key strength of the project lies in its real-time updates, hierarchical file
management, and AI-powered assistance, making it an ideal solution for remote
teams, product managers, developers, and creative professionals who require an
efficient and organized workspace. The platform allows users to collaborate on
documents, create structured workflows, visualize ideas through diagramming, and
manage files systematically.
10
1
References:
Websites:
3. Excalidraw - [Link]
4. [Link] - [Link]
10
2