A pet-store demo built with AngularJS 1.x, written to practice custom modules, directives, and providers rather than to be a real shop.
▶ View the site — see the note below on what no longer works.
Important
Archived, and partly non-functional. Two backing services are gone:
- Firebase — the
mattsauroangularstoreproject has been deactivated, so registration, login, and logout all fail. The database returns423 Locked. - api.adorable.io — the avatar service used for review avatars shut down; the endpoint now redirects to a landing page, so avatars don't render.
The product catalogue is served from a local pets.json, so browsing,
tabs, and reviews still work. Kept as a record of the work, not as a running
app. It is not maintained.
Two modules: myApp (the application) and storeProducts (a reusable module
holding the store-specific pieces), wired together at declaration:
var app = angular.module("myApp", ["storeProducts", "ngRoute"]);storeProducts is the interesting half. It defines two directives backed by
templates — storePanels for the tabbed product view and storeReviews for
the review form — plus an avatar provider, which is the practice piece:
a provider rather than a plain service, exercising the $get factory form.
Routes map /, /page1, /page2, and /login onto templates in
templates/. Auth is Firebase email/password, with onAuthStateChanged calling
$scope.$apply() to pull Firebase's callback back into Angular's digest cycle —
the comment in app.js explaining why is worth keeping.
| File | Role |
|---|---|
app.js |
Module declaration, routes, auth controllers |
modules/storeProducts.js |
Directives and the avatar provider |
templates/ |
Route and directive templates |
pets.json |
The product catalogue |
login.html |
Login/registration view |
stylesheet.less / .css |
Styles (LESS source and compiled output) |
Built with AngularJS 1.x, ngRoute, Bootstrap, and Firebase.
No build step. Serve the folder — file:// won't work, since routes and
directives fetch their templates over HTTP:
python3 -m http.server 8000 # then open http://localhost:8000The catalogue loads; anything touching auth or avatars won't.
Kept as-is rather than modernized. Linked from the archived version of my original portfolio; my current portfolio is here.