create-fe-boilerplate 0.4.1 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -0
- package/package.json +1 -1
- package/templates/next/js/scss/axios/README.md +36 -0
- package/templates/next/js/scss/axios/eslint.config.mjs +18 -0
- package/templates/next/js/scss/axios/jsconfig.json +8 -0
- package/templates/next/js/scss/axios/next.config.js +5 -0
- package/templates/next/js/scss/axios/package-lock.json +6950 -0
- package/templates/next/js/scss/axios/package.json +23 -0
- package/templates/next/js/scss/axios/postcss.config.mjs +7 -0
- package/templates/next/js/scss/axios/public/file.svg +1 -0
- package/templates/next/js/scss/axios/public/globe.svg +1 -0
- package/templates/next/js/scss/axios/public/next.svg +1 -0
- package/templates/next/js/scss/axios/public/vercel.svg +1 -0
- package/templates/next/js/scss/axios/public/window.svg +1 -0
- package/templates/next/js/scss/axios/src/api/auth.js +7 -0
- package/templates/next/js/scss/axios/src/api/axios.js +16 -0
- package/templates/next/js/scss/axios/src/app/dashboard/Dashboard.scss +35 -0
- package/templates/next/js/scss/axios/src/app/dashboard/page.jsx +30 -0
- package/templates/next/js/scss/axios/src/app/favicon.ico +0 -0
- package/templates/next/js/scss/axios/src/app/layout.jsx +9 -0
- package/templates/next/js/scss/axios/src/app/login/Login.scss +58 -0
- package/templates/next/js/scss/axios/src/app/login/page.jsx +61 -0
- package/templates/next/js/scss/axios/src/app/page.jsx +5 -0
- package/templates/next/js/scss/axios/src/app/signup/Signup.scss +58 -0
- package/templates/next/js/scss/axios/src/app/signup/page.jsx +45 -0
- package/templates/next/js/scss/axios/src/components/AuthGuard.jsx +32 -0
- package/templates/next/js/scss/axios/src/components/VerifyOtpModal.jsx +51 -0
- package/templates/next/js/scss/axios/src/components/VerifyOtpModal.scss +66 -0
- package/templates/next/js/scss/axios/src/styles/globals.scss +10 -0
- package/templates/next/ts/scss/axios/README.md +36 -0
- package/templates/next/ts/scss/axios/eslint.config.mjs +18 -0
- package/templates/next/ts/scss/axios/next.config.ts +7 -0
- package/templates/next/ts/scss/axios/package-lock.json +6997 -0
- package/templates/next/ts/scss/axios/package.json +28 -0
- package/templates/next/ts/scss/axios/postcss.config.mjs +7 -0
- package/templates/next/ts/scss/axios/public/file.svg +1 -0
- package/templates/next/ts/scss/axios/public/globe.svg +1 -0
- package/templates/next/ts/scss/axios/public/next.svg +1 -0
- package/templates/next/ts/scss/axios/public/vercel.svg +1 -0
- package/templates/next/ts/scss/axios/public/window.svg +1 -0
- package/templates/next/ts/scss/axios/src/api/auth.ts +10 -0
- package/templates/next/ts/scss/axios/src/api/axios.ts +31 -0
- package/templates/next/ts/scss/axios/src/app/dashboard/Dashboard.scss +35 -0
- package/templates/next/ts/scss/axios/src/app/dashboard/page.tsx +30 -0
- package/templates/next/ts/scss/axios/src/app/favicon.ico +0 -0
- package/templates/next/ts/scss/axios/src/app/layout.tsx +13 -0
- package/templates/next/ts/scss/axios/src/app/login/Login.scss +58 -0
- package/templates/next/ts/scss/axios/src/app/login/page.tsx +60 -0
- package/templates/next/ts/scss/axios/src/app/page.tsx +5 -0
- package/templates/next/ts/scss/axios/src/app/signup/Signup.scss +58 -0
- package/templates/next/ts/scss/axios/src/app/signup/page.tsx +45 -0
- package/templates/next/ts/scss/axios/src/components/AuthGuard.tsx +35 -0
- package/templates/next/ts/scss/axios/src/components/VerifyOtpModal.scss +66 -0
- package/templates/next/ts/scss/axios/src/components/VerifyOtpModal.tsx +57 -0
- package/templates/next/ts/scss/axios/src/styles/globals.scss +10 -0
- package/templates/next/ts/scss/axios/tsconfig.json +36 -0
package/README.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# create-fe-boilerplate
|
|
2
|
+
|
|
3
|
+
A powerful CLI tool to quickly scaffold modern React and Next.js applications. It comes pre-configured with essential features like authentication, OTP verification, and multiple styling and state management options.
|
|
4
|
+
|
|
5
|
+
## 🚀 Features
|
|
6
|
+
|
|
7
|
+
- **Frameworks**: React.js, Next.js
|
|
8
|
+
- **Languages**: TypeScript, JavaScript
|
|
9
|
+
- **Styling**: Tailwind CSS, SCSS (Modular)
|
|
10
|
+
- **API & State Management**: Axios, Redux Toolkit (RTK) Query
|
|
11
|
+
- **Auth Flow**: Built-in Login, Signup, and OTP Verification components
|
|
12
|
+
- **Modern UI**: Clean, responsive, and easy-to-customize designs
|
|
13
|
+
|
|
14
|
+
## 📦 Installation
|
|
15
|
+
|
|
16
|
+
You can use the CLI directly via `npx`:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npx create-fe-boilerplate
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Or install it globally:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm install -g create-fe-boilerplate
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## 🛠️ Usage
|
|
29
|
+
|
|
30
|
+
Simply run the command and follow the interactive prompts to choose your project configuration:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
create-fe-boilerplate
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Prompt Options:
|
|
37
|
+
|
|
38
|
+
1. **Project Name**: Enter the name of your project.
|
|
39
|
+
2. **Framework**: Choose between `React` or `Next.js`.
|
|
40
|
+
3. **Language**: Choose `TypeScript` or `JavaScript`.
|
|
41
|
+
4. **Styling**: Choose `Tailwind CSS` or `SCSS`.
|
|
42
|
+
5. **API/State Management**: Choose `Axios` or `Redux Toolkit (RTK)`.
|
|
43
|
+
|
|
44
|
+
## 📂 Project Structure
|
|
45
|
+
|
|
46
|
+
The generated project will have a clean and organized structure:
|
|
47
|
+
|
|
48
|
+
- `src/api`: API configuration and helper functions.
|
|
49
|
+
- `src/components`: Reusable UI components (including Auth modals).
|
|
50
|
+
- `src/pages` or `src/app`: Application routes and page components.
|
|
51
|
+
- `src/styles`: Global and component-specific styles.
|
|
52
|
+
- `src/utils`: Utility functions (Encryption, etc.).
|
|
53
|
+
|
|
54
|
+
## 🔐 Authentication Flow
|
|
55
|
+
|
|
56
|
+
The boilerplate includes a pre-built authentication flow:
|
|
57
|
+
|
|
58
|
+
- **Login**: Email/Password login with optional OTP trigger.
|
|
59
|
+
- **Signup**: User registration.
|
|
60
|
+
- **OTP Verification**: A modal-based OTP verification system.
|
|
61
|
+
- **Auth Guard**: Protected routes to ensure only authenticated users can access specific pages.
|
|
62
|
+
|
|
63
|
+
## 📄 License
|
|
64
|
+
|
|
65
|
+
This project is licensed under the ISC License.
|
package/package.json
CHANGED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
|
|
2
|
+
|
|
3
|
+
## Getting Started
|
|
4
|
+
|
|
5
|
+
First, run the development server:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm run dev
|
|
9
|
+
# or
|
|
10
|
+
yarn dev
|
|
11
|
+
# or
|
|
12
|
+
pnpm dev
|
|
13
|
+
# or
|
|
14
|
+
bun dev
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
|
18
|
+
|
|
19
|
+
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
|
|
20
|
+
|
|
21
|
+
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
|
|
22
|
+
|
|
23
|
+
## Learn More
|
|
24
|
+
|
|
25
|
+
To learn more about Next.js, take a look at the following resources:
|
|
26
|
+
|
|
27
|
+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
|
28
|
+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
|
29
|
+
|
|
30
|
+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
|
|
31
|
+
|
|
32
|
+
## Deploy on Vercel
|
|
33
|
+
|
|
34
|
+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
|
35
|
+
|
|
36
|
+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineConfig, globalIgnores } from "eslint/config";
|
|
2
|
+
import nextVitals from "eslint-config-next/core-web-vitals";
|
|
3
|
+
import nextTs from "eslint-config-next/typescript";
|
|
4
|
+
|
|
5
|
+
const eslintConfig = defineConfig([
|
|
6
|
+
...nextVitals,
|
|
7
|
+
...nextTs,
|
|
8
|
+
// Override default ignores of eslint-config-next.
|
|
9
|
+
globalIgnores([
|
|
10
|
+
// Default ignores of eslint-config-next:
|
|
11
|
+
".next/**",
|
|
12
|
+
"out/**",
|
|
13
|
+
"build/**",
|
|
14
|
+
"next-env.d.ts",
|
|
15
|
+
]),
|
|
16
|
+
]);
|
|
17
|
+
|
|
18
|
+
export default eslintConfig;
|