Welcome to the frontend repository of the Bookmarks App — a modern, fast, and secure web application designed to help users save, organize, and manage their internet bookmarks with ease.
🌐 Live Demo: bookmark-frontend-teal.vercel.app
(This is the Frontend layer of the application. The NestJS backend repository can be found on my GitHub profile).
- Hybrid Authentication: Seamless login flow utilizing Google OAuth 2.0 and JWT.
- Guest Mode Architecture: Allows users to try the app and interact with the UI using local mock data before committing to an account.
- Advanced State Management: Utilizes Zustand for global asynchronous state, avoiding prop-drilling and handling optimistic UI updates.
- Next.js & React 19: Built on the bleeding edge of the React ecosystem using the App Router.
- Optimism & Resilience: Custom Axios interceptors to handle silent token refreshing and Zero-Downtime deployments.
- Hydration Safe: Custom
useStorehooks to ensure exact parity between Server-Side Rendering (SSR) and Client-Side state, completely eliminating React hydration mismatches. - Responsive UI: Fully responsive dashboard crafted with Tailwind CSS and Shadcn UI components.
This repository adopts a strict separation of concerns, heavily prioritizing maintainability and scalability:
app/: Next.js 15 App Router definitions and page layouts.components/: Modular React components divided into "Landing" and "Dashboard" contexts, utilizing Shadcn UI.store/: Centralized Zustand stores for user sessions, workspaces, collections, and bookmarks logic.lib/: Core utilities, including theapi.tsconfigured with interceptors to automatically attach Bearer Auth Tokens and intercept 401s for queue-based multi-request silent token renewal.
To run this project locally, you will need Node.js (v18+) and the corresponding Backend API running.
-
Clone the repository:
git clone https://github.com/JDR89/Bookmark---Frontend.git cd Bookmark---Frontend -
Install dependencies:
pnpm install
-
Configure Environment Variables: Create a
.envfile in the root directory and add the URL of your local or production backend:NEXT_PUBLIC_API_URL=http://localhost:3008/api # For production: NEXT_PUBLIC_API_URL=https://your-railway-backend.app/api
-
Start the development server:
pnpm run dev
Open http://localhost:3000 with your browser to see the result.
This frontend is designed to be effortlessly deployed on Vercel as a Serverless edge application.
The project relies on a decoupled Full-Stack architecture:
- Database: PostgreSQL hosted securely on Railway (internal network).
- Backend Engine: NestJS API running on Railway as a Long-Running Web Service.
- Frontend Edge: This repository, distributed globally via Vercel CDNs, communicating with the backend over HTTPS.
- Spam Prevention: Traditional Email/Password registration has been disabled at the UI level. User onboarding is currently restricted to legitimate Google Accounts via OAuth 2.0 to protect the database against malicious bot scraping.
- Stateless Sessions: Only short-lived Access Tokens are handled by the frontend, reducing XSS vulnerabilities exposure.