Skip to content

Commit

Permalink
add Storefront documentation (#2771)
Browse files Browse the repository at this point in the history
  • Loading branch information
tvikito authored Sep 14, 2023
2 parents 2b89f29 + d9fa4ad commit 3d0b9d2
Show file tree
Hide file tree
Showing 16 changed files with 2 additions and 2,239 deletions.
106 changes: 0 additions & 106 deletions storefront/BEST_PRACTICES.md

This file was deleted.

69 changes: 2 additions & 67 deletions storefront/README.md
Original file line number Diff line number Diff line change
@@ -1,68 +1,3 @@
This is documentation for Shopsys Platform StoreFront. Let's start with first two steps.
# Shopsys Platform StoreFront

## Install

1 - Install all dependencies.

```plain
pnpm install
```

## Start app

2 - Start the development server.

```plain
pnpm run dev
```

After this command open http://localhost:3000/ in your browser.

### Optional

Build the app for production.

```plain
pnpm run build
```

Run the built app in production mode.

```plain
pnpm start
```

Run eslint for code

```plain
pnpm run lint
```

Run eslint and fix code

```plain
pnpm run lint--fix
```

Run prettier format code

```plain
pnpm run format
```

Run translation files generator. You can find generated files in /public/locales/ folder.

```plain
pnpm run translate
```

## Development

### Generated GraphQL requests

Requests to API are generated by [GraphQl Code Generator](https://www.graphql-code-generator.com/). The definitions of queries/mutations/fragments are stored in `./graphql/requests`.

After some changes to API you need to regenerate hooks and types, so it's in sync with current state of Frontend API: This is automatically checked on the CI pipeline. If the hooks and types are not regenerated, the pipeline fails.

1. Run `php phing frontend-api-generate-graphql-schema` inside php-fpm container
2. Run `pnpm run gql:codegen` in storefront container
Storefront documentation is available in the documentation of Shopsys Platform in the section [Storefront](https://docs.shopsys.com/storefront).
63 changes: 0 additions & 63 deletions storefront/docs/authentication.md

This file was deleted.

27 changes: 0 additions & 27 deletions storefront/docs/coding-standards.md

This file was deleted.

Loading

0 comments on commit 3d0b9d2

Please sign in to comment.