mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-26 06:47:17 +10:00
Merge pull request #820 from sharetribe/app-rename
Remove occurrences of 'Starter App'
This commit is contained in:
commit
42000675aa
9 changed files with 28 additions and 27 deletions
|
|
@ -6,8 +6,8 @@ According to [MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP):
|
|||
> certain types of attacks, including Cross Site Scripting (XSS) and data injection attacks. These
|
||||
> attacks are used for everything from data theft to site defacement or distribution of malware.
|
||||
|
||||
This document describes how to use a CSP with the Starter App. By default the CSP is disabled. By
|
||||
turning it on, the default whitelist in [server/csp.js](../server/csp.js) works with the all the
|
||||
This document describes how to use a CSP with the Flex template app. By default the CSP is disabled.
|
||||
By turning it on, the default whitelist in [server/csp.js](../server/csp.js) works with the all the
|
||||
URLs and tools that come with the application.
|
||||
|
||||
## Setup
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Environment configuration variables
|
||||
|
||||
The following configuration variables can be set to control the Starter App behaviour. Most of them
|
||||
have defaults that work for development environment. For production deploys most should be set.
|
||||
The following configuration variables can be set to control the Flex template app behaviour. Most of
|
||||
them have defaults that work for development environment. For production deploys most should be set.
|
||||
|
||||
| Variable | Description |
|
||||
| ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
|
||||
|
|
@ -25,7 +25,7 @@ have defaults that work for development environment. For production deploys most
|
|||
|
||||
## Defining configuration
|
||||
|
||||
When the Starter App is started locally with `yarn run dev` or `yarn run dev-server`, you can set
|
||||
When the app is started locally with `yarn run dev` or `yarn run dev-server`, you can set
|
||||
environment variables by using the (gitignored) `.env` file. The repository contains a template file
|
||||
`.env-template` with default configuration. Just copy that as `.env` and edit as necessary.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Google Maps
|
||||
|
||||
Starter App uses the Google Maps API for showing a map and in searching locations in the search
|
||||
autocompletion. This document describes how to setup the API key for the API requests to work
|
||||
properly.
|
||||
The Flex template for web uses the Google Maps API for showing a map and in searching locations in
|
||||
the search autocompletion. This document describes how to setup the API key for the API requests to
|
||||
work properly.
|
||||
|
||||
## Generate a Google Maps API key
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,10 @@ filters rely on listing's indexed data.
|
|||
|
||||
## Filter types
|
||||
|
||||
The Starter App has two different filter types: _select single_ and _select multiple_. The _select
|
||||
single_ one can be used to filter out search result with only one value per search parameter. The
|
||||
_select multiple_ filters on the other hand can take multiple values for a single search parameter.
|
||||
The Flex template for web has two different filter types: _select single_ and _select multiple_. The
|
||||
_select single_ one can be used to filter out search result with only one value per search
|
||||
parameter. The _select multiple_ filters on the other hand can take multiple values for a single
|
||||
search parameter.
|
||||
|
||||
These two filter types are implemented with four different components, a standard and a plain one:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Error logging with Sentry
|
||||
|
||||
The Starter App supports error logging with [Sentry](https://sentry.io/) out of the box provided
|
||||
that required environment variables are set in place. Other logging solutions can also be used but
|
||||
the Sentry client comes already strapped into the Starter App.
|
||||
The Flex template application supports error logging with [Sentry](https://sentry.io/) out of the
|
||||
box provided that required environment variables are set in place. Other logging solutions can also
|
||||
be used but the Sentry client comes already strapped into application.
|
||||
|
||||
## Setting up Sentry keys
|
||||
|
||||
|
|
@ -17,8 +17,8 @@ they can be passed for example to the `yarn run dev-server` command:
|
|||
|
||||
REACT_APP_PUBLIC_SENTRY_DSN='<public-sentry-dsn>' SERVER_SENTRY_DSN='<private-sentry-dsn>' yarn run dev-server
|
||||
|
||||
If the Sentry DSN keys are not provided Starter App will log errors to the console. The logging and
|
||||
Sentry setup is implemented in [util/log.js](../src/util/log.js) and
|
||||
If the Sentry DSN keys are not provided the template app will log errors to the console. The logging
|
||||
and Sentry setup is implemented in [util/log.js](../src/util/log.js) and
|
||||
[server/log.js](../server/log.js) so refer to those files to change the external logging service or
|
||||
the logging logic in general.
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ the logging logic in general.
|
|||
By default Sentry fetches the source maps for minified javascript files. However, this might now
|
||||
work in case some sort of authentication, e.g. basic auth, is required to reach your application. To
|
||||
circumvent this a security token can be configured to Sentry. Sentry then adds this token to the
|
||||
source maps request header so that the server hosting Starter App can then be configured to let
|
||||
source maps request header so that the server hosting the marketplace can then be configured to let
|
||||
those requests access the source maps.
|
||||
|
||||
For basic auth the security token can be configured as follows:
|
||||
|
|
|
|||
|
|
@ -104,8 +104,8 @@ After that we need to import some components:
|
|||
|
||||
* `LayoutSingleColumn` and wrappers that it needs to position content
|
||||
* `Footer` component (to be added inside LayoutWrapperFooter)
|
||||
* `NamedLink` makes it easier to point to different pages inside Starter app
|
||||
* `ExternalLink` can be used to link outside of Starter app. It creates a normal `<a>`link with
|
||||
* `NamedLink` makes it easier to point to different pages inside the application
|
||||
* `ExternalLink` can be used to link outside the application. It creates a normal `<a>`link with
|
||||
extra attributes `target="_blank" rel="noopener noreferrer"` that add some security to these
|
||||
outbound links.
|
||||
|
||||
|
|
@ -219,8 +219,8 @@ to import new components easily with `import { AboutPage } from '../../component
|
|||
|
||||
## 7. Adding a route to the page
|
||||
|
||||
As a last step you need to add the newly created static page to Starter apps routing. This can be
|
||||
done in `src/routeConfiguration.js`.
|
||||
As a last step you need to add the newly created static page to the routing. This can be done in
|
||||
`src/routeConfiguration.js`.
|
||||
|
||||
Inside routeConfiguration function you should add a URL path, a page name (it should not conflicting
|
||||
with other pages), and the component itself.
|
||||
|
|
@ -254,5 +254,5 @@ We are using several libraries in this example. If you want to read more, here's
|
|||
* [JSX](https://reactjs.org/docs/introducing-jsx.html): for getting HTML-like markup syntax for own
|
||||
components
|
||||
* [CSS Modules](https://github.com/css-modules/css-modules)
|
||||
* [React Router](https://reacttraining.com/react-router/web/guides/philosophy): routing inside
|
||||
Starter app pages.
|
||||
* [React Router](https://reacttraining.com/react-router/web/guides/philosophy): routing inside the
|
||||
application.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Sharetribe Starter App Testing
|
||||
# Testing Flex template for the web
|
||||
|
||||
The test setup is based on the `create-react-app` test setup and is using the
|
||||
[Jest testing framework](https://facebook.github.io/jest/). See the
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Error logging for the Starter App server. Can be used to
|
||||
* Error logging for the Flex template server. Can be used to
|
||||
* strap on an external error logging service like Sentry
|
||||
* or just plain printing errors to the log.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -292,7 +292,7 @@ const routeConfiguration = () => {
|
|||
|
||||
// Do not change this path!
|
||||
//
|
||||
// The API expects that the Starter App implements /reset-password endpoint
|
||||
// The API expects that the application implements /reset-password endpoint
|
||||
{
|
||||
path: '/reset-password',
|
||||
name: 'PasswordResetPage',
|
||||
|
|
@ -301,7 +301,7 @@ const routeConfiguration = () => {
|
|||
|
||||
// Do not change this path!
|
||||
//
|
||||
// The API expects that the Starter App implements /verify-email endpoint
|
||||
// The API expects that the application implements /verify-email endpoint
|
||||
{
|
||||
path: '/verify-email',
|
||||
name: 'EmailVerificationPage',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue