Project Details
Otach
Premium Timepieces.
Tech Stack
By the Numbers
Description
Otach is a luxury watch storefront built with the Next.js App Router. It pairs a curated catalogue of
mechanical, smart, and sport timepieces with a complete shopping flow — catalogue browsing, filtering,
product detail pages, a persistent bag, checkout, and Firebase-backed authentication.
Signed-in members can also add and manage their own listings through a small owner-only catalogue manager.
The interface follows a restrained, editorial luxury-retail direction: a single teal accent, generous
spacing, quiet animations, and a focus on product photography.
Key Features
- Responsive landing page with hero, featured timepieces, category highlights, service guarantees, and a closing call to action
- Sticky, responsive navigation with a Shop menu, account menu, bag preview popover, and mobile drawer
- Catalogue of 26 timepieces with search across name, tagline, description, and category
- Filters by category (Analog / Smartwatch / Sport) and price range; sorting by featured, price, and name A–Z; pagination at 9 items per page
- Dynamic product detail route at
/items/[id]with static generation, related timepieces, breadcrumbs, and a branded 404 for unresolved IDs - Firebase Authentication with email/password and Google sign-in via a single AuthContext listener
- Protected routes with redirect to
/loginand return to the intended destination after sign-in - Add Product form with field-level validation writing to Firestore with ownership bound to the authenticated UID
- Manage Products page listing only the member's own listings, with view and delete actions
- Cart context with quantity controls, per-item maximum, subtotal, and item count — persisted in localStorage namespaced by Firebase UID
- Validated delivery form with generated order reference in
OT-YYYY-XXXXXXformat - Toast notifications for auth, bag, and form outcomes across the app
Routes
| Route | Access | Description |
|---|---|---|
| / | Public | Landing page |
| /items | Public | Catalogue with search, filters, sorting, and pagination |
| /items/[id] | Public | Product detail; falls back to Firestore for owner-created records, then 404 |
| /about | Public | Brand story, values, and craftsmanship |
| /cart | Public | Shopping bag with quantity management and subtotal |
| /checkout | Protected | Delivery form and order confirmation |
| /items/add | Protected | Create a timepiece listing |
| /items/manage | Protected | List, view, and delete your own timepieces |
| /login / /register | Public | Email/password and Google sign-in and account creation |
Challenges Faced
One of the trickiest parts was building the cart persistence layer correctly. Per-user localStorage
namespacing by Firebase UID meant the cart had to stay in sync with the auth state — loading the right
cart when a user signs in, flushing it on sign-out, and handling the brief moment Firebase is still
resolving the session on page load without showing a flicker or incorrect cart count.
Managing Firestore security rules alongside the owner-created product flow also required careful thought.
The rules had to allow each member to read and write only their own records, while keeping the public
catalogue fully accessible without authentication — and ensuring that a Firestore rule can't be used as a
query filter, so the client query had to explicitly filter by userId itself.
Future Improvements
Future improvements could include a wishlist / favourites feature, server-side rendered catalogue pages for better SEO on dynamic product data, real Stripe checkout integration to replace the simulated order confirmation, review and rating system for timepieces, and an admin dashboard for moderation of owner-submitted listings.