ℹ️ Full documentation can be found Here
In order to get you started quickly with your demo, we made read CSV import files that you can import in merchant center to populate it with sample data.
-
Install the
Frontastic-CLI
.brew tap frontasticgmbh/tap && brew install frontastic-cli
-
Initialize the
Frontastic-CLI
.frontastic init
-
Install project dependencies. This installs both frontend and backend dependencies.
frontastic install
-
Under
/packages/home/frontend
create a.env.local
file with keys from.env.dist
and populate with your own values.
⚠️ .env.local
is gitignored and this should not change. In production environments you should set these variables using Netlify environment variables.NEXT_PUBLIC_FRONTASTIC_HOST=https://home-thegoodstore.frontastic.io/frontastic NEXT_PUBLIC_FRONTASTIC_API_KEY= NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=dlwdq84ig SITE_URL= NEXT_PUBLIC_GA_TRACKING_ID=GTM-NWT2CTF NEXT_PUBLIC_ALGOLIA_APPLICATION_ID= NEXT_PUBLIC_ALGOLIA_SEARCH_API_KEY= NEXT_PUBLIC_ALGOLIA_PRODUCTS_INDEX=test_TheGoodStore NEXT_PUBLIC_ALGOLIA_PRODUCTS_QUERY_SUGGESTIONS_INDEX=test_TheGoodStore_query_suggestions NEXT_PUBLIC_ADYEN_CLIENT_KEY=
Next step depends wether you want to work on the backend or the frontend.
-
cd
into frontend working directory.cd /packages/home/frontend
-
Start the project in development mode.
yarn dev
-
Launch storybook.
yarn storybook
-
From the project's root run
frontastic run
- NextJs for the fastest and the best development experience 💥
- Typescript for a strong typed and bug-free code 🐛
- TailwindCSS for the easiest and the most customizable styling 😻
- NodeJs for a blazing fast response time from the extensions ⚡
- commercetools Composable Commerce (CoCo) is our e-commerce suite 💼
- Algolia for the fastest real time search experience ⚡
- Adyen for fast and secure payments 🔒
.
├── algolia # Algolia related configurations
├── components
│ ├── commercetools-ui # UI components
│ ├── headless # Components with no UI
│ ├── HOC # Higher order components
├── context # Global providers
├── frontastic
│ ├── hooks # Data fetching & mutation hooks
│ ├── lib # Library sepcific code
│ ├── provider
│ │ └── Frontastic # Main provider
│ └── tastics # Tastic components
├── helpers
│ ├── constants # Constants
│ ├── hooks # Custom hooks
│ ├── mappers # Data transformation
│ ├── mocks # Mocks & placeholders
│ └── utils # Utility functions
├── pages
│ ├── __preview # Preview
│ ├── sitemap-categories.xml # Ctageories sitemap
│ ├── sitemap-products.xml # Products sitemap
│ ├── sitemap-static.xml # Structure sitemap
│ └── verify # Account verification
├── public # Public assets
├── sdk # SDK instance
├── styles # Global styling
└── types # Types
next.config.js
: Main configuration for NextJsnext-i18next.config.js
Configuration for internationalizationnext-sitemap.config.js
Configuration for generating sitemapstailwind.config.js
Configuration for TailwindCSSprettier.config.js
Configuration for prettier.eslintrc.json
Configuration for EsLintnetlify.toml
Configuration for Netifyproject.config.js
Project specific configurations
-
Run linter to detect or auto fix code errors and presist a consistent code styling
yarn fix
-
Run the
build
command. This will build the project and generate sitemaps and robots.txt file.yarn build
If you want to deploy your project. All you have to do is push to master and Netlify will automatically start building your project.
ℹ️ If you want to manually trigger a build based on the latest commit on master you can do it from Netlify. For more information refer to this documentation.