Skip to content

Commit 9334b37

Browse files
committed
Git cleanup and initial commit
0 parents  commit 9334b37

99 files changed

Lines changed: 23544 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.amazonq/rules/memory-bank/guidelines.md

Lines changed: 622 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# ByteBox - Product Overview
2+
3+
## Purpose
4+
ByteBox is a lightweight web dashboard for developer resources — a personal dev toolkit in one beautiful place. It serves as a centralized hub where bookmarks, documentation, APIs, commands, and code snippets live together in an organized, searchable, and visually appealing interface.
5+
6+
## Value Proposition
7+
Think **Trello for resources**, but built specifically for developers who want style and speed. ByteBox combines the organizational power of kanban boards with developer-focused features like syntax highlighting, tag-based filtering, and instant search. The glassmorphic UI adapts to any wallpaper while maintaining readability and aesthetic appeal.
8+
9+
## Target Users
10+
- **Developers** who need to organize bookmarks, code snippets, CLI commands, and documentation
11+
- **Technical teams** looking for a shared resource management system
12+
- **DevOps engineers** managing commands and configuration snippets
13+
- **Students and learners** collecting coding resources and references
14+
- **Anyone** who wants a beautiful, fast way to organize technical resources
15+
16+
## Key Features
17+
18+
### Core Functionality
19+
- **📦 Kanban-Style Boards** — Organize resources into customizable categories with responsive columns
20+
- **🧭 View Mode Selector** — Switch between All Cards, Most Recent, Starred Only, and By Tag views with keyboard shortcuts (⌘1-4)
21+
- **🏷️ Smart Tagging** — Add multiple tags with color-coded filtering (AND/OR logic)
22+
- **⭐ Star Favorites** — Mark important cards as starred for quick access with dashboard filtering
23+
- **🔍 Lightning Search** — Press Cmd/Ctrl+K to search across titles, descriptions, tags, and content
24+
- **🎨 Drag & Drop** — Reorder cards and move them between boards seamlessly with @dnd-kit
25+
- **✍️ CRUD Everything** — Create, edit, delete cards with a slick modal interface and two-step deletion confirmation
26+
- **💻 Syntax Highlighting** — Code snippets with 35+ languages (powered by Shiki)
27+
- **📝 Copy-to-Clipboard** — One-click copy for all text content (code blocks, URLs, commands, docs)
28+
- **🖼️ Image/Screenshot Cards** — Save and preview images with full-screen lightbox, download, and clipboard support
29+
30+
### Card Types
31+
1. **📑 Bookmark** — Save URLs and links (auto-categorized to Bookmarks)
32+
2. **💻 Code Snippet** — Save code with syntax highlighting (auto-categorized to Code Snippets)
33+
3. **⌘ Command** — Save CLI commands (auto-categorized to Commands)
34+
4. **📚 Documentation** — Save notes and docs (auto-categorized to Documentation)
35+
5. **🖼️ Image** — Upload screenshots or images (auto-categorized to Images)
36+
37+
### Glass UI & Theming
38+
- **Glassmorphic Layout** — Sidebar, header, cards, modals, and filters share reusable glass utilities with blurred depth and accent-aware tinting
39+
- **Adjustable Glass Intensity** — A transparency slider (Clear → Frosted) instantly recalibrates blur, opacity, and shadows
40+
- **Accent Theme Library** — Swap between Byte Classic, Neon Night, Rainbow Sprint, Midnight Carbon, Sunset Espresso, and Pastel Haze palettes, or build custom 2–6 color palettes
41+
- **Icon Palettes** — Choose curated icon stacks (Neon Grid, Carbon Tech, Espresso Circuit, Rainbow Loop, Pink Pulse) or set a custom hex color
42+
- **Background Playground** — Solid color picker, custom 2–4 color gradients with angle control, curated gradient presets, and built-in wallpaper library (plus uploads)
43+
- **Typography Controls** — Choose UI and mono fonts independently from preloaded stacks (Inter/Geist/etc. + JetBrains/Fira/etc.)
44+
- **Presets** — Save the entire appearance (mode, accent/icon, background, fonts, glass) as named profiles; apply or delete anytime
45+
- **Theme Persistence** — Light/dark base, accent/icon themes, custom colors, background selection, fonts, and presets persist locally
46+
- **System Detection** — Defaults to your OS preference on first load
47+
48+
### Data Management
49+
- **Export/Import** — Backup all data as JSON, restore anytime
50+
- **SQLite Database** — Fast local storage with Prisma 7 ORM
51+
- **Settings Persistence** — All theme preferences persist to database (survives browser clears)
52+
- **Seed Data** — Get started with example cards and categories
53+
54+
## Use Cases
55+
56+
### Daily Development
57+
- Quick access to frequently used code snippets
58+
- Organize API documentation and references
59+
- Store and retrieve CLI commands
60+
- Bookmark important development resources
61+
62+
### Learning & Research
63+
- Collect code examples while learning new technologies
64+
- Organize tutorial links and documentation
65+
- Tag resources by topic or technology
66+
- Star important learning materials
67+
68+
### Team Collaboration
69+
- Share common commands and configurations
70+
- Centralize team documentation
71+
- Organize project-specific resources
72+
- Export/import data for team distribution
73+
74+
### Project Management
75+
- Organize resources by project using categories
76+
- Tag resources by technology stack
77+
- Quick search across all project resources
78+
- Visual organization with drag-and-drop
79+
80+
## Keyboard Shortcuts
81+
- **Cmd/Ctrl + K** — Open global search
82+
- **Cmd/Ctrl + 1** — View all cards
83+
- **Cmd/Ctrl + 2** — View most recent cards
84+
- **Cmd/Ctrl + 3** — View starred only
85+
- **Cmd/Ctrl + 4** — View by tag
86+
- **Cmd/Ctrl + Shift + S** — Toggle starred filter
87+
- **Esc** — Close modals or search
88+
89+
## Brand Identity
90+
**Made with ❤️ by Pink Pixel**
91+
- Tagline: _"Dream it, Pixel it"_
92+
- Brand Colors: Pink (#ec4899) and Purple (#8b5cf6)
93+
- Design Philosophy: Beautiful, functional, developer-focused
Lines changed: 241 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,241 @@
1+
# ByteBox - Project Structure
2+
3+
## Directory Organization
4+
5+
```
6+
ByteBox/
7+
├── src/ # Application source code
8+
│ ├── app/ # Next.js App Router pages and API routes
9+
│ │ ├── api/ # Backend API endpoints
10+
│ │ ├── search/ # Search page with filters
11+
│ │ ├── settings/ # Settings/appearance page
12+
│ │ ├── tags/ # Tag directory page
13+
│ │ ├── globals.css # Global styles with Tailwind + glass/theming tokens
14+
│ │ ├── layout.tsx # Root layout with ThemeProvider
15+
│ │ └── page.tsx # Main dashboard (boards)
16+
│ ├── components/ # React components
17+
│ │ ├── cards/ # Card-related components
18+
│ │ ├── layout/ # Layout components (AppLayout, Board, CategoryColumn)
19+
│ │ └── ui/ # Reusable UI components
20+
│ ├── contexts/ # React Context providers
21+
│ │ └── ThemeContext.tsx # Theme, accent, icon, and wallpaper controller
22+
│ ├── hooks/ # Custom React hooks
23+
│ │ └── useSearch.ts # Search & filter hook
24+
│ ├── lib/ # Utility libraries
25+
│ │ ├── db/ # Prisma client & database queries
26+
│ │ ├── utils/ # Helper functions (cn, generateId, formatDate, etc.)
27+
│ │ └── themeRegistry.ts # Accent & icon palette definitions
28+
│ └── types/ # TypeScript type definitions
29+
│ ├── index.ts # Main type definitions
30+
│ └── indev.ts # Development/experimental types
31+
├── prisma/ # Database configuration
32+
│ ├── migrations/ # Database migration history
33+
│ ├── schema.prisma # Database schema definition
34+
│ ├── seed.ts # Database seed script
35+
│ └── dev.db # SQLite database file
36+
├── public/ # Static assets
37+
│ ├── wallpapers/ # Built-in wallpaper images
38+
│ ├── favicon.png # Site favicon
39+
│ ├── icon.png # App icon
40+
│ └── logo_banner.png # Logo asset
41+
├── scripts/ # Build and utility scripts
42+
│ └── next-with-env.cjs # Environment-aware Next.js wrapper
43+
├── .amazonq/ # Amazon Q configuration
44+
│ └── rules/ # Project rules and documentation
45+
│ └── memory-bank/ # Memory Bank documentation
46+
├── DEV/ # Development resources and backups
47+
├── .next/ # Next.js build output (generated)
48+
└── node_modules/ # Dependencies (generated)
49+
```
50+
51+
## Core Components
52+
53+
### Application Layer (`src/app/`)
54+
55+
#### Pages
56+
- **page.tsx** — Main dashboard with kanban boards, drag-and-drop, and card management
57+
- **search/page.tsx** — Dedicated search experience with advanced filtering
58+
- **settings/page.tsx** — Appearance customization, data management, and about section
59+
- **tags/page.tsx** — Tag directory with statistics and filtering capabilities
60+
- **layout.tsx** — Root layout wrapping all pages with ThemeProvider and global styles
61+
62+
#### API Routes (`src/app/api/`)
63+
- **cards/** — CRUD operations for cards (create, read, update, delete)
64+
- **categories/** — Category management endpoints
65+
- **tags/** — Tag management and filtering
66+
- **export/** — Data export to JSON
67+
- **import/** — Data import from JSON
68+
- **settings/** — User settings persistence
69+
70+
### Component Layer (`src/components/`)
71+
72+
#### Cards (`components/cards/`)
73+
- **Card.tsx** — Base card component with type-specific rendering
74+
- **DraggableCard.tsx** — Wrapper adding drag-and-drop functionality
75+
- **CardModal.tsx** — Full-screen modal for viewing/editing cards
76+
- **CreateCardModal.tsx** — Modal for creating new cards with type selection
77+
- **ImageCard.tsx** — Specialized component for image cards with lightbox
78+
79+
#### Layout (`components/layout/`)
80+
- **AppLayout.tsx** — Main application shell with sidebar, header, and content area
81+
- **Board.tsx** — Kanban board container managing categories and drag-and-drop
82+
- **CategoryColumn.tsx** — Individual category column with cards
83+
- **Sidebar.tsx** — Navigation sidebar with filters and actions
84+
- **Header.tsx** — Top header with search, view modes, and theme toggle
85+
86+
#### UI (`components/ui/`)
87+
- **Tag.tsx** — Tag display and interaction component
88+
- **SearchBar.tsx** — Global search with keyboard shortcuts
89+
- **FilterPanel.tsx** — Advanced filtering UI (tags, starred, date)
90+
- **CodeBlock.tsx** — Syntax-highlighted code display with copy button
91+
- **ThemeToggle.tsx** — Light/dark mode switcher
92+
- **ExportImport.tsx** — Data backup and restore UI
93+
- **Button.tsx** — Reusable button component with variants
94+
- **Modal.tsx** — Base modal component with glass styling
95+
96+
### Context & State (`src/contexts/`)
97+
98+
#### ThemeContext.tsx
99+
Central theme management providing:
100+
- Light/dark mode state
101+
- Accent theme selection and custom palette creation
102+
- Icon theme/color management
103+
- Background configuration (solid, gradient, wallpaper, upload)
104+
- Font selection (UI and mono fonts)
105+
- Glass intensity control
106+
- Settings presets (save/load/delete)
107+
- Persistence to database via API
108+
109+
### Hooks (`src/hooks/`)
110+
111+
#### useSearch.ts
112+
Provides search and filtering functionality:
113+
- Full-text search across cards
114+
- Tag filtering with AND/OR logic
115+
- Starred filter
116+
- Date range filtering
117+
- View mode management (all, recent, starred, by-tag)
118+
- Debounced search for performance
119+
120+
### Library Layer (`src/lib/`)
121+
122+
#### Database (`lib/db/`)
123+
- **client.ts** — Prisma client singleton
124+
- **queries.ts** — Reusable database query functions
125+
- **seed.ts** — Database seeding utilities
126+
127+
#### Utils (`lib/utils/`)
128+
- **cn.ts** — Class name merging utility (clsx + tailwind-merge)
129+
- **generateId.ts** — Unique ID generation
130+
- **formatDate.ts** — Date formatting helpers
131+
- **truncate.ts** — Text truncation utility
132+
- **syntax.ts** — Syntax highlighting configuration (Shiki)
133+
- **imageUtils.ts** — Image compression and processing
134+
135+
#### Theme Registry (`lib/themeRegistry.ts`)
136+
Defines:
137+
- Built-in accent themes (Byte Classic, Neon Night, etc.)
138+
- Icon palettes (Neon Grid, Carbon Tech, etc.)
139+
- Gradient presets
140+
- Wallpaper library
141+
- Font stacks (UI and mono)
142+
143+
### Type Definitions (`src/types/`)
144+
145+
#### index.ts
146+
Core types:
147+
- **Card** — Card data structure with all fields
148+
- **Category** — Category/board structure
149+
- **Tag** — Tag structure with color
150+
- **CardType** — Union type for card types
151+
- **ViewMode** — View mode options
152+
- **FilterState** — Filter configuration
153+
- **ThemeMode** — Light/dark mode
154+
- **AccentTheme** — Accent color palette structure
155+
- **IconTheme** — Icon color configuration
156+
- **BackgroundConfig** — Background settings
157+
- **FontConfig** — Font selection
158+
- **SettingsPreset** — Saved appearance preset
159+
160+
## Database Schema
161+
162+
### Models (Prisma)
163+
164+
#### Category
165+
- Represents boards/columns in the UI
166+
- Fields: id, name, description, color, order, cards[], createdAt, updatedAt
167+
- Default color: #ec4899 (Pink Pixel brand)
168+
169+
#### Tag
170+
- For organizing and filtering cards
171+
- Fields: id, name (unique), color, cards[], createdAt, updatedAt
172+
- Default color: #8b5cf6 (Purple brand)
173+
174+
#### Card
175+
- Main content type (bookmarks, snippets, commands, docs, images)
176+
- Fields: id, type, title, description, content, imageData, fileData, fileName, fileType, fileSize, language, starred, categoryId, category, tags[], order, createdAt, updatedAt
177+
- Indexed by: categoryId, type
178+
- Cascade delete with category
179+
180+
#### UserSettings
181+
- Singleton pattern (id always "default")
182+
- Fields: id, mode, accentThemeId, iconThemeId, customIconColor, glassIntensity, backgroundConfig (JSON), fontConfig (JSON), customAccentThemes (JSON), settingsPresets (JSON), createdAt, updatedAt
183+
- Stores all theme and appearance preferences
184+
185+
## Architectural Patterns
186+
187+
### Next.js App Router
188+
- Server Components by default for optimal performance
189+
- Client Components marked with 'use client' directive
190+
- API routes in app/api/ directory
191+
- File-based routing
192+
193+
### Component Composition
194+
- Small, focused components with single responsibility
195+
- Composition over inheritance
196+
- Props drilling minimized via Context API
197+
- Reusable UI components in components/ui/
198+
199+
### State Management
200+
- React Context for global state (theme, settings)
201+
- Local state with useState for component-specific data
202+
- Server state managed via API routes and database
203+
204+
### Styling Architecture
205+
- Tailwind CSS utility classes
206+
- CSS custom properties for theming (--accent-*, --glass-*)
207+
- Glass utilities in globals.css
208+
- Component-scoped styles when needed
209+
210+
### Data Flow
211+
1. User interaction → Component
212+
2. Component → API route (fetch/POST)
213+
3. API route → Prisma query
214+
4. Prisma → SQLite database
215+
5. Response → Component state update
216+
6. Re-render with new data
217+
218+
### Drag & Drop Architecture
219+
- @dnd-kit library for drag-and-drop
220+
- DndContext wraps draggable areas
221+
- Sensors for mouse, touch, and keyboard
222+
- Collision detection algorithms
223+
- onDragEnd handler updates database
224+
225+
### Search & Filter Architecture
226+
- useSearch hook centralizes logic
227+
- Debounced search input (300ms)
228+
- Client-side filtering for instant results
229+
- Tag filtering with AND/OR logic
230+
- View modes control data display
231+
232+
## Configuration Files
233+
234+
- **package.json** — Dependencies and scripts
235+
- **tsconfig.json** — TypeScript configuration
236+
- **next.config.ts** — Next.js configuration
237+
- **tailwind.config.ts** — Tailwind CSS configuration
238+
- **postcss.config.mjs** — PostCSS configuration
239+
- **prisma.config.ts** — Prisma configuration
240+
- **eslint.config.mjs** — ESLint rules
241+
- **.env** — Environment variables (DATABASE_URL)

0 commit comments

Comments
 (0)