Skip to content

IgorFachini/store-system-vue

Repository files navigation

store-system (store-system-vue)

A Quasar Framework app, made for simple stores.

Focused on sales people who sell products to customers.

Database: Firestore Database Only

User to testing in live preview (fake)

Functionalities

  • All pages protected

  • Authentication by email registered in firebase, multi users support

  • PWA support

  • All data is saved offline when pwa is installed, and updated in real time when connected to the “internet” (Not working)

  • Language support (i18n)

    • English
    • Portuguese

Pages

  • Home Dashboard: Total Resume of all cash flow

    • Paid purchases: Total of all purchases paid by the customer
    • Unpaid purchases: Total of all purchases unpaid by the customer
    • Payments: Total of all payments by the customer
    • Expenses: Total of all expenses
  • CRUD (Create, Read, Update, Delete)

    • Customers
    • Products
    • Expenses: Products purchased for resale are considered expenses
      • (It is necessary to register products and suppliers to register expenses)
    • Suppliers: Restock products for resale

  • Stock history: Hisotry of all stock changes
    • Products

  • Cash Flow (Fast Sales, Purchases, Payments, Quick Exit):
    • All Cash Flow: All entries and exits of money

  • Shopping cart (List products)
    • Discounts in % porcentage and $ value
    • Custom Sale Value
    • Option to reduce product stock

Example dev firebase variables, .env file

FIREBASE_API_KEY=variable
FIREBASE_PROJECT_ID=variable

Optional

<!-- Necessary if you want to use firebase storage -->
FIREBASE_STORAGE_BUCKET=variable

--------------------------------------------
FIREBASE_DATABASE_URL=variable
FIREBASE_AUTH_DOMAIN=variable
FIREBASE_MESSAGING_SENDER_ID=variable
FIREBASE_APP_ID=variable
FIREBASE_MEASUREMENT_ID=variable

Install the dependencies

yarn

Start the app in development mode (hot-code reloading, error reporting, etc.)

quasar dev

Lint the files

yarn run lint

Build the app for production

quasar build

Customize the configuration

See Configuring quasar.conf.js.

Backup model JSON file example to import

  • backup.json

Database model example

  • database.model.json

Utils Firebase commands

Exporting data from Firestore

  1. Open the Firebase Console.
  2. Navigate to your project and click the gear icon next to the “Project Overview” heading.
  3. Click the “Project Settings” button.
  4. In the “Service accounts” tab, click the “Generate new private key” button. This will download a JSON file with your Firebase project’s configuration.
  5. Rename the downloaded file to appConfig.json.
  6. Open a terminal and navigate to the directory where you want to save the exported JSON file. Make sure the above file you just renamed exists in the same directory as well.
  7. Run the following command to export data from your Firestore database:

Delete all data from Firestore

  1. Firebase CLI
  2. Login on CLI
  3. Run command
firebase firestore:delete --all-collections --project [PROJECT_ID]

Import data from JSON file to Firestore

  1. Run command
 npx -p node-firestore-import-export firestore-import -a appConfig.json -b backup.json