Skip to content

Commit ca59d82

Browse files
committed
Initial commit
0 parents  commit ca59d82

18 files changed

+8506
-0
lines changed

.gitignore

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/vscode
5+
/node_modules
6+
/.pnp
7+
.pnp.*
8+
.yarn/*
9+
!.yarn/patches
10+
!.yarn/plugins
11+
!.yarn/releases
12+
!.yarn/versions
13+
14+
# testing
15+
/coverage
16+
17+
# next.js
18+
/.next/
19+
/out/
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+
# env files (can opt-in for committing if needed)
35+
.env*
36+
37+
# vercel
38+
.vercel
39+
40+
# typescript
41+
*.tsbuildinfo
42+
next-env.d.ts

.husky/commit-msg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
npx commitlint --edit $1

.husky/pre-commit

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

.lintstagedrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"*.{js,jsx,ts,tsx}": ["eslint --fix", "prettier --write"],
3+
"*.{json,css,scss,md}": ["prettier --write"]
4+
}

.npmrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Save exact versions (no ^ or ~) when installing packages
2+
save-exact=true
3+
# Ensure no prefix is added (redundant with save-exact but keeps filenames clean)
4+
save-prefix=""

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"semi": false,
3+
"singleQuote": true,
4+
"trailingComma": "none",
5+
"endOfLine": "auto"
6+
}

README.md

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# 🚀 Initial Next.js + Tailwind Project
2+
3+
This project is a modern and scalable starter template, set up with Next.js (React) and Tailwind CSS. It includes robust configuration for code quality, formatting, and commit management using TypeScript, ESLint, Prettier, Husky/Commitlint and Lint-Staged.
4+
5+
## 🛠️ Key Technologies
6+
7+
- [Next.js](https://nextjs.org/): React framework for developing full-stack web applications with hybrid rendering.
8+
9+
- [React](https://react.dev/) & [React DOM](https://react.dev/learn): The JavaScript library for building user interfaces.
10+
11+
- [Tailwind CSS](https://tailwindcss.com/): A utility-first CSS framework for building designs quickly and flexibly.
12+
13+
- [TypeScript](https://www.typescriptlang.org/): A superset of JavaScript that adds static typing.
14+
15+
- [ESLint](https://eslint.org/): For detecting problems and ensuring compliance with coding standards.
16+
17+
- [Prettier](https://prettier.io/): For automatic code formatting.
18+
19+
- [Husky](https://typicode.github.io/husky/) & [Commitlint](https://commitlint.js.org/): To ensure that all commit messages follow the Conventional Commits standard.
20+
21+
- [Lint-Staged](https://github.com/okonet/lint-staged): Runs linting and formatting commands only on staged files before commit.
22+
23+
## 🌟 First Steps
24+
25+
### Requirements
26+
27+
Asegúrate de tener **[Node.js](https://nodejs.org/)** (versión LTS recomendada) y **npm** instalados en tu sistema.
28+
29+
### Installation:
30+
31+
1. Clone the repository:
32+
33+
```
34+
git clone <URL_OF_THE_REPOSITORY>
35+
cd nextflow-starter
36+
```
37+
38+
2. Install the dependencies:
39+
40+
```
41+
npm install or npm i
42+
```
43+
44+
**⚠️ WARNING:**
45+
_The dependencies have exact versions. Run the **`npm upgrade`** command to update to the latest versions if desired._
46+
47+
3. Configure Husky (required for pre-commit and pre-push git hooks):
48+
49+
```
50+
npm run prepare
51+
```
52+
53+
## ⚙️ Available Scripts
54+
55+
At the root of the project, you can run the following commands:
56+
57+
| Command | Description |
58+
| :---------------- | :----------------------------------------------------------------------------------------------------- |
59+
| `npm run dev` | Start the application in development mode. It can be accessed at http://localhost:3000. |
60+
| `npm run build ` | Start the production server after running npm run build. |
61+
| `npm run start` | Runs the production server after npm run build. |
62+
| `npm run lint` | Runs ESLint to analyze code and automatically fixes fixable issues. |
63+
| `npm run format` | Run Prettier to automatically format files, followed by npm run lint to apply automatic linting fixes. |
64+
| `npm run prepare` | Configure Husky's git hooks. Must be run after cloning the project. |
65+
66+
## 📐 Code Standards and Commits
67+
68+
### 💡 Code Format and Style
69+
70+
The `npm run format` and `npm run lint` commands help you keep your code clean. What's more, thanks to Husky and lint-staged, your code is automatically formatted and checked (linted) before each commit.
71+
72+
#### 📝 Commit Convention
73+
74+
The project uses Husky and Commitlint to enforce the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard.
75+
76+
When you make a commit, your message should follow a specific format, such as:
77+
78+
> feat(component): add support for dark mode
79+
> fix(api): fix bug when obtaining user data
80+
81+
#### ⚠️ IMPORTANT NOTE FOR THE FIRST COMMIT:
82+
83+
> _If you run npm run prepare before the first commit, the traditional message such as "Initial commit" will fail. You must use a valid commit type, for example:_
84+
85+
```
86+
git commit -m "chore: initial project setup"
87+
```
88+
89+
#### Example of Permitted Commit Types:
90+
91+
- **feat:** New functionality.
92+
- **fix:** Bug fix.
93+
94+
- **chore:** General maintenance (updating dependencies, etc.).
95+
96+
- **refactor:** Code restructuring that does not introduce functionality or fix bugs.
97+
98+
- **style:** Changes that do not affect logic (spacing, formatting, etc.).
99+
100+
- **test:** Adding or modifying tests.
101+
102+
- **docs:** Changes to documentation.
103+
104+
**_Any commit that does not comply with this format will be blocked by Husky and Commitlint._**
105+
106+
---

app/fonts.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { Montserrat, Lusitana } from 'next/font/google'
2+
3+
export const montserratSans = Montserrat({
4+
variable: '--font-montserrat',
5+
subsets: ['latin']
6+
})
7+
8+
export const lusitanaSerif = Lusitana({
9+
variable: '--font-lusitana',
10+
weight: ['400', '700'],
11+
subsets: ['latin']
12+
})

app/globals.css

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
@import 'tailwindcss';
2+
3+
:root {
4+
--background: #ffffff;
5+
--foreground: #171717;
6+
--font-montserrat-sans: 'Montserrat', sans-serif;
7+
--font-lusitana-serif: 'Lusitana', serif;
8+
}
9+
10+
@theme {
11+
--color-background: var(--background);
12+
--color-foreground: var(--foreground);
13+
--font-sans: var(--font-montserrat-sans);
14+
--font-serif: var(--font-lusitana-serif);
15+
}
16+
17+
@media (prefers-color-scheme: dark) {
18+
:root {
19+
--background: #0a0a0a;
20+
--foreground: #ededed;
21+
}
22+
}
23+
24+
body {
25+
background-color: var(--background);
26+
color: var(--foreground);
27+
}

app/layout.tsx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import type { Metadata } from 'next'
2+
import { lusitanaSerif, montserratSans } from './fonts'
3+
import './globals.css'
4+
5+
export const metadata: Metadata = {
6+
title: 'My Project',
7+
description: 'My starter Project'
8+
}
9+
10+
export default function RootLayout({
11+
children
12+
}: Readonly<{
13+
children: React.ReactNode
14+
}>) {
15+
return (
16+
<html lang="en">
17+
<body
18+
className={`bg-background text-foreground font-sans ${montserratSans.variable} ${lusitanaSerif.variable} antialiased`}
19+
>
20+
{children}
21+
</body>
22+
</html>
23+
)
24+
}

0 commit comments

Comments
 (0)