Skip to content

Commit 827616f

Browse files
committed
next-loginradius app complete
1 parent d5fa0f7 commit 827616f

26 files changed

+9248
-0
lines changed

next-loginradius/.commitlintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"]
3+
}

next-loginradius/.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
charset = utf-8
7+
end_of_line = lf
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true

next-loginradius/.eslintrc

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"plugins": ["prettier"],
3+
"extends": ["next", "next/core-web-vitals", "prettier"],
4+
"rules": {
5+
"prettier/prettier": "error",
6+
"camelcase": "off",
7+
"import/prefer-default-export": "off",
8+
"react/jsx-filename-extension": "off",
9+
"react/jsx-props-no-spreading": "off",
10+
"react/no-unused-prop-types": "off",
11+
"react/require-default-props": "off",
12+
"import/extensions": [
13+
"error",
14+
"ignorePackages",
15+
{
16+
"ts": "never",
17+
"tsx": "never",
18+
"js": "never",
19+
"jsx": "never"
20+
}
21+
],
22+
"quotes": "off",
23+
"jsx-a11y/anchor-is-valid": [
24+
"error",
25+
{
26+
"components": ["Link"],
27+
"specialLink": ["hrefLeft", "hrefRight"],
28+
"aspects": ["invalidHref", "preferButton"]
29+
}
30+
]
31+
},
32+
"overrides": [
33+
{
34+
"files": "**/*.+(ts|tsx)",
35+
"parser": "@typescript-eslint/parser",
36+
"plugins": ["@typescript-eslint/eslint-plugin"],
37+
"extends": ["plugin:@typescript-eslint/recommended", "prettier"],
38+
"rules": {
39+
"@typescript-eslint/explicit-function-return-type": "off",
40+
"@typescript-eslint/explicit-module-boundary-types": "off",
41+
"no-use-before-define": [0],
42+
"@typescript-eslint/no-use-before-define": [1],
43+
"@typescript-eslint/no-explicit-any": "off",
44+
"@typescript-eslint/no-var-requires": "off",
45+
"@typescript-eslint/quotes": [
46+
2,
47+
"backtick",
48+
{
49+
"avoidEscape": true
50+
}
51+
]
52+
}
53+
}
54+
]
55+
}

next-loginradius/.gitignore

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# JetBrains IDE files
9+
.idea/
10+
11+
# testing
12+
/coverage
13+
14+
# next.js
15+
/.next/
16+
/out/
17+
18+
# production
19+
/build
20+
21+
# misc
22+
.DS_Store
23+
*.pem
24+
tsconfig.tsbuildinfo
25+
26+
# debug
27+
npm-debug.log*
28+
yarn-debug.log*
29+
yarn-error.log*
30+
31+
# local env files
32+
.env
33+
.env.local
34+
.env.development.local
35+
.env.test.local
36+
.env.production.local
37+
38+
# vercel
39+
.vercel

next-loginradius/.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
save-exact = true

next-loginradius/.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
12.22

next-loginradius/.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"trailingComma": "all",
3+
"singleQuote": true,
4+
"printWidth": 80,
5+
"tabWidth": 2
6+
}

next-loginradius/LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 João Pedro Schmitz
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

next-loginradius/README.md

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
<p align="center">
2+
<img src="https://user-images.githubusercontent.com/26466516/141659551-d7ba5630-7200-46fe-863b-87818dae970a.png" alt="Next.js TypeScript Starter">
3+
</p>
4+
5+
<br />
6+
7+
<div align="center"><strong>Non-opinionated TypeScript starter for Next.js</strong></div>
8+
<div align="center">Highly scalable foundation with the best DX. All the tools you need to build your next project.</div>
9+
10+
<br />
11+
12+
<div align="center">
13+
<img src="https://img.shields.io/static/v1?label=PRs&message=welcome&style=flat-square&color=5e17eb&labelColor=000000" alt="PRs welcome!" />
14+
15+
<img alt="License" src="https://img.shields.io/github/license/jpedroschmitz/typescript-nextjs-starter?style=flat-square&color=5e17eb&labelColor=000000">
16+
17+
<a href="https://twitter.com/intent/follow?screen_name=jpedroschmitz">
18+
<img src="https://img.shields.io/twitter/follow/jpedroschmitz?style=flat-square&color=5e17eb&labelColor=000000" alt="Follow @jpedroschmitz" />
19+
</a>
20+
</div>
21+
22+
<div align="center">
23+
<sub>Created by <a href="https://twitter.com/jpedroschmitz">João Pedro</a> with the help of many <a href="https://github.com/jpedroschmitz/typescript-nextjs-starter/graphs/contributors">wonderful contributors</a>.</sub>
24+
</div>
25+
26+
<br />
27+
28+
## Features
29+
30+
- ⚡️ Next.js 12
31+
- ⚛️ React 18
32+
- ⛑ TypeScript
33+
- 📏 ESLint — To find and fix problems in your code
34+
- 💖 Prettier — Code Formatter for consistent style
35+
- 🐶 Husky — For running scripts before committing
36+
- 📄 Commitizen — To define a standard way of committing rules
37+
- 🚓 Commitlint — To make sure your commit messages follow the convention
38+
- 🖌 Renovate — To keep your dependencies up to date
39+
- 🚫 lint-staged — Run ESLint and Prettier against staged Git files
40+
- 👷 PR Workflow — Run Type Check & Linters on Pull Requests
41+
- ⚙️ EditorConfig - Consistent coding styles across editors and IDEs
42+
- 🗂 Path Mapping — Import components or images using the `@` prefix
43+
44+
## Quick Start
45+
46+
The best way to start with this template is using [Create Next App](https://nextjs.org/docs/api-reference/create-next-app).
47+
48+
```
49+
yarn create next-app -e https://github.com/jpedroschmitz/typescript-nextjs-starter
50+
# or
51+
npx create-next-app -e https://github.com/jpedroschmitz/typescript-nextjs-starter
52+
```
53+
54+
### Development
55+
56+
To start the project locally, run:
57+
58+
```bash
59+
yarn dev
60+
```
61+
62+
Open `http://localhost:3000` with your browser to see the result.
63+
64+
## Testimonials
65+
66+
> [**“This starter is by far the best TypeScript starter for Next.js. Feature packed but un-opinionated at the same time!”**](https://github.com/jpedroschmitz/typescript-nextjs-starter/issues/87#issue-789642190)<br>
67+
> — Arafat Zahan
68+
69+
> [**“I can really recommend the Next.js Typescript Starter repo as a solid foundation for your future Next.js projects.”**](https://corfitz.medium.com/create-a-custom-create-next-project-command-2a6b35a1c8e6)<br>
70+
> — Corfitz
71+
72+
> [**“Brilliant work!”**](https://github.com/jpedroschmitz/typescript-nextjs-starter/issues/87#issuecomment-769314539)<br>
73+
> — Soham Dasgupta
74+
75+
## Showcase
76+
77+
List of websites that started off with Next.js TypeScript Starter:
78+
79+
- [dowhile.io](https://dowhile.io)
80+
- [graphcms.com](https://graphcms.com)
81+
- [mobg.com.br](https://mobg.com.br)
82+
- [nextlevelweek.com](https://nextlevelweek.com)
83+
- [rocketseat.com.br](https://www.rocketseat.com.br)
84+
85+
## Documentation
86+
87+
### Requirements
88+
89+
- Node.js >= 12.22.0
90+
- Yarn 1 (Classic)
91+
92+
### Directory Structure
93+
94+
- [`.github`](.github) — GitHub configuration including the CI workflow.<br>
95+
- [`.husky`](.husky) — Husky configuration and hooks.<br>
96+
- [`public`](./public) — Static assets such as robots.txt, images, and favicon.<br>
97+
- [`src`](./src) — Application source code, including pages, components, styles.
98+
99+
### Scripts
100+
101+
- `yarn dev` — Starts the application in development mode at `http://localhost:3000`.
102+
- `yarn build` — Creates an optimized production build of your application.
103+
- `yarn start` — Starts the application in production mode.
104+
- `yarn type-check` — Validate code using TypeScript compiler.
105+
- `yarn lint` — Runs ESLint for all files in the `src` directory.
106+
- `yarn format` — Runs Prettier for all files in the `src` directory.
107+
- `yarn commit` — Run commitizen. Alternative to `git commit`.
108+
109+
### Path Mapping
110+
111+
TypeScript are pre-configured with custom path mappings. To import components or files, use the `@` prefix.
112+
113+
```tsx
114+
import { Button } from '@/components/Button';
115+
116+
// To import images or other files from the public folder
117+
import avatar from '@/public/avatar.png';
118+
```
119+
120+
### Switch to npm
121+
122+
This starter uses Yarn 1 (Classic) by default, but this choice is yours. If you'd like to switch to npm, delete the `yarn.lock` file, install the dependencies with `npm i`, change the CI workflow, and Husky Git hooks to use npm commands.
123+
124+
## License
125+
126+
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for more information.

next-loginradius/next-env.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference types="next" />
2+
/// <reference types="next/image-types/global" />
3+
4+
// NOTE: This file should not be edited
5+
// see https://nextjs.org/docs/basic-features/typescript for more information.

next-loginradius/next.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
reactStrictMode: true,
3+
};

next-loginradius/package.json

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"name": "typescript-nextjs-starter",
3+
"description": "A TypeScript starter for Next.js that includes all you need to build amazing projects",
4+
"version": "1.0.0",
5+
"private": true,
6+
"author": "João Pedro Schmitz <hey@joaopedro.dev> (@jpedroschmitz)",
7+
"license": "MIT",
8+
"keywords": [
9+
"nextjs",
10+
"starter",
11+
"typescript"
12+
],
13+
"scripts": {
14+
"dev": "next",
15+
"build": "next build",
16+
"start": "next start",
17+
"type-check": "tsc",
18+
"lint": "eslint --ignore-path .gitignore \"src/**/*.+(ts|js|tsx)\"",
19+
"format": "prettier --ignore-path .gitignore \"src/**/*.+(ts|js|tsx)\" --write",
20+
"commit": "cz"
21+
},
22+
"lint-staged": {
23+
"./src/**/*.{ts,js,jsx,tsx}": [
24+
"eslint --ignore-path .gitignore --fix",
25+
"prettier --ignore-path .gitignore --write"
26+
]
27+
},
28+
"dependencies": {
29+
"@chakra-ui/react": "2.2.1",
30+
"@emotion/react": "^11",
31+
"@emotion/styled": "^11",
32+
"framer-motion": "^6",
33+
"loginradius-react": "0.2.0",
34+
"next": "12.1.6",
35+
"react": "18.2.0",
36+
"react-dom": "18.2.0"
37+
},
38+
"devDependencies": {
39+
"@commitlint/cli": "17.0.3",
40+
"@commitlint/config-conventional": "17.0.3",
41+
"@types/node": "16.11.41",
42+
"@types/react": "18.0.14",
43+
"@types/react-dom": "18.0.5",
44+
"@typescript-eslint/eslint-plugin": "5.30.0",
45+
"@typescript-eslint/parser": "5.30.0",
46+
"commitizen": "4.2.4",
47+
"cz-conventional-changelog": "3.3.0",
48+
"eslint": "8.18.0",
49+
"eslint-config-next": "12.1.6",
50+
"eslint-config-prettier": "8.5.0",
51+
"eslint-import-resolver-typescript": "2.7.1",
52+
"eslint-plugin-prettier": "4.0.0",
53+
"husky": "8.0.1",
54+
"lint-staged": "13.0.3",
55+
"prettier": "2.7.1",
56+
"typescript": "4.7.4"
57+
},
58+
"config": {
59+
"commitizen": {
60+
"path": "cz-conventional-changelog"
61+
}
62+
}
63+
}

0 commit comments

Comments
 (0)