From 8022c82c91b50055c1afd96008bc014bc297bb66 Mon Sep 17 00:00:00 2001 From: Andrij Orlenko <94047334+lotyp@users.noreply.github.com> Date: Wed, 11 Jan 2023 16:49:58 +0200 Subject: [PATCH] docs: adding guide, readme refactor (#44) --- Makefile | 2 +- README.md | 166 ++++++++-------------- apps/docs/.secretlintignore | 2 + apps/docs/pages/guide/getting-started.mdx | 23 +++ apps/docs/theme.config.tsx | 5 +- assets/vb-logo.png | Bin 0 -> 4499 bytes 6 files changed, 90 insertions(+), 108 deletions(-) create mode 100644 apps/docs/.secretlintignore create mode 100644 assets/vb-logo.png diff --git a/Makefile b/Makefile index c70c3986..95c88c93 100644 --- a/Makefile +++ b/Makefile @@ -80,7 +80,7 @@ help: ## Show this menu # Default action # Defines default command when `make` is executed without additional parameters # ------------------------------------------------------------------------------------ -all: install hooks up +all: install hooks .PHONY: all diff --git a/README.md b/README.md index 9845522a..1747a88d 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,14 @@ -

+
+View Documentation / Demo +
+
Build Status GitHub package.json version @@ -19,7 +22,6 @@ Code Climate technical debt Code Climate coverage
-
# NextJS Starter Template @@ -43,12 +45,24 @@ You can use it with the backend template, written in Laravel — [laravel-starte This turborepo uses [pnpm](https://pnpm.io) as a package manager. It includes the following packages/apps: +### → Structure + +```bash +. +├── apps +│ ├── web (nextjs app - i18n, ssr, api, jest, cypress) +│ └── docs (nextra app) +└── packages + ├── common-i18n (locales...) + ├── jest-config (shared jest configs) + ├── eslint-config-custom (shared eslint configs) + └── ui (react stub components) +``` + ### → Apps - `docs`: a [Nextra](https://nextra.site/) documentation template generated from [Nextra: Docs Starter Kit](https://vercel.com/templates/next.js/documentation-starter-kit) - - [DEMO docs app](https://next-starter-tpl-docs.vercel.app/) - - `web`: [Next.js](https://nextjs.org/) app with tailwindcss and sentry support - [DEMO web app](https://next-starter-tpl-web.vercel.app/) @@ -101,117 +115,22 @@ This repository has some additional tools already setup for you:
-## 💿 Installation +## 💿 Installation and Usage > Warning: Repository with [docker-shared-services](https://github.com/wayofdev/docker-shared-services) should be configured, up and running, to ensure system wide TLS and DNS support. -### → Instructions - -- First, setup, for this repository, compatible backend by following instructions in [laravel-starter-tpl](https://github.com/wayofdev/laravel-starter-tpl) - -- After backend is set up done, clone this repository: - - ```bash - git@github.com:wayofdev/next-starter-tpl.git - ``` - -- Create `.env` file: - - ```bash - $ make env \ - APP_NAME=tpl \ - SYSTEM_SERVICES_NAMESPACE=ss \ - PROJECT_SERVICES_NAMESPACE=wod - ``` - -- Build, install and run application: - - ```bash - make - ``` - -- Now, project is running, and, if default settings were used, available at [https://tpl.wod.docker](https://tpl.wod.docker) - -
- -## 💻 Usage - -### → Build - -To build all apps and packages, run the following command: - -```bash -# with makefile, through Docker -$ make build - -# or, directly, without docker, using system binaries -$ pnpm run build -``` - -
- -### → Develop - -To develop all apps and packages, run the following command: - -```bash -# with makefile, through Docker -$ make up - -# or, directly, without docker, using system binaries -$ pnpm run dev -``` - -
- -### → Remote Caching - -Turborepo can use a technique known as [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching) to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines. - -By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can [create one](https://vercel.com/signup), then enter the following commands: - -```bash -# with makefile -$ make turbo-login - -# directly -$ pnpm dlx turbo login -``` - -This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview). - -Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your turborepo: - -```bash -# with makefile -$ make turbo-link - -# directly -$ pnpm dlx turbo link -``` - -
- -## 🧪 Testing - -You can check `Makefile` or `package.json` to get full list of commands for local testing. For testing, you can use these commands to test: - -```bash -make test -``` +**[Follow getting-started guide in documentation](https://next-starter-tpl-docs.wayof.dev/guide/getting-started)** 🔗
## 🤝 License [![Licence](https://img.shields.io/github/license/wayofdev/next-starter-tpl?style=for-the-badge&color=blue)](./LICENSE) -[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwayofdev%2Fnext-starter-tpl.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fwayofdev%2Fnext-starter-tpl?ref=badge_shield) - -
- [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwayofdev%2Fnext-starter-tpl.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fwayofdev%2Fnext-starter-tpl?ref=badge_large) +
+ ## 🧱 Credits and Useful Resources Based on [nextjs-monorepo-example](https://github.com/belgattitude/nextjs-monorepo-example) template from [belgattitude](https://github.com/belgattitude). @@ -256,4 +175,43 @@ This repository was created in **2022** by [lotyp / wayofdev](https://github.com Contributors -
\ No newline at end of file +
+ +## 🤑 Sponsors + + + + + + + + + + + +
+ + Reproto Logo
+
Reproto

+ 🎖️ Financial Support +
+ + Vercel Logo
+
Vercel

+ ☁️ Infrastructure Support +
+ + Sentry Logo
+
Sentry

+ ☁️ Infrastructure Support +
+ + ZenHub Logo
+
ZenHub

+ ☁️ Infrastructure Support +
+ + Blank Logo
+

+ +
diff --git a/apps/docs/.secretlintignore b/apps/docs/.secretlintignore new file mode 100644 index 00000000..b1dbbf8d --- /dev/null +++ b/apps/docs/.secretlintignore @@ -0,0 +1,2 @@ +# next.js build output +.next diff --git a/apps/docs/pages/guide/getting-started.mdx b/apps/docs/pages/guide/getting-started.mdx index ad588e01..e23d13c6 100644 --- a/apps/docs/pages/guide/getting-started.mdx +++ b/apps/docs/pages/guide/getting-started.mdx @@ -109,4 +109,27 @@ $ make env \ Change generated `.env` file to match your needs, if needed. +### → Install Dependencies + +This command will install all dependencies, through docker container, for this mono-repo and all dependencies. + +```bash +# default action - runs `make install` and setups git hooks +$ make + +# or, run each step separately +$ make install +$ make hooks +``` + +### → Run docker container in dev mode + +This command will start docker container in dev mode, with hot reloading enabled. + +```bash +make up +``` + +Project can be accessed at [tpl.docker](https://tpl.docker) + diff --git a/apps/docs/theme.config.tsx b/apps/docs/theme.config.tsx index 8c10fbc1..e767cee1 100644 --- a/apps/docs/theme.config.tsx +++ b/apps/docs/theme.config.tsx @@ -1,5 +1,5 @@ import type { DocsThemeConfig } from 'nextra-theme-docs' -import React from 'react' +import { Fragment } from 'react' const config: DocsThemeConfig = { i18n: [{ locale: 'en-US', text: 'English' }], @@ -15,8 +15,7 @@ const config: DocsThemeConfig = { text: 'NextJS Starter Tpl', }, toc: { - extraContent: , - float: true, + extraContent: , }, useNextSeoProps() { return { diff --git a/assets/vb-logo.png b/assets/vb-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..08c60dbd11b513f2315455e8b9779845e2ba56a2 GIT binary patch literal 4499 zcmb`Lg;!Kv7sk)b00Yt?N{Z+J(ny2AP}1?z5-NFbeB_%BqigdlGbj(Nzf`Cd& zmxR(?GvE0B4c}SouCw?4J^Q(5-Fxo6Yu#9VT{X%p%vS&alp5+P1^_?_Arz3p2vcYA z?Owtps;_ONdXw|!?~RR@iHTz)BkK26d3kwJ78ZCszP7q5z}Hvd-aTh7O83kbnuaxX z4#k_cH0TW0Iyed>(D!WbW9*GlQe!v2{Gcb;{GW%-cTC_6rpL9FX}s}6gY}y>JeX~0 zKJIZ1yFT97vWiza$8Ws`tzxJpHTXPUI)c0n7Wj+Erlm`q{gc)rDGiz{zvfNgLSkjk ze#<6vew#<9++%Uv!w6?oE1$Zs{$V{buKpiVOt)lUh2-o z^M&hlHEm~j$TABR4SMRG7Wyi>z6{%d%Ei;p-;=OmN^|mAK8<4hdW@&{+wPp%L2*ZI%A{4!gO%+B>B53hH%c#GTH@* zx-5Mw0z^&Dq-4XA7kWvLaRWHo+tUo;$+oQ5+0lY>mj$HAPB*j6yl{OcF6cBExTIa4 zW@uLizhKEhTv>qP7h^XWHp&+!JPyz1hLRzbZ_uFOt0Xoaip$oSc>&C3CkS*VRUH{N zAVBbBi~dPb!-zGTM1>P6y3It?aE=l!mtw|R?5B==4kq%yiL!Lgpz8BER=mse(G-xA zrGSnB%YQ9q!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