Code Monkey home page Code Monkey logo

prisma-ecommerce's People

Contributors

dupk avatar weakky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

prisma-ecommerce's Issues

Build permissions system on the backend

Using graphql-shield or https://blog.graph.cool/graphql-directive-permissions-authorization-made-easy-54c076b5368e

Step1. Allow only users with role ADMIN to perform those mutations:

# Upsert mutations
  upsertBrand(brandId: ID, categoryId: ID!, name: String!): Brand
  upsertAttribute(attributeId: ID, categoryId: ID!, value: String!): Attribute
  upsertCategory(categoryId: ID, name: String!): Category
  upsertOption(optionId: ID, name: String!, values: [OptionValueInput!]!, categoryId: ID!): Option
  upsertProduct(
    productId: ID,
    name: String!,
    categoryId: ID!,
    brandId: ID!,
    available: Boolean!,
    optionIds: [ID!]!,
    variants: [ProductVariantInput!]!,
    attributesIds: [ID!]!,
    unavailableOptionsValuesIds: [ID!]!,
    displayPrice: Float!,
    imageUrl: String
  ): Product

  #Upsert Shop metadata
  upsertBestSalesProducts(shopMetadataId: ID, bestSalesProducts: [OrderableProductInput!]!): ShopMetadata!
  upsertNewProducts(shopMetadataId: ID, newProducts: [OrderableProductInput!]!): ShopMetadata!
  upsertMOTD(shopMetadataId: ID, MOTD: String!): ShopMetadata!

  # Delete mutations
  deleteProduct(productId: ID!): Product
  deleteOption(optionId: ID!): Option
  deleteBrand(brandId: ID!): Brand
  deleteAttribute(attributeId: ID!): Attribute
  deleteCategory(categoryId: ID!): Category

#Order mutations
  setOrderAsPrepared(orderId: ID!): Order #Can be updated only by admins (eg: to set order as prepared)

And those queries:

allCustomers: [User!]!

Allow to update the MOTD

The MOTD field is already present in the datamodel.

Everything still needs to be done though, on Prisma (building the resolver), on the backoffice (creating the view to be able to update it), and on the mobile app (to query and display the MOTD)

Generate invoices for the seller and the clients

When a client submit an order:

  • Send him a mail with a detailed invoice of his order

For the seller:

  • Allow him to generate a daily/monthly receipt of all the orders processed, for accounting reasons

Create a makefile at the root of projects

Allow the developer to...

  • Configure his development environment
  • Install projects
  • Launch projects
  • Reset projects (npm cache, watchman, node_modules..)
  • Debug projects (display dependancies, track errors..)

Paginate product list

Although there's already some pagination handled by react-table (UI wise), we're querying all the products at once, which will lead to really slow performance in the future.

Flavian

Bonjour Flavian, je suis très intéressé par ce repo et le code que tu développes, moi même je travaille avec Prisma,
Je t'ai contacté sur twitter récemment, pourrai-tu m'appeler sur mon tel au 0675505209?. Je cherche quelqu'un comme toi.
Tu peux fermer cette issue après l'avoir lue

Clean inline-styles

Inline-styles should be put in their respectives .styles.js files.

Using styled-components could be an option as well

Create an iPad/tablet app to easily manage orders

As the app will solely be used as a "drive" e-commerce system, we need a way to be able to see incoming orders easily.

An iPad app sticked to a wall, plugged to the prisma API with subscriptions to get in-real incoming orders would be the perfect option.

This app would allow the shop owner to:

  • See incoming orders
    • Filter them by "orders to prepare" / "orders prepared"
    • Set them as prepared (to notify the user)
  • Easily change variants availabilities of products

Warn user that some items in his cart were removed

When a product is deleted from the backoffice, we delete all cart items that had this product in it.

When the user logs in again, we should warn him we an Alert.alert() that some products of his cart were deleted.

Solution:

We could simply save in AsyncStorage the number of item in his cart, then compare it when fetching his cart from the server.

If localCartItemsLength < serverCartItemLengths then Alert.alert() the user.

Create the views to handle user's account

The last tab on the RN app will be dedicated to user's account, allowing him to manage all kind of stuff.

  • List his orders (with ability to add an order to the cart)
  • Edit his account information
  • Grab shops information (opening hours, address, etc etc. This may be put in the ShopMetadata model)
  • Allow to change his shop
  • Logout
  • Terms of Service
  • More ideas ?

Allow to disable some option values when creating/editing a product

As of now, when adding options to a product, you're forced to use ALL the linked options values. There should be a way to only add SOME of the values.

eg: A t-shirt can only exist in Color blue, and black, even though the Color option has the color value yellow. In this case, admin should be able to disabled option value yellow.

update apollo to 2.0 simz

I'm currently working on your project.

did update apollo and code relative to work with last version.
app working with last apollo2 now.
I already setup the Facebook login with prisma in my repo, i can add it here too

Show variant in Order tickets

Only the name of the product is shown for the moment.

We could only show the optionValues.

t-shirt x 2 (XL, Blue)

Product cannot be deleted when put in an order

When a product was put in an order, it cannot be deleted.

GraphQL error: The change you are trying to make would violate the required relation '_OrderLineItemToVariant' between OrderLineItem and Variant

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.