{"id":18107024,"url":"https://github.com/loficrypto/firecommerce","last_synced_at":"2026-02-18T05:33:59.893Z","repository":{"id":258115466,"uuid":"873433916","full_name":"loficrypto/Firecommerce","owner":"loficrypto","description":"This project aims to deliver a comprehensive ecommerce solution with seamless navigation, robust user management, and efficient product handling. 🚀🛒📈","archived":false,"fork":false,"pushed_at":"2024-10-16T13:28:06.000Z","size":211,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-19T14:50:31.118Z","etag":null,"topics":["ecommerce","ecommerce-application","ecommerce-platform","ecommerce-store","ecommerce-website","firebase","firebase-database","react","react-router","react-router-dom","reactjs","vitejs"],"latest_commit_sha":null,"homepage":"https://nullbite.net/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loficrypto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-16T06:55:05.000Z","updated_at":"2024-10-16T13:28:10.000Z","dependencies_parsed_at":"2024-10-20T08:48:32.479Z","dependency_job_id":null,"html_url":"https://github.com/loficrypto/Firecommerce","commit_stats":null,"previous_names":["loficrypto/my-project"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loficrypto%2FFirecommerce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loficrypto%2FFirecommerce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loficrypto%2FFirecommerce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loficrypto%2FFirecommerce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loficrypto","download_url":"https://codeload.github.com/loficrypto/Firecommerce/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238471119,"owners_count":19477985,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ecommerce","ecommerce-application","ecommerce-platform","ecommerce-store","ecommerce-website","firebase","firebase-database","react","react-router","react-router-dom","reactjs","vitejs"],"created_at":"2024-10-31T23:09:02.054Z","updated_at":"2025-10-12T14:33:50.821Z","avatar_url":"https://github.com/loficrypto.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Let's go through a detailed overview of your ecommerce project, which includes functionalities like a user-friendly shopping experience, wallet top-up with cryptocurrency, admin panel, email notifications, and a blog section.\n\n# Project Overview\n\n## Ecommerce Shop with Admin Panel\n\n- Home Page: Showcases featured products and allows users to browse various categories.\n\n- Shop Page: Displays a grid of all available products with options to add to cart.\n\n- Product Details: Provides detailed information about individual products.\n\n- Cart: Users can view and manage items they intend to purchase.\n\n- Checkout: Processes the purchase, deducting the amount from the user's wallet balance.\n\n- User Profile Management\n\n- Profile Details: Displays user information.\n\n- Wallet Balance: Shows the current balance, allows users to top up their wallet using cryptocurrency.\n\n- Purchase History: Lists recent purchases with download links for digital products.\n\n- Top-Up History: Records all wallet top-up transactions.\n\n- Transactions: Displays all user transactions, both purchases, and top-ups.\n\n### Admin Panel\n\n- Manage Orders: Admins can view and manage all orders placed by users.\n\n- Manage Products: Admins can add new products, update existing ones, or delete products.\n\n- Manage Users: Admins can view and manage all registered users.\n\n- Send Emails: Admins can send email notifications to users using Brevo's SMTP.\n\n### Automated Email Notifications\n\n- Order Confirmation: Sends an email with product download links upon successful purchase.\n\n### Blog\n\n- Posts Management: Admins can create, update, or delete blog posts.\n\n- Image Upload: Blog posts can include images stored in Firebase Storage.\n\n### Key Technologies\n- Frontend: React with Vite and Tailwind CSS for a responsive and modern design.\n\n- Backend: Firebase for authentication, Firestore for database management, Firebase Storage for file uploads.\n\n- Email Service: Brevo's SMTP integrated with Nodemailer for sending email notifications.\n\n- Payment Integration: Apirone API for handling cryptocurrency transactions.\n\n### Project Directory Structure\n```\nsrc/\n├── components/\n│   ├── AdminEmails.jsx\n│   ├── AdminOrders.jsx\n│   ├── AdminProductForm.jsx\n│   ├── AdminProducts.jsx\n│   ├── AdminUsers.jsx\n│   ├── Navbar.jsx\n│   ├── ProductCard.jsx\n│   ├── ProductGrid.jsx\n│   ├── ProfileDetails.jsx\n│   ├── PurchaseHistory.jsx\n│   ├── TopUpHistory.jsx\n│   ├── Transactions.jsx\n├── pages/\n│   ├── Admin.jsx\n│   ├── Cart.jsx\n│   ├── Checkout.jsx\n│   ├── Home.jsx\n│   ├── Login.jsx\n│   ├── Profile.jsx\n│   ├── Register.jsx\n│   ├── Shop.jsx\n├── utils/\n│   ├── apirone.js\n│   ├── emailService.js\n├── firebase.js\n├── index.css\n├── main.jsx\n```\n\n### Firebase Firestore Rules\n\n```\nservice cloud.firestore {\n  match /databases/{database}/documents {\n    match /users/{userId} {\n      allow read, write: if request.auth.uid == userId;\n    }\n    match /orders/{orderId} {\n      allow read, write: if request.auth != null;\n    }\n    match /transactions/{transactionId} {\n      allow read, write: if request.auth != null;\n    }\n  }\n}\n```\n\n### Callback server.js\n\n```js\nconst express = require('express');\nconst bodyParser = require('body-parser');\nconst { getFirestore, doc, getDoc, updateDoc } = require('firebase/firestore');\nconst admin = require('firebase-admin');\nconst serviceAccount = require('./path-to-your-firebase-service-account-file.json');\n\nadmin.initializeApp({\n    credential: admin.credential.cert(serviceAccount)\n});\n\nconst db = getFirestore();\nconst app = express();\napp.use(bodyParser.json());\n\napp.post('/api/topup-callback', async (req, res) =\u003e {\n    try {\n        const { id, paid, amount, currency } = req.body;\n\n        if (paid) {\n            const userId = id.split('-')[0]; // Adjust this based on your invoice ID format\n            const userDocRef = doc(db, 'users', userId);\n            const userDoc = await getDoc(userDocRef);\n\n            if (userDoc.exists()) {\n                const newBalance = userDoc.data().walletBalance + amount;\n                await updateDoc(userDocRef, { walletBalance: newBalance });\n                res.status(200).send('Top-up successful');\n            } else {\n                res.status(404).send('User not found');\n            }\n        } else {\n            res.status(400).send('Payment not completed');\n        }\n    } catch (error) {\n        console.error(\"Error in top-up callback\", error);\n        res.status(500).send('Internal Server Error');\n    }\n});\n\napp.listen(3000, () =\u003e {\n    console.log('Server is running on port 3000');\n});\n```\n### Database Structure for React Project\nUsers Collection\n```\nusers (collection)\n  ├── userId1 (document)\n  │   ├── email: \"user1@example.com\"\n  │   ├── walletBalance: 100.0\n  │   ├── purchases: [ { productId: \"productId1\", date: \"2023-01-01\" } ]\n  │   ├── topUps: [ { amount: 50.0, date: \"2023-01-01\" } ]\n  │   ├── transactions: [ { amount: 50.0, date: \"2023-01-01\" } ]\n  ├── userId2 (document)\n  │   ├── ...\n  \nproducts (collection)\n  ├── productId1 (document)\n  │   ├── name: \"Product 1\"\n  │   ├── description: \"Description 1\"\n  │   ├── price: 20.0\n  │   ├── imageUrl: \"url_to_image\"\n  │   ├── productFile: \"url_to_file\"\n  ├── productId2 (document)\n  │   ├── ...\n\norders (collection)\n  ├── orderId1 (document)\n  │   ├── userId: \"userId1\"\n  │   ├── items: [ { productId: \"productId1\", quantity: 1 } ]\n  │   ├── totalAmount: 20.0\n  │   ├── date: \"2023-01-01\"\n  ├── orderId2 (document)\n  │   ├── ...\n\nblogPosts (collection)\n  ├── postId1 (document)\n  │   ├── title: \"Post 1\"\n  │   ├── content: \"Content 1\"\n  │   ├── imageUrl: \"url_to_image\"\n  ├── postId2 (document)\n  │   ├── ...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floficrypto%2Ffirecommerce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floficrypto%2Ffirecommerce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floficrypto%2Ffirecommerce/lists"}