Skip to content

Commit 74f6ff1

Browse files
committed
Initial commit from Create Next App
0 parents  commit 74f6ff1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+12618
-0
lines changed

.env.example

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# When adding additional environment variables, the schema in "/src/env.js"
2+
# should be updated accordingly.
3+
4+
# Example:
5+
# SERVERVAR="foo"
6+
# NEXT_PUBLIC_CLIENTVAR="bar"
7+
8+
# Server-side environment variables
9+
NODE_ENV=development
10+
# POSTGRES_URL=""
11+
12+
# Client-side environment variables
13+
NEXT_PUBLIC_APP_URL=http://localhost:3000

.eslintrc.cjs

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/** @type {import("eslint").Linter.Config} */
2+
const config = {
3+
parser: "@typescript-eslint/parser",
4+
parserOptions: {
5+
project: true,
6+
},
7+
plugins: ["@typescript-eslint"],
8+
extends: [
9+
"next/core-web-vitals",
10+
"plugin:@typescript-eslint/recommended-type-checked",
11+
"plugin:@typescript-eslint/stylistic-type-checked",
12+
],
13+
rules: {
14+
"@typescript-eslint/array-type": "off",
15+
"@typescript-eslint/consistent-type-definitions": "off",
16+
"@typescript-eslint/consistent-type-imports": [
17+
"warn",
18+
{
19+
prefer: "type-imports",
20+
fixStyle: "inline-type-imports",
21+
},
22+
],
23+
"@typescript-eslint/no-unused-vars": [
24+
"warn",
25+
{
26+
argsIgnorePattern: "^_",
27+
},
28+
],
29+
"@typescript-eslint/require-await": "off",
30+
"@typescript-eslint/no-misused-promises": [
31+
"error",
32+
{
33+
checksVoidReturn: {
34+
attributes: false,
35+
},
36+
},
37+
],
38+
},
39+
}
40+
module.exports = config

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.gitignore

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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+
# testing
9+
/coverage
10+
11+
# database
12+
/prisma/db.sqlite
13+
/prisma/db.sqlite-journal
14+
db.sqlite
15+
16+
# next.js
17+
/.next/
18+
/out/
19+
next-env.d.ts
20+
21+
# production
22+
/build
23+
24+
# misc
25+
.DS_Store
26+
*.pem
27+
28+
# debug
29+
npm-debug.log*
30+
yarn-debug.log*
31+
yarn-error.log*
32+
.pnpm-debug.log*
33+
34+
# local env files
35+
# do not commit any .env files to git, except for the .env.example file. https://create.t3.gg/en/usage/env-variables#using-environment-variables
36+
.env
37+
.env*.local
38+
39+
# vercel
40+
.vercel
41+
42+
# typescript
43+
*.tsbuildinfo
44+
45+
/public/sw.js

.prettierignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
dist
2+
node_modules
3+
.next
4+
package.json
5+
pnpm-lock.yaml

.vscode/launch.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Next.js: debug server-side",
6+
"type": "node-terminal",
7+
"request": "launch",
8+
"command": "bun run dev"
9+
},
10+
{
11+
"name": "Next.js: debug client-side",
12+
"type": "chrome",
13+
"request": "launch",
14+
"url": "http://localhost:3000"
15+
}
16+
]
17+
}

.vscode/settings.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"editor.formatOnSave": true,
3+
"editor.defaultFormatter": "esbenp.prettier-vscode",
4+
"typescript.tsdk": "node_modules\\typescript\\lib"
5+
}

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 THEALIFHAKER1
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.

README.md

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# NEXT INITIATE
2+
3+
NEXT.js 14+ starter template with app router, shadcn/ui, typesafe env, icons and configs setup.
4+
5+
## Usage
6+
7+
1. Setup a project using the template
8+
9+
```bash
10+
pnpm create next-app -e https://github.com/THEALIFHAKER1/NEXT-INITIATE
11+
```
12+
13+
```bash
14+
npx create-next-app -e https://github.com/THEALIFHAKER1/NEXT-INITIATE
15+
```
16+
17+
```bash
18+
yarn create next-app -e https://github.com/THEALIFHAKER1/NEXT-INITIATE
19+
```
20+
21+
```bash
22+
bunx create-next-app -e https://github.com/THEALIFHAKER1/NEXT-INITIATE
23+
```
24+
25+
2. Copy `.env.example` to `.env.local`
26+
27+
```bash
28+
cp .env.example .env.local
29+
```
30+
31+
## Features
32+
33+
This template uses [shadcn](https://github.com/shadcn)'s Next.js app structure from [shadcn/ui](https://ui.shadcn.com/).
34+
35+
- Next.js 14+ `/app` router
36+
- TypeScript
37+
- Tailwind CSS
38+
- shadcn/ui (Radix UI + Tailwind)
39+
- Prettier (w/ auto sort imports and tailwind classes)
40+
- SEO optimized
41+
- Typesafe env, icons, and config
42+
- Ready to use - jump right into development
43+
44+
## Scripts
45+
46+
If you are using a different package manager, be sure to update the package.json format scripts.
47+
48+
1. Check project formatting
49+
50+
```bash
51+
yarn format:check
52+
```
53+
54+
2. Format the project
55+
56+
```bash
57+
yarn format
58+
```

bun.lockb

301 KB
Binary file not shown.

components.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "new-york",
4+
"rsc": true,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "tailwind.config.ts",
8+
"css": "src/styles/globals.css",
9+
"baseColor": "neutral",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"aliases": {
14+
"components": "@/components",
15+
"utils": "@/lib/utils"
16+
}
17+
}

icon.png

16.9 KB
Loading

icon_converter.py

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
from PIL import Image
2+
import os
3+
4+
# List of icon sizes for PNG files
5+
icon_sizes = [
6+
(16, 16),
7+
(32, 32),
8+
(72, 72),
9+
(96, 96),
10+
(128, 128),
11+
(144, 144),
12+
(152, 152),
13+
(180, 180),
14+
(192, 192),
15+
(384, 384),
16+
(512, 512)
17+
]
18+
19+
def resize_and_save(input_image_path, output_directory, ico_directory):
20+
# Load the input image
21+
img = Image.open(input_image_path)
22+
23+
# Ensure the output directory exists
24+
os.makedirs(output_directory, exist_ok=True)
25+
26+
# Ensure the ICO output directory exists
27+
os.makedirs(ico_directory, exist_ok=True)
28+
29+
# Variable to hold the 32x32 image for the ICO file
30+
img_32x32 = None
31+
32+
# Process each size
33+
for size in icon_sizes:
34+
resized_img = img.resize(size, Image.LANCZOS)
35+
output_path = os.path.join(output_directory, f'icon-{size[0]}x{size[1]}.png')
36+
resized_img.save(output_path)
37+
print(f'Saved: {output_path}')
38+
39+
# Save the 32x32 image for the ICO file
40+
if size == (32, 32):
41+
img_32x32 = resized_img
42+
43+
# Save the ICO file if the 32x32 image was created
44+
if img_32x32:
45+
ico_output_path = os.path.join(ico_directory, 'favicon.ico')
46+
img_32x32.save(ico_output_path, format='ICO')
47+
print(f'Saved: {ico_output_path}')
48+
49+
if __name__ == '__main__':
50+
# Input image path
51+
input_image_path = 'icon.png' # Replace with your image path
52+
53+
# Output directory to save resized images
54+
output_directory = 'public/icons'
55+
56+
# Directory to save the ICO file
57+
ico_directory = 'public'
58+
59+
# Call the function
60+
resize_and_save(input_image_path, output_directory, ico_directory)

next.config.mjs

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/** @type {import('next').NextConfig} */
2+
import withSerwistInit from "@serwist/next"
3+
4+
const nextConfig = {
5+
images: {
6+
remotePatterns: [
7+
{
8+
protocol: "https",
9+
hostname: "via.placeholder.com",
10+
},
11+
],
12+
},
13+
}
14+
15+
const withSerwist = withSerwistInit({
16+
swSrc: "src/app/sw.ts",
17+
swDest: "public/sw.js",
18+
})
19+
20+
export default withSerwist(nextConfig)

0 commit comments

Comments
 (0)