Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #23

Merged
merged 26 commits into from
May 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
4057c36
Test: Fix1 Move workflow to root folder
SanjeebLama Apr 21, 2023
674695b
Fix2: workflow
SanjeebLama Apr 21, 2023
82ec98a
Fix3: Deployement workflow
SanjeebLama Apr 21, 2023
a1742e9
Update main.yml
SanjeebLama Apr 21, 2023
406b7c9
Fix4: Deployement workflow
SanjeebLama Apr 21, 2023
f27117e
Fix5: Deployement workflow
SanjeebLama Apr 21, 2023
8ba2321
Update main.yml
SanjeebLama Apr 21, 2023
45fbda5
Fix9: Deployement workflow
SanjeebLama Apr 21, 2023
a33ac82
Fix-10: Deployement workflow
SanjeebLama Apr 21, 2023
08a6e09
Fix-11: Deployement workflow
SanjeebLama Apr 21, 2023
9db7a78
Fix-12: Deployement workflow
SanjeebLama Apr 21, 2023
86b3c02
Fix-13: Deployement workflow
SanjeebLama Apr 21, 2023
9a9e62c
Fix-14: Deployement workflow
SanjeebLama Apr 21, 2023
3bded9f
Fix-15: Deployement workflow
SanjeebLama Apr 21, 2023
16da0f1
add yarn run build command
Apr 24, 2023
3365cdb
Update main.yml - Only build in vercel
SanjeebLama Apr 24, 2023
b47e2ea
Update main.yml
SanjeebLama Apr 24, 2023
4fa302e
Fix-19: Deployement workflow
SanjeebLama Apr 24, 2023
771c8a1
Update main.yml
SanjeebLama Apr 24, 2023
0800d0e
Fix-20: Deployement workflow
SanjeebLama Apr 24, 2023
084adda
Add preview links
SanjeebLama Apr 24, 2023
56410f9
Fix A1: configurations
SanjeebLama Apr 24, 2023
aad687d
Fix A2: configurations
SanjeebLama Apr 24, 2023
51b5de9
Merge pull request #19 from SanjeebLama/feature/lighthouse-ci-setup
SanjeebLama Apr 30, 2023
4745a32
Update README.md
SanjeebLama May 3, 2023
923d787
Merge pull request #22 from SanjeebLama/update-readme
SanjeebLama May 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,19 @@ jobs:
node-version: 16.x

- name: Install Dependencies
run: npm install
run: yarn

- name: Build App
run: npm run build
- name: Build App -- But do you we need to build here?
working-directory: apps/docs
#run: yarn workspace docs run build
run: yarn run build

- name: Deploy to Vercel
- name: Deploy apps/docs to Vercel
uses: amondnet/vercel-action@v20
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-args: --yes
build-dir: apps/docs/.next

- name: Wait for Deployment
run: |
Expand All @@ -36,6 +39,7 @@ jobs:

- name: Run Lighthouse Tests
run: |
cd apps/docs
npm install -g @lhci/[email protected]
lhci autorun
env:
Expand Down
189 changes: 189 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[![Jira](https://badgen.net/badge/icon/jira?icon=jira&label)](https://github.com/SanjeebLama/Frontend-Skeleton)
[![](https://img.shields.io/badge/Documentation-darkblue?style=flat&logo=notion&logoWidth=20&logoHeight=20)](https://github.com/SanjeebLama/Frontend-Skeleton)


# 🚀 Turbo Frontend Skeleton

Turbo Frontend Skeleton is a template designed to help streamline the process of creating new frontend projects. It comes equipped with all the latest stable dependencies that we use, allowing developers to get up and running quickly.
Expand Down Expand Up @@ -45,7 +46,195 @@ This turborepo has some additional tools already setup for you:
| TypeScript | A strict syntactical superset of JavaScript |
| ESLint | A pluggable linting utility for JavaScript and JSX |
| Prettier | An opinionated code formatter |



#### Project Tree

```
frontend-skeleton
├─ .vscode
│ └─ settings.json
├─ apps
│ ├─ docs
│ │ ├─ .eslintrc.js
│ │ ├─ README.md
│ │ ├─ next-env.d.ts
│ │ ├─ next.config.js
│ │ ├─ package.json
│ │ ├─ pages
│ │ │ ├─ _app.tsx
│ │ │ └─ index.tsx
│ │ ├─ postcss.config.js
│ │ ├─ styles
│ │ │ └─ globals.css
│ │ ├─ tailwind.config.js
│ │ └─ tsconfig.json
│ └─ web
│ ├─ .eslintrc.js
│ ├─ .lighthouseci
│ ├─ README.md
│ ├─ next-env.d.ts
│ ├─ next-i18next.config.js
│ ├─ next.config.js
│ ├─ package.json
│ ├─ pages
│ │ ├─ _app.tsx
│ │ ├─ _error.tsx
│ │ ├─ api
│ │ │ ├─ axios
│ │ │ │ └─ index.tsx
│ │ │ └─ error.tsx
│ │ ├─ index.tsx
│ │ └─ playground
│ │ ├─ axios
│ │ │ └─ index.tsx
│ │ ├─ index.tsx
│ │ ├─ react-form
│ │ │ └─ index.tsx
│ │ └─ users
│ │ └─ index.tsx
│ ├─ postcss.config.js
│ ├─ public
│ │ └─ static
│ │ ├─ assets
│ │ │ ├─ Axios.png
│ │ │ ├─ axios_example.png
│ │ │ ├─ i18-example.png
│ │ │ ├─ react-hook-form.png
│ │ │ └─ react-query-fetch.png
│ │ └─ locales
│ │ ├─ en
│ │ │ └─ common.json
│ │ └─ ja
│ │ └─ common.json
│ ├─ sentry.client.config.js
│ ├─ sentry.edge.config.js
│ ├─ sentry.server.config.js
│ ├─ services
│ │ ├─ axios.ts
│ │ └─ index.ts
│ ├─ styles
│ │ └─ globals.css
│ ├─ tailwind.config.js
│ └─ tsconfig.json
├─ package.json
├─ packages
│ ├─ next-i18next-config
│ │ ├─ next-i18next.config.js
│ │ └─ package.json
│ ├─ eslint-config-custom
│ │ ├─ index.js
│ │ └─ package.json
│ ├─ tailwind-config
│ │ ├─ package.json
│ │ ├─ postcss.config.js
│ │ └─ tailwind.config.js
│ ├─ tsconfig
│ │ ├─ README.md
│ │ ├─ base.json
│ │ ├─ nextjs.json
│ │ ├─ package.json
│ │ └─ react-library.json
│ └─ ui
│ ├─ .babelrc.json
│ ├─ .storybook
│ │ ├─ main.js
│ │ └─ preview.js
│ ├─ components
│ │ ├─ atoms
│ │ │ ├─ Axios
│ │ │ │ ├─ Drawer
│ │ │ │ │ └─ index.tsx
│ │ │ │ ├─ Modal
│ │ │ │ │ └─ index.tsx
│ │ │ │ ├─ Table
│ │ │ │ │ └─ index.tsx
│ │ │ │ └─ index.tsx
│ │ │ ├─ CustomDatePicker
│ │ │ │ └─ index.tsx
│ │ │ ├─ CustomInput
│ │ │ │ └─ index.tsx
│ │ │ ├─ CustomPasswordInput
│ │ │ │ └─ index.tsx
│ │ │ ├─ CustomSelect
│ │ │ │ └─ index.tsx
│ │ │ ├─ CustomizableButton
│ │ │ │ └─ index.tsx
│ │ │ ├─ DocumentationButton
│ │ │ │ └─ index.tsx
│ │ │ ├─ NumberInput
│ │ │ │ └─ index.tsx
│ │ │ ├─ RequiredIcon
│ │ │ │ └─ index.tsx
│ │ │ ├─ StoryButton
│ │ │ │ ├─ StoryButton.stories.tsx
│ │ │ │ └─ index.tsx
│ │ │ ├─ TechStackInfo
│ │ │ │ └─ index.tsx
│ │ │ └─ index.ts
│ │ ├─ index.ts
│ │ ├─ molecules
│ │ │ └─ index.ts
│ │ └─ organisms
│ │ └─ index.ts
│ ├─ index.tsx
│ ├─ package.json
│ ├─ postcss.config.js
│ ├─ stories
│ │ ├─ Button.stories.tsx
│ │ ├─ Button.tsx
│ │ ├─ Header.stories.tsx
│ │ ├─ Header.tsx
│ │ ├─ Introduction.stories.mdx
│ │ ├─ Page.stories.tsx
│ │ ├─ Page.tsx
│ │ ├─ assets
│ │ │ ├─ code-brackets.svg
│ │ │ ├─ colors.svg
│ │ │ ├─ comments.svg
│ │ │ ├─ direction.svg
│ │ │ ├─ flow.svg
│ │ │ ├─ plugin.svg
│ │ │ ├─ repo.svg
│ │ │ └─ stackalt.svg
│ │ ├─ button.css
│ │ ├─ header.css
│ │ └─ page.css
│ ├─ styles
│ │ └─ globals.css
│ ├─ tailwind.config.js
│ ├─ tsconfig.json
│ └─ types
│ ├─ FormData.tsx
│ └─ index.tsx
├─ .eslintrc.js
├─ .git
├─ .gitignore
├─ .nvmrc
├─ .prettierrc
├─ README.md
├─ turbo.json
└─ yarn.lock

```

**Atomic Design System for Component Development**
- Atomic Design System is a methodology for creating design systems by breaking down the UI into fundamental building blocks called atoms, molecules, and organisms.
- Atoms are the smallest and most basic building blocks, molecules are groups of atoms that work together to form more complex and functional components, and organisms are groups of molecules and atoms that work together to form a more complete section or module of the interface.
- By using Atomic Design System, designers and developers can create scalable, reusable, and consistent components that can be easily maintained and updated.
- This approach promotes a more efficient and collaborative design process by providing a common language and framework for designers and developers to work with, while delivering high-quality and user-friendly experiences.


** Naming Convention**
- Use a consistent and descriptive naming convention across all projects and components within the mono repo.
- Avoid using ambiguous or generic names that could create confusion or conflicts with other projects or components within the mono repo.
- Package names should be descriptive and easy to remember. For example, a package that contains code for a web server might be named my-web-server.
- Directory names should be similar to package names, but they should be more specific. For example, the directory that contains the code for the web server's main logic might be named src/web-server.
- File names should be descriptive and include the name of the file's contents. For example, a file that contains the code for the web server's main logic might be named main.js.
- Consider using a versioning scheme in the naming convention to indicate the version of the project or component (e.g., "app-v1.0", "lib-v2.3", "ui-v1.2.3", etc.).



<p align="right"><a href="#-turbo-frontend-skeleton">⬆️</a></p>

Expand Down
10 changes: 7 additions & 3 deletions apps/docs/lighthouserc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
module.exports = {
ci: {
collect: {
url: 'http://localhost:3001',
startServerCommand: 'yarn run dev',
// Use this for Prod / dev
url: [
`https://${process.env.PREVIEW_URL}`,
],
// url: 'http://localhost:3001',
startServerCommand:
process.env.NODE_ENV === 'production' ? undefined : 'npm run start',
},
assert: {
preset: 'lighthouse:no-pwa',
Expand All @@ -12,4 +17,3 @@ module.exports = {
},
},
};

15 changes: 11 additions & 4 deletions turbo.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
{
"$schema": "https://turbo.build/schema.json",
"globalDependencies": ["**/.env.*local"],
"globalDependencies": [
"**/.env.*local"
],
"pipeline": {
"build": {
"dependsOn": ["^build"],
"outputs": ["dist/**", ".next/**"]
"dependsOn": [
"^build"
],
"outputs": [
".next/**",
"!.next/cache/**"
]
},
"lint": {
"outputs": []
Expand All @@ -13,4 +20,4 @@
"cache": false
}
}
}
}