Skip to content

Commit

Permalink
feat: add web example and getting started doc
Browse files Browse the repository at this point in the history
  • Loading branch information
pahaz committed Jun 8, 2024
1 parent 7e8e283 commit e10f39e
Show file tree
Hide file tree
Showing 7 changed files with 12,698 additions and 59 deletions.
1 change: 1 addition & 0 deletions apps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ All applications are stored here.

You can use a microservice approach or a traditional monolith approach.
But we strongly recommend separating your API from the front-end application.

4 changes: 4 additions & 0 deletions apps/web/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# `web`

Simple Front-End WEB app example

32 changes: 32 additions & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "web",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "next dev --port 3000",
"build": "next build",
"start": "next start",
"test": "jest .",
"lint": "eslint . --max-warnings 0"
},
"dependencies": {
"@repo/i18n": "workspace:*",
"@repo/ui": "workspace:*"
},
"peerDependencies": {
"@turbo/gen": "^1.13.3",
"@types/eslint": "^8.56.10",
"@types/node": "^20.12.8",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"eslint": "^8.57.0",
"next": "^14.2.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"typescript": "^5.4.5"
},
"devDependencies": {
"@repo/eslint-config": "workspace:*",
"@repo/typescript-config": "workspace:*"
}
}
Binary file added docs/_img/00-use-template-screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
- [x] Monorepo: prepare /packages/* and /apps/* folders
- [x] Monorepo: requirements tree : /packages/* and /apps/* depends on /package.json
- [x] Monorepo: reusable UI package example: /packages/ui
- [ ] Monorepo: docs how to add app or package
- [x] Monorepo: docs how to add app or package
- [x] Monorepo: TypeScript support
- [x] Monorepo: add README.md for all packages
- [x] NextJs: init with SSR (app router) + React Server Components
- [x] Antd: init Ant Design support with custom theme
- [ ] CI: run tests
- [ ] CI: test build
- [ ] CI: linters
- [ ] i18n: init internationalization support
- [x] CI: linters
- [x] i18n: init internationalization support
- [ ] i18n: add Antd i18n support
- [ ] Docker: docker-compose file for deploy and local development
- [ ] Docker: docker-compose docs
Expand Down
17 changes: 14 additions & 3 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
# Init your own monorepo

You should have `docker-compose`, `git` and `node` commands.
You can create a fork of [boilerplate](https://github.com/8iq/nodejs-hackathon-boilerplate-starter-kit) by click on github `Use Template` button or fork the repo.
You can create a fork of [boilerplate](https://github.com/8iq/nodejs-hackathon-boilerplate-starter-kit)
by click on GitHub `Use Template` button or fork the repo.

![use template click](./_img/00-use-template-screen.png)

```bash
# 1) Fork https://github.com/8iq/nodejs-hackathon-boilerplate-starter-kit
# 1) Click `Use Template`: https://github.com/8iq/nodejs-hackathon-boilerplate-starter-kit

# 2) Clone your fork!
# 2) Clone your repo!
git clone [email protected]:USERNAME/REPOSITORY.git my-new-startup
cd my-new-startup

# 3) Install dependencies and link workspaces
yarn
```

# create new package

Just use `turbo gen workspace` to create a new package

# create new app

Just use `turbo gen workspace --copy ./apps/web` to create a new app
Loading

0 comments on commit e10f39e

Please sign in to comment.