Git Product home page Git Product logo

bitcart-admin's Introduction

Bitcart

Github All Contributors CircleCI Codecov Python versions

Bitcart is a platform for merchants, users and developers which offers easy setup and use.

Linked repositories

Our ecosystem consists of a few packages, this is our central repository.

It is recommended to propose feature requests to Bitcart ecosystem as a whole on that repository.

Full list of our repositories:

https://github.com/bitcart/bitcart - Bitcart Core Daemons and Merchants API

https://github.com/bitcart/bitcart-admin - The admin panel of Bitcart

https://github.com/bitcart/bitcart-store - Bitcart ready store

https://github.com/bitcart/bitcart-docker - Docker packaging, base for all deployment methods

https://github.com/bitcart/bitcart-sdk - Python library for coins connection

https://github.com/bitcart/bitccl - The BitCCL scripting language for checkout flow automation

https://github.com/bitcart/bitcart-docs - Bitcart documentation

https://github.com/bitcart/bitcart-site - Bitcart official site

Docs

Docs are available at https://docs.bitcart.ai or in our docs repository

Contributing

See our contributing guidelines for details.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

MrNaif2018
MrNaif2018

🚧 💻 📖 🎨
tomasmor42
tomasmor42

💻
Yağız Değirmenci
Yağız Değirmenci

💻
Weidong Sun
Weidong Sun

💻
kartecianos
kartecianos

💻
CYBORG
CYBORG

🎨
Saksham Singh
Saksham Singh

🎨
Orestis Charalampakos
Orestis Charalampakos

🎨 💻
TobyAsE
TobyAsE

💻 🎨
Shadman Ahmed
Shadman Ahmed

🎨
Karol Trzeszczkowski
Karol Trzeszczkowski

💻
Maxime Koitsalu
Maxime Koitsalu

💻 🎨
Shubham-Singh-Rajput
Shubham-Singh-Rajput

🌍
Nicolás Giacconi
Nicolás Giacconi

💻 🎨
leovoon
leovoon

💻 🎨 ️️️️♿️
Mustapha Nezzari
Mustapha Nezzari

🌍
surfer190
surfer190

📖
restyler
restyler

📖
gruve-p
gruve-p

💻
g00g1
g00g1

💻
RAVAAN
RAVAAN

🛡️

This project follows the all-contributors specification. Contributions of any kind welcome!

Copyright and License

Copyright (C) 2019 MrNaif2018

Licensed under the MIT license

bitcart-admin's People

Contributors

arynn-gupta avatar d-maksimenko avatar dependabot-preview[bot] avatar dependabot[bot] avatar mrnaif2018 avatar mrnaif2022 avatar renovate[bot] avatar restyler 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

Watchers

 avatar  avatar  avatar

bitcart-admin's Issues

Add pre-commit

Pre-commit hooks should be added, documented and applied as we did in all our python repositories.
Pre-commit hooks are to be added by pre-commit app: https://pre-commit.com/
See those pull requests for reference: bitcart/bitcart#238, bitcart/bitcart-sdk#32, bitcart/bitccl#13

Of course, python-related tasks should be removed, and a set of rules for js repos should be created. Pre-commit checks should run most basic checks for file consistency (newlines, trailing whitespaces, etc), also probably eslint with our config (so that it runs prettier too) and any other useful checks for js code

We currently use husky for pre-commit hooks. Preferably pre-commit would also run the linting run by husky, or just run husky itself

The main issue is to make pre-commit use versions from package.json without manually specifying them in it's config file

Important: the pull request will be merged without squash, so please try to make it like reference PRs, first commit adding the pre-commit config, and in next commits applying fixers one by one, and in last commits documenting it and adding to CI. To add to CI you can use bitcartcc/lint action by our bitcartcc/bitcartcc-shared orb. See other pull requests for reference

Set up javascript, vue and UI testing

Currently we only run eslint linting by yarn lint:
https://github.com/bitcartcc/bitcart-admin/blob/6a3e10391ef22dead01e0b9a65a2dba393ccdc4c/package.json#L12
To get to 1.0 release, we need a stable test suite to test that UI doesn't break without checking it manually (for example when upgrading one image input library it got broken and got into release, so I had to fix it later manually)
I am not an expert in javascript apps (and vue apps) testing, so any help welcome
We need a few categories of tests set up:

  1. Unit tests. I heard that jest is often used for this. We may test some utility functions and so on. For code coverage codecov is to be used of course.
  2. Integration tests: something that may be tested on a real API. This could either use our demo merchants api instance (https://api.bitcartcc.com), or better, it would start the most recent changes from bitcart master repo in docker
  3. End to end tests and snapshot testing. This type of testing is the most important one. Something like selenium could be used, or better-suiting libraries for that in js world. It would test that UI works as expected.
    This would then be added to our CI. If you need help in adding it, you can just implement the tests and I can add that to CI.
    First of all we need to scaffold the initial infrastructure for that, then add those test types and start adding new tests. This issue can yield a lot of pull requests because there are a lot of tests to add or set up.

Improve handling of unaccessible API and document it

Currently the UX for both new contributors and users experiencing issues accessing the Merchants API is not optimal, all they see is connection refused error:
изображение
It is caused by fetching done in server side (on client side it will just fail request so it doesn't matter).
We fetch API policies to configure some essential settings for store operations, and most store pages require those variables set.
Instead of erroring out, the page being accessed (so this should probably be implemented in layouts to make it work on all pages) should display a message that it was not possible to reach Merchants API and provide hints on how to fix the issue: either it is not started or BITCART_ADMIN_API_URL is set to an invalid value

Some hints on how it works:
Nuxt config is used to load API url from env variable here:
https://github.com/bitcartcc/bitcart-admin/blob/6a3e10391ef22dead01e0b9a65a2dba393ccdc4c/nuxt.config.js#L62
It is loaded in nuxtServerInit:
https://github.com/bitcartcc/bitcart-admin/blob/6a3e10391ef22dead01e0b9a65a2dba393ccdc4c/store/index.js#L45
3 requests on server side are made in nuxtServerInit, they should be handled:
https://github.com/bitcartcc/bitcart-admin/blob/6a3e10391ef22dead01e0b9a65a2dba393ccdc4c/store/index.js#L46-L48

Also it is required to add to the documentation (CONTRIBUTING.md) how to set up api for development, see this comment for reference (replace STORE with ADMIN in env variable name)

Unable to proceed a payment with metamask option.

Version of BitcartCC: 0.7.4.1
Your operating system: MacOS 12.5 | Linux Debian
Deployment method: Docker

Reproducible steps:

  1. Setup an EVM related payment token (ETH, MATIC, AVALANCHE) etc.
  2. Have metamask installed and changed to the correct network
  3. Create an invoice and try to pay with the above token.
  4. Try to pay with metamask
  5. Error appears

What you expected to see, versus what you actually saw:
Expected to proceed with the payment with metamask, open metamask extension popup.
Actually saw the following error
Please change your network in metamask to work on the MATIC network (chain id 137)

Screen Shot 2023-08-12 at 6 46 17 PM

Add ability to customize admin UI (theming support)

Similar to bitcart/bitcart-store#319

We are taking the same approach: css variables.
It needs to be researched whether vuetify can generate those variables for css files to change colors at runtime

TODO:

  • Implement initial theming support via vuetify's css vars support
  • Make sure all external UI components also follow theme colors
  • Load theme css file from theme_settings.admin_theme_url of the store, see bitcart/bitcart#244
  • Research for any vuetify analogues to bootswatch

Initially, at least customizing checkout page is our goal. Later whole admin UI could be made customizeable

Set up internalization and translate the admin panel

We need to set up internalization infastructure on admin panel.
Initially, translating only checkout page is enough. Later we can translate the whole panel.
Steps to do it:

  • Set up nuxt/i18n. See this commit and further ones to see how we did it for bitcartcc store
  • Setup transifex resource. I will do it when initial setup is done
  • Start translating checkout page. The translation process should look the same as in bitcart/bitcart-site#86
  • Try translating the whole admin panel. This would mean to change vuetify locale too, as it has some locales supported.

Making all admin pages responsive

Some pages, like toolbars in management panel, aren't responsive on mobile.
image
Also, toolbars don't have any borders in production, while in developer environment they have borders (as it should be).
image

Admin panel work

Help is appreciated.
Currently we have the following design:
изображение
изображение
The task is to port https://demo.bitcartcc.com design or similar to vuetify.
Screen of old admin:
изображение

Card texts might be fixed to be more fit in this design in both dark and light modes.
After finishing design, actual functionality should be added, loading data from Backend API.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Pending Approval

These branches will be created by Renovate only once you click their checkbox below.

  • Update dependency eslint to v9
  • Update dependency vue to v3
  • Update dependency vuetify to v3
  • Update nuxt packages (major) (@nuxtjs/device, @nuxtjs/eslint-config, @nuxtjs/eslint-module, nuxt)
  • 🔐 Create all pending approval PRs at once 🔐

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

circleci
.circleci/config.yml
dockerfile
Dockerfile
  • node 20-alpine
npm
modules/@bitcart/core/package.json
package.json
  • @chenfengyuan/vue-qrcode ^1.0.1
  • @ergonode/vuems ^1.1.0
  • @hcaptcha/vue-hcaptcha ^1.3.0
  • @nuxtjs/auth ^4.9.0
  • @nuxtjs/axios ^5.12.5
  • @nuxtjs/router ^1.7.0
  • express ^4.18.1
  • nuxt-start ^2.15.1
  • socks-proxy-agent ^8.0.0
  • @babel/eslint-parser ^7.16.5
  • @nuxtjs/device ^2.1.0
  • @nuxtjs/eslint-config ^10.0.0
  • @nuxtjs/eslint-module ^3.0.0
  • @nuxtjs/pwa ^3.3.4
  • @nuxtjs/vuetify ^1.11.3
  • eslint ^8.0.0
  • eslint-config-prettier ^9.0.0
  • eslint-plugin-nuxt >=2.0.0
  • eslint-plugin-prettier ^5.0.0
  • lodash.debounce ^4.0.8
  • lodash.merge ^4.6.2
  • lodash.mergewith ^4.6.2
  • nuxt ^2.15.1
  • prettier ^3.0
  • vuetify ~2.7.0
  • vuetify-datetime-picker ^2.1.1
  • vuetify-image-input 19.2.2
  • vue <2.7
  • vue-server-renderer <2.7
  • vue-template-compiler <2.7
  • vuetify-loader 1.7.3

  • Check this box to trigger a request for Renovate to run again on this repository

Set up formatting guidelines

Currently, we don't have any formatting set up (I format code with vscode eslint extension, but it isn't a formatter actually).
We should create something like https://github.com/bitcartcc/bitcart/blob/master/CODING_STANDARDS.md#formatting, but for vue repos.
What are the choices available? Prettier, for example?
Last time I used it, it was formatting files in a weird way, but it's probably opinionated.
Ideally our formatter we'll use should be like black in python - https://github.com/psf/black - almost no configuration, but sensible, good for readability choices.
We'll need the formatter we choose to be able to check if files are formatted correctly - we need it as a part of our CI process.
P.S. @orestischaral you may want to take a look at it

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.