Skip to content

Dev - #6

Merged
parth3083 merged 12 commits into
mainfrom
dev
Feb 15, 2026
Merged

Dev#6
parth3083 merged 12 commits into
mainfrom
dev

Conversation

@parth3083

@parth3083 parth3083 commented Feb 15, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

Release Notes

  • New Features

    • Added file upload functionality with drag-and-drop support for floor plans
    • Implemented user authentication with sign in/sign out capabilities
    • Introduced responsive navigation bar with user profile integration
    • Added project showcase section displaying community projects
  • UI/Styling Improvements

    • Redesigned global styling system with modern Tailwind CSS integration
    • Added responsive UI components including progress indicators and badges
    • Implemented dark mode support with customizable theme tokens

Copilot AI review requested due to automatic review settings February 15, 2026 18:56
@coderabbitai

coderabbitai Bot commented Feb 15, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This pull request restructures the web application by introducing authentication via Puter, implementing file upload capabilities with progress tracking, redesigning the homepage with new components, and establishing a centralized UI component library with theming support.

Changes

Cohort / File(s) Summary
Core App Configuration
apps/web/package.json, apps/web/src/app/globals.css
Added puter.js and styling dependencies; removed all global CSS rules to rely on new theming system.
App Layout & Routing
apps/web/src/app/layout.tsx, apps/web/src/app/page.tsx, apps/web/src/app/visualizer/[id]/page.tsx
Replaced Geist font with Afacad_Flux, integrated AuthProvider and Navbar, redesigned home page with composed components, added dynamic visualizer route for floor plan viewing.
Navigation & Core UI Components
apps/web/src/components/Navbar.tsx, apps/web/src/components/MaxWidth.tsx, apps/web/src/data/navbar.data.ts
Implemented responsive navigation bar with auth-aware actions and mobile menu toggle; added MaxWidth layout wrapper; defined navigation link data structure.
Homepage Components
apps/web/src/components/home/Hero.tsx, apps/web/src/components/home/ProjectCard.tsx, apps/web/src/components/home/ProjectSection.tsx
Created hero section with CTA buttons, project card displaying metadata and images, and projects section container.
File Upload System
apps/web/src/components/home/Upload.tsx
Implemented drag-and-drop file upload with base64 conversion, simulated progress tracking, and navigation to visualizer route; guarded by authentication check.
Authentication System
apps/web/src/context/AuthProvider.tsx, apps/web/src/types/auth.types.ts, apps/web/src/lib/puter.action.ts
Established context-based auth state management with signIn/signOut/refreshAuth actions, integrated Puter authentication, auto-initialized on mount.
Puter Integration & Utilities
apps/web/src/lib/puter.hosting.ts, apps/web/src/utils/puter.ts, apps/web/src/lib/constants.ts
Added hosting config management, image upload to Puter hosting, blob conversion utilities, and centralized constants for configuration and prompts.
Types & Supporting Utilities
apps/web/src/types/navbar.types.ts, apps/web/src/types/project-card.types.ts, apps/web/src/types/puter.types.ts, apps/web/src/lib/utils.ts
Defined Zod-validated navbar schema, project card props, Puter-related types, and className merge utility.
UI Component Library - Components
packages/ui/components/ui/badge.tsx, packages/ui/components/ui/button.tsx, packages/ui/components/ui/card.tsx, packages/ui/components/ui/grid-pattern.tsx, packages/ui/components/ui/progress.tsx
Created reusable Badge, Button, Card, GridPattern SVG, and Progress components with variant systems and Radix UI primitives.
UI Component Library - Configuration
packages/ui/components.json, packages/ui/src/styles/globals.css, packages/ui/tsconfig.json, packages/ui/package.json
Introduced UI configuration for design system, comprehensive theming with CSS custom properties and dark mode, path aliases, and updated exports.
UI Component Library - Cleanup
packages/ui/src/button.tsx, packages/ui/src/card.tsx, packages/ui/src/code.tsx
Removed outdated UI component implementations in favor of new component library structure.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant Upload as Upload Component
    participant Auth as AuthProvider/useAuth
    participant PuterAuth as Puter Auth Service
    participant FileIO as File I/O
    participant PuterHosting as Puter Hosting Service
    participant Router as Next Router

    User->>Upload: Select/Drop file
    Upload->>Auth: Check isSignedIn
    
    alt Not signed in
        Upload->>PuterAuth: Call signIn()
        PuterAuth-->>Upload: Sign in result
        Auth->>PuterAuth: Refresh auth state
        PuterAuth-->>Auth: Get current user
        Auth-->>Upload: Update context
    end
    
    alt Signed in
        Upload->>FileIO: Read file as base64
        FileIO-->>Upload: base64 data URL
        Upload->>Upload: Initialize progress tracking
        loop Progress update
            Upload->>Upload: Increment progress (0→100%)
        end
        
        Upload->>PuterHosting: uploadImageToHosting(base64)
        PuterHosting->>FileIO: Fetch blob from data URL
        PuterHosting->>PuterHosting: Determine content type & extension
        PuterHosting->>FileIO: Write file to hosting filesystem
        PuterHosting-->>Upload: Return hosted URL
        
        Upload->>Router: Navigate to /visualizer/{uniqueId}
        Router-->>User: Display visualizer page
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

🐰 A rabbit hops through auth and files divine,
Upload components dancing, progress bars align,
Puter hosts our visions, cards and grids take shape,
The UI blooms with buttons, badges, and drape,
Our warren's transformed—what a grand escape!


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands and usage tips.

@parth3083
parth3083 merged commit 1104903 into main Feb 15, 2026
6 of 7 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR represents a major overhaul transitioning from a basic Next.js starter to a full-featured application with a UI component library. The changes introduce authentication via Puter.js, file upload functionality, Radix UI components with Tailwind styling, and a new landing page with project management features.

Changes:

  • Replaces simple UI components with a comprehensive Radix UI-based design system with Tailwind CSS v4
  • Adds Puter.js authentication and hosting integration for file management
  • Implements file upload functionality with progress tracking and navigation
  • Creates new landing page with Hero, Upload, and ProjectSection components

Reviewed changes

Copilot reviewed 35 out of 36 changed files in this pull request and generated 20 comments.

Show a summary per file
File Description
pnpm-lock.yaml Updates dependency lockfile with new UI libraries and Puter.js; contains invalid zod version
apps/web/package.json Adds core dependencies (puter.js, clsx, lucide-react, zod); invalid zod version
packages/ui/package.json Transforms UI package with Radix UI, Tailwind, and styling utilities
packages/ui/components/* New comprehensive UI components (Button, Badge, Card, Progress, GridPattern) with Radix UI
packages/ui/src/styles/globals.css New comprehensive design system with CSS variables and Tailwind theme
apps/web/src/app/* Replaces starter page with new landing page and adds visualizer route
apps/web/src/components/* New components for Navbar, Hero, Upload, ProjectCard, and layout
apps/web/src/context/AuthProvider.tsx Authentication context provider using Puter.js
apps/web/src/lib/* Utility functions for Puter hosting, actions, and constants
apps/web/src/types/* TypeScript type definitions for auth, hosting, and components

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +67 to +70
const value = useMemo(
() => ({ ...authState, refreshAuth, signIn, signOut }),
[authState]
);

Copilot AI Feb 15, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing dependency in useMemo: The useMemo on lines 67-70 includes authState but doesn't include signIn and signOut functions which are defined above. While these functions are defined in the component body and could change on re-render, they should either be included in dependencies or memoized with useCallback.

Copilot uses AI. Check for mistakes.
Comment on lines +3 to +8
const page = async ({ params }: { params: Promise<{ id: string }> }) => {
const { id } = await params;
return <div>This is visualizer page. and this is the id: {id}</div>;
};

export default page;

Copilot AI Feb 15, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent naming: The component is named 'page' (lowercase) which doesn't follow React component naming conventions. React components should be PascalCase. Rename to 'Page' or a more descriptive name like 'VisualizerPage'.

Suggested change
const page = async ({ params }: { params: Promise<{ id: string }> }) => {
const { id } = await params;
return <div>This is visualizer page. and this is the id: {id}</div>;
};
export default page;
const VisualizerPage = async ({ params }: { params: Promise<{ id: string }> }) => {
const { id } = await params;
return <div>This is visualizer page. and this is the id: {id}</div>;
};
export default VisualizerPage;

Copilot uses AI. Check for mistakes.
const { isSignedIn, username, signIn, signOut } = useAuth();

return (
<nav className="w-full sticky top-0 inset-x-0 border-b border-border bg-white/50 z-999 backdrop-blur-2xl">

Copilot AI Feb 15, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent z-index usage: 'z-100' on line 13 and 'z-999' on line 15 in Navbar.tsx are non-standard Tailwind values. Tailwind's default z-index scale goes from 0 to 50. These arbitrary values won't work unless explicitly configured in tailwind.config. Use standard z-index values or configure custom values in the Tailwind config.

Suggested change
<nav className="w-full sticky top-0 inset-x-0 border-b border-border bg-white/50 z-999 backdrop-blur-2xl">
<nav className="w-full sticky top-0 inset-x-0 border-b border-border bg-white/50 z-50 backdrop-blur-2xl">

Copilot uses AI. Check for mistakes.
<div className="w-full flex flex-col items-center gap-3">
<Badge variant={'outline'} className="flex items-center gap-2">
<div className="size-2 bg-primary animate-pulse rounded-full" />
<p className="text-sm!">Introducing ArqiTech 2.0</p>

Copilot AI Feb 15, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid Tailwind class 'text-sm!'. The '!' important modifier must be a prefix ('!text-sm'), not a suffix. This will not apply the styling correctly.

Suggested change
<p className="text-sm!">Introducing ArqiTech 2.0</p>
<p className="text-sm">Introducing ArqiTech 2.0</p>

Copilot uses AI. Check for mistakes.
Comment on lines +68 to +69
console.error(`Error in the uploading the file to blob : ${error}`);
return null;

Copilot AI Feb 15, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error handling issue: The catch block on line 67-69 silently returns null after logging. If image conversion fails, the function returns null but the caller may not handle this gracefully. Consider throwing an error or returning a more descriptive error object so callers can provide user feedback.

Suggested change
console.error(`Error in the uploading the file to blob : ${error}`);
return null;
console.error('Error uploading the file to blob:', error);
const message =
'Failed to upload image to hosting' +
(projectId ? ` for project ${projectId}` : '') +
(label ? ` (label: ${label})` : '') +
(url ? ` from URL: ${url}` : '');
throw new Error(
`${message}${error instanceof Error ? ` - ${error.message}` : ''}`
);

Copilot uses AI. Check for mistakes.
Comment on lines +50 to +55
useEffect(() => {
const initializeAuth = async () => {
await refreshAuth();
};
initializeAuth();
}, []);

Copilot AI Feb 15, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing dependency in useEffect hook: The effect on line 50-55 calls refreshAuth() but doesn't include it in the dependency array. This violates the React hooks exhaustive-deps rule. While refreshAuth is stable in this case, it should be included in the dependencies or wrapped with useCallback to make the intent explicit.

Copilot uses AI. Check for mistakes.
Comment on lines +22 to +23
arqitech is ai-first design environment that helps you visualize,
render and ship archietectureal projects faster than ever.

Copilot AI Feb 15, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multiple spelling errors in user-facing text:

  1. "ArqiTech" appears to be the brand name, but inconsistent capitalization throughout
  2. "archietectureal" should be "architectural"
  3. "arqitech" should match the branding (likely "ArqiTech")

These errors appear in prominent hero section text that will be immediately visible to users.

Suggested change
arqitech is ai-first design environment that helps you visualize,
render and ship archietectureal projects faster than ever.
ArqiTech is an ai-first design environment that helps you visualize,
render and ship architectural projects faster than ever.

Copilot uses AI. Check for mistakes.
Comment on lines +78 to +90
base64Promise
.then(base64Data => {
timeoutRef.current = window.setTimeout(() => {
onComplete?.(base64Data);
}, REDIRECT_DELAY_MS);
})
.catch(() => null);
}
return nextValue;
});
}, PROGRESS_INTERVAL_MS);
const uniqueId = Date.now().toString();
router.push(`/visualizer/${uniqueId}`);

Copilot AI Feb 15, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The onComplete callback is invoked with base64Data (line 81) but is never awaited or checked for errors. If onComplete throws an error or is a promise, it could cause unhandled exceptions. Additionally, the callback is invoked after navigating to a new page (line 90 happens before line 81 executes), which may not be the intended behavior since the user has already left the page.

Suggested change
base64Promise
.then(base64Data => {
timeoutRef.current = window.setTimeout(() => {
onComplete?.(base64Data);
}, REDIRECT_DELAY_MS);
})
.catch(() => null);
}
return nextValue;
});
}, PROGRESS_INTERVAL_MS);
const uniqueId = Date.now().toString();
router.push(`/visualizer/${uniqueId}`);
(async () => {
try {
const base64Data = await base64Promise;
if (onComplete) {
await Promise.resolve(onComplete(base64Data));
}
timeoutRef.current = window.setTimeout(() => {
const uniqueId = Date.now().toString();
router.push(`/visualizer/${uniqueId}`);
}, REDIRECT_DELAY_MS);
} catch {
// Swallow errors to avoid unhandled rejections; behavior matches previous .catch(() => null)
}
})();
}
return nextValue;
});
}, PROGRESS_INTERVAL_MS);

Copilot uses AI. Check for mistakes.
Comment on lines +8 to +12
<Card className="size-80 p-0! overflow-hidden flex flex-col gap-0! items-center group">
<CardContent className="w-full h-[80%] p-0 m-0 relative">
<Badge
variant={'secondary'}
className="absolute top-2 left-2 text-base uppercase rounded-xl!"

Copilot AI Feb 15, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multiple invalid CSS class syntax issues with trailing '!':

  • Line 8: 'p-0!' should be '!p-0' or 'p-0'
  • Line 8: 'gap-0!' should be '!gap-0' or 'gap-0'
  • Line 12: 'rounded-xl!' should be '!rounded-xl' or 'rounded-xl'

The '!' modifier in Tailwind must be a prefix, not suffix. These will not work as intended.

Suggested change
<Card className="size-80 p-0! overflow-hidden flex flex-col gap-0! items-center group">
<CardContent className="w-full h-[80%] p-0 m-0 relative">
<Badge
variant={'secondary'}
className="absolute top-2 left-2 text-base uppercase rounded-xl!"
<Card className="size-80 !p-0 overflow-hidden flex flex-col !gap-0 items-center group">
<CardContent className="w-full h-[80%] p-0 m-0 relative">
<Badge
variant={'secondary'}
className="absolute top-2 left-2 text-base uppercase !rounded-xl"

Copilot uses AI. Check for mistakes.
Comment on lines +93 to +113
const handleFileChange = (event: ChangeEvent<HTMLInputElement>) => {
if (!isSignedIn) {
return;
}
const nextFile = event.target.files?.[0];
if (nextFile) {
processFile(nextFile);
}
};

const handleDrop = (event: DragEvent<HTMLLabelElement>) => {
event.preventDefault();
event.stopPropagation();
if (!isSignedIn) {
return;
}
setIsDragging(false);
const nextFile = event.dataTransfer.files?.[0];
if (nextFile) {
processFile(nextFile);
}

Copilot AI Feb 15, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security concern: The file upload accepts any file type without validation (line 97-100, 110-113). This could allow malicious files to be processed. Add file type validation to ensure only image files are accepted (e.g., check file.type against 'image/jpeg', 'image/png', etc.) before processing.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants