Git Product home page Git Product logo

itswadesh / svelte-commerce Goto Github PK

View Code? Open in Web Editor NEW
1.4K 33.0 271.0 67.95 MB

The open-source storefront for any eCommerce. Built with a PWA and headless approach, using a modern JS stack. The API approach also allows you to merge Svelte Commerce with any third-party tool like payment gateways, POS or AI. WIP for MedusaJS, Woocommerce, Bigcommerce and Shopify.

Home Page: https://arialshop.com

License: MIT License

JavaScript 1.89% HTML 0.07% CSS 0.12% Svelte 76.66% TypeScript 20.98% Dockerfile 0.04% XSLT 0.24%
ecommerce svelte tailwindcss shopping-cart cart pwa filters rest-api faceted-search javascript

svelte-commerce's Issues

Display server errors

Describe the bug
Adding items to the cart feels like the app is not working with no warning been displayed.

To Reproduce
I downloaded the repo and install dependencies and try adding an item to the cart.

Expected behavior
There should be server errors warnings. I see the error on the web console "401 unauthorized" invalid token...

Update Tailwind to v2

Hi. Are there any plans to switch to the newer version of TailwindCSS ?. I use Sapper and Tailwind 2 in production and about to start a new e-commerce project. Before I begin, was looking for ready-made options. Your project is almost perfect. Cheers

Unhandled Promise Rejection

Description
I have a medusajs backend. I cloned this repo, added medusa-backend-url in .env file, exported medusa in the src/lib/services/index.ts directory, then installed dependencies. When i run the app it starts correctly but brings an error(shown below) and the server stops. Is there anything i'm missing?

Error message

[email protected] dev
node src/lib/services/copy && vite dev --host --port 3000

VITE v4.3.7 ready in 27283 ms

➜ Local: http://localhost:3000/
➜ Network: http://192.168.22.112:3000/
➜ Network: http://10.42.0.1:3000/
➜ press h to show help
10:21:04 AM [vite-plugin-svelte] /node_modules/svelte-toasts/src/FlatToast.svelte:37:0 A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event.
10:21:07 AM [vite-plugin-svelte] /node_modules/svelte-toasts/src/BootstrapToast.svelte:23:0 A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event.
node:internal/process/promises:265
triggerUncaughtException(err, true /* fromPromise */);
^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "[object Object]".] {
code: 'ERR_UNHANDLED_REJECTION'
}

Error 500 when deployed to vercel/netlify

Getting Error 500 when deployed to vercel/netlify

To Reproduce

  1. click the the deploy to netlify or the deploy to vercel button on the github repo
  2. wait for the site to be deployed on vercel or netlify
  3. after the site is deployed successfully you will see the error 500
  4. no error to be found on the log of the deployment

Expected behavior
The main ecommerce page appearing on the deployed site

Screenshots
If applicable, add screenshots to help explain your problem.

Screenshot

Document is not defined

Got the following error while accessing the profile page

31|lapi    | GET /api/users/me 200 8.617 ms - 144
31|lapi    | GET /api/cart 200 6.822 ms - 888
31|lapi    | GET /api/settings 200 1.144 ms - -
31|lapi    | GET /api/users/me 401 0.808 ms - 25
30|h       | (node:25367) UnhandledPromiseRejectionWarning: ReferenceError: document is not defined
30|h       |     at Object.goto (/var/www/hopyshopy/www/__sapper__/build/server/api-a61cbacc.js:454:45)
30|h       |     at getMe (/var/www/hopyshopy/www/__sapper__/build/server/profile-a0922ee7.js:21:11)
30|h       |     at process._tickCallback (internal/process/next_tick.js:68:7)
30|h       | (node:25367) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
30|h       | (node:25367) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
31|lapi    | GET /api/cart 200 11.761 ms - 888

api structure document

hallo , its the best ecommerce tamlet i came a cross so far
i want to integrate it with my Strapi backend, is it possible? where can he api structure so i can make my api the same

[filtering page] APPLY button is not shown at the bottom of a screen on an Android phone

Describe the bug
APPLY button is not shown at the bottom of a screen on an Android phone. I am talking about the "filtering" page.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://svelte-commerce.litekart.in/search' from your Android smartphone
  2. Click on 'filter'

Expected behavior
APPLY button is shown at the bottom of the screen

Screenshots
photo_2022-01-16_22 08 13_1_50

Smartphone (please complete the following information):

  • Device: Android smartphone
  • OS: Android 10
  • Browser: Chrome
  • Version: 96.0.4664.92

Link to documentation

Hi sorry to disturb you this looks like an amazing project but I was wondering if there's any link to documentation on how can I integrate this with a MedusaJS backend. I can see some variable defined in the .env.example but I also see other backend solutions so I don't know if I should delete those or how should I proceed/possible caveats etc

Thanks in advance

BTW I know it's not ideal to open an issue for this but I couldn't see any way to reach out to you to ask this question, apologies.

Add a security policy

Hey there!

I belong to an open source security research community, and a member (@ktg9) has found an issue, but doesn’t know the best way to disclose it.

If not a hassle, might you kindly add a SECURITY.md file with an email, or another contact method? GitHub recommends this best practice to ensure security issues are responsibly disclosed, and it would serve as a simple instruction for security researchers in the future.

Thank you for your consideration, and I look forward to hearing from you!

(cc @huntr-helper)

What is the docker compose.yaml

What is the best compose.yaml if I deploy using docker compose? Because I have to use woocommerce, I need to modify some configurations

Instructions to integrate with Saleor?

Is your feature request related to a problem? Please describe.
I want to integrate this frontend with Saleor
Describe the solution you'd like
A simple readme with how to get started would be great!
Otherwise, just some resources on how to get started will also do.
Describe alternatives you've considered
I've tried to have a look at config.js, but I guess this frontend is using a REST API and Saleor uses GraphQL, I'm new to GraphQL and can't figure out the integration.

Err at Hooks... TypeError: Cannot read properties of undefined (reading '_id')

Hey, thanks for the great project! And also happy to hire you for 20-30min to help me get it working locally and connecting to my REST API. My email [email protected] if interested. Thanks.

So, I cloned, npm install with 0 vulnerabilities and WARN derecated and then renamed to .env but didn't change there anything. When I npm run dev then all nice in console but when I open http://localhost:3000/ then I get 500 undefined in my browser and in console: https://i.imgur.com/6XIBxRG.png

I'm on Win 11 and Node v18.7.0

Documentation or Guide for integration with Medusa

I have been trying to integrate my medusa backend with this store-front app.

I would like to know if you have some documents or guide for integrations with Medusa?
Or integration with Medusa is still WIP?

Instructions for Magento 2.3

This project looks interesting for us, do you have an instructions how to integrate it with Magento 2.3? I mean how to install it globally for whole website (not for a single module)?

Documentation for Woocommerce

Please add a small documentation for Woocommerce configuration just like medusa.

Svelte Commerce seems like a great project. Many thumbs up

.prettierrc missing plugins key, uses deprecated option

Describe the bug
prettier-plugin-svelte isn't being loaded on prettier invocation because "plugins" is empty/undefined.

[warn] Ignored unknown option { svelteSortOrder: "options-styles-scripts-markup" }.
[warn] Ignored unknown option { svelteStrictMode: true }.
[warn] Ignored unknown option { svelteBracketNewLine: false }.
[warn] Ignored unknown option { svelteAllowShorthand: true }.
[warn] Ignored unknown option { svelteIndentScriptAndStyle: false }.
[error] No parser could be inferred for file "src/lib/ui/Errors.svelte".

Additionally, once the plugin is loaded, a warning indicating that the svelteBracketNewLine option is deprecated in favor of bracketSameLine appears.

To Reproduce
Steps to reproduce the behavior:

  1. Run npx prettier src/lib/ui/Errors.svelte -c
  2. Observe warning and error output:
Checking formatting...
[warn] Ignored unknown option { svelteSortOrder: "options-styles-scripts-markup" }.
[warn] Ignored unknown option { svelteStrictMode: true }.
[warn] Ignored unknown option { svelteBracketNewLine: false }.
[warn] Ignored unknown option { svelteAllowShorthand: true }.
[warn] Ignored unknown option { svelteIndentScriptAndStyle: false }.
src/lib/ui/Errors.svelte
[error] No parser could be inferred for file "src/lib/ui/Errors.svelte".
All matched files use Prettier code style!

Expected behavior

Checking formatting...
All matched files use Prettier code style!

Proposed solution

I don't work with prettier regularly, but this seems to work in my environment without issue.

diff --git a/.prettierrc b/.prettierrc
index b577b951..ff8b5f00 100644
--- a/.prettierrc
+++ b/.prettierrc
@@ -2,9 +2,10 @@
        "semi": false,
        "singleQuote": true,
        "trailingComma": "none",
+       "bracketSameLine": true,
+       "plugins": ["prettier-plugin-svelte"],
        "svelteSortOrder": "options-styles-scripts-markup",
        "svelteStrictMode": true,
-       "svelteBracketNewLine": false,
        "svelteAllowShorthand": true,
        "printWidth": 100,
        "useTabs": true,

npm i (8.19.1) not able to run dev

Not able to run dev
Not able to install dependencies fully on npm version 8.19.1

Errors which I have faced:
npm ERR! syscall read
npm ERR! errno -4077
npm ERR! network read ECONNRESET
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR!

I have tried

  • npm i
  • npm install vite
  • npm config set fetch-retry-mintimeout 20000
  • npm config set fetch-retry-maxtimeout 120000

How can I start using?
Should I try going back to npm previous version?
Any suggestion would be appreciated

Add theming feature

We need to add a theming feature so that a developer can change the look and feel of the storefront without modifying a lot of code.

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.