The Marketplace App is an internal platform designed to facilitate the buying, selling, and exchange of assets within an organization. Built with a modern tech stack, it offers a seamless user experience, robust functionality, and secure transactions. Key features include user profiles, asset listings, comments, ratings, and administrative tools for managing content and users.
- Features
- Technologies Used
- Getting Started (Local Development)
- Deployment (GCP with Firebase)
- Usage
- Contributing
- License
- User Profiles: Manage personal information, track activity, and view ratings.
- Asset Listings: Create, view, and manage asset listings with detailed descriptions and images.
- Comments and Ratings: Engage with assets through comments and rate user interactions.
- Admin Tools: Administrative features for managing users, assets, and content moderation.
- Secure Authentication: User authentication and authorization powered by Firebase.
- Real-time Updates: Live updates for comments, ratings, and asset changes using Firestore.
- Frontend: Vue.js 3, Vuetify 3
- Backend: Firebase (Firestore, Authentication, Storage, Hosting)
- Development Tools: Vite, Firebase Emulators, Node.js, npm
To set up the project locally, follow these steps:
-
Node.js and npm: Ensure you have Node.js (v16+) and npm installed.
-
Firebase CLI: Install the Firebase CLI globally:
npm install -g firebase-tools
-
Clone the Repository:
git clone https://github.com/your-repo/marketplace-app.git cd marketplace-app -
Install Dependencies:
npm install
-
Set Up Firebase Emulators:
The project uses Firebase Emulators for local development. Start the emulators with:
firebase emulators:start
This will run Firestore, Authentication, and other services locally.
-
Configure Firebase:
Create a
.envfile in the root directory with your Firebase configuration:VITE_FIREBASE_API_KEY=your-api-key VITE_FIREBASE_AUTH_DOMAIN=your-auth-domain VITE_FIREBASE_PROJECT_ID=your-project-id VITE_FIREBASE_STORAGE_BUCKET=your-storage-bucket VITE_FIREBASE_MESSAGING_SENDER_ID=your-messaging-sender-id VITE_FIREBASE_APP_ID=your-app-id
Replace the placeholders with your Firebase project’s configuration values.
-
Run the Development Server:
Start the Vite development server:
npm run dev
Access the app at http://localhost:5173.
To deploy the app on a new GCP account using Firebase, follow these steps:
-
GCP Account: Ensure you have a Google Cloud Platform account.
-
Firebase CLI: Install the Firebase CLI globally (if not already done):
npm install -g firebase-tools
-
Create a Firebase Project:
- Go to the Firebase Console.
- Click "Add project" and follow the prompts to create a new project.
- Enable the necessary services: Firestore, Authentication, and Storage.
-
Set Up Firebase Services:
- Firestore: Create a Firestore database in "Native mode."
- Authentication: Enable authentication methods (e.g., Email/Password, Google).
- Storage: Set up Firebase Storage for asset images or files.
-
Configure Security Rules:
Update Firestore and Storage security rules to match your project’s requirements. Example rules are in
firestore.rulesandstorage.rules. Deploy rules using:firebase deploy --only firestore:rules,storage:rules
-
Initialize Firebase in the Project:
-
Log in to Firebase CLI:
firebase login
-
Initialize Firebase in the project directory:
firebase init
-
Select "Hosting" and choose your Firebase project.
-
Set the public directory to
dist(for Vite builds).
-
-
Build the Project:
Build the Vue.js app for production:
npm run build
-
Deploy to Firebase Hosting:
Deploy the app:
firebase deploy --only hosting
Access the deployed app at the provided URL (e.g.,
https://your-project-id.web.app).
Once the app is running:
- Sign Up / Log In: Create an account or log in using Firebase Authentication.
- Create Assets: List assets with titles, descriptions, and images.
- Engage: Comment on assets, rate users, and manage your profile.
- Admin Features: If you’re an admin, manage users, assets, and content.
Contributions are welcome! To contribute:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Commit your changes and push to your fork.
- Submit a pull request with a detailed description of your changes.
This project is licensed under the MIT License.