Based on DPC Turbo Starter Project: RTKQ
It contains a NextJS App with a UI Library package. As well as packages for Typescript definitions and Redux toolkit. It also containg examples of using RTK Query for API fetching.
-
Initialize git and make the first commit
git init -b main
git add .
git commit -m "chore: Project created"
-
Connect a remote repository and push to it.
git remote add origin <LINK TO REPO>
git push
-
Setup CI/CD
-
Implement the project :-)
-
The web app (@profilur/web) - /apps/web
-
UI lib (@profilur/web-ui) - /packages/ui/web-ui
-
Typescript (@profilur/types) - /packages/core/types
-
Redux Toolkit (@profilur/store) - /packages/core/store
-
RTK Query - (@profilur/api) - /packages/core/api
-
API Mocking (MSW) - @profilur/api-mocks- /packages/core-api-mocks
-
Example API - @profilur/example-api- /packages/addons/example-api
-
Example Mocked API - @profilur/example-api-mocks- /packages/addons/example-api-mocks
First of course is to install all packages:
yarn install
Mocking is turned on by default for dev environment and off for production builds. Global flag is set in files /apps/web/.env and /apps/web/.env.development respectively. Mocking is also set on a per api level in /packages/core/api-mocks/src/handlers.ts
To start server:
yarn dev:web
Available at http://localhost:3000
yarn dev:storybook
Available at http://localhost:6006
yarn build:web
Generated app can be found at: /apps/web/.next
yarn build:storybook
Generated app can be found at: /packages/ui/web/storybook-static
For questions contact bjorn.allvin@accenture.com