Giter Site home page Giter Site logo

bazar-appwrite-api's Introduction

Bazar AppWrite backend

Initial setup (currently not working)

The first step is to manually create a Project using the project id from the appwrite.json file, an Api Key also needs to be manually generated, for local development is easier to give it all scopes, the Endpoint comes with the project. Set BAZAR_PROJECT_ID (obvious), BAZAR_MANAGEMENT_API_KEY (the Api Key) and BAZAR_ENDPOINT (the Endpoint) as environmental variables (globally on your machine). The other IDs you will take from the appwrite.json, in the end you need to have all these variables set.

export BAZAR_PROJECT_ID="..."
export BAZAR_MANAGEMENT_API_KEY="..."
export BAZAR_ENDPOINT="..."
export BAZAR_COLLECTION_CATEGORIES="..."
export BAZAR_COLLECTION_SUB_CATEGORIES="..."
export BAZAR_COLLECTION_PRODUCTS="..."
export BAZAR_COLLECTION_CARTS="..."
export BAZAR_COLLECTION_CART_ITEMS="..."
export BAZAR_COLLECTION_ORDERS="..."
export BAZAR_COLLECTION_ORDER_ITEMS="..."
export BAZAR_COLLECTION_PAYMENTS="..."
export BAZAR_COLLECTION_STORES="..."
export BAZAR_COLLECTION_USER_DETAILS="..."

Build the DB structure (From here below it does work)

To create the DB structure you need to use the appwrite-cli, follow the initial steps and then deploy the DB

Seeds

You can seed the DB by running

npm run seed

and clean the data using

npm run clean-data

Updating the DB structure

Currently, the appwrite-cli does not correctly support migrations, so if you have a DB structure in place, and you want to update it you'll have to delete the docker volumes and basically build the DB from scratch.

Migrations

We might come up with a migration approach in the future, but there are a couple of bugs affecting the server-sdk (attributes get stuck when deleted), for now they can be made through the admin dashboard.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.