How addy015/mykeeper works
Purpose and Runtime
MyKeeper is a Next.js 16 App Router file-storage dashboard. It provides authenticated users a workspace to upload, browse, search, organize, and manage files, backed by Appwrite authentication, database, and storage services. It runs as a Node.js/Next.js application with React 19 and Tailwind CSS v4.
Application Entry and Route Shells
The global application shell and styling originate at app/layout.js and app/globals.css. Route groups split unauthenticated and authenticated/dashboard experiences:
• Auth shell: app/(auth)/layout.js
• Main workspace shell: app/(root)/layout.js
• Dashboard landing route: app/(root)/page.js
This separation is the primary UI/control boundary between account access and file-management operations.
Authentication Lifecycle
Authentication UI begins at app/(auth)/sign-in/page.js; callback completion is handled by app/auth/callback/page.js. User/session interactions are centralized in lib/actions/user.actions.js, which should act as the Appwrite-facing boundary for registration, login, session lookup, and logout rather than embedding backend access in route components.
File Workspace and Navigation
The dashboard’s primary file views are the root landing page and type-filtered dynamic route:
• app/(root)/page.js
• app/(root)/[type]/page.js
components/Sidebar.jsx supplies workspace navigation, while components/Topbar.jsx is the likely global command/search surface. components/SortDropdown.jsx controls presentation ordering. The expected flow is route selection/filtering → file retrieval/action layer → rendered file list/cards.
File Domain and Mutations
lib/actions/file.actions.js is the core file-domain boundary: it should coordinate Appwrite storage objects and associated metadata records for upload, retrieval, search, rename, sharing, and deletion. components/FileCard.jsx renders individual file entities, and the modal components isolate destructive or metadata-changing interactions:
• components/modals/DeleteModal.jsx
• components/modals/RenameModal.jsx
• components/modals/ShareModal.jsx
These UI components initiate mutations, while the action layer owns persistence and Appwrite integration.
Storage Visibility
components/StorageSummary.jsx presents aggregate storage usage, requiring file metadata or Appwrite storage totals to flow from the backend/action layer into the dashboard. File details are exposed separately through components/modals/DetailsModal.jsx, keeping inspection distinct from mutation flows.
Backend and Service Boundaries
Appwrite client/service initialization is centralized in lib/appwrite.js; environment-provided endpoint, project, and resource identifiers configure the external BaaS connection. Appwrite supplies the material infrastructure for authentication, database metadata, and binary file storage. lib/utils.js and lib/plain.js support shared application transformations or plain-data boundaries.
A small application health/integration endpoint exists at app/api/ping/route.js, with components/AppwritePing.js providing a UI-side probe. This establishes a lightweight boundary for checking service availability without coupling all dashboard rendering to direct connectivity checks.
Main entry points: file.actions.js File actions · appwrite.js Appwrite client · layout.js Workspace shell · page.js Dashboard landing
Components 19
UI shells and workspace
- Global app shell · Provides global styling and application chrome.
app/layout.js - Workspace shell
app/(root)/layout.js - Dashboard landing
app/(root)/page.js - Type-filtered files
app/(root)/[type]/page.js - Sidebar navigation
components/Sidebar.jsx - Topbar search
components/Topbar.jsx - Sort controls
components/SortDropdown.jsx
Authentication
- Auth shell
app/(auth)/layout.js - Sign-in page
app/(auth)/sign-in/page.js - Auth callback
app/auth/callback/page.js - User actions · Owns registration, login, session lookup, and logout.
lib/actions/user.actions.js
File domain
- File cards
components/FileCard.jsx - File management modals · Delete, rename, share, and inspection dialogs.
components/modals/DeleteModal.jsx - Storage summary
components/StorageSummary.jsx - File actions · Coordinates file metadata and binary storage operations.
lib/actions/file.actions.js
Service boundary
- Appwrite client · Configures Appwrite from environment-provided identifiers.
lib/appwrite.js - Appwrite services · Authentication, metadata database, and binary storage.
- Service ping endpoint
app/api/ping/route.js - Appwrite ping probe
components/AppwritePing.js
Connections 21
- Global app shell → Auth shell: wraps
- Global app shell → Workspace shell: wraps
- Auth shell → Sign-in page: hosts
- Sign-in page → User actions: auth requests
- Auth callback → User actions: completes session
- Workspace shell → Dashboard landing: hosts
- Workspace shell → Type-filtered files: hosts
- Sidebar navigation → Dashboard landing: selects workspace view
- Sidebar navigation → Type-filtered files: filters by type
- Topbar search → File actions: searches files
- Sort controls → File cards: orders presentation
- Dashboard landing → File actions: loads files and usage
- Type-filtered files → File actions: retrieves filtered files
- File actions → File cards: supplies file entities
- File actions → Storage summary: supplies usage totals
- File management modals → File actions: initiates mutations
- File actions → Appwrite client: uses
- User actions → Appwrite client: uses
- Appwrite client → Appwrite services: connects to
- Appwrite ping probe → Service ping endpoint: probes
- Service ping endpoint → Appwrite client: checks connectivity