This project is a full-stack, serverless e-commerce website built as a commissioned proof-of-concept for a student's thesis. It provides a complete online shopping experience for a furniture store, from browsing products to completing payments, and includes a full administrative backend for site management.
- Customer Facing:
- Dynamic product catalog and browsing
- User account creation and login
- Persistent shopping cart
- Secure checkout with PayPal integration
- Administrative Panel:
- Role-based access for administrators
- Full CRUD (Create, Read, Update, Delete) functionality for products
- Customer order tracking and status management
- User account appeal and management system
- Frontend: HTML5, CSS3, Vanilla JavaScript, jQuery
- Backend & Services:
- Google Firebase: Used as the complete serverless backend.
- Firebase Authentication: For user registration and login (Email/Password).
- Cloud Firestore: NoSQL database for all application data (users, products, orders).
- Firebase Storage: For hosting all product imagery.
- Firebase Hosting: For deploying and serving the live application.
- Payment Integration: PayPal API
Follow these instructions to set up a local development environment.
- Install the Firebase CLI, preferably using
npm install -g firebase-tools. - Log in to your Google account using
firebase login.
- Create a new project in the Firebase Console.
- In your new project, get the
firebaseConfigobject and update the contents ofpublic/scripts/firebase.jsaccordingly. - Run
firebase initin your local project directory. - When prompted, select "Use an existing project" and choose the project you just created.
- Enable Firestore, Storage, and Hosting. Do not overwrite the existing
public/index.htmlfile. - Troubleshooting: If the
initcommand fails, try deleting the.firebasercfile and running it again.
- Firestore Rules: Ensure your Firestore security rules allow reads and writes for development. The default rules are restrictive.
- Authentication: In the Firebase Console, go to Build > Authentication > Sign-in method and enable the Email/Password provider.
- Register a new account through the application's register page.
- In the Firebase Console, go to Build > Firestore Database.
- Find the new user's document in your
userscollection. - Manually add a new field named
isAdmin, set its type toBoolean, and its value totrue. This will grant access to the 'Admin Console' in the UI for that user.
- To deploy the project to Firebase Hosting, run the command
firebase deploy.